Mouse::Exporter man page on Fedora

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

Mouse::Exporter(3)    User Contributed Perl Documentation   Mouse::Exporter(3)

NAME
       Mouse::Exporter - make an import() and unimport() just like Mouse.pm

VERSION
       This document describes Mouse version 1.02

SYNOPSIS
	   package MyApp::Mouse;

	   use Mouse ();
	   use Mouse::Exporter;

	   Mouse::Exporter->setup_import_methods(
	     as_is => [ 'has_rw', 'other_sugar', \&Some::Random::thing ],
	     also  => 'Mouse',
	   );

	   sub has_rw {
	       my $meta = caller->meta;
	       my ( $name, %options ) = @_;
	       $meta->add_attribute(
		 $name,
		 is => 'rw',
		 %options,
	       );
	   }

	   # then later ...
	   package MyApp::User;

	   use MyApp::Mouse;

	   has 'name';
	   has_rw 'size';
	   thing;

	   no MyApp::Mouse;

DESCRIPTION
       This module encapsulates the exporting of sugar functions in a
       "Mouse.pm"-like manner. It does this by building custom "import",
       "unimport" methods for your module, based on a spec you provide.

       Note that "Mouse::Exporter" does not provide the "with_meta" option,
       but you can easily get the metaclass by "caller->meta" as "SYNOPSIS"
       shows.

METHODS
   "setup_import_methods( ARGS )"
   "build_import_methods( ARGS ) -> (\&import, \&unimport)"
SEE ALSO
       Moose::Exporter

perl v5.14.2			  2012-08-27		    Mouse::Exporter(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