File: magic.t

package info (click to toggle)
libref-util-perl 0.204-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 252 kB
  • sloc: perl: 610; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use strict;
use warnings;
use Ref::Util qw<is_arrayref>;
use Test::More 'tests' => 1;

my ( $x, $y );

{
    package Foo;
    sub TIESCALAR { bless {}, shift }
    sub FETCH { $x }
}

tie $y, 'Foo';
$x = [];

ok( is_arrayref($y), 'Will not accept tied hashref as arrayref' );