| 1 |
|
| package Psh::Locale::Default; |
| 2 |
|
| |
| 3 |
|
| # |
| 4 |
|
| # Main part of the module. |
| 5 |
|
| # |
| 6 |
|
| |
| 7 |
1 |
| my %sig_description = ( |
| 8 |
|
| 'TTOU' => 'TTY output', |
| 9 |
|
| 'TTIN' => 'TTY input', |
| 10 |
|
| 'KILL' => 'killed', |
| 11 |
|
| 'FPE' => 'floating point exception', |
| 12 |
|
| 'SEGV' => 'segmentation fault', |
| 13 |
|
| 'PIPE' => 'broken pipe', |
| 14 |
|
| 'BUS' => 'bus error', |
| 15 |
|
| 'ABRT' => 'aborted', |
| 16 |
|
| 'ILL' => 'illegal instruction', |
| 17 |
|
| 'TSTP' => 'stop typed at TTY', |
| 18 |
|
| 'INT' => 'interrupt character typed' |
| 19 |
|
| ); |
| 20 |
1 |
| $Psh::text{sig_description}=\%sig_description; |
| 21 |
|
| |
| 22 |
1 |
▶ | while(<DATA>) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (defined($_ = readline DATA)) |
185 |
1 |
186 |
|
| 23 |
185 |
▶ | next if /^\#/; |
Branch: 1 branch
| Branch | True | False | Total |
| if /^\#/ |
7 |
178 |
185 |
|
| 24 |
178 |
| chomp; |
| 25 |
178 |
▶ | if( /^([a-z_]+)=(.*)$/) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (/^([a-z_]+)=(.*)$/) |
62 |
116 |
178 |
|
| 26 |
62 |
| my $key= $1; |
| 27 |
62 |
| my $val= $2; |
| 28 |
62 |
▶ | if( $val=~/\\$/) { |
Branch: 1 branch
| Branch | True | False | Total |
| if ($val =~ /\\$/) { } |
6 |
56 |
62 |
|
| 29 |
6 |
| $val=~ s/\\$//; |
| 30 |
|
| } else { |
| 31 |
56 |
| $val.="\n"; |
| 32 |
|
| } |
| 33 |
62 |
| $val=~ s/\\n/\n/g; |
| 34 |
62 |
| $val=~ s/\\(.)/$1/g; |
| 35 |
62 |
| $Psh::text{$key}=$val; |
| 36 |
|
| } |
| 37 |
|
| } |
| 38 |
|
| |
| 39 |
1 |
| 1; |
| 40 |
|
| |
| 41 |
|
| __DATA__ |