From: gfx Date: Tue, 9 Feb 2010 06:12:59 +0000 (+0900) Subject: Add a DB::sub test to xt/ X-Git-Tag: 0.50_01~13 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=6d5a627396f91b2dce25a7b6e5c5dbe6b67f2d95 Add a DB::sub test to xt/ --- diff --git a/xt/05_dbsub.t b/xt/05_dbsub.t new file mode 100644 index 0000000..a6ae6fe --- /dev/null +++ b/xt/05_dbsub.t @@ -0,0 +1,22 @@ +#!perl -w +BEGIN{ $^P = 0x10 | 0x200 } +use Test::More; + +sub DB::DB {} + +{ + package Foo; + use Mouse; + + __PACKAGE__->meta->add_method(bar => sub{ __LINE__ }); +} + +if(Mouse::Util::MOUSE_XS){ +is $DB::sub{'Foo::bar'}, sprintf('%s:%d-%d', __FILE__, Foo->bar, Foo->bar), + '%DB::sub updated'; +} +else{ + pass 'under Mouse::PurePerl'; +} + +done_testing;