## See POD after __END__
-require 5.002;
+use 5.005_64;
use strict;
-use vars qw(@ISA @EXPORT $VERSION);
+our(@ISA, @EXPORT, $VERSION);
use Carp;
$out = "{\n package $class;\n use Carp;\n sub new {\n";
$out .= " my (\$class, \%init) = \@_;\n";
+ $out .= " \$class = __PACKAGE__ unless \@_;\n";
my $cnt = 0;
my $idx = 0;
With no argument, the accessor returns a reference to the
element's whole array (whether or not the element was
-specified as C<'@'> or C<'*@').
+specified as C<'@'> or C<'*@'>).
With one or two arguments, the first argument is an index
specifying one element of the array; the second argument, if
With no argument, the accessor returns a reference to the
element's whole hash (whether or not the element was
-specified as C<'%'> or C<'*%').
+specified as C<'%'> or C<'*%'>).
With one or two arguments, the first argument is a key specifying
one element of the hash; the second argument, if present, is
print "(which was a ", $cat->breed->name, ")\n";
print "had two kittens: ", join(' and ', @{$cat->kittens}), "\n";
+=back
=head1 Author and Modification History