Sophie

Sophie

distrib > PLD > th > ppc > by-pkgid > c5892292785fc4575cc9f0df0ab03c44

perl-Lexical-Persistence-1.020-1.src.rpm

Description:

Lexical::Persistence does a few things, all related. Note that all
the behaviors listed here are the defaults. Subclasses can override
nearly every aspect of Lexical::Persistence's behavior.

Lexical::Persistence lets your code access persistent data through
lexical variables. This example prints "some value" because the value
of $x perists in the $lp object between setter() and getter().

use Lexical::Persistence;

my $lp = Lexical::Persistence->new();
$lp->call(\&setter);
$lp->call(\&getter);

sub setter { my $x = "some value" }
sub getter { print my $x, "\n" }

Lexicals with leading underscores are not persistent.

By default, Lexical::Persistence supports accessing data from multiple
sources through the use of variable prefixes. The set_context()
member sets each data source. It takes a prefix name and a hash of
key/value pairs. By default, the keys must have sigils representing
their variable types.

Generated packages:

Other version of this rpm: