26 Jul 2005 21:11:43 UTC
- Distribution: Acme-use-strict-with-pride
- Module version: 0.04
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (1)
- Testers (48 / 404 / 0)
- KwaliteeBus factor: 1
- 94.12% Coverage
- License: unknown
- Activity24 month
- Download (4.16KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionNWCLARK Nicholas Clark
Acme::use::strict::with::pride - enforce bondage and discipline on very naughty modules.
use Acme::use::strict::with::pride; # now all your naughty modules get to use strict; and use warnings;
using Acme::use::strict::with::pride causes all modules to run with
Whether they like it or not :-)
Acme::use::strict::with::pride installs a code reference into
@INCthat intercepts all future
requirerequests. (code references in
@INCwere in 5.6.x, but were not documented until 5.8.0, which extends the feature to allow objects in
The subroutine in
@INCthen finds the module using the normal
@INCpath, opens the file, and attaches a source filter that adds "use strict; use warnings;" to the start of every file. This is naughty - it's not a documented feature, it may be changed or removed with no notice, and the current implementation is slightly buggy in subtle cases.
Nothing. There's no unimport method, so using strict with pride is a one way trip. This could be construed as a bug or a feature, depending on your point of view.
There's no unimport. There's no way to specify an import list to
use warnings;. There's no way to exclude specific modules (eg
Exporter) from the clutches
Acme::use::strict:with::pride. The error and warning handling is global, rather than being chained, and it won't play nicely with error objects. The source filter in coderef
@INCis undocumented, so I shouldn't be using it.
Nicholas Clark, <firstname.lastname@example.org>
Copyright 2002,2003 by Nicholas Clark
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Acme::use::strict::with::pride, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Acme::use::strict::with::pride
For more information on module installation, please visit the detailed CPAN module installation guide.