Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Re^5: Macros, LFSPs and LFMs

by demerphq (Chancellor)
on Jun 15, 2003 at 14:20 UTC ( #266031=note: print w/replies, xml ) Need Help??

in reply to Re^5: Macros, LFSPs and LFMs
in thread Macros, LFSPs and LFMs

I can see your point here. Ive done things like this

sub assert{ my ($stmt,@args)=@_; my $ok=eval"$stmt" or die "Failed to eval assertion '$stmt':$@"; unless ($ok) { no warnings; my $str=eval qq("$stmt") or die "Failed to eval assertion '$stmt' as a string:$@"; die "Failed assertion '$str'\n"; } }

which works reasonably well, but obviously isn't as satisfactory as your approach, and could even be a security risk as presently written if it were run on untrustworthy data.

Anyway, Itll be nice though when the new stuff is out at a production grade. I look forward to it. :-)


<Elian> And I do take a kind of perverse pleasure in having an OO assembly language...

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2016-10-23 22:59 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (302 votes). Check out past polls.