[Rt-devel] DBIx::SB::Handle -- $PrevHandle question.
Dmitri Tikhonov
dtikhonov at vonage.com
Wed Feb 21 16:28:35 EST 2007
Dear RTers and DBIx::SBers,
what is the purpose of $PrevHandle "magic" in
DBIx::SearchBuilder::Handle? Specifically, this code:
sub dbh {
my $self=shift;
#If we are setting the database handle, set it.
$DBIHandle{$self} = $PrevHandle = shift if (@_);
return($DBIHandle{$self} ||= $PrevHandle);
}
puzzles me. The conversion from $DBIHandle to %DBIHandle is based on
patch from Audrey Tang [1] which was included along with $PrevHandle
into the 0.61 -> 0.96 changeset [2]. However, I can't find the
explanation for $PrevHandle in the Changes file or anywhere in the
comments. Could someone please tell me why it's there?
Thank you,
- Dmitri.
1. http://rt.cpan.org/Public/Bug/Display.html?id=4167
2.
http://search.cpan.org/diff?from=DBIx-SearchBuilder-0.61&to=DBIx-SearchBuilder-0.96
More information about the Rt-devel
mailing list