Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix "Cannot look up attributes in a type object" in generated scripts
The panda script failed with "Cannot look up attributes in a type object
in method files at src/gen/m-CORE.setting:26732". Seems like files()
expects to be called on an object. CompUnitRepo objects are to be found
in @*INC.
  • Loading branch information
niner committed Mar 31, 2015
1 parent c8cab23 commit 011c3ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/CompUnitRepo/Local/Installation.pm
Expand Up @@ -34,9 +34,10 @@ __END__
';
my $perl_wrapper = '#!/usr/bin/env #perl#
sub MAIN(:$name, :$auth, :$ver, *@pos, *%named) {
my @binaries = CompUnitRepo::Local::Installation.files(\'bin/#name#\', :$name, :$auth, :$ver);
my @installations = @*INC.grep(CompUnitRepo::Local::Installation);
my @binaries = @installations>>.files(\'bin/#name#\', :$name, :$auth, :$ver);
unless +@binaries {
@binaries = CompUnitRepo::Local::Installation.files(\'bin/#name#\');
@binaries = @installations>>.files(\'bin/#name#\');
if +@binaries {
note q:to/SORRY/;
===SORRY!===
Expand Down

0 comments on commit 011c3ec

Please sign in to comment.