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

    Prima::Object 1.24

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Dmitry Karasik | More programs
    Perl Artistic License / FREE
    April 3rd, 2008, 11:57 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Prima::Object description

    Prima::Object is a Perl module with Prima toolkit base classes.

    Prima::Object is a Perl module with Prima toolkit base classes.

    SYNOPSIS

    if ( $obj-> isa('Prima::Component')) {

    # set and get a property
    my $name = $obj-> name;
    $obj->name( 'an object' );

    # set a notification callback
    $obj-> onPostMessage( sub {
    shift;
    print "hey! I've received this: @_n";
    });

    # can set multiple properties. note, that 'name' and 'owner',
    # replace the old values, while onPostMessage are aggregated.
    $obj-> set(
    name => 'AnObject',
    owner => $new_owner,
    onPostMessage => sub {
    shift;
    print "hey! me too!n";
    },
    );

    # de-reference by name
    $new_owner-> AnObject-> post_message(1,2);
    }

    Prima::Object and Prima::Component are the root objects of the Prima toolkit hierarchy. All the other objects are derived from the Component class, which in turn is the only descendant of Object class. Both of these classes are never used for spawning their instances, although this is possible using

    Prima::Component-> create( .. parameters ... );

    call. This document describes the basic concepts of the OO programming with Prima toolkit. Although Component has wider functionality than Object, all examples will be explained on Component, since Object has no descendant classes and all the functionality of Object is present in Component. Some of the information here can be found in Prima::internals as well, the difference is that Prima::internals considers the coding tasks from a C programmer's view, whereas this document is wholly about perl programming.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Prima toolkit | Prima object | Perl module | Prima | toolkit | object

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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