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 > Perl Modules

    SPOPS::Tool::ReadOnly 0.87

    Download button

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

    License / Price:

    Last Updated:

    Category:
    Chris Winters | More programs
    Perl Artistic License / FREE
    December 11th, 2007, 19:15 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    SPOPS::Tool::ReadOnly description

    SPOPS::Tool::ReadOnly is a Perl module to make a particular object read-only.

    SPOPS::Tool::ReadOnly is a Perl module to make a particular object read-only.

    SYNOPSIS

    # Load information with read-only rule

    my $spops = {
    class => 'This::Class',
    isa => [ 'SPOPS::DBI' ],
    field => [ 'email', 'language', 'country' ],
    id_field => 'email',
    base_table => 'test_table',
    rules_from => [ 'SPOPS::Tool::ReadOnly' ],
    };
    SPOPS::Initialize->process({ config => { test => $spops } });

    # Fetch an object, modify it...
    my $object = This::Class->fetch( 45 );
    $object->{foo} = "modification";

    # Trying to save the object throws an error:
    # "This::Class is read-only; no changes allowed"
    eval { $object->save };

    This is a simple rule to ensure that save() and remove() calls to a particular class do not actually do any work. Instead they just result in a warning that the class is read-only.

    METHODS

    behavior_factory()

    Installs the behavior during the class generation process.

    generate_persistence_methods()

    Generates save() and remove() methods that just throw exceptions.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    read-only object | SPOPS tool | Perl module | read-only | object | SPOPS

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

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