Storable-Improved
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
did:
use IO::File;
local $Storable::forgive_me = 1;
sub IO::File::STORABLE_freeze_pre_processing
{
my $self = shift( @_ );
my $class = ref( $self ) || $self;
my $args = [ __FILE__, 'r' ];
# We change the glob object into a regular hash-based one to be Storable-friendly
my $this = bless( { args => $args, class => $class } => $class );
return( $this );
}
sub IO::File::STORABLE_thaw_post_processing
{
my $self = shift( @_ );
my $args = $self->{args};
my $class = $self->{class};
# We restore our glob object. Geez that was hard. Not.
my $obj = $class->new( @$args );
did:
use IO::File;
local $Storable::forgive_me = 1;
sub IO::File::STORABLE_freeze_pre_processing
{
my $self = shift( @_ );
my $class = ref( $self ) || $self;
my $args = [ __FILE__, 'r' ];
# We change the glob object into a regular hash-based one to be Storable-friendly
my $this = bless( { args => $args, class => $class } => $class );
return( $this );
}
sub IO::File::STORABLE_thaw_post_processing
{
my $self = shift( @_ );
my $args = $self->{args};
my $class = $self->{class};
# We restore our glob object. Geez that was hard. Not.
my $obj = $class->new( @$args );
lib/Storable/Improved.pm view on Meta::CPAN
would throw a fatal error that Storable does not accept glob, but if you did:
use IO::File;
local $Storable::forgive_me = 1;
sub IO::File::STORABLE_freeze_pre_processing
{
my $self = shift( @_ );
my $class = ref( $self ) || $self;
my $args = [ __FILE__, 'r' ];
# We change the glob object into a regular hash-based one to be Storable-friendly
my $this = bless( { args => $args, class => $class } => $class );
return( $this );
}
sub IO::File::STORABLE_thaw_post_processing
{
my $self = shift( @_ );
my $args = $self->{args};
my $class = $self->{class};
# We restore our glob object. Geez that was hard. Not.
my $obj = $class->new( @$args );
t/01_glob.t view on Meta::CPAN
my $io = IO::File->new( __FILE__, 'r' );
isa_ok( $io => 'IO::File' );
sub IO::File::STORABLE_freeze_pre_processing
{
# diag( __PACKAGE__, "::STORABLE_freeze_pre_processing: Got arguments '", join( "', '", @_ ), "'" ) if( $DEBUG );
my $self = shift( @_ );
my $class = ref( $self ) || $self;
my $args = [ __FILE__, 'r' ];
# We change the glob object into a regular hash-based one to be Storable-friendly
my $this = bless( { args => $args, class => $class } => $class );
return( $this );
}
sub IO::File::STORABLE_thaw_post_processing
{
# diag( __PACKAGE__, "::STORABLE_thaw_post_processing: Got arguments '", join( "', '", @_ ), "'" ) if( $DEBUG );
my $self = shift( @_ );
my $args = $self->{args};
my $class = $self->{class};
# We restore our glob object. Geez that was hard. Not.
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.475 second using v1.00-cache-2.02-grep-82fe00e-cpan-9e6bc14194b )