From: Christian Jaeger Date: Sat, 18 Oct 2008 18:25:12 +0000 (+0200) Subject: Git.pm: do not break inheritance X-Git-Tag: v1.6.0.4~3^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/d8b24b930f5b7150e63d989de39eb71bd37e8e63?ds=inline;hp=--cc Git.pm: do not break inheritance Make it possible to write subclasses of Git.pm Signed-off-by: Christian Jaeger Signed-off-by: Junio C Hamano --- d8b24b930f5b7150e63d989de39eb71bd37e8e63 diff --git a/perl/Git.pm b/perl/Git.pm index 6aab712e6a..ba94453781 100644 --- a/perl/Git.pm +++ b/perl/Git.pm @@ -1203,8 +1203,7 @@ =head1 COPYRIGHT # the method was called upon an instance and (undef, @args) if # it was called directly. sub _maybe_self { - # This breaks inheritance. Oh well. - ref $_[0] eq 'Git' ? @_ : (undef, @_); + UNIVERSAL::isa($_[0], 'Git') ? @_ : (undef, @_); } # Check if the command id is something reasonable.