NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Stringified references don't work? (Score:2)
As for names, I would go for Test::Ref, since the Perl operator is ref().
Re:Stringified references don't work? (Score:1)
For example,
use warnings;
use strict;
use Test::More tests => 2;
my $val1 = qr/foo/;
my $val2 = qr/foo/;
$a = $val1;
$b = $val1;
$c = $val2;
diag ref $a;
diag ref $b;
diag ref $c;
is($a, $b);
isnt($a, $c);
A whole module for ... ? (Score:2)
Re:A whole module for ... ? (Score:1)
What problem were you solving? (Score:2)
--
xoa
Re:What problem were you solving? (Score:1)
I am testing to ensure that an object returned by a function is actually the same object received by a previous call to this function. In OO terms, I testing to make sure a class is a Singleton.
I tried the XS route, until Randal's suggestion above, because I needed the address of what the
RV*'s were pointing to. The new route ofis((ref $a && ref $b && $a == $b), 1)isn't pretty, but it works just fine. Also, I got a good look at howTest::BuilderandTest::Builder::Testerwork, so I wou