Hey Perl Advent, ToolSet gets even better!

dagolden on 2008-12-05T03:36:37

I was tickled to find my ToolSet module featured in the 2008 Perl Advent Calendar.

However, in response to the comment that ToolSet didn't support pragmas like "no indirect", I decided it was time for a feature upgrade. Now that Perl 5.10 allows for user pragmas, ToolSet needed more general pragma support.

So ToolSet 0.99 has a new API for pragmas:

# My/Tools.pm
package My::Tools;
use base 'ToolSet';

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

1;

This should work with any simple pragma that uses $^H or %^H without other side-effects during import().

Happy holidays!

-- dagolden