in reply to Re: how to write a modified return() call?
in thread how to write a modified return() call?
Thank you, this is useful!
Two questions.. One on topic and one off topic.
Why not..my $start_with = another_value() or ( warn("Could not get another value"), return );
Or evenmy $start_with = another_value() or warn("Could not get another value"), return;
I tried these out and they seem to work fine. I suppose it's maybe trying to mess with the compiler/interpreter being vague with arguments to warn(), in the last example.my $start_with = another_value() or warn "Could not get another value", return;
Are you using parenthesis as good practice/legibility only?
It seems that unless I want to create my own perl distro, there's no way to do as JavaFan suggests ( 779943 ).
Perl's pretty freaking liberal with what it lets you do with symbol tables, but.. we can't just add another function to the language at compile time.
I wonder if this is something lisp could do- probably not- this must be on the language design (compiler/interpreter) level, not the coding level (?).
( Actually, as Corion noted initially.. 779928 )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: how to write a modified return() call?
by ikegami (Patriarch) on Jul 14, 2009 at 19:05 UTC |