# New Ticket Created by  Wenzel Peppmeyer 
# Please include the string:  [perl #127305]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127305 >


# https://gist.github.com/b0d44595e0d3b314a09d

# Module.pm6
unit module Module;

sub EXPORT ($var) {
        { foo => sub () {} }
}

# use-module.p6

use v6;
use lib '.';
use Module 42;

# OUTPUT:
# Error while importing from 'Module':
# no EXPORT sub, but you provided positional argument in the 'use'  statement
# at /home/dex/projekte/perl6/rakudobug/EXPORT+unit-package/use-module.p6:3
# ------> use Module 42⏏;

# Package.pm6

unit package Package;

sub EXPORT ($var) {
        { foo => sub () {} }
}

# use-package.p6

use v6;
use lib '.';
use Package 42;

# OUTPUT:
# Error while importing from 'Package':
# no EXPORT sub, but you provided positional argument in the 'use'  statement
# at /home/dex/projekte/perl6/rakudobug/EXPORT+unit-package/use-package.p6:3
# ------> use Package 42⏏;

# expected: either complain about unit and EXPORT in the same file or 
# make it work

Reply via email to