Skip Menu |
Report information
Id: 131911
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: molecules <bottomsc [at]>

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)

Date: Wed, 16 Aug 2017 18:16:41 +0000
To: "rakudobug [...]" <rakudobug [...]>
From: "Bottoms, Christopher A" <BottomsC [...]>
Subject: [BUG] non-Perl 6 scripts in the module bin directory do not install in a runnable form
Download (untitled) / with headers
text/plain 2.3k

(This may be easier to read here: 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/`.

`zef install .` runs without error in the top directory. But when trying to run ``, I get an error. Come to find out, a Perl 6 wrapper script had been installed for `` and that is what is giving me the error. If I run `bin/` directly, it works fine.

## Expected Behavior

I expected that running `` from any directory would be the same as running it from the source directory.

## Actual Behavior

When trying to run ``, I get the following error:

    Could not find Perl5 at line 2 in:

## Steps to Reproduce

Create the following files:


    "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/env perl
    use v5.10;
    use strict;
    use warnings;
    say 'Hello world!';

Install it and run ``.

zef install .     # error
bin/ # works fine

The "installed" `` script is
    #!/usr/bin/env perl6
    sub MAIN(:$name is copy, :$auth, :$ver, *@, *%) {"", :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!

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at