Skip to content

Commit

Permalink
Add scope parameter for subroutines called for each element in [zoom]…
Browse files Browse the repository at this point in the history
… replacements.
  • Loading branch information
racke committed Aug 15, 2010
1 parent fcb51c9 commit 097d190
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/WellWell/Zoom.pm
Expand Up @@ -194,7 +194,14 @@ sub parse_handler {

if ($sob->{sub}) {
# determine code reference for named function
$sob->{subref} = $Vend::Cfg->{Sub}{$sob->{sub}} || $Global::GlobalSub->{$sob->{sub}};
my $subref = $Vend::Cfg->{Sub}{$sob->{sub}} || $Global::GlobalSub->{$sob->{sub}};

if ($sob->{scope} eq 'element') {
$elt->{zoom_rep_sub} = $subref;
}
else {
$sob->{subref} = $subref;
}
}

$sref->{params}->{$sob->{list}}->{hash}->{$name} = $sob;
Expand Down

0 comments on commit 097d190

Please sign in to comment.