Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    MooseX::GlobRef::Object 0.0701

    Download button

    No screenshots available
    Downloads: 294  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Very Good (4.1/5)
    9 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Piotr Roszatycki | More programs
    Perl Artistic License / FREE
    June 14th, 2011, 06:40 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    MooseX::GlobRef::Object description

    It can store a Moose object in glob reference.

    MooseX::GlobRef::Object can store a Moose object in glob reference.

    SYNOPSIS

    package My::IO;

    use Moose;

    extends 'MooseX::GlobRef::Object';

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

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

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

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


    This meta-policy allows to store Moose object in glob reference or file handle. The class attributes will be stored in anonymous hash associated with glob reference. It allows to create a Moose version of IO::Handle.

    The elements of hash can be accessed with ${*$self}->{key} expression.

    You can use MooseX::GlobRef::Meta::Instance metaclass directly if you need more customised configuration.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Moose object | glob reference | Perl module | Moose | object | glob

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM