Release commit for 0.006022
[p5sagit/Devel-Declare.git] / t / method-installer-runtime.t
CommitLineData
b633fbd2 1use strict;
d17a5ab4 2use warnings;
72a03bb0 3use Test::More tests => 2;
b633fbd2 4use Devel::Declare::MethodInstaller::Simple;
5
6BEGIN {
7 Devel::Declare::MethodInstaller::Simple->install_methodhandler(
8 name => 'method',
9 into => 'main',
10 );
11}
12
72a03bb0 13ok(!main->can('foo'), 'foo() not installed yet');
b633fbd2 14
09ca664a 15method foo {
16 $_[0]->method
17}
b633fbd2 18
72a03bb0 19ok(main->can('foo'), 'foo() installed at runtime');
b633fbd2 20