From: Matt S Trout Date: Wed, 27 Jun 2007 03:48:16 +0000 (+0000) Subject: added example X-Git-Tag: 0.001000~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3c90044df86def2b373a42229f04b691a15df85c;p=p5sagit%2FDevel-BeginLift.git added example --- diff --git a/example/simple.pl b/example/simple.pl new file mode 100755 index 0000000..0c3ce26 --- /dev/null +++ b/example/simple.pl @@ -0,0 +1,23 @@ +#!/usr/bin/env perl + +use strict; +use warnings; + +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) { + print foo($i++); + print bar($i++); +} + +no Devel::BeginLift; + +print foo($i++);