Test::Without::Module man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Test::Without::Module(User Contributed Perl DocumentatTest::Without::Module(3)

NAME
       Test::Without::Module - Test fallback behaviour in absence of modules

SYNOPSIS
	 use Test::Without::Module qw( My::Module );

	 # Now, loading of My::Module fails :
	 eval { require My::Module; };
	 warn $@ if $@;

	 # Now it works again
	 eval q{ no Test::Without::Module qw( My::Module ) };
	 eval { require My::Module; };
	 print "Found My::Module" unless $@;

DESCRIPTION
       This module allows you to deliberately hide modules from a program even
       though they are installed. This is mostly useful for testing modules
       that have a fallback when a certain dependency module is not installed.

   EXPORT
       None. All magic is done via "use Test::Without::Module LIST" and "no
       Test::Without::Module LIST".

   Test::Without::Module::get_forbidden_list
       This function returns a reference to a copy of the current hash of
       forbidden modules or an empty hash if none are currently forbidden.
       This is convenient if you are testing and/or debugging this module.

ONE LINER
       A neat trick for using this module from the command line was mentioned
       to me by NUFFIN and by Jerrad Pierce:

	 perl -MTest::Without::Module=Some::Module -w -Iblib/lib t/SomeModule.t

       That way, you can easily see how your module or test file behaves when
       a certain module is unavailable.

BUGS
       ยท   There is no lexical scoping

CREDITS
       Much improvement must be thanked to Aristotle from PerlMonks, he
       pointed me to a much less convoluted way to fake a module at
       <http://www.perlmonks.org/index.pl?node=192635>.

       I also discussed with him an even more elegant way of overriding
       CORE::GLOBAL::require, but the parsing of the overridden subroutine
       didn't work out the way I wanted it - CORE::require didn't recognize
       barewords as such anymore.

       NUFFIN and Jerrad Pierce pointed out the convenient use from the
       command line to interactively watch the behaviour of the test suite and
       module in absence of a module.

AUTHOR
       Copyright (c) 2003-2009 Max Maischein, <corion@cpan.org>

LICENSE
       This module is released under the same terms as Perl itself.

SEE ALSO
       Devel::Hide, Acme::Intraweb, PAR, perlfunc

perl v5.14.1			  2009-01-18	      Test::Without::Module(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net