X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=examples%2Funits%2Fbytes.pl;h=615976d7bcf57cd04d4df6a176203fdc0c972897;hb=68a5f1ac75a933e5a844c23243fc386816bdcf85;hp=bea299289182809dfeaa89f933a0bab25ee138d8;hpb=19b62758d344df4fa5cb91cd04d65fbb0b316934;p=gitmo%2FMoose-Autobox.git diff --git a/examples/units/bytes.pl b/examples/units/bytes.pl index bea2992..615976d 100644 --- a/examples/units/bytes.pl +++ b/examples/units/bytes.pl @@ -6,7 +6,8 @@ use warnings; use Moose::Autobox; { - package Units::Bytes; + package # hide from PAUSE + Units::Bytes; use Moose::Role; use Moose::Autobox; @@ -35,3 +36,33 @@ print "2 megabytes are " . 2->megabytes . " bytes"; print "1 gigabyte is " . 1->gigabyte . " bytes"; print "2 terabyes are " . 2->terabytes . " bytes"; +=pod + +=head1 NAME + +Unit::Bytes + +=head1 SYNOPSIS + + Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Bytes'); + + print "5 kilobytes are " . 5->kilobytes . " bytes"; + print "2 megabytes are " . 2->megabytes . " bytes"; + print "1 gigabyte is " . 1->gigabyte . " bytes"; + print "2 terabyes are " . 2->terabytes . " bytes"; + +=head1 DESCRIPTION + +This is a Moose::Autobox port of the perl6 vmethods example. + +=head1 AUTHOR + +Stevan Little, Estevan@iinteractive.comE + +=head1 ACKNOLEDGEMENTS + +This code was ported from the version in the Pugs +examples/vmethods/ directory. See that for original author +information. + +=cut