1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
#!perl
package
patchperl;
# ABSTRACT: patch a perl source tree
use strict;
use warnings;
use Devel::PatchPerl;
use Getopt::Long;
my $version = '';
my $patchlevel = '';
GetOptions(
version => \$version,
patchlevel => \$patchlevel,
) or die("Error in command line arguments\n");
if ( $version ) {
my $vers = Devel::PatchPerl->_patchperl_version();
print "Devel::PatchPerl $vers\n";
}
else {
local $ENV{PERL5_PATCHPERL_PATCHLEVEL} = $patchlevel;
Devel::PatchPerl->patch_source($ARGV[1], $ARGV[0]);
}
__END__
=pod
=encoding UTF-8
=head1 NAME
patchperl - patch a perl source tree
=head1 VERSION
version 2.08
=head1 SYNOPSIS
patchperl
=head1 COMMAND LINE SWITCHES
=over
=item C<--version>
Prints the version of L<Devel::PatchPerl> to STDOUT and exits
=item C<--patchlevel>
Devel::PatchPerl will normally update the C<patchlevel.h> file in the perl source tree
to indicate that it has applied local patches. This behaviour is negated if it is
detected that it is operating in a git repository. To override this and update
C<patchlevel.h> when in a Git repository use this switch.
=back
=head1 AUTHOR
Chris Williams <chris@bingosnet.co.uk>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2021 by Chris Williams and Marcus Holland-Moritz.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
|