Debian Codegraph @

t/bless.t

raw symbols SCIP
1 use Test::More qw(no_plan);
2 use strict;
3 use warnings;
4
5 use autobox::Core;
6
7 my %struct = (
8 ARRAY => [ 'foo' ],
9 HASH => { 'foo' => 1 },
10 CODE => sub { 'foo' },
11 );
12
13 foreach my $reftype ( keys %struct ) {
14 $struct{$reftype}->bless("Object");
15 is ref $struct{$reftype}, "Object";
16 }
17
18 TODO: {
19 todo_skip "Make it work for Regexp, Scalar and Glob", 3;
20 my %todo = (
21 Regexp => qr/foo/,
22 SCALAR => \'foo',
23 GLOB => \*STDIN,
24 );
25
26 foreach my $reftype ( keys %todo ) {
27 $todo{$reftype}->bless("Object");
28 is ref $todo{$reftype}, "Object";
29 }
30 }
31