Skip Menu |

This queue is for tickets about the Module-ScanDeps CPAN distribution.

Report information
The Basics
Id: 69213
Status: resolved
Priority: 0/
Queue: Module-ScanDeps

People
Owner: Nobody in particular
Requestors: schutton [...] cisco.com
shutton [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: bug-AnyEvent [...] rt.cpan.org
Subject: ScanDeps incompatible with AnyEvent (Perl 5.14, AnyEvent 5.34, PAR 1.00.2)
Date: Thu, 30 Jun 2011 15:46:29 -0700
To: bug-PAR [...] rt.cpan.org
From: Scott Hutton <schutton [...] cisco.com>
PAR emits this error while trying to compile AnyEvent: <<<<< $ pp -c -M AnyEvent -M AnyEvent::Impl::EV -M EV -o repeng {SCRIPTNAME} Variable "@models" is not available at T7uor6 line 1259. SYSTEM ERROR in compiling /usr/local/lib/perl5/site_perl/5.14.1/mach/AnyEvent.pm: 65280 at /usr/local/lib/perl5/site_perl/5.14.1/Module/ScanDeps.pm line 1241. Show quoted text
>>>>>
The problem stems from something that's being done with WARNING_BITS. This is a pruned version of the script that ScanDeps was using, and reproduces the problem: Show quoted text
>>>>>
#use Module::ScanDeps::DataFeed 'KaVvk9.out'; sub { package AnyEvent;# basically a tuned-down version of common::sensesub common_sense { # from common:.sense 3.4 ${^WARNING_BITS} ^= ${^WARNING_BITS} ^ "\x3c\x3f\x33\x00\x0f\xf0\x0f\xc0\xf0\xfc\x33\x00"; # use strict vars subs - NO UTF-8, as Util.pm doesn't like this atm. (uts46data.pl) $^H |= 0x00000600; } BEGIN { AnyEvent::common_sense } use Carp (); our $VERSION = '5.34'; our $MODEL; our $AUTOLOAD; our @ISA; our @REGISTRY; our $VERBOSE; my @models = ( ); sub detect() { @models; } } <<<<< Problem encountered with: perl 5, version 14, subversion 1 (v5.14.1) built for i386-freebsd-64int AnyEvent version 5.34 PAR 1.00.2 Changing the "my" to an "our" allows compilation to complete, as does eliminating the WARNING_BITS/^H modifications. Cc'ing the AnyEvent bug list in case it makes more sense to address the problem from that side. -Scott Hutton Software Engineer, Cisco Systems, Inc.
On 2011-06-30 18:46:41, schutton@cisco.com wrote: Show quoted text
> PAR emits this error while trying to compile AnyEvent:
The problem seems to be the outer sub { ... } that Module::ScanDeps adds when trying to "compile" some Perl code, i.e. essentially it runs "perl" on it, but adds some code to print out %INC at the end. Cf. sub _compile in Module::ScanDeps. The outer sub causes the warning Variable "@models" is not available at ... and the manipulation to $^WARNING_BITS and $^H makes this fatal. There are probably other ways to achieve _compile's goal, perhaps some clever hack using some B::* modules. But what is the reason you are using "pp -c ..." at all? Especially since you already add modules AnyEvent, AnyEvent::Impl::EV and EV explcitly. Are other modules missing in the packed executable? Cheers, Roderich
Subject: Out of Office AutoReply: [rt.cpan.org #69213] ScanDeps incompatible with AnyEvent (Perl 5.14, AnyEvent 5.34, PAR 1.00.2)
Date: Thu, 7 Jul 2011 15:15:41 -0700
To: "Roderich Schupp via RT" <bug-Module-ScanDeps [...] rt.cpan.org>
From: "Scott Hutton (schutton)" <schutton [...] cisco.com>
I'll be out of the office until Monday, July 11th. For any urgent issues, please contact my manager, Michael Hulton (mhulton@cisco.com). For reputation engine issues, please contact Michael Parker (parker@ironport.com). -Scott
Removing -c works around the issue. The wisdom around here as to why it was being used was: "historical."
On 2011-07-11 19:11:51, SHUTTON wrote: Show quoted text
> Removing -c works around the issue. The wisdom around here as to why > it was being used was: "historical."
OK :) The problem should be fixed in Module::ScanDeps 1.03 which uses a different method to extract %INC etc _after_compilation, but _before- execution. Cheers, Roderich