/[cvs]/nfo/perl/libs/Data/Mungle/Code/Symbol.pm
ViewVC logotype

Contents of /nfo/perl/libs/Data/Mungle/Code/Symbol.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations)
Thu Mar 27 15:17:03 2003 UTC (21 years, 3 months ago) by joko
Branch: MAIN
Changes since 1.1: +7 -4 lines
namespace fixes for Data::Mungle::*

1 ## ---------------------------------------------------------------------------
2 ## $Id: Symbol.pm,v 1.1 2003/01/22 17:59:22 root Exp $
3 ## ---------------------------------------------------------------------------
4 ## $Log: Symbol.pm,v $
5 ## Revision 1.1 2003/01/22 17:59:22 root
6 ## + refactored from Mail::Audit::Dispatch
7 ##
8 ## ---------------------------------------------------------------------------
9
10
11 package Data::Mungle::Code::Symbol;
12
13 use strict;
14 use warnings;
15
16 require Exporter;
17 our @ISA = qw( Exporter );
18 our @EXPORT_OK = qw(
19 export_symbols
20 );
21
22
23 use Data::Mungle::Code::Ref qw( get_coderef );
24
25 sub export_symbols {
26 my $symbols = shift;
27 my $mixinPackage = shift;
28 my $callPackage = shift;
29 $callPackage ||= __PACKAGE__;
30 foreach (@$symbols) {
31 {
32 no strict 'refs';
33 my $newName = $mixinPackage . '::' . $_;
34 *{$newName} = get_coderef($callPackage, $_);
35 }
36 }
37 }
38
39 1;

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed