Description: Fix a 0.000004 regression in exporting subroutines
 While at it, add a test case catching the regression.
Origin: vendor, https://rt.cpan.org/Ticket/Attachment/1562228/833791/0001-Fix-a-0.000004-regression-in-exporting-subroutines.patch
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=107627
Bug-Debian: http://bugs.debian.org/805105
Author: Niko Tyni <ntyni@debian.org>
Last-Update: 2015-11-22

--- a/lib/Perl6/Export/Attrs.pm
+++ b/lib/Perl6/Export/Attrs.pm
@@ -141,7 +141,7 @@
     REQUEST:
     while ($argno < @_) {
         my $request = $_[$argno];
-        if (my ($sub_name) = $request =~ m/\A & ($IDENT) (?:\(\))? \z/xms) {
+        if (my ($sub_name) = $request =~ m/\A &? ($IDENT) (?:\(\))? \z/xms) {
             if (exists $request{$sub_name}) {
                 splice @_, $argno, 1;
                 next REQUEST;
--- /dev/null
+++ b/t/01export.t
@@ -0,0 +1,12 @@
+use Test::More tests => 1;
+
+package Lib;
+use Perl6::Export::Attrs;
+sub doit :Export { "Do it!"; }
+1;
+
+package main;
+import Lib qw(doit);
+
+is(doit(), "Do it!", "function exported as expected");
+
