X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FNet%2Fservent.pm;h=78a168145557552c555bb36528d41aab3461f2a7;hb=f1317c8d183c687b884dabebf7d01723441851a4;hp=18c7fb5c922eb7053925bb89979b8fbba2468e24;hpb=0e06870bf080a38cda51c06c6612359afc2334e1;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Net/servent.pm b/lib/Net/servent.pm index 18c7fb5..78a1681 100644 --- a/lib/Net/servent.pm +++ b/lib/Net/servent.pm @@ -1,8 +1,8 @@ package Net::servent; use strict; -use 5.005_64; -our $VERSION = '1.00'; +use 5.006_001; +our $VERSION = '1.01'; our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS); BEGIN { use Exporter (); @@ -74,10 +74,10 @@ method returns an array reference, the rest scalars. You may also import all the structure fields directly into your namespace as regular variables using the :FIELDS import tag. (Note that this still overrides your core functions.) Access these fields as variables named -with a preceding C. Thus, C<$serv_obj-Ename()> corresponds to +with a preceding C. Thus, C<$serv_obj-Ename()> corresponds to $s_name if you import the fields. Array references are available as -regular array variables, so for example C<@{ $serv_obj-Ealiases() -}> would be simply @s_aliases. +regular array variables, so for example C<@{ $serv_obj-Ealiases()}> +would be simply @s_aliases. The getserv() function is a simple front-end that forwards a numeric argument to getservbyport(), and the rest to getservbyname().