Softpedia
 


LINUX CATEGORIES:



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

    KiokuDB::Meta::Attribute::Lazy 0.52

    Download button

    No screenshots available
    Downloads: 297  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Yuval Kogman | More programs
    Perl Artistic License / FREE
    January 31st, 2012, 14:15 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    KiokuDB::Meta::Attribute::Lazy description

    Trait for lazy loaded attributes

    KiokuDB::Meta::Attribute::Lazy is a trait for lazy loaded attributes.

    SYNOPSIS

     # in your class:

     package Foo;
     use KiokuDB::Class;

     has bar => (
     traits => [qw(KiokuDB::Lazy)],
     isa => "Bar",
     is => "ro",
     );



     # Later:

     my $foo = $dir->lookup($id);

     # bar is not yet loaded, it will be lazily fetched during this call:
     $foo->bar;


    This Moose::Meta::Attribute trait provides lazy loading on a per field basis for objects stored in KiokuDB.

    Instead of using proxy objects with AUTOLOAD, overloading, or similar hacks, you can declaratively specify which attributes you want to make lazy, and this will be done cleanly through the MOP.

    This is implemented by using a placeholder object, KiokuDB::Thunk which contains references to the ID and the linker, and KiokuDB::Meta::Instance will know to replace the placeholder with the actual loaded object when it is fetched from the object by an accessor.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    loaded attributes | meta attributes | Perl module | KiokuDB | Perl | meta

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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