Your IP : 216.73.216.1


Current Path : /usr/share/doc/perl-Moose/t/bugs/
Upload File :
Current File : //usr/share/doc/perl-Moose/t/bugs/delete_sub_stash.t

use strict;
use warnings;
use Test::More;

use Moose ();

{
    package Foo;
    sub bar { 'BAR' }
}

my $method = \&Foo::bar;

{
    no strict 'refs';
    delete ${'::'}{'Foo::'};
}

my $meta = Moose::Meta::Class->create('Bar');
$meta->add_method(bar => $method);
is(Bar->bar, 'BAR');

done_testing;