X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/6b443abb1ebf8f9a7902eb53911ab26201e5e7ab..7ac9a00245dde674939ac5d88887e0cf69ab1736:/perl.plp
diff --git a/perl.plp b/perl.plp
index 255032a..a5ef991 100644
--- a/perl.plp
+++ b/perl.plp
@@ -2,24 +2,60 @@
Html({
title => 'perl version cheat sheet',
- version => 'v1.0',
+ version => '1.2',
keywords => [qw'
perl version feature features comparison
sheet cheat overview summary
'],
stylesheet => [qw'light dark red'],
+ data => ['perl.inc.pl'],
});
:>
-
Perl cheat sheets
+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.
+
<:
my $info = do 'perl.inc.pl' or die $@ // $!;
-for my $ver (reverse sort keys %{$info}) {
- print ''."\n";
- printf '
%vd
'."\n", $ver;
- printf '- %s
- %s', Entity(@{$_}), '
' for @{ $info->{$ver} };
- print "
\n";
- print "
\n\n";
+for my $vernum (reverse sort keys %{$info}) {
+ my $verrow = $info->{$vernum};
+ defined $verrow->{unstable} and next unless exists $get{v};
+
+ say '';
+ say sprintf '
%vd %s
', $vernum, $verrow->{release};
+ for (@{ $verrow->{new} }) {
+ my ($topic, $desc, $attr) = @{$_};
+ if ($attr) {
+ my $title;
+ if (defined $attr->{experimental}) {
+ $title = 'experimental';
+ }
+ if ($attr->{dropped}) {
+ next unless exists $get{v};
+ $title = sprintf 'removed in %vd', $attr->{dropped};
+ }
+ elsif ($attr->{stable}) {
+ $title .= sprintf ' until %vd', $attr->{stable};
+ }
+ if ($attr->{experimental}) {
+ $title = sprintf '%s',
+ $attr->{experimental}, $title;
+ }
+ if ($attr->{feature}) {
+ $title = sprintf('feature', $attr->{feature})
+ . (defined $title && ", $title");
+ }
+ $desc .= sprintf ' (%s)', $title;
+ }
+ say sprintf '- %s
- %s', $topic, $desc || '
';
+ }
+ say sprintf ' - Unicode
- v%s', $_ for $verrow->{unicode} || ();
+ say '
';
+ say "
\n";
}