2 |
## $Id$ |
## $Id$ |
3 |
## ---------------------------------------------------------------------- |
## ---------------------------------------------------------------------- |
4 |
## $Log$ |
## $Log$ |
5 |
|
## Revision 1.6 2004/08/10 13:59:48 jonen |
6 |
|
## + bugfix(use of Storable): the FreeBSD port of Perl 5.8.4 uses 64 bits |
7 |
|
## |
8 |
|
## Revision 1.5 2004/06/20 23:00:23 joko |
9 |
|
## minor fix: now creates cache-file in same directory where rap.xml is |
10 |
|
## |
11 |
## Revision 1.4 2004/06/20 16:12:24 joko |
## Revision 1.4 2004/06/20 16:12:24 joko |
12 |
## + sub indexTargets |
## + sub indexTargets |
13 |
## modified getTargetDetails to use cached target details |
## modified getTargetDetails to use cached target details |
34 |
use Data::Dumper; |
use Data::Dumper; |
35 |
use DesignPattern::Object; |
use DesignPattern::Object; |
36 |
use Storable; |
use Storable; |
37 |
|
use File::Basename qw( dirname ); |
38 |
|
|
39 |
|
# NEW 2004-08-05: needed at FreeBSD perl>=5.4.3 |
40 |
|
# read http://lists.freebsd.org/pipermail/freebsd-ports/2004-June/013169.html |
41 |
|
# or more detailed at 'perldoc Storable' |
42 |
|
$Storable::interwork_56_64bit = 1; |
43 |
|
|
44 |
sub accessMetadata { |
sub accessMetadata { |
45 |
my $self = shift; |
my $self = shift; |
130 |
my $self = shift; |
my $self = shift; |
131 |
my $options = shift; |
my $options = shift; |
132 |
|
|
133 |
|
# determine filename for cache-file |
134 |
my $filename = 'rap.xml.cache'; |
my $filename = 'rap.xml.cache'; |
135 |
|
if (my $rapfile = $self->{__rap}->{filename}) { |
136 |
|
if (my $path = dirname($rapfile)) { |
137 |
|
$filename = $path . '/' . $filename; |
138 |
|
} |
139 |
|
} |
140 |
|
|
141 |
if ($options->{build}) { |
if ($options->{build}) { |
142 |
$self->log("Building index of Targets", 'notice'); |
$self->log("Building index of Targets", 'notice'); |