user-pic

steffenw

  • About: I blog about Perl.
  • Commented on Split a .pm into a .pod and a .pm
    At the begin of line: = followed by letter a-f, then it is pod. There are much more keywords then in your script. To increase compiletime write pod after __END__ compiler stops reading file at this label....
  • Commented on \d does not validate numbers
    Then [:digit:] is /d and also not [0-9]...
  • Posted Call for papers - gpw2016 - Nuremberg to steffenw

    We'd like to invite all IT developers, administrators, users, managers to submit talks for the German Perl Workshop 2016 in Nuremberg.

    Lots of time to speak:
    There are 21 hours available for talks, and we rely on you to fill them.

    Topic of your talk:
    We are interested i…

Subscribe to feed Recent Actions from steffenw

  • Yuki Kimoto commented on \d does not validate numbers

    I'm using [0-9].

    \d contains Unicode number.

  • Ben Bullock commented on \d does not validate numbers

    Yes, I switched to using [0-9] almost everywhere. I think it's simpler.

  • Karl Williamson commented on \d does not validate numbers

    DEVANAGARI DIGIT NINE, for example, is used by millions of people millions, perhaps billions, of times a day as an essential component of their numbers. I don't know if you are being careless with your terminology, or wrongly arrogant about the place in the universe of [0-9].

    Unicode::UCD::num(), since Perl 5.14, can be used to make sure that a string of digits are all from the same script, so are not spoofing attempts, returning the numeric value the string represents, or undef if it is illegal.

  • Ben Bullock commented on \d does not validate numbers

    > That’s what /a is for.

    As a followup to this article, I am thinking about making another blog post showing how \d is used to match numbers in actual CPAN modules. It's used for number validation in more than a thousand modules, for example here is the matches for /\\d\./:

    http://grep.cpan.me/?q=%5C%5Cd%5C.

    and here is the matches for /\\d\+\./:

    http://grep.cpan.me/?q=%5C%5Cd%5C%2B%5C..*%2F%5Bb-z%5D*a

    Noting your comment, I tried s…

  • yanick commented on Split a .pm into a .pod and a .pm

    For giggles, there are two modules of mine that also deal with that kind of stuff:

    Test::Pod::Snippets -- which turn code in the SYNOPSIS, and potentially elsewhere in the documentation -- into tests.

    Dist::Zilla::Plugin::CoalescePod -- merges related .pm and .pod files together when building the dist.

Subscribe to feed Responses to Comments from steffenw

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.