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 9c833e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/CompUnitRepo/Local/Installation.pm
Expand Up @@ -34,9 +34,9 @@ __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 @binaries = @*INC>>.files(\'bin/#name#\', :$name, :$auth, :$ver);
unless +@binaries {
@binaries = CompUnitRepo::Local::Installation.files(\'bin/#name#\');
@binaries = @*INC>>.files(\'bin/#name#\');
if +@binaries {
note q:to/SORRY/;
===SORRY!===
Expand Down

0 comments on commit 9c833e4

Please sign in to comment.