New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
charnames.pm clobbers default variable #7379
Comments
From marcel@noug.atThis is a bug report for perl from marcel@noug.at, charnames.pm's import() clobbers $_. $ perl -Mcharnames=:full -le print Here's a patch: Inline Patchdiff -ruN src.orig/lib/charnames.pm src/lib/charnames.pm
--- src.orig/lib/charnames.pm Mon Feb 9 22:30:09 2004
+++ src/lib/charnames.pm Tue Jun 22 18:38:23 2004
@@ -190,8 +190,8 @@
## fill %h keys with our @_ args.
##
my ($promote, %h, @args) = (0);
- while (@_ and $_ = shift) {
- if ($_ eq ":alias") {
+ while (my $arg = shift) {
+ if ($arg eq ":alias") {
@_ or
croak ":alias needs an argument in charnames";
my $alias = shift;
@@ -210,11 +210,11 @@
alias_file ($alias);
next;
}
- if (m/^:/ and ! ($_ eq ":full" || $_ eq ":short")) {
- warn "unsupported special '$_' in charnames";
+ if (substr($arg, 0, 1) eq ':' and ! ($arg eq ":full" || $arg eq ":short")) {
+ warn "unsupported special '$arg' in charnames";
next;
}
- push @args, $_;
+ push @args, $arg;
}
@args == 0 && $promote and @args = (":full");
@h{@args} = (1) x @args;
Flags: Site configuration information for perl v5.9.2: Configured by marcel at Tue Jun 22 18:01:17 CEST 2004. Summary of my perl5 (revision 5 version 9 subversion 2 patch 22969) configuration: Locally applied patches: @INC for perl v5.9.2: Environment for perl v5.9.2: |
From @mhxOn 2004-06-22, at 16:43:50 -0000, Marcel "Grünauer" (via RT) wrote:
Thanks for your report. Your patch has been applied together with a test case as change #22972. Marcus -- |
The RT System itself - Status changed from 'new' to 'open' |
@mhx - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#30409 (status was 'resolved')
Searchable as RT30409$
The text was updated successfully, but these errors were encountered: