From: Tels Date: Sat, 9 Jul 2005 23:10:29 +0000 (+0200) Subject: #2 try at Text::Balanced patch and maintainership X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=75c4c974b3d5cef5c6dab333977800a4ccd5a59f;p=p5sagit%2Fp5-mst-13.2.git #2 try at Text::Balanced patch and maintainership Message-Id: <200507092310.30592@bloodgate.com> (with minor tweaks) p4raw-id: //depot/perl@25134 --- diff --git a/lib/Text/Balanced.pm b/lib/Text/Balanced.pm index 8b390f7..bb839a0 100644 --- a/lib/Text/Balanced.pm +++ b/lib/Text/Balanced.pm @@ -7,7 +7,6 @@ use strict; package Text::Balanced; use Exporter; -use SelfLoader; use vars qw { $VERSION @ISA %EXPORT_TAGS }; $VERSION = '1.95_01'; @@ -37,6 +36,14 @@ sub _match_variable($$); sub _match_codeblock($$$$$$$); sub _match_quotelike($$$$); +sub carp { + require Carp; goto &Carp::carp; +} + +sub croak { + require Carp; goto &Carp::croak; +} + # HANDLE RETURN VALUES IN VARIOUS CONTEXTS sub _failmsg { @@ -343,8 +350,7 @@ sub _match_tagged # ($$$$$$$) for (qw,~ ! ^ & * ) _ + - = } ] : " ; ' > . ? / | ',) { next if $rdel =~ /\Q$_/; $del = $_; last } unless ($del) { - use Carp; - croak "Can't interpolate right delimiter $rdel" + croak ("Can't interpolate right delimiter $rdel") } eval "qq$del$rdel$del"; }; @@ -887,8 +893,7 @@ sub extract_multiple (;$$$$) # ($text, $functions_ref, $max_fields, $ignoreunkno unless (wantarray) { - use Carp; - carp "extract_multiple reset maximal count to 1 in scalar context" + carp ("extract_multiple reset maximal count to 1 in scalar context") if $^W && defined($_[2]) && $max > 1; $max = 1 }