Re: Bug#604943: ITP: libclass-load-perl -- module for loading modules by name
On Thu, Nov 25, 2010 at 06:09:55PM +0100, gregor herrmann wrote:
> Package: wnpp
> Owner: gregor herrmann <gregoa@debian.org>
> Severity: wishlist
> X-Debbugs-CC: debian-devel@lists.debian.org,debian-perl@lists.debian.org
>
> * Package name : libclass-load-perl
> Version : 0.06
> Upstream Author : Shawn M Moore, <sartak at bestpractical.com>
> * URL : http://search.cpan.org/dist/Class-Load/
> * License : Artistic or GPL-1+
> Programming Lang: Perl
> Description : module for loading modules by name
>
> "require EXPR" only accepts Class/Name.pm style module names, not
> Class::Name. For that, Class::Load provides "load_class 'Class::Name'".
>
> It's often useful to test whether a module can be loaded, instead of throwing
> an error when it's not available. For that, Class::Load provides
> "try_load_class 'Class::Name'".
>
> Finally, sometimes it is important to know whether a particular class has
> been loaded. Asking %INC is an option, but that will miss inner packages and
> any class for which the filename does not correspond to the package name. For
> that, this module provides "is_class_loaded 'Class::Name'".
Looks interesting. I have been using
Module::Load::Conditional for a similar purpose.
--
Joel Roth
Reply to: