Mass Deface
package from CPAN, F is an older tool, originally intended for the
development of XS modules, which comes packaged with the Perl
distribution.
A typical invocation of L for a pure Perl module is:
h2xs -AX --skip-exporter --use-new-tests -n Foo::Bar
The C<-A> omits the Autoloader code, C<-X> omits XS elements,
C<--skip-exporter> omits the Exporter code, C<--use-new-tests> sets up a
modern testing environment, and C<-n> specifies the name of the module.
=item Use L and L
A module's code has to be warning and strict-clean, since you can't
guarantee the conditions that it'll be used under. Besides, you wouldn't
want to distribute code that wasn't warning or strict-clean anyway,
right?
=item Use L
The L module allows you to present your error messages from
the caller's perspective; this gives you a way to signal a problem with
the caller and not your module. For instance, if you say this:
warn "No hostname given";
the user will see something like this:
No hostname given at /usr/local/lib/perl5/site_perl/5.6.0/Net/Acme.pm
line 123.
which looks like your module is doing something wrong. Instead, you want
to put the blame on the user, and say this:
No hostname given at bad_code, line 10.
You do this by using L and replacing your Cs with
Cs. If you need to C, say C instead. However, keep
C and C in place for your sanity checks - where it really is
your module at fault.
=item Use L - wisely!
L gives you a standard way of exporting symbols and
subroutines from your module into the caller's namespace. For instance,
saying C