B::Hooks::OP::Check::Install::Files is not indexed
[p5sagit/Devel-Declare.git] / t / method-installer-runtime.t
1 use strict;
2 use warnings;
3 use Test::More tests => 2;
4 use Devel::Declare::MethodInstaller::Simple;
5
6 BEGIN {
7   Devel::Declare::MethodInstaller::Simple->install_methodhandler(
8     name => 'method',
9     into => 'main',
10   );
11 }
12
13 ok(!main->can('foo'), 'foo() not installed yet');
14
15 method foo {
16     $_[0]->method
17 }
18
19 ok(main->can('foo'), 'foo() installed at runtime');
20