diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2012-05-08 18:20:12 +0000 |
---|---|---|
committer | Lorry <lorry@roadtrain.codethink.co.uk> | 2012-10-03 12:23:37 +0000 |
commit | 661707e7bd4282aeab5a2f6a8f02ca5731fd813f (patch) | |
tree | 9b32ff910278233ad929888499ca8380f2696582 /examples/warndie.pl | |
download | error-perl-tarball-661707e7bd4282aeab5a2f6a8f02ca5731fd813f.tar.gz |
Imported from /srv/lorry/lorry-area/error-perl-tarball/Error-0.17018.tar.gz.baserock/morph
Diffstat (limited to 'examples/warndie.pl')
-rw-r--r-- | examples/warndie.pl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/warndie.pl b/examples/warndie.pl new file mode 100644 index 0000000..23e2e9e --- /dev/null +++ b/examples/warndie.pl @@ -0,0 +1,23 @@ +#!/usr/bin/perl -w + +require Error; +if( $ARGV[0] ) { + import Error qw( :warndie ); + print "Imported the :warndie tag.\n"; + print "\n"; +} +else { + print "Running example without the :warndie tag.\n"; + print "Try also passing a true value as \$ARGV[0] to import this tag\n"; + print "\n"; +} + +sub inner { + shift->foo(); +} + +sub outer { + inner( @_ ); +} + +outer( undef ); |