NAME

MooseX::GlobRef::Meta::Class - Metaclass for globref objects

SYNOPSIS

package My::IO;

use metaclass 'MooseX::GlobRef::Meta::Class';

use Moose;

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 metaclass is used by MooseX::GlobRef::Object base class and it uses MooseX::GlobRef::Meta::Instance as instance metaclass.

INHERITANCE

METHODS

initialize

The methods overridden by this class.

SEE ALSO

MooseX::GlobRef::Object, Moose::Meta::Class, Moose, metaclass.

AUTHOR

Piotr Roszatycki <dexter@cpan.org>

LICENSE

Copyright (C) 2007, 2008, 2009 by Piotr Roszatycki <dexter@debian.org>.

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

See http://www.perl.com/perl/misc/Artistic.html