in reply to Exporting namespace elements when package is in same file as main

Just pimping Exporter::Shiny as it takes away some of the hassle...

use strict; use warnings; BEGIN { package MyUtils; use Exporter::Shiny qw( answer ); sub answer { return 42; } } use MyUtils { prefix => 'my_' }, qw( answer ); print my_answer(), "\n";
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
  • Comment on Re: Exporting namespace elements when package is in same file as main
  • Download Code