File: 51isa.t

package info (click to toggle)
libstring-tagged-perl 0.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: perl: 2,105; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 454 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use v5.14;
use warnings;

use Test2::V0;

BEGIN { plan skip_all => "This perl does not support infix isa" unless $^V ge v5.32; }

use String::Tagged;
use experimental qw(isa);

String::Tagged->new("cat") isa 'Foo';

my $begin = String::Tagged->new( "BEGIN" );
$begin->apply_tag( -1, 5, begin => 1 );

is( dies {
   my $str = String::Tagged->new( $begin );
}, undef, 'Prior use of infix isa does not upset method calls' );

done_testing;