/[cvs]/nfo/perl/libs/DesignPattern/Bridge.pm
ViewVC logotype

Diff of /nfo/perl/libs/DesignPattern/Bridge.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by joko, Fri Dec 13 21:46:29 2002 UTC revision 1.2 by joko, Sun Dec 15 02:06:15 2002 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## --------------------------------------------------------------------------------  ## --------------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.2  2002/12/15 02:06:15  joko
6    ##  + feature to be able to specify module in non-perl-style when loading plugins: e.g. $process->load('Setup/Storage')
7    ##
8  ##  Revision 1.1  2002/12/13 21:46:29  joko  ##  Revision 1.1  2002/12/13 21:46:29  joko
9  ##  + initial check-in  ##  + initial check-in
10  ##  ##
# Line 15  use warnings; Line 18  use warnings;
18    
19  use base qw( DesignPattern::Object );  use base qw( DesignPattern::Object );
20    
21    use Data::Dumper;
22    
23  ## ========   object inheritance   ========  ## ========   object inheritance   ========
24    
25  # TODO:  # TODO:
# Line 80  my $logger = Log::Dispatch::Config->inst Line 85  my $logger = Log::Dispatch::Config->inst
85    
86      my $modulename_load = shift;      my $modulename_load = shift;
87            
88        # substitute slashes through double double-colons to load modules perl-style
89        $modulename_load =~ s/\//::/g;
90        
91      my $package = $self_classname . '::' . $modulename_load;      my $package = $self_classname . '::' . $modulename_load;
92      $logger->info( __PACKAGE__ . "->load: $package" );      $logger->info( __PACKAGE__ . "->load: $package" );
93    
94      # this is the module testing phase - use mixin doesn't seem to propagate errors by default      # this is the module testing phase - use mixin doesn't seem to propagate errors by default
95      eval("use $package;");      eval("use $package;");
96      if ($@) {      if ($@) {
97        $logger->error( __PACKAGE__ . "->load: $@" );        # include caller information
98          my @caller = caller;
99          my $caller_msg = $caller[1] . ':' . $caller[2];
100          $logger->error( __PACKAGE__ . "->load: $@ ($caller_msg)" );
101      }      }
102    
103  #print "ref-1: ", ref $self, "\n";  #print "ref-1: ", ref $self, "\n";

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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