# New Ticket Created by Lloyd Fournier # Please include the string: [perl #126893] # in the subject line of all future correspondence about this issue. # <URL: https://rt.perl.org/Ticket/Display.html?id=126893 >
perl6 -e 'use Test do { Date.new(year => 2015); ()}' ===SORRY!=== Default constructor for 'Date' only takes named arguments This example is fairly golfed, but you can run into this in the wild. Consider a module that has an EXPORT sub and takes positional arguments. If you tried to do use MyModule Date.new( year => 2015) # you will get the error 2ยข I don't really get why the arguments to 'use' don't just use normal invocation semantics, with the positionals taken out and passed to export and the named used for normal importing. unless $*IN_DECL eq 'use' || $*IN_DECL eq 'no' || $*IN_DECL eq 'import' || $*IN_RETURN { $_[2].named($name); } This is the line in Actions.nqp that makes 'use' special.