From 6d034593a5f0b02eb9e5b7069fa86814aae07b7c Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sat, 18 Aug 2012 18:34:54 -0500 Subject: initial implementation --- lib/Fun.pm | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) (limited to 'lib') diff --git a/lib/Fun.pm b/lib/Fun.pm index e69de29..188adfb 100644 --- a/lib/Fun.pm +++ b/lib/Fun.pm @@ -0,0 +1,78 @@ +package Fun; +use strict; +use warnings; +# ABSTRACT: simple function signatures + +use Devel::CallParser; +use XSLoader; + +XSLoader::load( + __PACKAGE__, + exists $Fun::{VERSION} ? ${ $Fun::{VERSION} } : (), +); + +use Exporter 'import'; +our @EXPORT = our @EXPORT_OK = ('fun'); + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=cut + +=head1 EXPORTS + +=head2 fun + +=cut + +sub fun { + my ($name, $code) = @_; + my $caller = caller; + no strict 'refs'; + *{ $caller . '::' . $name } = $code; +} + +=head1 BUGS + +No known bugs. + +Please report any bugs through RT: email +C, or browse to +L. + +=head1 SEE ALSO + +L, etc... + +=head1 SUPPORT + +You can find this documentation for this module with the perldoc command. + + perldoc Fun + +You can also look for information at: + +=over 4 + +=item * AnnoCPAN: Annotated CPAN documentation + +L + +=item * CPAN Ratings + +L + +=item * RT: CPAN's request tracker + +L + +=item * Search CPAN + +L + +=back + +=cut + +1; -- cgit v1.2.3-54-g00ecf