Skip to content

Commit

Permalink
pass \%seen along to recursive invocations
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed Mar 21, 2011
1 parent 9c91054 commit b659faf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Class/Rebless.pm
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ my %subs = (
while (my($name, $editor) = each %subs) {
my $code; # yay for recursive closures!
$code = sub {
my($proto, $obj, $namespace, $opts, $level) = @_;
my($proto, $obj, $namespace, $opts, $level, $seen) = @_;
$opts ||= {};
$opts->{code} = $code;
$editor->($opts);

_recurse($proto, $obj, $namespace, $opts, $level);
_recurse($proto, $obj, $namespace, $opts, $level, $seen);
#goto &recurse; # I wonder why this doesn't work?
};
no strict 'refs';
Expand Down

0 comments on commit b659faf

Please sign in to comment.