From a4c42bfb2337d37da89d789cb8cc226367994e32 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 21 May 2012 00:15:27 +0000 Subject: perl 5.14.2 from siep git-svn-id: svn://tug.org/texlive/trunk@26525 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/tlperl/lib/TAP/Object.pm | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'Master/tlpkg/tlperl/lib/TAP/Object.pm') 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 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 from L, eg: + + $self->_confess( 'why me?', 'aaarrgh!' ); + +May also be called as a I 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 { -- cgit v1.2.3