NAME maybe - Use a Perl module and ignore error if can't be loaded SYNOPSIS use Getopt::Long; use maybe 'Getopt::Long::Descriptive'; if (maybe::HAVE_GETOPT_LONG_DESCRIPTIVE) { Getopt::Long::Descriptive::describe_options("usage: %c %o", @options); } else { Getopt::Long::GetOptions(\%options, @$opt_spec); } use maybe 'Carp' => 'confess'; if (maybe::HAVE_CARP) { confess("Bum!"); } else { die("Bum!); } DESCRIPTION This pragma loads a Perl module. If the module can't be loaded, the error will be ignored. Otherwise, the module's import method is called with unchanged caller stack. The special constant maybe::HAVE_*MODULE* is created and it AUTHOR Piotr Roszatycki COPYRIGHT Copyright (C) 2008 by Piotr Roszatycki . This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See http://www.perl.com/perl/misc/Artistic.html