in reply to Re: Re: eval with sub
in thread eval with sub
That'll be faster, safer, won't leak memory like a sieve, and if you had made $op a lexical variable earlier, could have been just written as :$main_index_list->tagBind($op, "<3>", do { my $thing = $op; sub { do_u +rl($thing) } });
But since I don't know the scope of $op, I wrote it safely.$main_index_list->tagBind($op, "<3>", sub { do_url($op) });
Please eliminate the runtime string-eval there! Please. It's so very unneeded.
-- Randal L. Schwartz, Perl hacker
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: eval with sub
by sierrathedog04 (Hermit) on Mar 10, 2001 at 12:41 UTC | |
by dws (Chancellor) on Mar 10, 2001 at 13:02 UTC | |
by merlyn (Sage) on Mar 10, 2001 at 16:22 UTC | |
by sierrathedog04 (Hermit) on Mar 10, 2001 at 17:23 UTC | |
by petral (Curate) on Mar 10, 2001 at 13:39 UTC |