X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=samples%2Ffuncs.pl;h=72a73257a38778b5d4f508bc32af22c424e24628;hb=5d3ec9b6f2a27ddb9a986a67cd428df2340af986;hp=5bcfeb9005dfdd1cb57d3f3136360b3a5b8b5091;hpb=7d694e6f49e219b9c5f62d323666ca2854d51f50;p=perl%2Fmodules%2Fwith.git diff --git a/samples/funcs.pl b/samples/funcs.pl index 5bcfeb9..72a7325 100755 --- a/samples/funcs.pl +++ b/samples/funcs.pl @@ -11,10 +11,10 @@ die "no functions" unless $f; my @f = $f =~ /C<([^<>]+)>/g; my %dup; @f = sort - grep { eval { () = prototype "CORE::$_" }; !$@ } + grep { eval { () = prototype "CORE::$_"; 1 } } grep !$dup{$_}++, @f; my $c = 10; -my $base = "my \@core = qw/"; +my $base = "my \@core = qw<"; my $out = $base; my $l = length $base; my $first = 1; @@ -31,7 +31,8 @@ for (@f) { } else { $l = length($base) - 1; $out .= "\n" . (' ' x $l); + redo; } } -$out .= "/;\n"; +$out .= ">;\n"; print $out;