Ticket #1322: padre-universal-config-tiny-path.diff

File padre-universal-config-tiny-path.diff, 1.5 KB (added by ofosos, 3 years ago)
  • t/collection/Config-Tiny/t/02_main.t

     
    99    $^W = 1; 
    1010} 
    1111 
    12 use UNIVERSAL; 
     12use Scalar::Util 'reftype'; 
    1313use Test::More tests => 33; 
    1414 
    1515use vars qw{$VERSION}; 
     
    3232ok( $Trivial,     '->new returns true' ); 
    3333ok( ref $Trivial, '->new returns a reference' ); 
    3434 
    35 # Legitimate use of UNIVERSAL::isa 
    36 ok( UNIVERSAL::isa( $Trivial, 'HASH' ), '->new returns a hash reference' ); 
     35ok( reftype($Trivial) eq 'HASH' ), '->new returns a hash reference' ); 
    3736isa_ok( $Trivial, 'Config::Tiny' ); 
    3837ok( scalar keys %$Trivial == 0, '->new returns an empty object' ); 
    3938 
     
    4241ok( $Config,     '->read returns true' ); 
    4342ok( ref $Config, '->read returns a reference' ); 
    4443 
    45 # Legitimate use of UNIVERSAL::isa 
    46 ok( UNIVERSAL::isa( $Config, 'HASH' ), '->read returns a hash reference' ); 
     44ok( reftype($Config) eq 'HASH' ), '->read returns a hash reference' ); 
    4745isa_ok( $Config, 'Config::Tiny' ); 
    4846 
    4947# Check the structure of the config 
     
    104102ok( $Read,     '->read of what we wrote returns true' ); 
    105103ok( ref $Read, '->read of what we wrote returns a reference' ); 
    106104 
    107 # Legitimate use of UNIVERSAL::isa 
    108 ok( UNIVERSAL::isa( $Read, 'HASH' ), '->read of what we wrote returns a hash reference' ); 
     105ok( reftype($Read) eq 'HASH' ), '->read of what we wrote returns a hash reference' ); 
    109106isa_ok( $Read, 'Config::Tiny' ); 
    110107 
    111108# Check the structure of what we read back in