MooseX::GlobRef 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::GlobRef(3)    User Contributed Perl Documentation   MooseX::GlobRef(3)

NAME
       MooseX::GlobRef - Store a Moose object in glob reference

SYNOPSIS
	 package My::IO;

	 use Moose;
	 use MooseX::GlobRef;

	 has 'file' => ( is => 'ro', isa => 'Str', required => 1 );

	 sub open {
	   my $fh = shift;
	   open $fh, $fh->file or confess "cannot open";
	   return $fh;
	 }

	 sub getlines {
	   my $fh = shift;
	   return readline $fh;
	 }

	 my $io = My::IO->new( file => '/etc/passwd' );
	 print "::::::::::::::\n";
	 print $io->file, "\n";
	 print "::::::::::::::\n";
	 $io->open;
	 print $io->getlines;

DESCRIPTION
       This module allows to store Moose object in glob reference of file
       handle.	The class attributes will be stored in hash slot associated
       with glob reference.  It allows to create a Moose version of
       IO::Handle.

       The attributes can be accessed directly with following expression:

	 my $hashref = \%{*$self};
	 print $hashref->{key};

       or shorter:

	 print *$self->{key};

       but the standard accessors should be used instead:

	 print $self->key;

METHODS
       init_meta( args : Hash ) : Moose::Meta::Class
	   See Moose::Exporter.

SEE ALSO
       http://github.com/dex4er/perl-MooseX-GlobRef
       <http://github.com/dex4er/perl-MooseX-GlobRef>, Moose.

AUTHOR
       Piotr Roszatycki <dexter@cpan.org>

LICENSE
       Copyright (c) 2007, 2008, 2009, 2010 Piotr Roszatycki
       <dexter@cpan.org>.

       This is free software; you can redistribute it and/or modify it under
       the same terms as perl itself.

       See <http://dev.perl.org/licenses/artistic.html>

perl v5.14.1			  2011-07-20		    MooseX::GlobRef(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