From: Florian Ragwitz Date: Sat, 25 Oct 2008 10:51:35 +0000 (+0000) Subject: Turn *_for_cv into classmethods. X-Git-Tag: 0.001001~1^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eeee00dfd031b2d5c2cac5179c47a56da82a994e;p=p5sagit%2FDevel-BeginLift.git Turn *_for_cv into classmethods. --- diff --git a/BeginLift.xs b/BeginLift.xs index cf92144..9794747 100644 --- a/BeginLift.xs +++ b/BeginLift.xs @@ -103,13 +103,13 @@ MODULE = Devel::BeginLift PACKAGE = Devel::BeginLift PROTOTYPES: DISABLE UV -setup_for_cv (CV *cv) +setup_for_cv (class, CV *cv) CODE: RETVAL = (UV)hook_op_check_entersubforcv (cv, lift_cb, NULL); OUTPUT: RETVAL void -teardown_for_cv (UV id) +teardown_for_cv (class, UV id) CODE: hook_op_check_entersubforcv_remove ((hook_op_check_id)id); diff --git a/lib/Devel/BeginLift.pm b/lib/Devel/BeginLift.pm index 67ff298..b940966 100644 --- a/lib/Devel/BeginLift.pm +++ b/lib/Devel/BeginLift.pm @@ -28,7 +28,7 @@ sub setup_for { my ($class, $target, $args) = @_; $lift{$target} ||= []; push @{ $lift{$target} }, map { - setup_for_cv($_); + $class->setup_for_cv($_); } map { ref $_ eq 'CODE' ? $_ @@ -38,7 +38,7 @@ sub setup_for { sub teardown_for { my ($class, $target) = @_; - teardown_for_cv($_) for @{ $lift{$target} }; + $class->teardown_for_cv($_) for @{ $lift{$target} }; delete $lift{$target}; }