| 1 | package Test::Geoffrey::Role; | ||
| 2 | |||
| 3 | use utf8; | ||
| 4 | use 5.016; | ||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | use Test::Builder; | ||
| 8 | |||
| 9 | $Test::Geoffrey::Role::VERSION = '0.000206'; | ||
| 10 | |||
| 11 | #my $tester = Test::Builder->new; | ||
| 12 | #*Level = \$Test::Builder::Level; | ||
| 13 | sub parent_is_role () { | ||
| 14 | my ( $code, $name ) = @_; | ||
| 15 | |||
| 16 | # local our $Level = $Level + 1; # this function | ||
| 17 | |||
| 18 | my $ok; | ||
| 19 | |||
| 20 | eval { | ||
| 21 | |||
| 22 | } or do { | ||
| 23 | |||
| 24 | }; | ||
| 25 | |||
| 26 | return $ok; | ||
| 27 | } | ||
| 28 | |||
| 29 | sub import { | ||
| 30 | my $class = shift; | ||
| 31 | #do { | ||
| 32 | #die "Unknown symbol: $_" if $_ ne 'parent_is_role' | ||
| 33 | # } for @_; | ||
| 34 | #no strict 'refs'; | ||
| 35 | *{ caller . '::parent_is_role' } = \&parent_is_role; | ||
| 36 | return 1; | ||
| 37 | } | ||
| 38 | |||
| 39 | 1; | ||
| 40 | |||
| 41 | __END__ |