ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/App-Staticperl/mkbundle
(Generate patch)

Comparing App-Staticperl/mkbundle (file contents):
Revision 1.33 by root, Thu Mar 8 19:07:44 2012 UTC vs.
Revision 1.34 by root, Mon Mar 12 21:45:10 2012 UTC

76 my $dir = find_incdir $_[1] 76 my $dir = find_incdir $_[1]
77 or return; 77 or return;
78 78
79 syswrite $W_TRACER, "-\n$dir\n$_[1]\n"; 79 syswrite $W_TRACER, "-\n$dir\n$_[1]\n";
80 80
81 open my $fh, "<:perlio", "$dir/$_[1]" 81 open my $fh, "<:raw:perlio", "$dir/$_[1]"
82 or warn "ERROR: $dir/$_[1]: $!\n"; 82 or warn "ERROR: $dir/$_[1]: $!\n";
83 83
84 $fh 84 $fh
85 }; 85 };
86 86
162 my ($variant, $src, $filter) = @_; 162 my ($variant, $src, $filter) = @_;
163 163
164 if (length $CACHE and 2048 <= length $src and defined $variant) { 164 if (length $CACHE and 2048 <= length $src and defined $variant) {
165 my $file = "$CACHE/" . Digest::MD5::md5_hex "$CACHEVER\x00$variant\x00$src"; 165 my $file = "$CACHE/" . Digest::MD5::md5_hex "$CACHEVER\x00$variant\x00$src";
166 166
167 if (open my $fh, "<:perlio", $file) { 167 if (open my $fh, "<:raw:perlio", $file) {
168 print "using cache for $file\n" 168 print "using cache for $file\n"
169 if $VERBOSE >= 7; 169 if $VERBOSE >= 7;
170 170
171 local $/; 171 local $/;
172 return <$fh>; 172 return <$fh>;
175 $src = $filter->($src); 175 $src = $filter->($src);
176 176
177 print "creating cache entry $file\n" 177 print "creating cache entry $file\n"
178 if $VERBOSE >= 8; 178 if $VERBOSE >= 8;
179 179
180 if (open my $fh, ">:perlio", "$file~") { 180 if (open my $fh, ">:raw:perlio", "$file~") {
181 if ((syswrite $fh, $src) == length $src) { 181 if ((syswrite $fh, $src) == length $src) {
182 close $fh; 182 close $fh;
183 rename "$file~", $file; 183 rename "$file~", $file;
184 } 184 }
185 } 185 }
563 or die "ERROR: $pm: path too long (only 128 octets supported)\n"; 563 or die "ERROR: $pm: path too long (only 128 octets supported)\n";
564 564
565 my $src = ref $path 565 my $src = ref $path
566 ? $$path 566 ? $$path
567 : do { 567 : do {
568 open my $pm, "<", $path 568 open my $pm, "<:raw:perlio", $path
569 or die "$path: $!"; 569 or die "$path: $!";
570 570
571 local $/; 571 local $/;
572 572
573 <$pm> 573 <$pm>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines