Christian Walde > Sub-Exporter-Simple > Sub::Exporter::Simple

Download:
Sub-Exporter-Simple-1.103210.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 1.103210   Source  

NAME ^

Sub::Exporter::Simple - just export some subs

VERSION ^

version 1.103210

SYNOPSIS ^

In your module:

    package Module;

    use Sub::Exporter::Simple qw( function1 function2 function3 );

    function1 { 1 }
    function2 { 2 }
    function3 { 3 }

In your target:

    use Module qw( function1 );

    function1();

DESCRIPTION ^

This module is basically just a macro for:

    use Sub::Exporter -setup => { exports => [ qw( function1 function2 function3 ) ] };

I made it because i found myself in the situation of wanting to simply export some subs in a number of modules, but not wanting to use Exporter, since Sub::Exporter offers a nicer API. However the default way of just exporting some plain subs in Sub::Exporter is a bit cumbersome to type (especially repeatedly) and does not look very clean either. (As far as typing effort goes, please do consider that [] and friends are often AltGr affairs in non-american layouts.) So this module just acts as a macro for that functionality and reduces the amount of needed typing, while making things look more clean.

That's all it does. It does not expose any other functionality of Sub::Exporter and never will. If you need more than this, use the real thing.

THANKS ^

Thanks to rjbs for writing the excellent Sub::Exporter and providing some input for this module, as well as catching a bug before the first release.

BUGS ^

Please report any bugs or feature requests through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

AUTHOR ^

Christian Walde <mithaldu@yahoo.de>

COPYRIGHT AND LICENSE ^

This software is Copyright (c) 2010 by Christian Walde.

This is free software, licensed under:

  DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004
syntax highlighting: