return Data::Dumper::Dumper($self);
}
+*perl = *dump;
+
1;
__END__
=item B<dump>
+Calls Data::Dumper::Dumper.
+
+=item B<perl>
+
+Same as B<dump>. For symmetry with Perl6's .perl method.
+
=back
=head1 BUGS
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
-=cut
\ No newline at end of file
+=cut
use strict;
use warnings;
-use Test::More tests => 56;
+use Test::More tests => 58;
BEGIN {
use_ok('Moose::Autobox');
[ 15, 20, 30, 10, 2, 6, 78, 101, 2, 10, 15, 20, 30 ],
'... the value is correctly put');
+my $expected_dump = qr/^\$VAR1\s*=\s*\[\s*15,\s*20,\s*30,\s*10,\s*2,\s*6,\s*78,\s*101,\s*2,\s*10,\s*15,\s*20,\s*30\s*\]\s*;\s*$/msx;
+
+like( $a->dump,
+ $expected_dump,
+ '... the value is correctly dumped' );
+is( $a->dump,
+ $a->perl,
+ '... the value is correctly dumped with perl()' );
+
+
# Hash
my $h = { one => 1, two => 2, three => 3 };