X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/0062da448369aded78eebffeaae69561fa016024..dc1ab5f00eed170e75fe40687b381369a35760b8:/perl.plp diff --git a/perl.plp b/perl.plp index ff3054e..131291e 100644 --- a/perl.plp +++ b/perl.plp @@ -2,7 +2,7 @@ Html({ title => 'perl version cheat sheet', - version => '1.1', + version => '1.3', keywords => [qw' perl version feature features comparison sheet cheat overview summary @@ -14,20 +14,24 @@ Html({ :>

Perl release summary

-

The most significant features introduced for recent versions of the Perl scripting language. -Depending on desired compatibility you'll want to support a minimum of -v5.8 or -v5.14. -

- +

The most significant features introduced for recent versions of the Perl +scripting language. <: my $info = do 'perl.inc.pl' or die $@ // $!; + +say "Depending on desired compatibility you'll want to support a minimum of"; +say join(' or ', map { + sprintf 'v%vd', $info->{$_}->{distrosum}, $_ +} v5.8, v5.20), '.'; +say '

'; + for my $vernum (reverse sort keys %{$info}) { my $verrow = $info->{$vernum}; - $verrow->{unstable} and next unless exists $get{v}; + defined $verrow->{unstable} and next unless exists $get{v}; - print '
'."\n"; - printf '

%vd %s

'."\n", $vernum, $verrow->{release}; + say '
'; + say sprintf '

%vd %s

', $vernum, $verrow->{release}; + say '
'; for (@{ $verrow->{new} }) { my ($topic, $desc, $attr) = @{$_}; if ($attr) { @@ -47,15 +51,16 @@ for my $vernum (reverse sort keys %{$info}) { $attr->{experimental}, $title; } if ($attr->{feature}) { - $title = sprintf('feature', $attr->{feature}) - . (defined $title && ", $title"); + my $prefix = sprintf 'feature', + $attr->{feature}; + $title = join ', ', $prefix, $title // (); } $desc .= sprintf ' (%s)', $title; } - printf '
%s
%s'."\n", $topic, $desc || '
'; + say sprintf '
%s
%s', $topic, $desc || '
'; } - printf '
Unicode
v%s'."\n", $_ for $verrow->{unicode} || (); - print "
\n"; - print "
\n\n"; + say sprintf '
Unicode
v%s', $_ for $verrow->{unicode} || (); + say '
'; + say "
\n"; }