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 ]

dagolden (6584)

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

Journal of dagolden (6584)

Thursday November 06, 2008
10:05 PM

ToolSet yak shaving adds Perl 5.10 features

[ #37821 ]

As often happens, I can't remember the exact original need that started the latest round of yak shaving. I think I was working on a one-liner to prototype a test program for some small program I was writing.

In any case, I was annoyed that my XDG ToolSet module I use for one-liners didn't give me Perl 5.10 features, but adding them required a new ToolSet release.

So now "perl -MXDG -e ... " gives me strict, warnings, some of Carp, DDS, Path::Class, File::Spec, Scalar::Util and either all of the Perl 5.10 features or else at least Perl6::Say.

If anyone else finds this useful, here's the code, or clone it from git and adapt as you see fit.

package XDG;

our $VERSION = '0.05';

use base 'ToolSet';

ToolSet->use_pragma( 'strict' );
ToolSet->use_pragma( 'warnings' );

    'Carp' => 'carp croak confess',
    'Data::Dump::Streamer' => 'Dump',
    'File::Spec' => undef,
    'Path::Class' => 'file dir',
    'Scalar::Util' => 'refaddr reftype blessed',

if ( $] >= 5.010 ) {
  ToolSet->use_pragma( 'feature', ':5.10' );
else {
  ToolSet->export( 'Perl6::Say' => 'say' );


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.