# New Ticket Created by Christopher Bottoms # Please include the string: [perl #131911] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=131911 >
(This may be easier to read here: https://github.com/ugexe/zef/issues/200. The only reason it is closed there is because it is a Rakudo bug, not a zef bug) ## Context In the module directory is a `META6.json` file and a subdirectory called `bin`. In the `bin` is a Perl 5 file called `bin/test.pl`. `zef install .` runs without error in the top directory. But when trying to run `test.pl`, I get an error. Come to find out, a Perl 6 wrapper script had been installed for `test.pl` and that is what is giving me the error. If I run `bin/test.pl` directly, it works fine. ## Expected Behavior I expected that running `test.pl` from any directory would be the same as running it from the source directory. ## Actual Behavior When trying to run `test.pl`, I get the following error: ===SORRY!=== Could not find Perl5 at line 2 in: /home/username/.perl6 /path/to/perl6/rakudo-star-2017.07/install/share/perl6/site /path/to/perl6/rakudo-star-2017.07/install/share/perl6/vendor /path/to/perl6/rakudo-star-2017.07/install/share/perl6 CompUnit::Repository::AbsolutePath<64730416> CompUnit::Repository::NQP<43359856> CompUnit::Repository::Perl5<43359896> ## Steps to Reproduce Create the following files: **`META6.json`** { "perl" : "6.c", "name" : "TESTING1234", "license" : "Artistic-2.0", "version" : "0.0.2", "auth" : "github:author", "authors" : ["First Last"], "description" : "TESTING module creation", "provides" : { }, "depends" : [ ], "test-depends" : [ "Test", "Test::META" ] } **`bin/test.pl`** #!/bin/env perl use v5.10; use strict; use warnings; say 'Hello world!'; Install it and run `test.pl`. ``` zef install . test.pl # error bin/test.pl # works fine ``` The "installed" `test.pl` script is `/path/to/perl6/rakudo-star-2017.07/install/share/perl6/site/bin/test.pl`: #!/usr/bin/env perl6 sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) { CompUnit::RepositoryRegistry.run-script("test.pl", :dist-name<TESTING1234>, :$name, :$auth, :$ver); } ## Your Environment * perl6 -v ``` This is Rakudo version 2017.07 built on MoarVM version 2017.07 implementing Perl 6.c. ``` Thank you for all of your hard work!