File Coverage

lib/Kephra/Help.pm
Criterion Covered Total %
statement 6 27 22.2
branch 0 6 0.0
condition n/a
subroutine 2 19 10.5
pod 0 12 0.0
total 8 64 12.5


line stmt bran cond sub pod time code
1             package Kephra::Help;
2             our $VERSION = '0.04';
3            
4 1     1   1475 use strict;
  1         3  
  1         89  
5 1     1   7 use warnings;
  1         3  
  1         653  
6            
7             my $dir;
8 0 0   0     sub _dir { if (defined $_[0]) {$dir = $_[0]} else {$dir} }
  0            
  0            
9 0     0     sub _hf { Kephra::Document::add ( File::Spec->catfile( $dir, shift ) ) }
10 0     0     sub _config { Kephra::API::settings()->{texts} }
11            
12 0     0 0   sub welcome { _hf _config()->{welcome}}
13 0     0 0   sub version_text { _hf _config()->{version}}
14 0     0 0   sub licence_gpl { _hf _config()->{license}}
15 0     0 0   sub feature_tour { _hf _config()->{feature}}
16 0     0 0   sub advanced_tour { _hf _config()->{special}}
17 0     0 0   sub navigation_guide { _hf _config()->{navigation}}
18 0     0 0   sub credits { _hf _config()->{credits}}
19 0     0 0   sub keyboard_map { _hf _config()->{keymap}}
20            
21 0     0     sub _web_page { Wx::LaunchDefaultBrowser( $_[0] ) }
22 0     0     sub _lang { lc Kephra::Config::Localisation::language() }
23            
24             sub online_documentation {
25 0 0   0 0   my $url = _lang() eq 'deutsch'
26             ? 'http://kephra.sourceforge.net/site/de/documentation.shtml'
27             : 'http://kephra.sourceforge.net/site/en/documentation.shtml';
28 0           _web_page($url);
29             }
30            
31             sub forum_site {
32 0 0   0 0   my $url = _lang() eq 'deutsch'
33             ? 'http://www.perl-community.de/bat/poard/start'
34             : 'http://www.perlmonks.org';
35 0           _web_page($url);
36             }
37            
38 0     0 0   sub bug_tracker { _web_page('http://sourceforge.net/tracker/?func=add&group_id=169747&atid=851590') }
39 0     0 0   sub feature_wish { _web_page('http://sourceforge.net/tracker/?func=add&group_id=169747&atid=851593') }
40             1;