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

Contents of /nfo/perl/libs/Data/Mungle/Code/Module.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
CVS Tags: HEAD
Changes since 1.1: +7 -4 lines
namespace fixes for Data::Mungle::*

1 ## ----------------------------------------------------------------------
2 ## $Id: Module.pm,v 1.1 2003/02/18 15:39:41 joko Exp $
3 ## ----------------------------------------------------------------------
4 ## $Log: Module.pm,v $
5 ## Revision 1.1 2003/02/18 15:39:41 joko
6 ## + initial commit
7 ##
8 ## ----------------------------------------------------------------------
9
10
11 package Data::Mungle::Code::Module;
12
13 use strict;
14 use warnings;
15
16
17 use Data::Dumper;
18
19 sub eval_vars {
20 my $self = shift;
21 my $module = shift;
22 my $varnames = shift;
23
24 $self->load("/Data/Mungle/Code/Scalar");
25 $self->eval("use $module;", $varnames);
26
27 # FIXME!!! this just works if $varnames contains a single, scalar variable name
28 # enhance this (Data::Code::Module) and/or Data::Code::Scalar to get this working properly!!!
29 my $result = $self->eval("return \$$varnames;");
30
31 # trace
32 #print Dumper($result);
33 #exit;
34
35 return $result;
36
37 }
38
39 1;
40 __END__

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