1=pod 2 3=encoding utf-8 4 5=head1 PURPOSE 6 7Very basic Exporter::Shiny test. 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 => 3; 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 package Local::Bar; 40 use Exporter::Shiny -setup => { exports => [qw(foo bar)] }; 41 sub foo { 42 return 42; 43 } 44 sub bar { 45 return 666; 46 } 47} 48 49use Local::Foo qw(foo); 50use Local::Bar qw(bar); 51 52is(foo(), 42); 53is(bar(), 666); 54 55local $@; 56eval q{ 57 package Local::Baz; 58 use Exporter::Shiny -setup => { exports => [qw(foo bar)], jazzy => 42 }; 59}; 60my $e = $@; 61 62like($e, qr/Unsupported Sub::Exporter-style options/); 63