NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Switch (Score:2)
How does it compare to Switch [cpan.org]?
That module seems to do a better Job at simulating the classic switch style but uses a source filter. Your module could probably benefit a lot from the & prototype. Or is there a reason you didnt use prototypes?
Re:Switch (Score:1)
As for the use of the & prototype, there are a few reasons why I didn't use it. Firstly, it doesn't work how I would like it to - it is desigined to enable one to mimic Perl's builtins, so the block goes first. If there is a way to use the & prototype, and utilise its magical bare block functionality in a different position than the first argument, then I don't know about it :) Also prototypes cripple the the free-form usage of functions, which isn't very perlish at all,
which strictly goes against the, er, perlishness of this module.
Perhaps this should all be in the documentation ...
broquaint out
Reply to This
Parent
Re:Switch (Score:1)
I very much like modules which have a section on how they differ from similar preexisting modules. It shows the author didn’t just mindlessly go to work. Of course, in case of
Switch::PerlishI know enough about the competition to know exactly why you did what you did (great job, btw! neat ways to exploit the native syntax), but not everyone might have that benefit.Re:Switch (Score:1)
broquaint out