| 1 | package HTTP::Cookies::PhantomJS; | ||||||||||||||||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||||||||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 4 | 1 | ▶ | use HTTP::Cookies; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use HTTP::Response; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use HTTP::Request; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | use HTTP::Headers::Util qw/split_header_words join_header_words/; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use HTTP::Date qw/time2str/; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||||||||||||||||
| 10 | 1 | our @ISA = 'HTTP::Cookies'; | |||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | our $VERSION = '0.01'; | |||||||||||||||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||||||||||||||||
| 13 | 1 | ▶ | use constant MAGIC => 'cookies="@Variant(\0\0\0\x7f\0\0\0\x16QList<QNetworkCookie>\0\0\0\0\x1'; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||
| 14 | 1 | my %ESCAPES = ( | |||||||||||||||||||||||||||||||||||||||||
| 15 | 'b' => "\b", | ||||||||||||||||||||||||||||||||||||||||||
| 16 | 'f' => "\f", | ||||||||||||||||||||||||||||||||||||||||||
| 17 | 'n' => "\n", | ||||||||||||||||||||||||||||||||||||||||||
| 18 | 'r' => "\r", | ||||||||||||||||||||||||||||||||||||||||||
| 19 | 't' => "\t", | ||||||||||||||||||||||||||||||||||||||||||
| 20 | '\\' => '\\', | ||||||||||||||||||||||||||||||||||||||||||
| 21 | ); | ||||||||||||||||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||||||||||||||||
| 23 | sub _read_length_block { | ||||||||||||||||||||||||||||||||||||||||||
| 24 | 298 | ▶ | my $str_ref = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_read_length_block: called CC=9 SCAR=22.0
| |||||||||||||||||||||||||||||||||||||||||||
| 25 | |||||||||||||||||||||||||||||||||||||||||||
| 26 | 298 | my $bytes; | |||||||||||||||||||||||||||||||||||||||||
| 27 | 298 | for (1..4) { | |||||||||||||||||||||||||||||||||||||||||
| 28 | 1192 | my $c = substr($$str_ref, 0, 1, ''); | |||||||||||||||||||||||||||||||||||||||||
| 29 | 1192 | ▶ | if ($c ne '\\') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 30 | 107 | $bytes .= sprintf '%x', ord($c); | |||||||||||||||||||||||||||||||||||||||||
| 31 | 107 | next; | |||||||||||||||||||||||||||||||||||||||||
| 32 | } | ||||||||||||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||||||||||||
| 34 | 1085 | $c = substr($$str_ref, 0, 1, ''); | |||||||||||||||||||||||||||||||||||||||||
| 35 | 1085 | ▶ | if ($c ne 'x') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 36 | 892 | ▶ | if (exists $ESCAPES{$c}) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 37 | 4 | $bytes .= sprintf '%x', ord($ESCAPES{$c}); | |||||||||||||||||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||||||||||||||||
| 39 | else { | ||||||||||||||||||||||||||||||||||||||||||
| 40 | 888 | $bytes .= sprintf '%x', int $c; | |||||||||||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||||||||||||
| 42 | 892 | next; | |||||||||||||||||||||||||||||||||||||||||
| 43 | } | ||||||||||||||||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||||||||||||||||
| 45 | 193 | $c = substr($$str_ref, 0, 1, ''); | |||||||||||||||||||||||||||||||||||||||||
| 46 | 193 | ▶ | if (substr($$str_ref, 0, 1) =~ /[a-f0-9]/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 47 | 185 | $c .= substr($$str_ref, 0, 1, ''); | |||||||||||||||||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||||||||||||||||
| 49 | 193 | ▶ | if (length($c) == 1 && $bytes && substr($bytes, -2) ne '\0') { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%4/6
length $c == 1 and $bytes and substr($bytes, -2) ne "\\0"
length $c == 1 and $bytes
MC/DC33%1/3
length $c == 1 and $bytes and substr($bytes, -2) ne "\\0"
length $c == 1
$bytes
substr($bytes, -2) ne "\\0"
Truth table50%2/4
A and B and C
A= length $c == 1B= $bytesC= substr($bytes, -2) ne "\\0"
| |||||||||||||||||||||||||||||||||||||||||||
| 50 | # \0\0\x1\x4 -> 00104 | ||||||||||||||||||||||||||||||||||||||||||
| 51 | 8 | $c = '0'.$c; | |||||||||||||||||||||||||||||||||||||||||
| 52 | } | ||||||||||||||||||||||||||||||||||||||||||
| 53 | 193 | $bytes .= $c; | |||||||||||||||||||||||||||||||||||||||||
| 54 | } | ||||||||||||||||||||||||||||||||||||||||||
| 55 | |||||||||||||||||||||||||||||||||||||||||||
| 56 | 298 | hex($bytes); | |||||||||||||||||||||||||||||||||||||||||
| 57 | } | ||||||||||||||||||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||||||||||||||||
| 59 | sub load { | ||||||||||||||||||||||||||||||||||||||||||
| 60 | 3 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
load: called CC=16 SCAR=28.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 61 | 3 | ▶ | my $file = shift || $self->{'file'} || return; | ||||||||||||||||||||||||||||||||||||||||
|
Condition100%5/5
shift() || $self->{'file'} || (return)
shift() or $self->{"file"}
MC/DC100%2/2
shift() || $self->{'file'} || (return)
shift()
$self->{"file"}
Truth table100%3/3
A or B
A= shift()B= $self->{"file"}
| |||||||||||||||||||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||||||||||||||||||
| 63 | 2 | ▶ | open my $fh, '<', $file or return; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 64 | 2 | <$fh>; # omit header | |||||||||||||||||||||||||||||||||||||||||
| 65 | 2 | my $data = <$fh>; | |||||||||||||||||||||||||||||||||||||||||
| 66 | 2 | $data =~ s/\\"/"/g; | |||||||||||||||||||||||||||||||||||||||||
| 67 | 2 | close $fh; | |||||||||||||||||||||||||||||||||||||||||
| 68 | 2 | ▶ | unless (substr($data, 0, length(MAGIC), '') eq MAGIC) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | warn "$file does not seem to contain cookies"; | |||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | return; | |||||||||||||||||||||||||||||||||||||||||
| 71 | } | ||||||||||||||||||||||||||||||||||||||||||
| 72 | |||||||||||||||||||||||||||||||||||||||||||
| 73 | 2 | my $cnt = _read_length_block(\$data); | |||||||||||||||||||||||||||||||||||||||||
| 74 | 2 | my ($len, $cookie, $cookie_str); | |||||||||||||||||||||||||||||||||||||||||
| 75 | 2 | ▶ | for (my $i=0; $i<$cnt; $i++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 76 | 296 | $len = _read_length_block(\$data); | |||||||||||||||||||||||||||||||||||||||||
| 77 | 296 | $cookie_str = substr($data, 0, $len, ''); | |||||||||||||||||||||||||||||||||||||||||
| 78 | |||||||||||||||||||||||||||||||||||||||||||
| 79 | # beginning may be in hex notation | ||||||||||||||||||||||||||||||||||||||||||
| 80 | 296 | my $additional = 0; | |||||||||||||||||||||||||||||||||||||||||
| 81 | 296 | ▶ | while ((my $c = substr($cookie_str, $additional, 4)) =~ /\\x[a-f0-9]{2}/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 82 | 17 | substr($cookie_str, $additional, 4) = chr hex substr $c, 2; | |||||||||||||||||||||||||||||||||||||||||
| 83 | 17 | $additional++; | |||||||||||||||||||||||||||||||||||||||||
| 84 | } | ||||||||||||||||||||||||||||||||||||||||||
| 85 | 296 | $cookie_str .= substr($data, 0, $additional*3, ''); | |||||||||||||||||||||||||||||||||||||||||
| 86 | |||||||||||||||||||||||||||||||||||||||||||
| 87 | 296 | ▶ | if ($additional = $cookie_str =~ s/\\\\/\\/g) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 88 | 0 | $cookie_str .= substr($data, 0, $additional, ''); | |||||||||||||||||||||||||||||||||||||||||
| 89 | } | ||||||||||||||||||||||||||||||||||||||||||
| 90 | #print $cookie_str, "\n"; | ||||||||||||||||||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||||||||||||||||||
| 92 | # properly process quoted values | ||||||||||||||||||||||||||||||||||||||||||
| 93 | # however anyway it is broken in HTTP::Cookies 6.01 - rt70721 | ||||||||||||||||||||||||||||||||||||||||||
| 94 | 296 | my ($key_val) = split_header_words($cookie_str); | |||||||||||||||||||||||||||||||||||||||||
| 95 | 296 | $key_val = join_header_words($key_val->[0], $key_val->[1]); | |||||||||||||||||||||||||||||||||||||||||
| 96 | 296 | my $tmp = $cookie_str; | |||||||||||||||||||||||||||||||||||||||||
| 97 | # value inside key_val may be quoted, but original may be not, so check it | ||||||||||||||||||||||||||||||||||||||||||
| 98 | 296 | ▶ | substr($tmp, 0, substr($tmp, length($key_val), 1) eq ';' ? length($key_val)+1 : length($key_val)-1) = ''; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 99 | 296 | my @cookie_parts = split ';', $tmp; | |||||||||||||||||||||||||||||||||||||||||
| 100 | |||||||||||||||||||||||||||||||||||||||||||
| 101 | 296 | my ($domain, $path); | |||||||||||||||||||||||||||||||||||||||||
| 102 | 296 | ▶ | for (my $i=0; $i<@cookie_parts; $i++) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 103 | 861 | ▶ | last if $path && $domain; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
$path and $domain
MC/DC0%0/2
$path and $domain
$path
$domain
Truth table33%1/3
A and B
A= $pathB= $domain
| |||||||||||||||||||||||||||||||||||||||||||
| 104 | 861 | ▶ | if (!$domain and ($domain) = $cookie_parts[$i] =~ /domain=(.+)/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
not $domain and ($domain) = $cookie_parts[$i] =~ /domain=(.+)/
MC/DC100%2/2
not $domain and ($domain) = $cookie_parts[$i] =~ /domain=(.+)/
not $domain
($domain) = $cookie_parts[$i] =~ /domain=(.+)/
Truth table100%3/3
not(A) and B
A= not $domainB= ($domain) = $cookie_parts[$i] =~ /domain=(.+)/
| |||||||||||||||||||||||||||||||||||||||||||
| 105 | 296 | next; | |||||||||||||||||||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||||||||||||||||||
| 107 | 565 | ▶ | if (!$path) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 108 | 565 | ($path) = $cookie_parts[$i] =~ /path=(.+)/ | |||||||||||||||||||||||||||||||||||||||||
| 109 | } | ||||||||||||||||||||||||||||||||||||||||||
| 110 | } | ||||||||||||||||||||||||||||||||||||||||||
| 111 | |||||||||||||||||||||||||||||||||||||||||||
| 112 | # generate fake request, so we can reuse extract_cookies() method | ||||||||||||||||||||||||||||||||||||||||||
| 113 | 296 | ▶ | my $req = HTTP::Request->new(GET => "http://".(substr($domain, 0, 1) eq '.' ? 'www' : '')."$domain$path"); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 114 | 296 | my $resp = HTTP::Response->new(200, 'OK', ['Set-Cookie', $cookie_str]); | |||||||||||||||||||||||||||||||||||||||||
| 115 | 296 | $resp->request($req); | |||||||||||||||||||||||||||||||||||||||||
| 116 | |||||||||||||||||||||||||||||||||||||||||||
| 117 | 296 | $self->extract_cookies($resp); | |||||||||||||||||||||||||||||||||||||||||
| 118 | } | ||||||||||||||||||||||||||||||||||||||||||
| 119 | |||||||||||||||||||||||||||||||||||||||||||
| 120 | 2 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 121 | } | ||||||||||||||||||||||||||||||||||||||||||
| 122 | |||||||||||||||||||||||||||||||||||||||||||
| 123 | sub _generate_length_block { | ||||||||||||||||||||||||||||||||||||||||||
| 124 | 149 | ▶ | my $length = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
_generate_length_block: called CC=3 SCAR=11.0
| |||||||||||||||||||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||||||||||||||||||
| 126 | my $normalize = sub { | ||||||||||||||||||||||||||||||||||||||||||
| 127 | 152 | ▶ | my $str = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||||||||||||||||||||||||||||||||||
| 128 | 152 | ▶ | return $str if length($str) != 2; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 129 | 149 | $str =~ s/^0//; | |||||||||||||||||||||||||||||||||||||||||
| 130 | 149 | $str; | |||||||||||||||||||||||||||||||||||||||||
| 131 | 149 | }; | |||||||||||||||||||||||||||||||||||||||||
| 132 | |||||||||||||||||||||||||||||||||||||||||||
| 133 | 149 | my $bytes; | |||||||||||||||||||||||||||||||||||||||||
| 134 | 149 | my $hex = sprintf '%x', $length; | |||||||||||||||||||||||||||||||||||||||||
| 135 | 149 | my $part; | |||||||||||||||||||||||||||||||||||||||||
| 136 | 149 | for (1..4) { | |||||||||||||||||||||||||||||||||||||||||
| 137 | 596 | ▶ | $bytes = (length($hex) ? '\x'.$normalize->(substr($hex, -2, 2, '')) : '\0'). $bytes; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 138 | } | ||||||||||||||||||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||||||||||||||||||
| 140 | 149 | $bytes; | |||||||||||||||||||||||||||||||||||||||||
| 141 | } | ||||||||||||||||||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||||||||||||||||||
| 143 | sub save { | ||||||||||||||||||||||||||||||||||||||||||
| 144 | 1 | ▶ | my $self = shift; | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
save: called CC=6 SCAR=18.1
Pod
documented
| |||||||||||||||||||||||||||||||||||||||||||
| 145 | 1 | ▶ | my $file = shift || $self->{'file'} || return; | ||||||||||||||||||||||||||||||||||||||||
|
Condition40%2/5
shift() || $self->{'file'} || (return)
shift() or $self->{"file"}
MC/DC0%0/2
shift() || $self->{'file'} || (return)
shift()
$self->{"file"}
Truth table33%1/3
A or B
A= shift()B= $self->{"file"}
| |||||||||||||||||||||||||||||||||||||||||||
| 146 | 1 | ▶ | open my $fh, '>', $file or die "Can't open $file: $!"; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 147 | |||||||||||||||||||||||||||||||||||||||||||
| 148 | 1 | my $res = MAGIC; | |||||||||||||||||||||||||||||||||||||||||
| 149 | 1 | my @cookies; | |||||||||||||||||||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||||||||||||||||||
| 151 | $self->scan(sub { | ||||||||||||||||||||||||||||||||||||||||||
| 152 | 148 | ▶ | my ($version,$key,$val,$path,$domain,$port, | ||||||||||||||||||||||||||||||||||||||||
|
Subroutine
__ANON__: called CC=6 SCAR=18.3
| |||||||||||||||||||||||||||||||||||||||||||
| 153 | $path_spec,$secure,$expires,$discard,$rest) = @_; | ||||||||||||||||||||||||||||||||||||||||||
| 154 | |||||||||||||||||||||||||||||||||||||||||||
| 155 | 148 | ▶ | return if $discard && !$self->{ignore_discard}; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition66%2/3
$discard and not $self->{"ignore_discard"}
MC/DC0%0/2
$discard and not $self->{"ignore_discard"}
$discard
not $self->{"ignore_discard"}
Truth table66%2/3
A and not(B)
A= $discardB= not $self->{"ignore_discard"}
| |||||||||||||||||||||||||||||||||||||||||||
| 156 | 148 | my @cookie_parts; | |||||||||||||||||||||||||||||||||||||||||
| 157 | |||||||||||||||||||||||||||||||||||||||||||
| 158 | 148 | ▶ | push @cookie_parts, $val =~ /^"/ ? "$key=$val" : join_header_words($key, $val); | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 159 | 148 | ▶ | push @cookie_parts, 'secure' if $secure; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 160 | 148 | push @cookie_parts, keys %$rest; | |||||||||||||||||||||||||||||||||||||||||
| 161 | 148 | ▶ | push @cookie_parts, 'expires='.time2str($expires) if $expires; | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 162 | 148 | push @cookie_parts, 'domain='.$domain; | |||||||||||||||||||||||||||||||||||||||||
| 163 | 148 | push @cookie_parts, 'path='.$path; | |||||||||||||||||||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||||||||||||||||||
| 165 | 148 | push @cookies, join '; ', @cookie_parts; | |||||||||||||||||||||||||||||||||||||||||
| 166 | 1 | }); | |||||||||||||||||||||||||||||||||||||||||
| 167 | |||||||||||||||||||||||||||||||||||||||||||
| 168 | 1 | $res .= _generate_length_block(scalar @cookies); | |||||||||||||||||||||||||||||||||||||||||
| 169 | 1 | for my $cookie (@cookies) { | |||||||||||||||||||||||||||||||||||||||||
| 170 | 148 | $res .= _generate_length_block(length $cookie); | |||||||||||||||||||||||||||||||||||||||||
| 171 | 148 | $cookie =~ s/\\/\\\\/g; | |||||||||||||||||||||||||||||||||||||||||
| 172 | 148 | $cookie =~ s/"/\\"/g; | |||||||||||||||||||||||||||||||||||||||||
| 173 | # any valid hex symbol at the beginning should be replaced with \x notation | ||||||||||||||||||||||||||||||||||||||||||
| 174 | 148 | my $i = 0; | |||||||||||||||||||||||||||||||||||||||||
| 175 | 148 | ▶ | while ((my $c = substr($cookie, $i, 1)) =~ /[a-f0-9]/) { | ||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||
| 176 | 15 | substr($cookie, $i, 1) = sprintf '\x%x', ord($c); | |||||||||||||||||||||||||||||||||||||||||
| 177 | 15 | $i += 4; | |||||||||||||||||||||||||||||||||||||||||
| 178 | } | ||||||||||||||||||||||||||||||||||||||||||
| 179 | 148 | $res .= $cookie; | |||||||||||||||||||||||||||||||||||||||||
| 180 | } | ||||||||||||||||||||||||||||||||||||||||||
| 181 | 1 | $res .= ')"'; | |||||||||||||||||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||||||||||||||||||
| 183 | 1 | print $fh "[General]\n"; | |||||||||||||||||||||||||||||||||||||||||
| 184 | 1 | print $fh $res, "\n"; | |||||||||||||||||||||||||||||||||||||||||
| 185 | 1 | close $fh; | |||||||||||||||||||||||||||||||||||||||||
| 186 | |||||||||||||||||||||||||||||||||||||||||||
| 187 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 188 | } | ||||||||||||||||||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||||||||||||||||||
| 190 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||
| 191 | |||||||||||||||||||||||||||||||||||||||||||
| 192 | __END__ | ||||||||||||||||||||||||||||||||||||||||||