Tie::SaveLater

Tie::SaveLater is a base class for tie modules that 'save later'.
Download

Tie::SaveLater Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Dan Kogai
  • Publisher web site:
  • http://search.cpan.org/~oyama/Crypt-Camellia-2.01/lib/Crypt/Camellia.pm

Tie::SaveLater Tags


Tie::SaveLater Description

Tie::SaveLater is a base class for tie modules that 'save later'. Tie::SaveLater is a base class for tie modules that "save later".SYNOPSIS package Tie::Storable; use base 'Tie::SaveLater'; use Storable qw(retrieve nstore); __PACKAGE__->make_subclasses; sub load{ retrieve($_) }; sub save{ nstore($_, $_->filename) }; 1; # later use Tie::Storable; { tie my $scalar => 'Tie::Storable', 'scalar.po'; $scalar = 42; } # scalar is automatically saved as 'scalar.po'. { tie my @array => 'Tie::Storable', 'array.po'; @array = qw(Sun Mon Tue Wed Fri Sat); } # array is automatically saved as 'array.po'. { tie my %hash => 'Tie::Storable', 'hash.po'; %hash = (Sun=>0, Mon=>1, Tue=>2, Wed=>3, Thu=>4, Fri=>5, Sat=>6); } # hash is automatically saved as 'hash.po'. { tie my $object => 'Tie::Storable', 'object.po'; $object = bless { First => 'Dan', Last => 'Kogai' }, 'DANKOGAI'; } # You can save an object; just pass a scalar { tie my $object => 'Tie::Storable', 'object.po'; $object->{WIFE} = { First => 'Naomi', Last => 'Kogai' }; # you can save before you untie like this tied($object)->save; } Requirements: · Perl


Tie::SaveLater Related Software