X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/7ed9b63a14c31376317e10ff18bdc8634508285b..a9f9b6054445a839cecdb10949adbd9dccbd7682:/perl.plp?ds=inline
diff --git a/perl.plp b/perl.plp
index f5d6f26..ff3054e 100644
--- a/perl.plp
+++ b/perl.plp
@@ -2,7 +2,7 @@
Html({
title => 'perl version cheat sheet',
- version => 'v1.1',
+ version => '1.1',
keywords => [qw'
perl version feature features comparison
sheet cheat overview summary
@@ -16,8 +16,8 @@ Html({
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.
+v5.8 or
+v5.14.
<:
@@ -29,18 +29,30 @@ for my $vernum (reverse sort keys %{$info}) {
print ''."\n";
printf '
%vd %s
'."\n", $vernum, $verrow->{release};
for (@{ $verrow->{new} }) {
- if (defined (my $experimental = $_->[2])) {
- my $title = 'experimental';
- my $class = ' class="ex"';
- if (ref \$experimental eq 'VSTRING') {
- $title .= sprintf ' until %vd', $experimental;
+ my ($topic, $desc, $attr) = @{$_};
+ if ($attr) {
+ my $title;
+ if (defined $attr->{experimental}) {
+ $title = 'experimental';
}
- elsif ($experimental) {
- $class .= sprintf ' title="%s"', $experimental;
+ if ($attr->{dropped}) {
+ next unless exists $get{v};
+ $title = sprintf 'removed in %vd', $attr->{dropped};
}
- $_->[1] .= qq{ ($title)};
+ 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;
}
- printf '- %s
- %s'."\n", @{$_}, '
'
+ printf ' - %s
- %s'."\n", $topic, $desc || '
';
}
printf ' - Unicode
- v%s'."\n", $_ for $verrow->{unicode} || ();
print "
\n";