# New Ticket Created by Ron Schmidt
# Please include the string: [perl #113478]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=113478 >
The attached Grumble.pm depends on Mumble.pm and neither does much. If
I pre-compile Grumble but not Mumble and have Grumble.pir and Mumble.pm
on my perl6 library path I get the 'No Stable' error for
> perl6 -e 'use Grumble;'
If I now pre-compile Mumble.pm and have both Grumble.pir and Mumble.pir
on my perl6 library path I still get the error whether Mumble.pm is on
the path or not. If I now pre-compile Grumble.pir AGAIN the error goes
away when I 'use Grumble;'.
This seems to mean that pre-compiling modules in the wrong order of
dependency can cause errors.
I then pulled down the modules for URI and pre-compiled all modules
into blib/lib so that all modules were pre-compiled after any module on
which they depended. I could now point PERL6LIB at my blib/lib with no
'.pm' files for any of the URI modules and the main URI test, 't/01.t'
ran successfully and 3 times as fast as when PERL6LIB pointed at the
'lib/' directory with '.pm' URI module files.
This seems to imply that this may be the non-deterministic
pre-compilation bug causing problems for Rakudo Star.
Since the attached files are quite short I include them below for
convenience.
** File Mumble.pm
class Mumble {
}
** File Grumble.pm
use Mumble;
class Grumble {
has $.gripe;
method exhale { say $.gripe }
}
**File nondet.sh
#!/bin/sh
export PERL6LIB=.
rm *.pir
perl6 --target=pir --output=Grumble.pir Grumble.pm
echo 'expect error 1'
perl6 -e 'use Grumble; say<ok>'
echo 'expect error 2'
perl6 --target=pir --output=Mumble.pir Mumble.pm
perl6 -e 'use Grumble; say<ok>'
echo 'expect error 3'
mv Mumble.pm Mumble_sav.pm
perl6 -e 'use Grumble; say<ok>'
mv Mumble_sav.pm Mumble.pm
echo 'expect OK'
perl6 --target=pir --output=Grumble.pir Grumble.pm
perl6 -e 'use Grumble; say<ok>'
use Mumble;
class Grumble {
has $.gripe;
method exhale { say $.gripe }
}
class Mumble {
}
#!/bin/sh
export PERL6LIB=.
rm *.pir
perl6 --target=pir --output=Grumble.pir Grumble.pm
echo 'expect error 1'
perl6 -e 'use Grumble; say <ok>'
echo 'expect error 2'
perl6 --target=pir --output=Mumble.pir Mumble.pm
perl6 -e 'use Grumble; say <ok>'
echo 'expect error 3'
mv Mumble.pm Mumble_sav.pm
perl6 -e 'use Grumble; say <ok>'
mv Mumble_sav.pm Mumble.pm
echo 'expect OK'
perl6 --target=pir --output=Grumble.pir Grumble.pm
perl6 -e 'use Grumble; say <ok>'