MooseX::Types::LoadableClass man page on Fedora

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

MooseX::Types::LoadablUsersContributed Perl DocMooseX::Types::LoadableClass(3)

NAME
       MooseX::Types::LoadableClass - ClassName type constraint with coercion
       to load the class.

SYNOPSIS
	   package MyClass;
	   use Moose;
	   use MooseX::Types::LoadableClass qw/ LoadableClass /;

	   has foobar_class => (
	       is => 'ro',
	       required => 1,
	       isa => LoadableClass,
	       coerce => 1,
	   );

	   MyClass->new(foobar_class => 'FooBar'); # FooBar.pm is loaded or an
						   # exception is thrown.

DESCRIPTION
	   use Moose::Util::TypeConstraints;

	   my $tc = subtype as ClassName;
	   coerce $tc, from Str, via { Class::MOP::load_class($_); $_ };

       I've written those three lines of code quite a lot of times, in quite a
       lot of places.

       Now I don't have to.

TYPES EXPORTED
   LoadableClass
       A normal class / package.

   LoadableRole
       Like "LoadableClass", except the loaded package must be a Moose::Role.

AUTHORS
       Tomas Doran (t0m) "<bobtfish@bobtfish.net>"

       Florian Ragwitz (rafl) "<rafl@debian.org>"

COPYRIGHT AND LICENSE
       Copyright (c) 2010 the above named authors.

       Licensed under the same terms as perl itself.

perl v5.14.2			  2012-02-15   MooseX::Types::LoadableClass(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