From: Chris Prather Date: Fri, 21 Nov 2008 17:28:37 +0000 (+0000) Subject: add '0 but true' X-Git-Tag: 0.62~23 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2deb99ff49eb915db04ec6083ccd59c14f5423b6;p=gitmo%2FMoose.git add '0 but true' --- diff --git a/t/100_bugs/019_moose_octal_defaults.t b/t/100_bugs/019_moose_octal_defaults.t index ddb9ab1..560eeff 100644 --- a/t/100_bugs/019_moose_octal_defaults.t +++ b/t/100_bugs/019_moose_octal_defaults.t @@ -91,4 +91,27 @@ __PACKAGE__->meta->make_immutable; $@ ? ::fail($@) : ::pass('017600 octal default works'); my $obj = Test::Moose::Go::Boom4->new; ::is( $obj->id, '0xFF', 'value is still the same' ); +} + +{ + my $package = qq{ +package Test::Moose::Go::Boom5; +use Moose; +use lib qw(lib); + +has id => ( + isa => 'Str', + is => 'ro', + default => '0 but true', +); + +no Moose; + +__PACKAGE__->meta->make_immutable; +}; + + eval $package; + $@ ? ::fail($@) : ::pass('017600 octal default works'); + my $obj = Test::Moose::Go::Boom5->new; + ::is( $obj->id, '0 but true', 'value is still the same' ); } \ No newline at end of file