File: magic.t

package info (click to toggle)
libset-object-perl 1.42-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 620 kB
  • sloc: perl: 1,069; makefile: 14
file content (25 lines) | stat: -rw-r--r-- 419 bytes parent folder | download | duplicates (3)
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
# RT 123582
print "1..1\n";

package TS;
sub TIESCALAR { bless ["tied"] }
sub FETCH     { $_[0][0] }

package main;

my ($a1, $a2);

$a1 = "plain";
tie $a2, 'TS';

use Set::Object;

my $set = Set::Object->new($a1, $a2);

my $members = join ',', $set->members;
my $ok = (($members eq 'plain,tied')
       or ($members eq 'tied,plain')) ? 1 : 0;

print 'not ' unless $ok;
print "ok 1\n";
print "# $members\n" unless $ok;