Re: spurious deaths in script execution due to read-only Config?

2011-02-23 Thread Christian Walde
On Wed, 23 Feb 2011 16:33:49 +0100, Brian Raven bra...@nyx.com wrote:

 I remembered this morning that there is a bug tracker for ActivePerl,
 started to write up an error report and in doing so ended up
 formulating a possible for for ActiveState:
 http://bugs.activestate.com/show_bug.cgi?id=89447

 It's the standard behavior of Perl.

 While autovivication is part of Perl's normal behaviour, I'm not sure
 that it is cause of this problem. The fact that un-commenting the line
 before the grep in the OP's code makes the problem go away tends to
 confirm this.

 I suspect that it is related to the Activestate overriding of Config
 ('use diagnostics' will give a stack trace) but I can't see how it
 causes that error, i.e. %Config::Config is read-only.

 Note that inhibiting the activestate override
 ($ENV{ACTIVEPERL_CONFIG_DISABLE} = 1) also seems to make the problem go
 away.

 Maybe somebody from Activestate has a clue.

Try reading the whole bug i linked. It has a detailed description of what 
happens and when and where the offending error is triggered and how it can be 
prevented.

Summary:

Grep makes $_ point at $Config{foo}, on first load ActivePerl::Config tries to 
load File::Basename, which triggers Exporter.pm, which goes local $_. At THAT 
point an attempt to autovivify is made causing the whole thing to crash down.

Solution: Make sure $_ isn't pointing at %Config when Exporter.pm happens. This 
can be done as simple as this:

 map { require ActiveState::Path } 1;

(Though i'm sure more elegant solutions exist.)

-- 
With regards,
Christian Walde
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: spurious deaths in script execution due to read-only Config?

2011-02-22 Thread Christian Walde
On Tue, 22 Feb 2011 13:46:55 +0100, Chris Wagner wagn...@plebeian.com wrote:
 At 08:54 PM 2/21/2011 +0100, Christian Walde wrote:
  use Config;
  # print 1 if $Config{foo}; # enabling this removes the crash
  grep { $_ } $Config{bar}; # this crashes

 These two lines on their own will cause ActivePerl of any version to exit
 with the error message above.
Hi.  U can't do that because Perl must autovivify $Config{bar} in order to
 have a value to put into $_.  HTH.

Good guess, that's almost what happens. The problem happens a bit deeper in the 
guts and is actually caused by Exporter.pm, where it tries to do local $_ and 
by doing so triggers autovivification. (grep/map only do an aliasing of %Config 
to $_, which is fine.)

I remembered this morning that there is a bug tracker for ActivePerl, started 
to write up an error report and in doing so ended up formulating a possible for 
for ActiveState: http://bugs.activestate.com/show_bug.cgi?id=89447

-- 
With regards,
Christian Walde
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


spurious deaths in script execution due to read-only Config?

2011-02-21 Thread Christian Walde
Hi,

I run two perl smokers and they've often been failing tests with errors like 
this:

  %Config::Config is read-only
  BEGIN failed--compilation aborted at C:/Perl/lib/ActiveState/Path.pm line 
12.
  Compilation failed in require at C:/Perl/lib/ActivePerl/Config.pm line 46.

Today i traced another occurence of this in App::Info::Util, specifically in 
sub lib_dirs. This lead me to finding a very minimal reproducable pattern for 
this error which i'm not sure should be one:

  use Config;
  # print 1 if $Config{foo}; # enabling this removes the crash
  grep { $_ } $Config{bar}; # this crashes

These two lines on their own will cause ActivePerl of any version to exit with 
the error message above. I'm not sure what exactly causes this or whether i 
should send this to the p5p mailing list, but i figured here is better for a 
start.

I'm very open to any suggestions on how to move on with this and will happily 
provide any information asked for.

-- 
With regards,
Christian Walde
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs


Re: Advice requested, porting unix perl app to windows

2009-06-03 Thread Christian Walde
On Wed, 03 Jun 2009 16:42:03 +0200, Dennis Daupert ddaup...@csc.com wrote:

 I don't know of a free (as in both beer and non-beer) windows equivalent
 to scp OR sftp.

You might want to look at cygwin. If the tools you're using are GNU, then it 
most likely has implementations of it that run on windows.

Alternatively, you might want to have a look at the putty toolset: 
http://www.chiark.greenend.org.uk/~sgtatham/putty/

-- 
Grüsse,
Christian Walde


___ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs