Code-ART
view release on metacpan or search on metacpan
lib/Code/ART.pm view on Meta::CPAN
my $package = shift;
my $opt_ref = shift // {};
croak("Options argument to 'use $package' must be a hash reference")
if ref($opt_ref) ne 'HASH';
# # Remember lexically scoped options...
# for my $optname (keys %{$opt_ref}) {
# croak "Unknown option ('$optname') passed to 'use $package'"
# if !$VALID_REFACTOR_OPTION{$optname} && !$VALID_HOIST_OPTION{$optname};
# $^H{"Code::ART $optname"} = $opt_ref->{$optname};
# }
# Export the API...
no strict 'refs';
*{caller().'::refactor_to_sub'} = \&refactor_to_sub;
*{caller().'::rename_variable'} = \&rename_variable;
*{caller().'::classify_all_vars_in'} = \&classify_all_vars_in;
*{caller().'::hoist_to_lexical'} = \&hoist_to_lexical;
}
( run in 0.419 second using v1.01-cache-2.11-cpan-49f99fa48dc )