diff options
author | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2012-05-21 00:15:27 +0000 |
commit | a4c42bfb2337d37da89d789cb8cc226367994e32 (patch) | |
tree | c3eabdef5d565a4e515d2be0d9d4d0540bde0250 /Master/tlpkg/tlperl/lib/TAP/Object.pm | |
parent | 8274475057f024d35332ac47c2e2f23ea156e6ed (diff) |
perl 5.14.2 from siep
git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlperl/lib/TAP/Object.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/TAP/Object.pm | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/Master/tlpkg/tlperl/lib/TAP/Object.pm b/Master/tlpkg/tlperl/lib/TAP/Object.pm index 498bb805c91..e933179c916 100644 --- a/Master/tlpkg/tlperl/lib/TAP/Object.pm +++ b/Master/tlpkg/tlperl/lib/TAP/Object.pm @@ -9,11 +9,11 @@ TAP::Object - Base class that provides common functionality to all C<TAP::*> mod =head1 VERSION -Version 3.17 +Version 3.23 =cut -$VERSION = '3.17'; +$VERSION = '3.23'; =head1 SYNOPSIS @@ -93,6 +93,25 @@ sub _croak { return; } +=head3 C<_confess> + +Raise an exception using C<confess> from L<Carp>, eg: + + $self->_confess( 'why me?', 'aaarrgh!' ); + +May also be called as a I<class> method. + + $class->_confess( 'this works too' ); + +=cut + +sub _confess { + my $proto = shift; + require Carp; + Carp::confess(@_); + return; +} + =head3 C<_construct> Create a new instance of the specified class. @@ -124,7 +143,7 @@ Create simple getter/setters. sub mk_methods { my ( $class, @methods ) = @_; - foreach my $method_name (@methods) { + for my $method_name (@methods) { my $method = "${class}::$method_name"; no strict 'refs'; *$method = sub { |