[rt.cpan.org #73037] constants wont inline

[email protected] ("patcat88 via RT")
Newsgroups perl.libwin32
Message-ID <[email protected]>
Tue Dec 06 04:10:31 2011: Request 73037 was acted upon.
Transaction: Ticket created by [email protected]
       Queue: Win32-WinError
     Subject: constants wont inline
   Broken in: 0.03
    Severity: Normal
       Owner: Nobody
  Requestors: [email protected]
      Status: new
 Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=73037 >


In WinError.pm constants can't be inlined because the eval part lacks a
() prototype.
Change 
##    eval "sub $AUTOLOAD { $val }"; ##
to 
##    eval "sub $AUTOLOAD () { $val }"; ##


Before fix
..............................................
FUNC: *main::VIEW_S_FIRST
VIEW_S_FIRST not in symbol table
FUNC: *main::VIEW_S_LAST
VIEW_S_LAST not in symbol table
1  <0> enter
# 7: print ERROR_FILE_NOT_FOUND;
2  <;> nextstate(main 241 winerror.pl:7) v:*,&,{,$
3  <0> pushmark s
4  <0> pushmark s
5  <#> gv[*ERROR_FILE_NOT_FOUND] s
6  <1> entersub[t2] lKS/TARG,3
7  <@> print vK
8  <@> leave[1 ref] vKP/REFC
winerror.pl syntax OK


After fix
FUNC: *main::VIEW_S_FIRST
VIEW_S_FIRST not in symbol table
FUNC: *main::VIEW_S_LAST
VIEW_S_LAST not in symbol table
1  <0> enter
# 7: print ERROR_FILE_NOT_FOUND;
2  <;> nextstate(main 241 winerror.pl:7) v:*,&,{,$
3  <0> pushmark s
4  <$> const[IV 2] s
5  <@> print vK
6  <@> leave[1 ref] vKP/REFC
winerror.pl syntax OK

Concise was run as
perl -MO=Concise,-exec,-src,-stash="main" winerror.pl

I am using v5.12.2 and WinError 0.03
winerror.pl (text/x-perl, 118 B)
#!/usr/bin/perl -w
use strict;
use Win32::WinError;
BEGIN {
    ERROR_FILE_NOT_FOUND();
}
print ERROR_FILE_NOT_FOUND;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.