| 1 | package MOP4Import::Types::Extend; | ||
| 2 | use 5.010; | ||
| 3 | use strict; | ||
| 4 | use warnings qw(FATAL all NONFATAL misc); | ||
| 5 | use Carp; | ||
| 6 | |||
| 7 | use MOP4Import::Opts qw/Opts m4i_opts/; | ||
| 8 | use MOP4Import::Types -as_base; | ||
| 9 | use MOP4Import::Util; | ||
| 10 | |||
| 11 | use constant DEBUG => $ENV{DEBUG_MOP4IMPORT}; | ||
| 12 | |||
| 13 | sub import { | ||
| 14 | my $myPack = shift; | ||
| 15 | |||
| 16 | m4i_log_start() if DEBUG; | ||
| 17 | |||
| 18 | my Opts $opts = m4i_opts([caller])->take_hash_maybe(\@_); | ||
| 19 | |||
| 20 | $opts->{extending} = 1; | ||
| 21 | |||
| 22 | $myPack->dispatch_pairs_as_declare(type => $opts, @_); | ||
| 23 | |||
| 24 | m4i_log_end($opts->{callpack}) if DEBUG; | ||
| 25 | } | ||
| 26 | |||
| 27 | 1; |