[Bast-commits] r4986 - Devel-BeginLift/1.000/trunk

rafl at dev.catalyst.perl.org rafl at dev.catalyst.perl.org
Sat Oct 25 12:23:03 BST 2008


Author: rafl
Date: 2008-10-25 12:23:03 +0100 (Sat, 25 Oct 2008)
New Revision: 4986

Modified:
   Devel-BeginLift/1.000/trunk/README
Log:
Update README.

Modified: Devel-BeginLift/1.000/trunk/README
===================================================================
--- Devel-BeginLift/1.000/trunk/README	2008-10-25 11:22:56 UTC (rev 4985)
+++ Devel-BeginLift/1.000/trunk/README	2008-10-25 11:23:03 UTC (rev 4986)
@@ -3,23 +3,23 @@
 
 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 @@
     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 - <mst at shadowcatsystems.co.uk>
 




More information about the Bast-commits mailing list