my $data = "this is a string of text";
my @dataset = qw( this is an array of text );
my %datagroup = ( hash => "mine", text => "yours" );
####
use Storable;
my $stored = freeze [ \$data, \@dataset, \%datagroup ];
print $stored; # just to see what it looks like, in binary encoding
my $thawed = thaw $stored;
my ($newdata, $newdataset_ref, $newdatagroup_ref) = @$thawed; # copies of original variables
(*data, *dataset, *datagroup) = @$thawed; # restore into the original variables
##
##
use FreezeThaw;
my $stored = freeze (\$data, \@dataset, \%datagroup);
print $stored; # even trickier encoding
my @thawed = thaw $stored;
my ($newdata, $newdataset_ref, $newdatagroup_ref) = @thawed;
(*data, *dataset, *datagroup) = @thawed;
##
##
my $stored = Data::Dumper->Dump( [ $data, \@dataset, \%datagroup ],
[ qw(data *dataset *datagroup )] );
print $stored;
eval $stored;
##
##
$hi = bless( {
'Data' => {},
'Container' => 'Container',
'Info' => {
'modified' => '0',
'name' => 'Hi',
'author' => 'chromatic',
'date' => '1 March 2000',
'desc' => 'silly demonstration for Jellybean'
},
'main' => sub { "DUMMY" },
'say_hi' => sub { "DUMMY" }
}, 'Hello::Hi' );