Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Prototypes and hand-written MMD

by PodMaster (Abbot)
on Jan 10, 2006 at 04:24 UTC ( #522086=note: print w/replies, xml ) Need Help??


in reply to Prototypes and hand-written MMD

From what I've read, you would need (&@). 'perldoc perlsub'
The interesting thing about "&" is that you can generate new syntax with it, provided it's in the initial position:
sub try (&@) { my($try,$catch) = @_; eval { &$try }; if ($@) { local $_ = $@; &$catch; } } sub catch (&) { $_[0] } try { die "phooey"; } catch { /phooey/ and print "unphooey\n"; };
Although I'm not quite sure it would work.

update: 2006-01-10 00:06:08 PST The prototype magic that allows you to avoid a comma only works with codeblocks (just like do/grep/map), so I'm pretty sure now that you can't avoid it.

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://522086]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (10)
As of 2021-01-27 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?