Al-HUWAITI Shell
Al-huwaiti


Server : Apache
System : Linux dedi-14684855.grupobig.com 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64
User : grupo692 ( 1004)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /home/.cpan/build/NetAddr-IP-4.079-0/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //home/.cpan/build/NetAddr-IP-4.079-0/t/old-store.t
# t/old-store.t - test backwards compatible Storable interaction

use Test::More;

my $tests = 7;

plan tests => $tests;

SKIP:
{
    skip "Failed to use Storable, module not found", $tests
	unless eval { require Storable && use_ok("Storable", 'freeze', 'thaw')};

    skip "Failed to use NetAddr::IP", $tests
	unless use_ok("NetAddr::IP", ':old_storable');

    my $oip = new NetAddr::IP "localhost";
    my $nip;

    isa_ok($oip, 'NetAddr::IP', 'Correct return type');

    my $serialized;

    eval { $serialized = freeze($oip) };
    unless (ok(!$@, "Freezing"))
    {
	diag $@;
    }

#    diag "Result is '$serialized'";

    eval { $nip = thaw($serialized) };
    unless (ok(!$@, "Thawing"))
    {
	diag $@;
    }

    isa_ok($nip, 'NetAddr::IP', 'Recovered correct type');
    is("$nip", "$oip", "New object eq original object");
}

Al-HUWAITI Shell