freebsd-ports/devel/p5-Lexical-Persistence/pkg-descr
Sunpoet Po-Chuan Hsieh ad4f267b7a Update WWW
search.cpan.org is shutting down.
It will redirect to metacpan.org after June 25, 2018.

With hat:	perl
2018-05-27 20:15:16 +00:00

18 lines
674 B
Text

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
persists 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" }
WWW: https://metacpan.org/release/Lexical-Persistence