ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/SCRAM/src/BuildSystem/ToolCache.pm
Revision: 1.4.10.1
Committed: Thu Mar 13 12:54:50 2008 UTC (17 years, 1 month ago) by muzaffar
Content type: text/plain
Branch: SCRAM_V2_0
CVS Tags: V2_2_2_pre3, V2_2_2_pre2, V2_2_2_pre1, V2_2_2-pre1, V2_2_1, forV2_2_1, V2_2_0, sm100112, V2_1_4, V2_1_3, V2_1_2, V2_1_1, V2_1_0, V2_0_6, V2_0_5, V2_0_4, V2_0_4_relcand2, V2_0_4_relcand1, V2_0_3, V2_0_3_relcand3, V2_0_3_relcand2, V2_0_3_relcand1, V2_0_2, V2_0_2_relcand1, V2_0_1, V2_0_1_relcand4, V2_0_1_relcand3, V2_0_1_relcand2, V2_0_1_relcand1, V2_0_0_relcand4, V2_0_0, V2_0_0_relcand3, V2_0_0_relcand2, V2_0_0_relcand1
Changes since 1.4: +17 -131 lines
Log Message:
scram v2.0 for multiple arch support and big lib stuff

File Contents

# User Rev Content
1 sashby 1.2 #____________________________________________________________________
2     # File: ToolCache.pm
3     #____________________________________________________________________
4     #
5     # Author: Shaun Ashby <Shaun.Ashby@cern.ch>
6     # Update: 2003-10-28 10:14:08+0100
7 muzaffar 1.4.10.1 # Revision: $Id: ToolCache.pm,v 1.4 2006/09/11 14:53:39 sashby Exp $
8 sashby 1.2 #
9     # Copyright: 2003 (C) Shaun Ashby
10     #
11     #--------------------------------------------------------------------
12     package BuildSystem::ToolCache;
13     require 5.004;
14    
15     use Exporter;
16     @ISA=qw(Exporter);
17     #
18     sub new()
19     {
20     my $proto=shift;
21 muzaffar 1.4.10.1 my $class=ref($proto) || $proto;
22     my $self={};
23     $self->{SETUP}={};
24 sashby 1.2 bless $self,$class;
25     return $self;
26     }
27    
28     sub setup()
29     {
30     my $self=shift;
31     return $self->{SETUP};
32     }
33    
34     sub name()
35     {
36     my $self = shift;
37     # Set the name of the cache file:
38     @_ ? $self->{CACHENAME} = shift #
39     : $self->{CACHENAME};
40     }
41 muzaffar 1.4.10.1
42     sub dirty()
43     {
44     my $self = shift;
45     $self->{internal}{dirty}=1;
46     }
47 sashby 1.2
48     sub writecache()
49     {
50     my $self=shift;
51 muzaffar 1.4.10.1 if (exists $self->{internal}{dirty})
52     {
53     my $file=$self->{CACHENAME};
54     delete $self->{internal};
55     use Cache::CacheUtilities;
56     &Cache::CacheUtilities::write($self,$file);
57     }
58 sashby 1.2 }
59    
60     1;
61