-----BEGIN PGP SIGNED MESSAGE-----

Moin,

this patch deals with modules that were already on the track to
enlightenment, but somehow didn't manage it.

* SelfLoader: already loaded Carp on demand. Remove commented out use Carp 
statement, and for consistency, add a wrapper for carp()
* open: loaded Carp on demand in two places, but forgot the third
* Text/Balanced: tried to load Carp on demand, but since it used
accidentily "use" vs. "require", didn't achive the desired effect.

Best wishes,

Tels

- --
 Signed on Sun Jun 26 21:12:58 2005 with key 0x93B84C15.
 Visit my photo gallery at http://bloodgate.com/photos/
 PGP key on http://bloodgate.com/tels.asc or per email.

 "Where shall I put you? Under H, like Hot, Sexy Mama?"



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQEVAwUBQr7+i3cLPEOTuEwVAQGDjwf8DZlhHwl+hz5lLqDCNvVgrNXKA0oXqfrc
CHIoZpib9ecF5DKi1K+FCzyKN4785BLOc2aQj4TMpAguVVAW6ZK7vcWhdRg/os2Q
Q01b9UJ40ahrzvKYfkgowypV+QFSYpWibqVp42kf6/aAu00nOrpyx0RD6hHt9M2q
sjQVfaIHwTIx4H+f8JXpCFbiJv7NiCLctEpvm8Ah+lMRMnxK7hkDtDIh2yThkUTw
n9WvBGBfPeSWR/tyrEfDZ9wvI6I0S7OUiYTycCTSZhw20K/xTPw0/klhJm9qPnfX
Ns70Amu0ZFyaq1qW0yD29xgijr8yYGqcVcpcl6utMjmIcOzMfvg+/Q==
=scCr
-----END PGP SIGNATURE-----
diff -ruN blead.patch.7/lib/open.pm blead.patch.8/lib/open.pm
--- blead.patch.7/lib/open.pm   2004-10-10 17:25:46.000000000 +0200
+++ blead.patch.8/lib/open.pm   2005-06-26 21:11:55.000000000 +0200
@@ -1,9 +1,8 @@
 package open;
 use warnings;
-use Carp;
 $open::hint_bits = 0x20000; # HINT_LOCALIZE_HH
 
-our $VERSION = '1.04';
+our $VERSION = '1.04_01';
 
 require 5.008001; # for PerlIO::get_layers()
 
@@ -14,6 +13,10 @@
     return;
 }
 
+sub croak {
+    require Carp; goto &Carp::croak;
+}
+
 sub _drop_oldenc {
     # If by the time we arrive here there already is at the top of the
     # perlio layer stack an encoding identical to what we would like
@@ -39,13 +42,11 @@
     require Encode;
     my ($loname, $lcname) = _get_encname($old[-2]);
     unless (defined $lcname) { # Should we trust get_layers()?
-       require Carp;
-       Carp::croak("open: Unknown encoding '$loname'");
+       croak("open: Unknown encoding '$loname'");
     }
     my ($voname, $vcname) = _get_encname($new[-1]);
     unless (defined $vcname) {
-       require Carp;
-       Carp::croak("open: Unknown encoding '$voname'");
+       croak("open: Unknown encoding '$voname'");
     }
     if ($lcname eq $vcname) {
        binmode($h, ":pop"); # utf8 is part of the encoding layer
diff -ruN blead.patch.7/lib/SelfLoader.pm blead.patch.8/lib/SelfLoader.pm
--- blead.patch.7/lib/SelfLoader.pm     2003-08-14 08:42:32.000000000 +0200
+++ blead.patch.8/lib/SelfLoader.pm     2005-06-26 14:12:48.000000000 +0200
@@ -1,9 +1,8 @@
 package SelfLoader;
-# use Carp;
 require Exporter;
 @ISA = qw(Exporter);
 @EXPORT = qw(AUTOLOAD);
-$VERSION = "1.0904";
+$VERSION = "1.0905";
 sub Version {$VERSION}
 $DEBUG = 0;
 
@@ -18,6 +17,7 @@
 our $attr_list = qr{ \s* : \s* (?: $one_attr )* }x;
 
 sub croak { require Carp; goto &Carp::croak }
+sub carp { require Carp; goto &Carp::carp }
 
 AUTOLOAD {
     print STDERR "SelfLoader::AUTOLOAD for $AUTOLOAD\n" if $DEBUG;
@@ -115,7 +115,7 @@
 sub _add_to_cache {
     my($self,$fullname,$pack,$lines, $protoype) = @_;
     return () unless $fullname;
-    (require Carp), Carp::carp("Redefining sub $fullname")
+    carp("Redefining sub $fullname")
       if exists $Cache{$fullname};
     $Cache{$fullname} = join('', "package $pack; ",@$lines);
     print STDERR "SelfLoader cached $fullname: $Cache{$fullname}" if $DEBUG;
diff -ruN blead.patch.7/lib/Text/Balanced.pm blead.patch.8/lib/Text/Balanced.pm
--- blead.patch.7/lib/Text/Balanced.pm  2004-05-16 17:52:34.000000000 +0200
+++ blead.patch.8/lib/Text/Balanced.pm  2005-06-26 14:10:06.000000000 +0200
@@ -10,7 +10,7 @@
 use SelfLoader;
 use vars qw { $VERSION @ISA %EXPORT_TAGS };
 
-$VERSION = '1.95_01';
+$VERSION = '1.95_02';
 @ISA           = qw ( Exporter );
                     
 %EXPORT_TAGS   = ( ALL => [ qw(
@@ -343,8 +343,8 @@
                        for (qw,~ ! ^ & * ) _ + - = } ] : " ; ' > . ? / | ',)
                                { next if $rdel =~ /\Q$_/; $del = $_; last }
                        unless ($del) {
-                               use Carp;
-                               croak "Can't interpolate right delimiter $rdel"
+                               require Carp;
+                               Carp::croak ("Can't interpolate right delimiter 
$rdel")
                        }
                        eval "qq$del$rdel$del";
                };
@@ -887,8 +887,8 @@
 
                unless (wantarray)
                {
-                       use Carp;
-                       carp "extract_multiple reset maximal count to 1 in 
scalar context"
+                       require Carp;
+                       Carp::carp ("extract_multiple reset maximal count to 1 
in scalar context")
                                if $^W && defined($_[2]) && $max > 1;
                        $max = 1
                }

Reply via email to