This is an automated email from the git hooks/post-receive script. dom pushed a commit to tag v0.03 in repository libclass-virtual-perl.
commit b51508b5bc6d41fad99b0407d5dfe18b1e582bb8 Author: Michael G. Schwern <[email protected]> Date: Fri Feb 9 13:17:34 2001 +0000 Version 0.02 For some reason certain specific Perl installations don't like require Carp; Carp::carp "foo" and must have parens instead. git-svn-id: file:///Users/schwern/tmp/svn/CPAN/Class-Virtual/trunk@2276 8151f2b9-fde8-0310-94fd-f048d12aab9e --- lib/Class/Virtual.pm | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/lib/Class/Virtual.pm b/lib/Class/Virtual.pm index 834206a..09d4ca1 100644 --- a/lib/Class/Virtual.pm +++ b/lib/Class/Virtual.pm @@ -2,7 +2,7 @@ package Class::Virtual; use strict; use vars qw($VERSION); -$VERSION = '0.01'; +$VERSION = '0.02'; use Class::ISA; # Class::ISA doesn't export?! @@ -45,11 +45,12 @@ Class::Virtual - Base class for virtual base classes. =head1 DESCRIPTION -This is a base class for implementing virtual base classes. Kinda -kooky. It allows you to explicitly declare what methods are virtual -and that must be implemented by subclasses. This might seem silly, -since your program will halt and catch fire when an unimplemented -virtual method is hit anyway, but there's some benefits. +This is a base class for implementing virtual base classes (what some +people call an abstract class). Kinda kooky. It allows you to +explicitly declare what methods are virtual and that must be +implemented by subclasses. This might seem silly, since your program +will halt and catch fire when an unimplemented virtual method is hit +anyway, but there's some benefits. The error message is more informative. Instead of the usual "Can't locate object method" error, you'll get one explaining that a @@ -118,8 +119,8 @@ sub _mk_virtual_methods { # Make sure the method doesn't already exist. if( $this_class->can($meth) ) { require Carp; - Carp::croak "$this_class attempted to declare $meth() virtual ". - "but it appears to already be implemented!"; + Carp::croak("$this_class attempted to declare $meth() virtual ". + "but it appears to already be implemented!"); } # Create a virtual method. @@ -131,11 +132,11 @@ sub _mk_virtual_methods { if( $class eq $this_class) { my $caller = caller; - Carp::croak "$caller called the virtual base class ". - "$this_class directly! Use a subclass instead"; + Carp::croak("$caller called the virtual base class ". + "$this_class directly! Use a subclass instead"); } else { - Carp::croak "$class forgot to implement $meth()"; + Carp::croak("$class forgot to implement $meth()"); } }; } @@ -174,7 +175,7 @@ sub missing_methods { CLASS: foreach my $class (@super_classes) { next METHOD if defined &{$class.'::'.$meth}; } - + push @missing, $meth; } } @@ -186,6 +187,10 @@ sub missing_methods { =back +=head1 CAVEATS and BUGS + +Autoloaded methods are currently not recognized. + =head1 AUTHOR -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libclass-virtual-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits
