use strict;
sub TIEHASH { undef }
package main;
use Tie::Anon qw(tieh);
use lib "t";
{
my $href = tieh("Tie::StdHash");
is ref($href), "HASH", "tieh should return a hash-ref";
is ref(tied(%$href)), "Tie::StdHash", "... and it's backed by the tied class.";
}
{
my $href = tieh("testlib::FailTieHash");
is $href, undef, "If tie() fails, it returns undef";
}
done_testing;