Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Perl Modules

    Class::MakeMethods::Composite::Hash 1.01

    Download button

    No screenshots available
    Downloads: 481  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Fair (2.7/5)
    4 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Matthew Simon Cavalletto | More programs
    Perl Artistic License / FREE
    January 24th, 2008, 16:32 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Class::MakeMethods::Composite::Hash description

    Class::MakeMethods::Composite::Hash is a Perl module with composite hash methods.

    Class::MakeMethods::Composite::Hash is a Perl module with composite hash methods.

    SYNOPSIS

    package MyObject;
    use Class::MakeMethods::Composite::Hash (
    new => 'new',
    scalar => [ 'foo', 'bar' ],
    array => 'my_list',
    hash => 'my_index',
    );
    ...

    my $obj = MyObject->new( foo => 'Foozle' );
    print $obj->foo();

    $obj->bar('Barbados');
    print $obj->bar();

    $obj->my_list(0 => 'Foozle', 1 => 'Bang!');
    print $obj->my_list(1);

    $obj->my_index('broccoli' => 'Blah!', 'foo' => 'Fiddle');
    print $obj->my_index('foo');

    The Composite::Hash suclass of MakeMethods provides a basic constructor and accessors for blessed-hash object instances.

    Class::MakeMethods Calling Interface

    When you use this package, the method declarations you provide as arguments cause subroutines to be generated and installed in your module.
    You can also omit the arguments to use and instead make methods at runtime by passing the declarations to a subsequent call to make().

    You may include any number of declarations in each call to use or make(). If methods with the same name already exist, earlier calls to use or make() win over later ones, but within each call, later declarations superceed earlier ones.

    You can install methods in a different package by passing -TargetClass => package as your first arguments to use or make.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    composite methods | hash methods | Perl module | composite | hash | methods

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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