stuff ) if $whatever;
# we got this far so keep on moving
The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...
Anywho, any ideas would be awesome!
TIA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...
Are you saying that you want a subroutine that can make the subroutine
that called *it* return? I'm not
Tom Phoenix wrote:
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...
Are you saying that you want a subroutine that can make the subroutine
that called *it*
On 11/24/2006 05:37 PM, JupiterHost.Net wrote:
Tom Phoenix wrote:
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...
Are you saying that you want a subrouti
On Fri, Nov 24, 2006 at 05:37:35PM -0600, JupiterHost.Net wrote:
> In a function I can do this:
>
> # stuff here
>
>if($whatever, @ret) {
>one();
>two();
>goto &CORE::return; # this is pseudo code that does not work but
> illustrates the idea of the goal
>}
>
>
What about doing this?
return if do_one_then_two($whatever);
...
sub do_one_then_two {
my $what = $_[0];
if ($what) {
one();
two();
return 1;
}
return 0;
}
Thanks, I'm not looking for how to handle a condition necessarily.
I want to be able to:
log_e
Just need to figure you how to get the functionality that:
goto &CORE::return;
feels like it should do assuming I knew how to reference return...
nah
Thanks for your examples, however if a change was needed you'd still
have to change every instance instead of the single function.
So I'd
JupiterHost.Net am Montag, 27. November 2006 21:37:
> > What about doing this?
> >
> > return if do_one_then_two($whatever);
> > ...
> > sub do_one_then_two {
> > my $what = $_[0];
> > if ($what) {
> > one();
> > two();
> > return 1;
> > }
> > return 0;
> > }
JupiterHost.Net wrote:
What about doing this?
return if do_one_then_two($whatever);
...
sub do_one_then_two {
my $what = $_[0];
if ($what) {
one();
two();
return 1;
}
return 0;
}
Thanks, I'm not looking for how to handle a condition necessarily.
I wan
Rob Dixon wrote:
JupiterHost.Net wrote:
What about doing this?
return if do_one_then_two($whatever);
...
sub do_one_then_two {
my $what = $_[0];
if ($what) {
one();
two();
return 1;
}
return 0;
}
Thanks, I'm not looking for how to handle a condition n
> >> log_error_and_return($error, @return) if $whatever;
Close you want
return log_and_go_home($error, @return) if $whatever;
sub log_and_go_home {
my $message = shift;
log_error($message);
carp $message;
return @_;
}
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -
From: "JupiterHost.Net" <[EMAIL PROTECTED]>
> Thanks, I'm not looking for how to handle a condition necessarily.
>
> I want to be able to:
>
> log_error_and_return($error, @return) if $whatever;
>
> instead of
>
> if($whatever) {
> log_error();
> carp $error;
> return @ret
Thanks to everyone for their feedback, I understand how to do basic
logic and control flow, what I'm really looking for is how to get
goto &CORE::return;
to work like it reads.
log_error_and_return($error, @return) if $whatever;
Close you want
return log_and_go_home($error, @return) i
On 11/28/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
But if you could do this:
return_carp(...) if $whatever;
the first time around then you could have 1 places it gets used in
your app and still only change it in one place. And its pretty
unambiguous IMHO.
Next imagine the stamp it
x27;&return' is the perldoc -f goto
'&NAME' that is necessary:
What I want to do is make it so that "goto &return;" : "exits the
current subroutine (losing any changes
set by local()) and immediately calls in its place the named
stions didn't I?
Also perhaps CORE::return is wrong, Ii shoudl have clarified that its
was pseudo code better. So assuming '&return' is the perldoc -f goto
'&NAME' that is necessary:
What I want to do is make it so that "goto &return;&
Hang on I guess I understand what it is you are trying to do...
You want: goto &CORE::return; to work like it reads.
Now my question to you is how does this read to you because what I am
reading in the perlsub about this stuff is the following.
Overriding Built-in Functions
Many built-in funct
Rob Coops wrote:
Hang on I guess I understand what it is you are trying to do...
You want: goto &CORE::return; to work like it reads.
Now my question to you is how does this read to you because what I am
reading in the perlsub about this stuff is the following.
It reads this way:
It "rea
On Mon, 27 Nov 2006 14:37:42 -0600, JupiterHost.Net wrote:
> basically I want to override return to log and carp first, every time
> its called.
Oh. You want http://search.cpan.org/dist/Hook-LexWrap/lib/Hook/LexWrap.pm
or some similar AOP module.
--
Peter Scott
http://www.perlmedic.com/
http:/
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...
I guess I'm totally confused; I don't see how a goto can return back
to the sub-rotine that called i
On 12/3/06, Bill Jones <[EMAIL PROTECTED]> wrote:
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
> The trick is I can't seem to goto() return in
> do_some_stuff_and_return(), I'm sure since its so deep down...
I guess I'm totally confused; I don't
Bill Jones wrote:
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
The trick is I can't seem to goto() return in
do_some_stuff_and_return(), I'm sure since its so deep down...
I guess I'm totally confused; I don't see how a goto can return back
to the
Thaks Jay, I'll soak it all up tomorrow first thing, I'm sleepy :)
Good night all!
Jay Savage wrote:
On 12/3/06, Bill Jones <[EMAIL PROTECTED]> wrote:
On 11/24/06, JupiterHost.Net <[EMAIL PROTECTED]> wrote:
> The trick is I can't seem to goto() return in
>
23 matches
Mail list logo