File: scalar-obj.t

package info (click to toggle)
libdata-dump-perl 1.25-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 188 kB
  • sloc: perl: 1,173; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 421 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
print "1..3\n";

use Data::Dump qw(dump); 

$a = 42;
bless \$a, "Foo";

my $d = dump($a);

print "$d\n";
print "not " unless $d eq q(do {
  my $a = 42;
  bless \$a, "Foo";
  $a;
});
print "ok 1\n";

$d = dump(\$a);
print "$d\n";
print "not " unless $d eq q(bless(do{\\(my $o = 42)}, "Foo"));
print "ok 2\n";

$d = dump(\\$a);
print "$d\n";
print "not " unless $d eq q(\\bless(do{\\(my $o = 42)}, "Foo"));
print "ok 3\n";