Subject: | Moose removes "blessed" from namespace after "no Moose" |
After using "no Moose;", a previously imported "use Scalar::Util
qw(blessed);" is removed from the namespace.
Workaround is possible by moving "use Scalar::Util..." after "no Moose".
Attached test script demonstrates this problem.
Subject: | moose_blessed.t |
#!/usr/bin/perl
use strict;
use warnings;
package BreakMoose;
use Test::More tests => 2;
use Scalar::Util qw(blessed);
use Moose;
my $foo = bless { }, 'BreakMoose';
ok( blessed $foo, '$foo is blessed' );
no Moose;
ok( blessed $foo, '$foo is still blessed' );
1;