The following commit has been merged in the master branch:
commit 63af4da6d1a2842df53db2e93e1ceca58d1b7615
Author: Modestas Vainius <[email protected]>
Date: Sun Jun 21 10:52:09 2009 +0200
Dpkg::Shlibs::SymbolFile: support subclassing of Symbol object
This change makes it easier to replace Dpkg::Shlibs::Symbol with
a derivative class by passing an appropriate $base_symbol parameter
in load().
diff --git a/scripts/Dpkg/Shlibs/SymbolFile.pm
b/scripts/Dpkg/Shlibs/SymbolFile.pm
index 55d4c3e..1912ac9 100644
--- a/scripts/Dpkg/Shlibs/SymbolFile.pm
+++ b/scripts/Dpkg/Shlibs/SymbolFile.pm
@@ -121,9 +121,8 @@ sub load {
my ($self, $file, $seen, $current_object_ref, $base_symbol) = @_;
sub new_symbol {
- my $base = shift;
- return $base->clone(@_) if defined $base;
- return Dpkg::Shlibs::Symbol->new(@_);
+ my $base = shift || 'Dpkg::Shlibs::Symbol';
+ return (ref $base) ? $base->clone(@_) : $base->new(@_);
}
if (defined($seen)) {
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]