Dist-Zilla-PluginBundle-Author-KENTNL
view release on metacpan or search on metacpan
utils/remove_bom.pl view on Meta::CPAN
my $bytes;
read $rfh, $bytes, 3;
while ( read $rfh, $bytes, 8192 > 0 ) {
$wfh->print($bytes);
}
close $rfh or warn "Closing $file read failed";
close $wfh or warn "Closing $file write failed";
path( $file . '.new' )->move($file);
}
pp( { BOM => $bomb } );
for my $file (@ARGV) {
my $path = path($file);
*STDERR->print("Checking $path\n");
my $bom_bytes = read_bom_segment($path);
next unless is_bom($bom_bytes);
*STDERR->print("BOM found, rewriting\n");
rewrite_without_bom($path);
}
( run in 0.606 second using v1.01-cache-2.11-cpan-f29a10751f0 )