Slash Boxes
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • by malte (1708) on 2005.05.21 2:29 (#40598) Homepage Journal

    How does it compare to Switch []?

    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?

    • Plus Switch is included in my ActiveState build. There is also a cool swith that lets you use switch statements like Perl6.
    • Good questions!

      How does it compare to Switch []?

      I'd like to think that in terms of complexity S::P is a simpler module because it uses Perl's native syntax. It also has an extensible smart matching system, so it can be used with your own objects. The main intention of the module is in the name - a perlish implementation of switch, so it should be subject to all the wonderful features and quirks of perl.

      That module seems to do a better Job at simulating the classic switch style but uses a source


      broquaint out

      • 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::Perlish I 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.

    • With regards to prototypes, I should probably also point out Tom Christansen's Far More Than Everything You've Ever Wanted to Know about Prototypes in Perl [], for the folk out there who aren't familiar with the document.

      broquaint out