From: Florian Ragwitz Date: Sat, 25 Oct 2008 11:23:03 +0000 (+0000) Subject: Update README. X-Git-Tag: 0.001002~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c360a8266e67c551240fd217a962d08b9d95bcdc;p=p5sagit%2FDevel-BeginLift.git Update README. --- diff --git a/README b/README index adacb76..c4364ab 100644 --- a/README +++ b/README @@ -3,23 +3,23 @@ NAME SYNOPSIS use Devel::BeginLift qw(foo baz); - - use vars qw($i); - - BEGIN { $i = 0 } - - sub foo { "foo: $_[0]\n"; } - - sub bar { "bar: $_[0]\n"; } - - for (1 .. 3) { + + use vars qw($i); + + BEGIN { $i = 0 } + + sub foo { "foo: $_[0]\n"; } + + sub bar { "bar: $_[0]\n"; } + + for (1 .. 3) { print foo($i++); print bar($i++); } - - no Devel::BeginLift; - - print foo($i++); + + no Devel::BeginLift; + + print foo($i++); outputs - @@ -54,6 +54,17 @@ DESCRIPTION begin lifting magic is number of teardown_for calls matches number of setup_for calls. + setup_for_cv + $id = Devel::BeginLift->setup_for_cv(\&code); + + Same as "setup_for", but only registers begin lifting magic for one code + reference. Returns an id to be used in "teardown_for_cv". + + teardown_for_cv + Devel::BeginLift->teardown_for_cv($id); + + Deregisters begin lifting magic referred to by $id. + AUTHOR Matt S Trout -