develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #118671] t/comp/parser.t loads utf8.pm from installed perl

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
June 28, 2013 23:15
Subject:
[perl #118671] t/comp/parser.t loads utf8.pm from installed perl
Message ID:
rt-3.6.HEAD-2552-1372461296-441.118671-15-0@perl.org
On Fri Jun 28 11:22:57 2013, craigberry wrote:
[snip]
> comp/parser.t falls prey to this assumption by (inadvertently?)
>    loading utf8.pm and looking for it in whatever @INC locations are
>    hard-coded into config.h.
> 
> The reproducer is as simple as running line 479 from t/comp/parser.t
>    as a one-liner and watching where it pulls utf8.pm from:
> 
> $ ./Configure -Dusedevel -DDEBUGGING -des && make test
> <snip>
> $ cd t
> $ ./perl -Dt -e 'eval chr 0x387;' 2>&1 | grep utf8.pm
> ((eval 1):1)	const(PV("utf8.pm"\0))
> (/usr/local/lib/perl5/5.19.2/utf8.pm:0)	nextstate
> (/usr/local/lib/perl5/5.19.2/utf8.pm:3)	const(IV(8388608))
> (/usr/local/lib/perl5/5.19.2/utf8.pm:3)	gvsv(utf8::hint_bits)
> (/usr/local/lib/perl5/5.19.2/utf8.pm:3)	sassign
> (/usr/local/lib/perl5/5.19.2/utf8.pm:3)	nextstate
> (/usr/local/lib/perl5/5.19.2/utf8.pm:5)	const(PV("1.12"\0))
> (/usr/local/lib/perl5/5.19.2/utf8.pm:5)	gvsv(utf8::VERSION)
> (/usr/local/lib/perl5/5.19.2/utf8.pm:5)	sassign
> (/usr/local/lib/perl5/5.19.2/utf8.pm:5)	nextstate
> (/usr/local/lib/perl5/5.19.2/utf8.pm:22)	const(IV(1))
> (/usr/local/lib/perl5/5.19.2/utf8.pm:22)	leaveeval
> (/usr/local/lib/perl5/5.19.2/utf8.pm:16)	const(PV("utf8_heavy.pl"\0))
> (/usr/local/lib/perl5/5.19.2/utf8.pm:16)	require
> (/usr/local/lib/perl5/5.19.2/utf8.pm:16)	nextstate
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	gvsv(utf8::AUTOLOAD)
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	rv2cv
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	defined
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	and
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	pushmark
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	gvsv(utf8::AUTOLOAD)
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	rv2cv
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	refgen
> (/usr/local/lib/perl5/5.19.2/utf8.pm:17)	goto
> 


I didn't get quite the same output as you did.  This was build with
-DDEBUGGING on dromedary:

#####
$ ./perl -Dt -e 'eval chr 0x387;' 2>&1
(-e:1)  const(IV(903))
(-e:1)  chr

EXECUTING...

(-e:0)  enter
(-e:0)  nextstate
(-e:1)  const(PV("\316\207"\0) [UTF8 "\x{387}"])
(-e:1)  entereval
((eval 1):1)    nextstate
((eval 1):1)    const(PV("utf8.pm"\0))
((eval 1):1)    require
(-e:1)  leave
#####

Thank you very much.
Jim Keenan

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=118671

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About