NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
more Moose (Score:1)
use Moose::Autobox (); # don't actually autobox
sub new {
my ($class, @args) = @_;
bless {
args =>
# this is the class that autoboxing would use anyway
bless \@args => 'Moose::Autobox::ARRAY',
} => $class;
}
sub add_args {
my $self = shift;
$self->{args}->push(@_); # NOT UGLY!!!
}
# Likewise, use Moose::Autobox::HASH for hashes.
Reply to This