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

use Perl Log In

Log In

[ Create a new account ]

hanekomu (8123)

  (email not shown publicly)
AOL IM: hanekomu (Add Buddy, Send Message)

Go (Baduk) player and Perl hacker.

Journal of hanekomu (8123)

Wednesday February 18, 2009
08:05 AM


[ #38504 ]

I've released any::feature. (It will take a while to appear on CPAN; look at the development repo on github.) It can be used like Perl 5.10's 'feature' pragma and will try to "do the right thing", regardless of whether you use Perl 5.8 or Perl 5.10.

So far it's a proof-of-concept and will only handle the 'say' feature.

Read about it in my blog.

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.
  • And....

    use any::feature 'say';

    looks a bit nicer than something like....

    from __future__ import with_statement

    IMHO of course ;-)

  • If you want to use this both on perl 5.8.x and on perl 5.10, then you have to install any::feature [] on 5.10.

    Wouldn't it be nicer to backport feature [] to 5.8, thus: rename any::feature [] to feature [], and make it only installable on 5.8? (Not sure how the latter would work)

    I'm not saying this is the best solution, but it's the solution I like better, among the options that I see.

    • I thought about that, but somehow it feels wrong to stomp on someone else's namespace; especially it's not clear what would happen if someone on 5.10 (or later) would use "install feature" in the CPAN shell...