+{
# grab all code entries that aren't in the not_methods list
map {
- my $code = *{$stash->{$_}}{CODE};
- # rely on the '' key we added in import for "no code here"
- exists $not_methods->{$code||''} ? () : ($_ => $code)
+ my $code = *{$stash->{$_}}{CODE};
+ # rely on the '' key we added in import for "no code here"
+ exists $not_methods->{$code||''} ? () : ($_ => $code)
} grep !(ref($stash->{$_}) eq 'SCALAR'), keys %$stash
};
};
keys %$stash
} = ();
if (my @requires_fail
- = grep !exists $has_methods{$_}, @{$info->{requires}||[]}) {
+ = grep !exists $has_methods{$_}, @{$info->{requires}||[]}) {
# role -> role, add to requires, role -> class, error out
if (my $to_info = $INFO{$to}) {
push @{$to_info->{requires}||=[]}, @requires_fail;
if (keys %$captures) {
my $ass_cap_count = @assembled_captures;
$make_sub .= join(
- "\n",
- map {
- /^([\@\%\$])/
- or die "capture key should start with \@, \% or \$: $_";
- qq{ my ${_} = ${1}{\$_[1][${ass_cap_count}]{${\perlstring $_}}};\n};
- } keys %$captures
+ "\n",
+ map {
+ /^([\@\%\$])/
+ or die "capture key should start with \@, \% or \$: $_";
+ qq{ my ${_} = ${1}{\$_[1][${ass_cap_count}]{${\perlstring $_}}};\n};
+ } keys %$captures
);
push @assembled_captures, $captures;
}
my $o_quoted = perlstring $outstanding;
$make_sub .= (
$name
- # disable the 'variable $x will not stay shared' warning since
- # we're not letting it escape from this scope anyway so there's
- # nothing trying to share it
+ # disable the 'variable $x will not stay shared' warning since
+ # we're not letting it escape from this scope anyway so there's
+ # nothing trying to share it
? " no warnings 'closure';\n sub ${name} {\n"
- : " \$Sub::Quote::QUOTED{${o_quoted}}[3] = sub {\n"
+ : " \$Sub::Quote::QUOTED{${o_quoted}}[3] = sub {\n"
);
$make_sub .= $code;
$make_sub .= " }".($name ? '' : ';')."\n";