/[cvs]/nfo/perl/libs/Data/Rap.pm
ViewVC logotype

Diff of /nfo/perl/libs/Data/Rap.pm

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

revision 1.4 by joko, Thu Mar 27 15:31:01 2003 UTC revision 1.5 by jonen, Fri Mar 28 16:52:41 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## -------------------------------------------------------------------------  ## -------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.5  2003/03/28 16:52:41  jonen
6    ##  now using env-var 'RAPBIN'
7    ##
8  ##  Revision 1.4  2003/03/27 15:31:01  joko  ##  Revision 1.4  2003/03/27 15:31:01  joko
9  ##  fixes to modules regarding new namespace(s) below Data::Mungle::*  ##  fixes to modules regarding new namespace(s) below Data::Mungle::*
10  ##  ##
# Line 179  sub constructor { Line 182  sub constructor {
182    #$self->load("Command");    #$self->load("Command");
183    #$self->load("Metadata");    #$self->load("Metadata");
184    #$self->load("Engine");    #$self->load("Engine");
185    
186      # check for another environment-variable: 'RAPBIN'
187      chdir $ENV{RAPBIN} if $ENV{RAPBIN};
188        
189  }  }
190    
# Line 225  sub start { Line 231  sub start {
231    
232  sub find_rules {  sub find_rules {
233    my $self = shift;    my $self = shift;
   my $cwd = cwd();  
234    
235    (my $volume, my $directory, my $file) = splitpath( $cwd );    my $basedir;
236    my @dir = splitdir($directory);    if (my $rapdir = $ENV{RAPDIR}) {
237    pop @dir;      $basedir = $rapdir;
238    #pop @dir;    } else {    
239    my $base = catpath($volume, catdir(@dir));      my $cwd = cwd();
240    
241        (my $volume, my $directory, my $file) = splitpath( $cwd );
242        my @dir = splitdir($directory);
243        pop @dir;
244        #pop @dir;
245        $basedir = catpath($volume, catdir(@dir));
246    
247      }
248    
249    my $rap_xml = "$base/etc/rap.xml";    my $rap_xml = "$basedir/etc/rap.xml";
250    return $rap_xml;    return $rap_xml;
251  }  }
252    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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