summaryrefslogtreecommitdiff
path: root/lib/Symbol.pm
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2001-11-05 15:26:24 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-05 13:34:25 +0000
commitc74f62b55c858d7cf9ed72589c05484ffce727b0 (patch)
treedcdf138910383bad040b493ea09e155a096c3593 /lib/Symbol.pm
parent6edf234670edef4b947a0a755b192ed118277469 (diff)
downloadperl-c74f62b55c858d7cf9ed72589c05484ffce727b0.tar.gz
bugfixes
Message-ID: <20011105142624.C31977@rafael> p4raw-id: //depot/perl@12850
Diffstat (limited to 'lib/Symbol.pm')
-rw-r--r--lib/Symbol.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Symbol.pm b/lib/Symbol.pm
index 15c211c8dc..8739bd2b31 100644
--- a/lib/Symbol.pm
+++ b/lib/Symbol.pm
@@ -63,14 +63,14 @@ explicitly.
=cut
-BEGIN { require 5.002; }
+BEGIN { require 5.005; }
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(gensym ungensym qualify qualify_to_ref);
@EXPORT_OK = qw(delete_package);
-$VERSION = 1.03;
+$VERSION = 1.04;
my $genpkg = "Symbol::";
my $genseq = 0;
@@ -95,8 +95,10 @@ sub qualify ($;$) {
my ($name) = @_;
if (!ref($name) && index($name, '::') == -1 && index($name, "'") == -1) {
my $pkg;
- # Global names: special character, "^x", or other.
- if ($name =~ /^([^a-z])|(\^[a-z])$/i || $global{$name}) {
+ # Global names: special character, "^xyz", or other.
+ if ($name =~ /^(([^a-z])|(\^[a-z_]+))\z/i || $global{$name}) {
+ # RGS 2001-11-05 : translate leading ^X to control-char
+ $name =~ s/^\^([a-z_])/'qq(\c'.$1.')'/eei;
$pkg = "main";
}
else {