X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FText%2FAbbrev.pm;h=c6be63bcc60bae0e90c00b3548b5455904e7f247;hb=f1d72bc4f93301613aaebd1e84ca89818fe21f42;hp=d4f12d0b99902f19057819ca76768a5ec03e8b7c;hpb=ee8c7f5465f003860e2347a2946abacac39bd9b9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Text/Abbrev.pm b/lib/Text/Abbrev.pm index d4f12d0..c6be63b 100644 --- a/lib/Text/Abbrev.pm +++ b/lib/Text/Abbrev.pm @@ -2,6 +2,8 @@ package Text::Abbrev; require 5.005; # Probably works on earlier versions too. require Exporter; +our $VERSION = '1.01'; + =head1 NAME abbrev - create an abbreviation table from a list @@ -41,6 +43,7 @@ The values are the original list elements. sub abbrev { my ($word, $hashref, $glob, %table, $returnvoid); + @_ or return; # So we don't autovivify onto @_ and trigger warning if (ref($_[0])) { # hash reference preferably $hashref = shift; $returnvoid = 1;