Skip to content

Commit

Permalink
[Perl6/Module/Loader.pm] correctly derive pre-compiled .pir filename …
Browse files Browse the repository at this point in the history
…from both .pm and .pm6 source names
  • Loading branch information
Martin Berends committed Jun 20, 2010
1 parent 683a745 commit f9943a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Perl6/Module/Loader.pm
Expand Up @@ -30,7 +30,7 @@ method need($name, %name_adverbs?) {
# Need not load file if we already did so.
unless %LOADED{$pm_file} {
# Is there a pre-compiled PIR version?
my $pir_file := pir::substr__SSII($pm_file, 0, pir::length__IS($pm_file) - 2) ~ 'pir';
my $pir_file := pir::substr__SSII($pm_file, 0, pir::index__ISSi($pm_file, '.', pir::length__IS($pm_file)-4)) ~ '.pir';
my $loaded_pir := 0;
if pir::stat__ISI($pir_file, 0) {
# XXX We really should check if it's newer than the .pm file
Expand Down

0 comments on commit f9943a2

Please sign in to comment.