SPOPS::Tool::ReadOnly

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

SPOPS::Tool::ReadOnly Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Chris Winters
  • Publisher web site:
  • http://search.cpan.org/~cwinters/SPOPS-0.87/SPOPS/SQLInterface.pm

SPOPS::Tool::ReadOnly Tags


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 => , field => , id_field => 'email', base_table => 'test_table', rules_from => , }; 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.METHODSbehavior_factory()Installs the behavior during the class generation process.generate_persistence_methods()Generates save() and remove() methods that just throw exceptions. Requirements: · Perl


SPOPS::Tool::ReadOnly Related Software