Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Re^5: Macros, LFSPs and LFMs

by demerphq (Chancellor)
on Jun 15, 2003 at 14:20 UTC ( [id://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. :-)


---
demerphq

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

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-03-28 17:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found