X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2F02-Film.t;h=f1477ccc46069c5fd046f8362540cf48a0d62969;hb=6298a324307439b76419d0f5db453b0d10f10517;hp=3a4d70a7561c8a21aa27735dc1aba4f95a690f1a;hpb=4edfce2f91ce49d56ea11eb7710600b3fe5b96c5;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/cdbi/02-Film.t b/t/cdbi/02-Film.t index 3a4d70a..f1477cc 100644 --- a/t/cdbi/02-Film.t +++ b/t/cdbi/02-Film.t @@ -1,5 +1,7 @@ use strict; use Test::More; +use Scalar::Util 'refaddr'; +use namespace::clean; $| = 1; BEGIN { @@ -383,21 +385,21 @@ SKIP: { # my bad taste is your bad taste my $btaste = Film->retrieve('Bad Taste'); my $btaste2 = Film->retrieve('Bad Taste'); - is Scalar::Util::refaddr($btaste), Scalar::Util::refaddr($btaste2), + is refaddr $btaste, refaddr $btaste2, "Retrieving twice gives ref to same object"; my ($btaste5) = Film->search(title=>'Bad Taste'); - is Scalar::Util::refaddr($btaste), Scalar::Util::refaddr($btaste5), + is refaddr $btaste, refaddr $btaste5, "Searching also gives ref to same object"; $btaste2->remove_from_object_index; my $btaste3 = Film->retrieve('Bad Taste'); - isnt Scalar::Util::refaddr($btaste2), Scalar::Util::refaddr($btaste3), + isnt refaddr $btaste2, refaddr $btaste3, "Removing from object_index and retrieving again gives new object"; $btaste3->clear_object_index; my $btaste4 = Film->retrieve('Bad Taste'); - isnt Scalar::Util::refaddr($btaste2), Scalar::Util::refaddr($btaste4), + isnt refaddr $btaste2, refaddr $btaste4, "Clearing cache and retrieving again gives new object"; $btaste=Film->insert({ @@ -407,7 +409,7 @@ SKIP: { NumExplodingSheep => 2, }); $btaste2 = Film->retrieve('Bad Taste 2'); - is Scalar::Util::refaddr($btaste), Scalar::Util::refaddr($btaste2), + is refaddr $btaste, refaddr $btaste2, "Creating and retrieving gives ref to same object"; }