Debian Codegraph @

bin/patchperl

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