Commit | Line | Data |
---|---|---|
1a52f2db | 1 | #!perl |
2 | use strict; | |
3 | use warnings FATAL => 'all'; | |
4 | ||
5 | # Importing always affects the currently compiling scope. | |
6 | ||
7 | package Foo; | |
8 | ||
9 | use Test::More 'no_plan'; | |
10 | ||
11 | BEGIN { | |
12 | package Bar; | |
13 | require Function::Parameters; | |
14 | Function::Parameters->import; | |
15 | } | |
16 | ||
17 | is( Foo->foo(42), 42 ); | |
18 | ||
19 | method foo ($arg) { | |
20 | return $arg; | |
21 | } |