22 |
|
bless $self, $class; |
23 |
|
$self->{file}=shift; |
24 |
|
$self->{Arch}=1; |
25 |
< |
push @{$self->{ARCHBLOCK}}, $Arch; |
25 |
> |
push @{$self->{ARCHBLOCK}}, $self->{Arch}; |
26 |
|
$self->init($self->{file}); |
27 |
|
return $self; |
28 |
|
} |
61 |
|
my $switch=ActiveDoc::SimpleDoc->new(); |
62 |
|
$switch->filetoparse($file); |
63 |
|
$switch->newparse("ordering"); |
64 |
+ |
$switch->addtag("ordering","Architecture", |
65 |
+ |
\&Arch_Start,$self, |
66 |
+ |
"", $self, |
67 |
+ |
\&Arch_End, $self); |
68 |
+ |
$switch->grouptag("Architecture","ordering"); |
69 |
|
$switch->addtag("ordering","require", |
70 |
|
\&require_start,$self, |
71 |
|
"", $self, |
101 |
|
$self->{url}{$$hashref{'name'}}=$$hashref{'file'}; |
102 |
|
} |
103 |
|
} |
104 |
+ |
|
105 |
+ |
sub Arch_Start { |
106 |
+ |
my $self=shift; |
107 |
+ |
my $name=shift; |
108 |
+ |
my $hashref=shift; |
109 |
+ |
|
110 |
+ |
$self->{switch}->checktag($name, $hashref,'name'); |
111 |
+ |
( ($ENV{SCRAM_ARCH}=~/$$hashref{name}.*/) )? ($self->{Arch}=1) |
112 |
+ |
: ($self->{Arch}=0); |
113 |
+ |
push @{$self->{ARCHBLOCK}}, $self->{Arch}; |
114 |
+ |
} |
115 |
+ |
|
116 |
+ |
sub Arch_End { |
117 |
+ |
my $self=shift; |
118 |
+ |
my $name=shift; |
119 |
+ |
|
120 |
+ |
pop @{$self->{ARCHBLOCK}}; |
121 |
+ |
$self->{Arch}=$self->{ARCHBLOCK}[$#{$self->{ARCHBLOCK}}]; |
122 |
+ |
} |
123 |
+ |
|