1N/A chdir 't' if -d 't'; 1N/A# this must come before main, or tests will fail 1N/A# these are "abstract virtual" parent methods 1N/A like( $@, qr/doesn't define a $method/, "croaks on inherited $method()" ); 1N/A# the default value is undef 1N/Amy $scalar = Tie::StdScalar->TIESCALAR(); 1N/A# Tie::StdScalar redirects to TIESCALAR 1N/A$scalar = Tie::StdScalar->new(); 1N/A# this approach should work as well 1N/A# first set, then read 1N/A# test DESTROY with an object that signals its destruction 1N/A# $scalar out of scope, Tie::StdScalar::DESTROY() called, DestroyAction set flag 1N/A# we want some noise, and some way to capture it 1N/Alocal $SIG{__WARN__} = sub { 1N/A# Tie::Scalar::TIEHANDLE should find and call TieTest::new and complain 1N/Apackage DestroyAction; 1N/A bless( \(my $self), $_[0] );