- or download this
my $data = "this is a string of text";
my @dataset = qw( this is an array of text );
my %datagroup = ( hash => "mine", text => "yours" );
- or download this
use Storable;
my $stored = freeze [ \$data, \@dataset, \%datagroup ];
...
my ($newdata, $newdataset_ref, $newdatagroup_ref) = @$thawed; # cop
+ies of original variables
(*data, *dataset, *datagroup) = @$thawed; # restore into the origin
+al variables
- or download this
use FreezeThaw;
my $stored = freeze (\$data, \@dataset, \%datagroup);
...
my ($newdata, $newdataset_ref, $newdatagroup_ref) = @thawed;
(*data, *dataset, *datagroup) = @thawed;
- or download this
my $stored = Data::Dumper->Dump( [ $data, \@dataset, \%datagroup ],
[ qw(data *dataset *datagroup )] );
print $stored;
eval $stored;
- or download this
$hi = bless( {
'Data' => {},
'Container' => 'Container',
...
'main' => sub { "DUMMY" },
'say_hi' => sub { "DUMMY" }
}, 'Hello::Hi' );