Skip to content
This repository has been archived by the owner on Dec 11, 2024. It is now read-only.

Subroutine redefined from re or utf8_heavy from eval #26

Closed
atoomic opened this issue Nov 4, 2015 · 2 comments
Closed

Subroutine redefined from re or utf8_heavy from eval #26

atoomic opened this issue Nov 4, 2015 · 2 comments

Comments

@atoomic
Copy link
Collaborator

atoomic commented Nov 4, 2015

Can only reproduce this error using cm522 branch (patched with swash updates)
no problems when using master (patched with swashnew-273)

Tested with perl 5.22.0 using branch swashnew-273 with HEAD at commit f6f2eb1

So far I could not make it shorter to reproduce the issue

#!./perl

use utf8;

use strict;
use warnings;

BEGIN {
    sub force_re { return re::is_regexp($_[0]) }
    sub xyz {
        my $exe = $Config::Config{_exe} || $Config::Config{_foo};    
    }
    sub abcd {
        my $results = qx{something};
        $results =~ s/^(syntax|parse) error/syntax error/mig;
        return $?;
    }
}

no warnings 'experimental::regex_sets';

my @w;
$SIG{__WARN__} = sub { push @w, "WARN: ", @_ };

my $re = '/(?[ \p{foo} ])/';
eval $re;

print join( "", @w ); 
print "ok\n" if scalar @w == 0;
> perl test.pl
ok
> perlcc test.pl
> ./test
WARN: Subroutine setcolor redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/i386-linux-debug-64int/re.pm line 37.
WARN: Subroutine _load_unload redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/i386-linux-debug-64int/re.pm line 94.
WARN: Subroutine bits redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/i386-linux-debug-64int/re.pm line 111.
WARN: Subroutine import redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/i386-linux-debug-64int/re.pm line 273.
WARN: Subroutine unimport redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/i386-linux-debug-64int/re.pm line 278.
WARN: Subroutine DESTROY redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/utf8_heavy.pl line 10.
WARN: Subroutine croak redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/utf8_heavy.pl line 14.
WARN: Subroutine _loose_name redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/utf8_heavy.pl line 16.
@toddr
Copy link
Member

toddr commented Nov 4, 2015

@atoomic The re warnings don't bother me much. use re fixes it.

I'm more worried about this:

$>./test
WARN: Subroutine DESTROY redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/utf8_heavy.pl line 10.
WARN: Subroutine croak redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/utf8_heavy.pl line 14.
WARN: Subroutine _loose_name redefined at /usr/local/cpanel/3rdparty/perl/522-debug/lib/perl5/5.22.0/utf8_heavy.pl line 16.

toddr added a commit that referenced this issue Jun 10, 2017
These all appear to be PAD related. Since we're saving the PAD statically with an immortal flag, we're not having issues any more.

#26
rurban#219
rurban#277
@toddr
Copy link
Member

toddr commented Jun 10, 2017

@toddr toddr closed this as completed Jun 10, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants