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.
  • Me likes, but you might want to extend your globs a bit.
    Range and hash support could make it look even better.

    before qr'/(\d+)' => run { set id => $1; };

    could become

    # hash, equivalent to /(\d+)
    before '/#' => run { set id => $1 }

    # range, for more specific matching (bit more complicated to implement but worth it imo)
    before '/[0-255]' => run { set id => $1 }

    # alternatives, would make sense too :)
    before '/{1|133|255}' => run { set id => $1 }

    • We already support the standard glob syntax:
      before '{1,133,255}'
      As well as character classes:
      before '[a-z]'
      So I'm afraid that numeric range needs some other syntax. The '#' shorthand is very nice, though. :-)
      • Ah, nice one, been some time since i last looked at Jifty::Dispatcher. :)
        • ----------------------------------------------------------------------
          r25678 (orig r2238):  audreyt | 2006-12-01 12:43:40 +0800

          * Jifty::Dispatcher - NUMBER SIGN (#) now captures one or more digit
            characters in the extended shellglob condition syntax.
            Suggested by: Sebastian Riedel