Revision history for Perl extension Moose::Autobox
-0.03
- - added &mixin_additional_role to allow mixing in of
- additional functionality
-
- - added new examples for units
- - ported from the Pugs examples/units directory
+0.03 Thurs. Aug 17, 2006
+
+ * Moose::Autobox
+ - we now inherit from autobox, now we don't have to
+ do that ugly eval thing or manually load autobox
+ when we want to use this module.
+ - added &mixin_additional_role to allow mixing in of
+ additional functionality (see examples/unit/*)
* Moose::Autobox::Code
- added the Y and U combinators
+ + added new examples for units
+ - ported from the Pugs examples/units directory
+
0.02 Sat. June 24, 2006
- fixed Moose::Autobox so that PAUSE won't try to
index SCALAR, ARRAY, HASH and CODE.
=head1 NAME
-tic_tac_toe.p6 - Tic-Tac-Toe
+tic_tac_toe.pl - Tic-Tac-Toe
=head1 DESCRIPTION
use Moose::Autobox;
{
- package Units::Bytes;
+ package # hide from PAUSE
+ Units::Bytes;
use Moose::Role;
use Moose::Autobox;
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, E<lt>stevan@iinteractive.comE<gt>
+
+=head1 ACKNOLEDGEMENTS
+
+This code was ported from the version in the Pugs
+examples/vmethods/ directory. See that for original author
+information.
+
+=cut
use Moose::Autobox;
{
- package Units::Time;
+ package # hide me from PAUSE
+ Units::Time;
use Moose::Role;
use Moose::Autobox;
print "1 day until 1 week ago : " . 1->day->til($one_week_ago)->as_string;
print "2 years since 1 week ago : " . 2->years->since($one_week_ago)->as_string;
+=pod
+=head1 NAME
+
+Unit::Time
+
+=head1 SYNOPSIS
+
+ Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Time');
+
+ print "2 days ago was : " . 2->days->ago->as_string;
+ print "3 weeks from now will be : " . 3->weeks->from_now->as_string;
+ print "1 day until 1 week ago : " . 1->day->til(1->week->ago)->as_string;
+ print "2 years since 1 week ago : " . 2->years->since(1->week->ago)->as_string;
+
+=head1 DESCRIPTION
+
+This is a Moose::Autobox port of the perl6 vmethods example.
+
+=head1 AUTHOR
+
+Stevan Little, E<lt>stevan@iinteractive.comE<gt>
+
+=head1 ACKNOLEDGEMENTS
+
+This code was ported from the version in the Pugs
+examples/vmethods/ directory. See that for original author
+information.
+
+=cut