Fix_Sort_Versions.pm (Mail-Mbox-MessageParser-1.5110) | : | Fix_Sort_Versions.pm (Mail-Mbox-MessageParser-1.5111) | ||
---|---|---|---|---|
#line 1 | #line 1 | |||
package Module::Install::PRIVATE::Fix_Sort_Versions; | package Module::Install::PRIVATE::Fix_Sort_Versions; | |||
use strict; | use strict; | |||
use warnings; | use warnings; | |||
use File::Slurper qw(read_text write_text); | ||||
use vars qw( @ISA $VERSION ); | use vars qw( @ISA $VERSION ); | |||
use Module::Install::Base; | use Module::Install::Base; | |||
@ISA = qw( Module::Install::Base ); | @ISA = qw( Module::Install::Base ); | |||
$VERSION = sprintf "%d.%02d%02d", q/0.1.0/ =~ /(\d+)/g; | $VERSION = sprintf "%d.%02d%02d", q/0.1.0/ =~ /(\d+)/g; | |||
# --------------------------------------------------------------------------- | # --------------------------------------------------------------------------- | |||
sub fix_sort_versions { | sub fix_sort_versions { | |||
my ($self, $file) = @_; | my ($self, $file) = @_; | |||
$self->configure_requires('File::Slurp', 0); | $self->perl_version('5.005'); | |||
$self->include_deps('File::Slurper', 0); | ||||
require File::Slurper; | ||||
File::Slurper->import('read_text', 'write_text'); | ||||
print "Fixing POD in $file\n"; | print "Fixing POD in $file\n"; | |||
my $code = read_text($file, undef, 1); | my $code = read_text($file, undef, 1); | |||
$code =~ s|^=encoding.*||m; | $code =~ s|^=encoding.*||m; | |||
write_text($file, $code, undef, 1); | write_text($file, $code, undef, 1); | |||
} | } | |||
1; | 1; | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 6 lines changed or added |