[Omaha.pm] /AAA|BBB/

Scott Miller scott.l.miller at gmail.com
Thu Feb 2 07:30:00 PST 2006


There are more arguments against using switch.  The switch module is a
"source filter" which means that it changes the syntax of perl, and as a
result royally screws up the debugger and can introduce bugs that are very
difficult to find.  Here is a
link<http://www.perlmonks.com/?node_id=456254>to one node on Perl
Monks <http://www.perlmonks.com> that discusses some of the draw backs to
switch.pm.  Here is a
link<http://search.cpan.org/%7Erjohnson/Case-0.0.2/Case.pm>to an
alternative module without those problems.

-Scott

On 2/2/06, Sean Baker <pbaker at omnihotels.com> wrote:
>
>
> "...I guess this kind of stuff is a strong argument for 'use Switch;'
> -grin-"...
>
> Switch is a pain with the debugger and .perldb.   It re-interprets your
> code (replacing the Switch statements with if's I guess) and shifts all
> of the line numbers so your break points don't work.   It is a good
> thought, but if you're in the debugger a lot it is more pain than it is
> worth.
> _______________________________________________
> Omaha-pm mailing list
> Omaha-pm at pm.org
> http://mail.pm.org/mailman/listinfo/omaha-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/omaha-pm/attachments/20060202/d8a139c0/attachment.html


More information about the Omaha-pm mailing list