1=pod 2 3=encoding utf-8 4 5=head1 PURPOSE 6 7Test the C<< /regexp/ >> notation. 8 9=head1 AUTHOR 10 11Toby Inkster E<lt>tobyink@cpan.orgE<gt>. 12 13=head1 COPYRIGHT AND LICENCE 14 15This software is copyright (c) 2014, 2017 by Toby Inkster. 16 17This is free software; you can redistribute it and/or modify it under 18the same terms as the Perl 5 programming language system itself. 19 20 21=cut 22 23use strict; 24use warnings; 25use Test::More tests => 2; 26 27{ 28 package Local::Foo; 29 use Exporter::Shiny qw(foo bar); 30 sub foo { 31 return 42; 32 } 33 sub bar { 34 return 666; 35 } 36} 37 38{ 39 my %imported; 40 'Local::Foo'->import({ into => \%imported }, qw( /^F/i )); 41 is_deeply([sort keys %imported], ['foo']); 42} 43 44{ 45 my %imported; 46 'Local::Foo'->import({ into => \%imported }, qw( -all !/^F/i )); 47 is_deeply([sort keys %imported], ['bar']); 48} 49