Skip to content

Instantly share code, notes, and snippets.

@exodist
Created August 4, 2011 01:55
Show Gist options
  • Save exodist/1124341 to your computer and use it in GitHub Desktop.
Save exodist/1124341 to your computer and use it in GitHub Desktop.
Modifying exports in before_export.
sub before_import {
my ( $dest, $spec ) = @_;
if ( $spec->config->{someoption} ) {
$spec->exports->{foo} = [
Exporter::Declare::Export::Sub->new(
sub { ... },
exported_by => __PACKAGE__,
),
{},
[]
];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment