in reply to Random Tips on Parse::RecDescent
Useful compilation, but you can go back and reenable strict 'refs'.
Makeshifts last the longest.
Alternatively: (UNIVERSAL::can('main', $sub) or sub { print "No such sub: $_\n" })->(); ____________#!/usr/bin/perl -w use strict; for (qw(foo bar)) { ($main::{$_} or sub { print "No such sub: $_\n" })->(); } sub foo { print "Yes, I'm here.\n"; } __END__ Yes, I'm here. No such sub: bar
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Random Tips on Parse::RecDescent
by hsmyers (Canon) on Jul 12, 2002 at 13:21 UTC | |
by Aristotle (Chancellor) on Jul 13, 2002 at 02:30 UTC | |
by hsmyers (Canon) on Jul 13, 2002 at 16:10 UTC |
In Section
Meditations