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.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Lexical::Attributes 1.4

    Download button

    No screenshots available
    Downloads: 298  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Abigail | More programs
    Perl Artistic License / FREE
    November 14th, 2008, 09:54 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Lexical::Attributes description

    Proper encapsulation

    Lexical::Attributes is a Perl module that offers proper encapsulation.

    SYNOPSIS

     use Lexical::Attributes;

     has $.scalar;
     has $.key ro;
     has (@.array, %.hash) is rw;

     sub method {
     $self -> another_method;
     print $.scalar;
     }


    NOTE: This module has changed significantly between releases 1.3 and 1.4. Code that works with version 1.3 or earlier will not work with version 1.4 or later.

    NOTE: This is experimental software! Certain things will change, specially if they are marked FIXME or mentioned on the TODO list.

    This module was created out of frustration with Perl's default OO mechanism, which doesn't offer good data encapsulation. I designed the technique of Inside-Out Objects several years ago, but I was not really satisfied with it, as it still required a lot of typing. This module uses a source filter to hide the details of the Inside-Out technique from the user.

    Attributes, the variables that belong to an object, are stored in lexical hashes, instead of piggy-backing on the reference that makes the object. The lexical hashes, one for each attribute, are indexed using the object. However, the details of this technique are hidden behind a source filter. Instead, attributes are declared in a similar way as lexical variables. Except that instead of my, a Perl6 keyword, has is used. Another thing is borrowed from Perl6, and that's the second sigil. Attributes have a dot separating the sigil from the name of attribute.


    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    proper encapsulation | lexical attributes | Perl module | lexical | attributes | encapsulation

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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