in reply to Package shortener and loader

According to the error report, I would guess that a regular expression is not being escaped properly. It appears that a number prefixed by a backslash is causing it problems (see the '\5 <-- HERE' in test output) around line 60 of aliased::factory. This is also supported by the large numbers of passes on *nix and failures on Windows.

In fact, the error appears to be in the line

($err = $@) =~ s/ at $f line \d+\.\n//;

I believe that it should be (untested)

($err = $@) =~ s/ at \Q$f\E line \d+\.\n//;

Update: Had \Q and \E reversed. perlre

Update2: Bug report submitted.

A test should probably be written (if possible) to reproduce this as part of the patch package. HTH.

--MidLifeXis

Replies are listed 'Best First'.
Re^2: Package shortener and loader
by ikegami (Patriarch) on Jun 24, 2011 at 15:46 UTC
    I concur. If you see this, it's a problem with a *test*, not the *module*, and you can safely force the install.

      Please correct me if I am wrong, but it seems to me (although I am not currently developing on windows), that under windows, if the module fails to require a module being requested, and the value of __FILE__ contains something matching \\\d, that the application will exhibit the same behavior as the test.

      The error is caused by passing an unescaped filename as a pattern, and it is not being caught by tests on *nix, because the value for __FILE__ does not contain '\'. I think that there are two parts to the fix - one is to enhance the test to enable the dev to test windows filenames on unix (is it worth it? not sure), and the other is to ignore the backslashes in the generated pattern so it does not happen outside of testing.

      However, I do concur, that with appropriate testing of your application, and appropriate controls in production, that you will probably be safe forcing the install. You can get uncaught errors however, if the module being required errors out for some reason.

      --MidLifeXis

        I misunderstood the issue! retracted.