Stories
Slash Boxes
Comments
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.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • ... is probably marginally better than cutting and pasting that 50 lines.

    Or alternatively, cut and past Config::Tiny into your code as Module::Config.
    • by Matts (1087) on 2008.05.04 9:44 (#62621) Journal
      Yup. The point being that configuration data is pretty simple and you shouldn't over complicate it unless you have really crazy needs.
      • What the point of the *s in:
        s/^\s*//;
        s/\s*$//;
        Surely you never want to match 0 spaces, so why not use s+? (That's an English ?, not a Perl one).
        • Hrm... I'm not sure there is a point, could just be a legacy of some old code that did something like

          s/^\s*something//;

        • Just habit. Everywhere I've ever seen whitespace removed it's used \s* rather than \s+. Perhaps historically \s* matched faster?