1 ################################################################################
3 ## Version 3.x, Copyright (C) 2004-2013, Marcus Holland-Moritz.
4 ## Version 2.x, Copyright (C) 2001, Paul Marquess.
5 ## Version 1.x, Copyright (C) 1999, Kenneth Albanowski.
7 ## This program is free software; you can redistribute it and/or
8 ## modify it under the same terms as Perl itself.
10 ################################################################################
18 # Disable broken TRIE-optimization
19 BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if "$]" >= 5.009004 && "$]" <= 5.009005 }
21 my $VERSION = __VERSION__;
34 my($ppport) = $0 =~ /([\w.]+)$/;
35 my $LF = '(?:\r\n|[\r\n])'; # line feed
36 my $HS = "[ \t]"; # horizontal whitespace
38 # Never use C comments in this file!
41 my $rccs = quotemeta $ccs;
42 my $rcce = quotemeta $cce;
46 Getopt::Long::GetOptions(\%opt, qw(
47 help quiet diag! filter! hints! changes! cplusplus strip version
48 patch=s copy=s diff=s compat-version=s
49 list-provided list-unsupported api-info=s
53 if ($@ and grep /^-/, @ARGV) {
54 usage() if "@ARGV" =~ /^--?h(?:elp)?$/;
55 die "Getopt::Long not found. Please don't use any options.\n";
59 print "This is $0 $VERSION.\n";
63 usage() if $opt{help};
64 strip() if $opt{strip};
66 $opt{'compat-version'} = __MIN_PERL__ unless exists $opt{'compat-version'};
67 $opt{'compat-version'} = int_parse_version($opt{'compat-version'});
69 # Each element of this hash looks something like:
71 # 'base' => '5.008000',
73 # 'todo' => '5.003007'
75 my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
77 ($2 ? ( base => $2 ) : ()),
78 ($3 ? ( todo => $3 ) : ()),
79 (index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
80 (index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
81 (index($4, 'n') >= 0 ? ( noTHXarg => 1 ) : ()),
82 (index($4, 'c') >= 0 ? ( core_only => 1 ) : ()),
83 (index($4, 'd') >= 0 ? ( deprecated => 1 ) : ()),
84 (index($4, 'i') >= 0 ? ( inaccessible => 1 ) : ()),
85 (index($4, 'x') >= 0 ? ( experimental => 1 ) : ()),
86 (index($4, 'u') >= 0 ? ( undocumented => 1 ) : ()),
87 (index($4, 'o') >= 0 ? ( ppport_fnc => 1 ) : ()),
89 : die "invalid spec: $_" } qw(
93 if (exists $opt{'list-unsupported'}) {
95 for $f (sort dictionary_order keys %API) {
96 next if $API{$f}{core_only};
97 next if $API{$f}{beyond_depr};
98 next if $API{$f}{inaccessible};
99 next if $API{$f}{experimental};
100 next unless $API{$f}{todo};
101 next if int_parse_version($API{$f}{todo}) <= int_parse_version(__MIN_PERL__);
102 print "$f ", '.'x(40-length($f)), " ", format_version($API{$f}{todo}), "\n";
107 # Scan for hints, possible replacement candidates, etc.
109 my(%replace, %need, %hints, %warnings, %depends);
111 my($hint, $define, $function);
117 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
118 | "[^"\\]*(?:\\.[^"\\]*)*"
119 | '[^'\\]*(?:\\.[^'\\]*)*' }{}egsx;
120 grep { exists $API{$_} } $code =~ /(\w+)/mg;
126 # Here, we are in the middle of accumulating a hint or warning.
129 # A line containing a comment end marker closes the hint. Remove that
130 # marker for processing below.
131 if (s/\s*$rcce(.*?)\s*$//) {
132 die "Nothing can follow the end of comment in '$_'\n" if length $1 > 0;
136 # Set $h to the hash of which type.
137 my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;
139 # Ignore any leading and trailing white space, and an optional star comment
140 # continuation marker, then place the meat of the line into $1
141 m/^\s*(?:\*\s*)?(.*?)\s*$/;
143 # Add the meat of this line to the hash value of each API element it
145 for (@{$hint->[1]}) {
146 $h->{$_} ||= ''; # avoid the warning older perls generate
150 # If the line had a comment close, we are through with this hint
151 undef $hint if $end_of_hint;
156 # Set up $hint if this is the beginning of a Hint: or Warning:
157 # These are from a multi-line C comment in the file, with the first line
158 # looking like (a space has been inserted because this file can't have C
159 # comment markers in it):
160 # / * Warning: PL_expect, PL_copline, PL_rsfp
171 if (m{^\s*$rccs\s+(Hint|Warning):\s+(\w+(?:,?\s+\w+)*)\s*$}) {
172 $hint = [$1, [split /,?\s+/, $2]];
176 if ($define) { # If in the middle of a definition...
178 # append a continuation line ending with backslash.
179 if ($define->[1] =~ /\\$/) {
182 else { # Otherwise this line ends the definition, make foo depend on bar
183 # (and what bar depends on) if its not one of ppp's own constructs
184 if (exists $API{$define->[0]} && $define->[1] !~ /^DPPP_\(/) {
185 my @n = find_api($define->[1]);
186 push @{$depends{$define->[0]}}, @n if @n
192 # For '#define foo bar' or '#define foo(a,b,c) bar', $define becomes a
193 # reference to [ foo, bar ]
194 $define = [$1, $2] if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(.*)};
198 if (exists $API{$function->[0]}) {
199 my @n = find_api($function->[1]);
200 push @{$depends{$function->[0]}}, @n if @n
205 $function->[1] .= $_;
209 $function = [$1, ''] if m{^DPPP_\(my_(\w+)\)};
211 # Set $replace to the number given for lines that look like
212 # / * Replace: \d+ * /
213 # (blanks added to keep real C comments from appearing in this file)
214 # Thus setting it to 1 starts a region where replacements are automatically
215 # done, and setting it to 0 ends that region.
216 $replace = $1 if m{^\s*$rccs\s+Replace:\s+(\d+)\s+$rcce\s*$};
218 # Add bar => foo to %replace for lines like '#define foo bar in a region
219 # where $replace is non-zero
220 $replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
222 # Add bar => foo to %replace for lines like '#define foo bar / * Replace * /
223 # (blanks added to keep real C comments from appearing in this file)
224 $replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
226 # Add foo => bar to %replace for lines like / * Replace foo with bar * /
227 # (blanks added to keep real C comments from appearing in this file)
228 $replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
230 # For lines like / * foo, bar depends on baz, bat * /
231 # create a list of the elements on the rhs, and make that list apply to each
232 # element in the lhs, which becomes a key in \%depends.
233 # (blanks added to keep real C comments from appearing in this file)
234 if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
235 my @deps = map { s/\s+//g; $_ } split /,/, $3;
237 for $d (map { s/\s+//g; $_ } split /,/, $1) {
238 push @{$depends{$d}}, @deps;
242 $need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
245 for (values %depends) {
247 $_ = [sort dictionary_order grep !$seen{$_}++, @$_];
250 if (exists $opt{'api-info'}) {
253 my $match = $opt{'api-info'} =~ m!^/(.*)/$! ? $1 : "^\Q$opt{'api-info'}\E\$";
254 for $f (sort dictionary_order keys %API) {
255 next unless $f =~ /$match/;
256 print "\n=== $f ===\n\n";
258 if ($API{$f}{base} || $API{$f}{todo}) {
259 if ($API{$f}{ppport_fnc}) {
260 print "This is only supported by ppport.h, and NOT by ANY perl version.\n";
263 my $base = format_version($API{$f}{base} || $API{$f}{todo});
264 print "Supported at least starting from perl-$base.\n";
268 if ($API{$f}{provided}) {
269 my $todo = $API{$f}{todo} ? $API{$f}{todo} : __MIN_PERL__;
270 my $at_least = (int_parse_version($todo) == int_parse_version(__MIN_PERL__))
273 print "Support by $ppport provided$at_least back to perl-",
274 format_version($todo),
276 print "Support needs to be explicitly requested by #define NEED_$f\n",
277 "(or #define NEED_${f}_GLOBAL).\n" if exists $need{$f};
278 print "Depends on: ", join(', ', @{$depends{$f}}), ".\n"
279 if exists $depends{$f};
283 if (exists $hints{$f} || exists $warnings{$f}) {
284 print "\n$hints{$f}" if exists $hints{$f};
285 print "\nWARNING:\n$warnings{$f}" if exists $warnings{$f};
289 if (! $API{$f}{ppport_fnc}) {
290 my $email = "Send email to perl5-porters\@perl.org if you need to have this functionality.\n";
291 if ($API{$f}{inaccessible}) {
292 print "\nThis is not part of the public API, and may not even be accessible to XS code.\n";
295 elsif ($API{$f}{core_only}) {
296 print "\nThis is not part of the public API, and should not be used by XS code.\n";
299 elsif ($API{$f}{deprecated}) {
300 print "\nThis is deprecated and should not be used. Convert existing uses.\n";
303 elsif ($API{$f}{experimental}) {
304 print "\nThe API for this is unstable and should not be used by XS code.\n", $email;
307 elsif ($API{$f}{undocumented}) {
308 print "\nSince this is undocumented, the API should be considered unstable.\n";
309 if ($API{$f}{provided}) {
310 print "Consider bringing this up on the list: perl5-porters\@perl.org.\n";
313 print "It may be that this is not intended for XS use, or it may just be\n",
314 "that no one has gotten around to documenting it.\n", $email;
319 print "No portability information available. Check your spelling; or",
320 " this could be\na bug in Devel::PPPort. To report an issue:\n",
321 "https://github.com/Dual-Life/Devel-PPPort/issues/new\n";
327 $count or print "\nFound no API matching '$opt{'api-info'}'.";
332 if (exists $opt{'list-provided'}) {
334 for $f (sort dictionary_order keys %API) {
335 next unless $API{$f}{provided};
337 push @flags, 'explicit' if exists $need{$f};
338 push @flags, 'depend' if exists $depends{$f};
339 push @flags, 'hint' if exists $hints{$f};
340 push @flags, 'warning' if exists $warnings{$f};
341 my $flags = @flags ? ' ['.join(', ', @flags).']' : '';
348 my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
349 my $srcext = join '|', map { quotemeta $_ } @srcext;
356 push @files, $_ unless $seen{$_}++;
358 else { warn "'$_' is not a file.\n" }
361 my @new = grep { -f } glob $_
362 or warn "'$_' does not exist.\n";
363 push @files, grep { !$seen{$_}++ } @new;
370 File::Find::find(sub {
371 $File::Find::name =~ /($srcext)$/i
372 and push @files, $File::Find::name;
376 @files = map { glob "*$_" } @srcext;
380 if (!@ARGV || $opt{filter}) {
382 my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
384 my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
385 push @{ $out ? \@out : \@in }, $_;
388 warning("Skipping the following files (use --nofilter to avoid this):\n| ", join "\n| ", @out);
393 die "No input files given!\n" unless @files;
395 my(%files, %global, %revreplace);
396 %revreplace = reverse %replace;
398 my $patch_opened = 0;
400 for $filename (@files) {
401 unless (open IN, "<$filename") {
402 warn "Unable to read from $filename: $!\n";
406 info("Scanning $filename ...");
408 my $c = do { local $/; <IN> };
411 my %file = (orig => $c, changes => 0);
413 # Temporarily remove C/XS comments and strings from the code
417 ( ^$HS*\#$HS*include\b[^\r\n]+\b(?:\Q$ppport\E|XSUB\.h)\b[^\r\n]*
418 | ^$HS*\#$HS*(?:define|elif|if(?:def)?)\b[^\r\n]* )
420 | "[^"\\]*(?:\\.[^"\\]*)*"
421 | '[^'\\]*(?:\\.[^'\\]*)*'
422 | / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]* ) )
423 }{ defined $2 and push @ccom, $2;
424 defined $1 ? $1 : "$ccs$#ccom$cce" }mgsex;
426 $file{ccom} = \@ccom;
428 $file{has_inc_ppport} = $c =~ /^$HS*#$HS*include[^\r\n]+\b\Q$ppport\E\b/m;
432 for $func (keys %API) {
434 $match .= "|$revreplace{$func}" if exists $revreplace{$func};
435 if ($c =~ /\b(?:Perl_)?($match)\b/) {
436 $file{uses_replace}{$1}++ if exists $revreplace{$func} && $1 eq $revreplace{$func};
437 $file{uses_Perl}{$func}++ if $c =~ /\bPerl_$func\b/;
438 if (exists $API{$func}{provided}) {
439 $file{uses_provided}{$func}++;
440 if ( ! exists $API{$func}{base}
441 || int_parse_version($API{$func}{base}) > $opt{'compat-version'})
443 $file{uses}{$func}++;
444 my @deps = rec_depend($func);
446 $file{uses_deps}{$func} = \@deps;
448 $file{uses}{$_} = 0 unless exists $file{uses}{$_};
452 $file{needs}{$_} = 'static' if exists $need{$_};
456 if ( exists $API{$func}{todo}
457 && int_parse_version($API{$func}{todo}) > $opt{'compat-version'})
459 if ($c =~ /\b$func\b/) {
460 $file{uses_todo}{$func}++;
466 while ($c =~ /^$HS*#$HS*define$HS+(NEED_(\w+?)(_GLOBAL)?)\b/mg) {
467 if (exists $need{$2}) {
468 $file{defined $3 ? 'needed_global' : 'needed_static'}{$2}++;
470 else { warning("Possibly wrong #define $1 in $filename") }
473 for (qw(uses needs uses_todo needed_global needed_static)) {
474 for $func (keys %{$file{$_}}) {
475 push @{$global{$_}{$func}}, $filename;
479 $files{$filename} = \%file;
482 # Globally resolve NEED_'s
484 for $need (keys %{$global{needs}}) {
485 if (@{$global{needs}{$need}} > 1) {
486 my @targets = @{$global{needs}{$need}};
487 my @t = grep $files{$_}{needed_global}{$need}, @targets;
489 @t = grep /\.xs$/i, @targets;
491 my $target = shift @targets;
492 $files{$target}{needs}{$need} = 'global';
493 for (@{$global{needs}{$need}}) {
494 $files{$_}{needs}{$need} = 'extern' if $_ ne $target;
499 for $filename (@files) {
500 exists $files{$filename} or next;
502 info("=== Analyzing $filename ===");
504 my %file = %{$files{$filename}};
509 for $func (sort dictionary_order keys %{$file{uses_Perl}}) {
510 if ($API{$func}{varargs}) {
511 unless ($API{$func}{noTHXarg}) {
512 my $changes = ($c =~ s{\b(Perl_$func\s*\(\s*)(?!aTHX_?)(\)|[^\s)]*\))}
513 { $1 . ($2 eq ')' ? 'aTHX' : 'aTHX_ ') . $2 }ge);
515 warning("Doesn't pass interpreter argument aTHX to Perl_$func");
516 $file{changes} += $changes;
521 warning("Uses Perl_$func instead of $func");
522 $file{changes} += ($c =~ s{\bPerl_$func(\s*)\((\s*aTHX_?)?\s*}
527 for $func (sort dictionary_order keys %{$file{uses_replace}}) {
528 warning("Uses $func instead of $replace{$func}");
529 $file{changes} += ($c =~ s/\b$func\b/$replace{$func}/g);
532 for $func (sort dictionary_order keys %{$file{uses_provided}}) {
533 if ($file{uses}{$func}) {
534 if (exists $file{uses_deps}{$func}) {
535 diag("Uses $func, which depends on ", join(', ', @{$file{uses_deps}{$func}}));
541 $warnings += hint($func);
544 unless ($opt{quiet}) {
545 for $func (sort dictionary_order keys %{$file{uses_todo}}) {
546 print "*** WARNING: Uses $func, which may not be portable below perl ",
547 format_version($API{$func}{todo}), ", even with '$ppport'\n";
552 for $func (sort dictionary_order keys %{$file{needed_static}}) {
554 if (not exists $file{uses}{$func}) {
555 $message = "No need to define NEED_$func if $func is never used";
557 elsif (exists $file{needs}{$func} && $file{needs}{$func} ne 'static') {
558 $message = "No need to define NEED_$func when already needed globally";
562 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_$func\b.*$LF//mg);
566 for $func (sort dictionary_order keys %{$file{needed_global}}) {
568 if (not exists $global{uses}{$func}) {
569 $message = "No need to define NEED_${func}_GLOBAL if $func is never used";
571 elsif (exists $file{needs}{$func}) {
572 if ($file{needs}{$func} eq 'extern') {
573 $message = "No need to define NEED_${func}_GLOBAL when already needed globally";
575 elsif ($file{needs}{$func} eq 'static') {
576 $message = "No need to define NEED_${func}_GLOBAL when only used in this file";
581 $file{changes} += ($c =~ s/^$HS*#$HS*define$HS+NEED_${func}_GLOBAL\b.*$LF//mg);
585 $file{needs_inc_ppport} = keys %{$file{uses}};
587 if ($file{needs_inc_ppport}) {
590 for $func (sort dictionary_order keys %{$file{needs}}) {
591 my $type = $file{needs}{$func};
592 next if $type eq 'extern';
593 my $suffix = $type eq 'global' ? '_GLOBAL' : '';
594 unless (exists $file{"needed_$type"}{$func}) {
595 if ($type eq 'global') {
596 diag("Files [@{$global{needs}{$func}}] need $func, adding global request");
599 diag("File needs $func, adding static request");
601 $pp .= "#define NEED_$func$suffix\n";
605 if ($pp && ($c =~ s/^(?=$HS*#$HS*define$HS+NEED_\w+)/$pp/m)) {
610 unless ($file{has_inc_ppport}) {
611 diag("Needs to include '$ppport'");
612 $pp .= qq(#include "$ppport"\n)
616 $file{changes} += ($c =~ s/^($HS*#$HS*define$HS+NEED_\w+.*?)^/$1$pp/ms)
617 || ($c =~ s/^(?=$HS*#$HS*include.*\Q$ppport\E)/$pp/m)
618 || ($c =~ s/^($HS*#$HS*include.*XSUB.*\s*?)^/$1$pp/m)
623 if ($file{has_inc_ppport}) {
624 diag("No need to include '$ppport'");
625 $file{changes} += ($c =~ s/^$HS*?#$HS*include.*\Q$ppport\E.*?$LF//m);
629 # put back in our C comments
632 my @ccom = @{$file{ccom}};
633 for $ix (0 .. $#ccom) {
634 if (!$opt{cplusplus} && $ccom[$ix] =~ s!^//!!) {
636 $file{changes} += $c =~ s/$rccs$ix$rcce/$ccs$ccom[$ix] $cce/;
639 $c =~ s/$rccs$ix$rcce/$ccom[$ix]/;
644 my $s = $cppc != 1 ? 's' : '';
645 warning("Uses $cppc C++ style comment$s, which is not portable");
648 my $s = $warnings != 1 ? 's' : '';
649 my $warn = $warnings ? " ($warnings warning$s)" : '';
650 info("Analysis completed$warn");
652 if ($file{changes}) {
653 if (exists $opt{copy}) {
654 my $newfile = "$filename$opt{copy}";
656 error("'$newfile' already exists, refusing to write copy of '$filename'");
660 if (open F, ">$newfile") {
661 info("Writing copy of '$filename' with changes to '$newfile'");
666 error("Cannot open '$newfile' for writing: $!");
670 elsif (exists $opt{patch} || $opt{changes}) {
671 if (exists $opt{patch}) {
672 unless ($patch_opened) {
673 if (open PATCH, ">$opt{patch}") {
677 error("Cannot open '$opt{patch}' for writing: $!");
683 mydiff(\*PATCH, $filename, $c);
687 info("Suggested changes:");
688 mydiff(\*STDOUT, $filename, $c);
692 my $s = $file{changes} == 1 ? '' : 's';
693 info("$file{changes} potentially required change$s detected");
701 close PATCH if $patch_opened;
705 #######################################################################
707 sub try_use { eval "use @_;"; return $@ eq '' }
712 my($file, $str) = @_;
715 if (exists $opt{diff}) {
716 $diff = run_diff($opt{diff}, $file, $str);
719 if (!defined $diff and try_use('Text::Diff')) {
720 $diff = Text::Diff::diff($file, \$str, { STYLE => 'Unified' });
721 $diff = <<HEADER . $diff;
727 if (!defined $diff) {
728 $diff = run_diff('diff -u', $file, $str);
731 if (!defined $diff) {
732 $diff = run_diff('diff', $file, $str);
735 if (!defined $diff) {
736 error("Cannot generate a diff. Please install Text::Diff or use --copy.");
745 my($prog, $file, $str) = @_;
746 my $tmp = 'dppptemp';
751 while (-e "$tmp.$suf") { $suf++ }
754 if (open F, ">$tmp") {
758 if (open F, "$prog $file $tmp |") {
760 s/\Q$tmp\E/$file.patched/;
771 error("Cannot open '$tmp' for writing: $!");
779 my($func, $seen) = @_;
780 return () unless exists $depends{$func};
781 $seen = {%{$seen||{}}};
782 return () if $seen->{$func}++;
784 grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
789 $opt{quiet} and return;
795 $opt{quiet} and return;
796 $opt{diag} and print @_, "\n";
801 $opt{quiet} and return;
802 print "*** ", @_, "\n";
807 print "*** ERROR: ", @_, "\n";
814 $opt{quiet} and return;
817 if (exists $warnings{$func} && !$given_warnings{$func}++) {
818 my $warn = $warnings{$func};
819 $warn =~ s!^!*** !mg;
820 print "*** WARNING: $func\n", $warn;
823 if ($opt{hints} && exists $hints{$func} && !$given_hints{$func}++) {
824 my $hint = $hints{$func};
826 print " --- hint for $func ---\n", $hint;
833 my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
834 my %M = ( 'I' => '*' );
835 $usage =~ s/^\s*perl\s+\S+/$^X $0/;
836 $usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
842 See perldoc $0 for details.
851 my $self = do { local(@ARGV,$/)=($0); <> };
852 my($copy) = $self =~ /^=head\d\s+COPYRIGHT\s*^(.*?)^=\w+/ms;
853 $copy =~ s/^(?=\S+)/ /gms;
854 $self =~ s/^$HS+Do NOT edit.*?(?=^-)/$copy/ms;
855 $self =~ s/^SKIP.*(?=^__DATA__)/SKIP
856 if (\@ARGV && \$ARGV[0] eq '--unstrip') {
857 eval { require Devel::PPPort };
858 \$@ and die "Cannot require Devel::PPPort, please install.\\n";
859 if (eval \$Devel::PPPort::VERSION < $VERSION) {
860 die "$0 was originally generated with Devel::PPPort $VERSION.\\n"
861 . "Your Devel::PPPort is only version \$Devel::PPPort::VERSION.\\n"
862 . "Please install a newer version, or --unstrip will not work.\\n";
864 Devel::PPPort::WriteFile(\$0);
869 Sorry, but this is a stripped version of \$0.
871 To be able to use its original script and doc functionality,
872 please try to regenerate this file using:
878 my($pl, $c) = $self =~ /(.*^__DATA__)(.*)/ms;
880 / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
881 | ( "[^"\\]*(?:\\.[^"\\]*)*"
882 | '[^'\\]*(?:\\.[^'\\]*)*' )
883 | ($HS+) }{ defined $2 ? ' ' : ($1 || '') }gsex;
886 $c =~ s!^\s*#\s*!#!mg;
889 open OUT, ">$0" or die "cannot strip $0: $!\n";