From: Shawn M Moore Date: Wed, 26 Nov 2008 03:26:55 +0000 (+0000) Subject: Make sure we export blessed and confess X-Git-Tag: 0.05~64 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2293e5f1add090f9f2a6437a0115eff07c62c683;p=gitmo%2FMooseX-Role-Parameterized.git Make sure we export blessed and confess --- diff --git a/lib/MooseX/Role/Parameterized.pm b/lib/MooseX/Role/Parameterized.pm index 938cc6a..2879984 100644 --- a/lib/MooseX/Role/Parameterized.pm +++ b/lib/MooseX/Role/Parameterized.pm @@ -3,7 +3,7 @@ package MooseX::Role::Parameterized; use Moose ( extends => { -as => 'moose_extends' }, around => { -as => 'moose_around' }, - 'confess', + qw/confess blessed/, ); use Carp 'croak'; @@ -16,7 +16,7 @@ our $CURRENT_METACLASS; __PACKAGE__->setup_import_methods( with_caller => ['parameter', 'role', 'method'], - as_is => ['has', 'with', 'extends', 'requires', 'excludes', 'augment', 'inner', 'before', 'after', 'around', 'super', 'override'], + as_is => ['has', 'with', 'extends', 'requires', 'excludes', 'augment', 'inner', 'before', 'after', 'around', 'super', 'override', 'confess', 'blessed'], ); sub parameter { diff --git a/t/010-blessed-confess.t b/t/010-blessed-confess.t new file mode 100644 index 0000000..04a71d3 --- /dev/null +++ b/t/010-blessed-confess.t @@ -0,0 +1,12 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More tests => 2; + +do { + package MyRole; + use MooseX::Role::Parameterized; + ::is(\&confess, \&Carp::confess, 'confess'); + ::is(\&blessed, \&Scalar::Util::blessed, 'blessed'); +}; +