Codebase list libnet-sieve-script-perl / ebc1c75
[svn-upgrade] Integrating new upstream version, libnet-sieve-script-perl (0.06) Yves Agostini 16 years ago
16 changed file(s) with 258 addition(s) and 192 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Perl module Net::Sieve::Script
11
2 0.0.5 Fri, 11 Apr 2008 11:31:45 +0200
2 0.06 Tue, 6 May 2008 20:20:04 +0200
3 - add copyright
4 - add use warnings, fix uninitialized values
5
6 0.05 Fri, 11 Apr 2008 11:31:45 +0200
37 - use Module::Install instead of ModuleMaker
48 - add version for all files
59
0 ---
01 abstract: Parse and write sieve scripts
12 author: Yves Agostini - Univ Metz - <agostini@univ-metz.fr>
23 build_requires:
34 Pod::Coverage: 0
45 Test::More: 0
56 distribution_type: module
6 generated_by: Module::Install version 0.64
7 generated_by: Module::Install version 0.67
78 license: perl
9 meta-spec:
10 url: http://module-build.sourceforge.net/META-spec-v1.3.html
11 version: 1.3
812 name: Net-Sieve-Script
913 no_index:
1014 directory:
1418 Class::Accessor::Fast: 0.3
1519 perl: 5.6.0
1620 tests: t/*.t
17 version: 0.05
21 version: 0.06
55
66 use vars qw{$VERSION $ISCORE @ISA};
77 BEGIN {
8 $VERSION = '0.64';
8 $VERSION = '0.67';
99 $ISCORE = 1;
1010 @ISA = qw{Module::Install::Base};
1111 }
00 #line 1
11 package Module::Install::Base;
22
3 $VERSION = '0.64';
3 $VERSION = '0.67';
44
55 # Suspend handler for "redefined" warnings
66 BEGIN {
1010
1111 use vars qw{$VERSION $ISCORE @ISA};
1212 BEGIN {
13 $VERSION = '0.64';
13 $VERSION = '0.67';
1414 $ISCORE = 1;
1515 @ISA = qw{Module::Install::Base};
1616 }
55
66 use vars qw{$VERSION $ISCORE @ISA};
77 BEGIN {
8 $VERSION = '0.64';
8 $VERSION = '0.67';
99 $ISCORE = 1;
1010 @ISA = qw{Module::Install::Base};
1111 }
55
66 use vars qw{$VERSION $ISCORE @ISA};
77 BEGIN {
8 $VERSION = '0.64';
8 $VERSION = '0.67';
99 $ISCORE = 1;
1010 @ISA = qw{Module::Install::Base};
1111 }
66
77 use vars qw{$VERSION $ISCORE @ISA};
88 BEGIN {
9 $VERSION = '0.64';
9 $VERSION = '0.67';
1010 $ISCORE = 1;
1111 @ISA = qw{Module::Install::Base};
1212 }
1616 my %seen = ();
1717
1818 sub prompt {
19 shift;
20
21 # Infinite loop protection
22 my @c = caller();
23 if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
24 die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
25 }
26
27 # In automated testing, always use defaults
28 if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
29 local $ENV{PERL_MM_USE_DEFAULT} = 1;
30 goto &ExtUtils::MakeMaker::prompt;
31 } else {
32 goto &ExtUtils::MakeMaker::prompt;
33 }
19 shift;
20
21 # Infinite loop protection
22 my @c = caller();
23 if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) {
24 die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])";
25 }
26
27 # In automated testing, always use defaults
28 if ( $ENV{AUTOMATED_TESTING} and ! $ENV{PERL_MM_USE_DEFAULT} ) {
29 local $ENV{PERL_MM_USE_DEFAULT} = 1;
30 goto &ExtUtils::MakeMaker::prompt;
31 } else {
32 goto &ExtUtils::MakeMaker::prompt;
33 }
3434 }
3535
3636 sub makemaker_args {
37 my $self = shift;
38 my $args = ($self->{makemaker_args} ||= {});
39 %$args = ( %$args, @_ ) if @_;
40 $args;
37 my $self = shift;
38 my $args = ($self->{makemaker_args} ||= {});
39 %$args = ( %$args, @_ ) if @_;
40 $args;
4141 }
4242
4343 # For mm args that take multiple space-seperated args,
4444 # append an argument to the current list.
4545 sub makemaker_append {
46 my $self = shift;
47 my $name = shift;
48 my $args = $self->makemaker_args;
49 $args->{name} = defined $args->{$name}
50 ? join( ' ', $args->{name}, @_ )
51 : join( ' ', @_ );
46 my $self = sShift;
47 my $name = shift;
48 my $args = $self->makemaker_args;
49 $args->{name} = defined $args->{$name}
50 ? join( ' ', $args->{name}, @_ )
51 : join( ' ', @_ );
5252 }
5353
5454 sub build_subdirs {
55 my $self = shift;
56 my $subdirs = $self->makemaker_args->{DIR} ||= [];
57 for my $subdir (@_) {
58 push @$subdirs, $subdir;
59 }
55 my $self = shift;
56 my $subdirs = $self->makemaker_args->{DIR} ||= [];
57 for my $subdir (@_) {
58 push @$subdirs, $subdir;
59 }
6060 }
6161
6262 sub clean_files {
63 my $self = shift;
64 my $clean = $self->makemaker_args->{clean} ||= {};
65 %$clean = (
66 %$clean,
67 FILES => join(' ', grep length, $clean->{FILES}, @_),
68 );
63 my $self = shift;
64 my $clean = $self->makemaker_args->{clean} ||= {};
65 %$clean = (
66 %$clean,
67 FILES => join(' ', grep length, $clean->{FILES}, @_),
68 );
6969 }
7070
7171 sub realclean_files {
72 my $self = shift;
73 my $realclean = $self->makemaker_args->{realclean} ||= {};
74 %$realclean = (
75 %$realclean,
76 FILES => join(' ', grep length, $realclean->{FILES}, @_),
77 );
72 my $self = shift;
73 my $realclean = $self->makemaker_args->{realclean} ||= {};
74 %$realclean = (
75 %$realclean,
76 FILES => join(' ', grep length, $realclean->{FILES}, @_),
77 );
7878 }
7979
8080 sub libs {
81 my $self = shift;
82 my $libs = ref $_[0] ? shift : [ shift ];
83 $self->makemaker_args( LIBS => $libs );
81 my $self = shift;
82 my $libs = ref $_[0] ? shift : [ shift ];
83 $self->makemaker_args( LIBS => $libs );
8484 }
8585
8686 sub inc {
87 my $self = shift;
88 $self->makemaker_args( INC => shift );
87 my $self = shift;
88 $self->makemaker_args( INC => shift );
89 }
90
91 my %test_dir = ();
92
93 sub _wanted_t {
94 /\.t$/ and -f $_ and $test_dir{$File::Find::dir} = 1;
95 }
96
97 sub tests_recursive {
98 my $self = shift;
99 if ( $self->tests ) {
100 die "tests_recursive will not work if tests are already defined";
101 }
102 my $dir = shift || 't';
103 unless ( -d $dir ) {
104 die "tests_recursive dir '$dir' does not exist";
105 }
106 require File::Find;
107 %test_dir = ();
108 File::Find::find( \&_wanted_t, $dir );
109 $self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
89110 }
90111
91112 sub write {
92 my $self = shift;
93 die "&Makefile->write() takes no arguments\n" if @_;
94
95 my $args = $self->makemaker_args;
96 $args->{DISTNAME} = $self->name;
97 $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
98 $args->{VERSION} = $self->version || $self->determine_VERSION($args);
99 $args->{NAME} =~ s/-/::/g;
100 if ( $self->tests ) {
101 $args->{test} = { TESTS => $self->tests };
102 }
103 if ($] >= 5.005) {
104 $args->{ABSTRACT} = $self->abstract;
105 $args->{AUTHOR} = $self->author;
106 }
107 if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
108 $args->{NO_META} = 1;
109 }
110 if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
111 $args->{SIGN} = 1;
112 }
113 unless ( $self->is_admin ) {
114 delete $args->{SIGN};
115 }
116
117 # merge both kinds of requires into prereq_pm
118 my $prereq = ($args->{PREREQ_PM} ||= {});
119 %$prereq = ( %$prereq, map { @$_ } map { @$_ } grep $_,
120 ($self->build_requires, $self->requires) );
121
122 # merge both kinds of requires into prereq_pm
123 my $subdirs = ($args->{DIR} ||= []);
124 if ($self->bundles) {
125 foreach my $bundle (@{ $self->bundles }) {
126 my ($file, $dir) = @$bundle;
127 push @$subdirs, $dir if -d $dir;
128 delete $prereq->{$file};
129 }
130 }
131
132 if ( my $perl_version = $self->perl_version ) {
133 eval "use $perl_version; 1"
134 or die "ERROR: perl: Version $] is installed, "
135 . "but we need version >= $perl_version";
136 }
137
138 my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
139 if ($self->admin->preop) {
140 $args{dist} = $self->admin->preop;
141 }
142
143 my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
144 $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
113 my $self = shift;
114 die "&Makefile->write() takes no arguments\n" if @_;
115
116 my $args = $self->makemaker_args;
117 $args->{DISTNAME} = $self->name;
118 $args->{NAME} = $self->module_name || $self->name || $self->determine_NAME($args);
119 $args->{VERSION} = $self->version || $self->determine_VERSION($args);
120 $args->{NAME} =~ s/-/::/g;
121 if ( $self->tests ) {
122 $args->{test} = { TESTS => $self->tests };
123 }
124 if ($] >= 5.005) {
125 $args->{ABSTRACT} = $self->abstract;
126 $args->{AUTHOR} = $self->author;
127 }
128 if ( eval($ExtUtils::MakeMaker::VERSION) >= 6.10 ) {
129 $args->{NO_META} = 1;
130 }
131 if ( eval($ExtUtils::MakeMaker::VERSION) > 6.17 and $self->sign ) {
132 $args->{SIGN} = 1;
133 }
134 unless ( $self->is_admin ) {
135 delete $args->{SIGN};
136 }
137
138 # merge both kinds of requires into prereq_pm
139 my $prereq = ($args->{PREREQ_PM} ||= {});
140 %$prereq = ( %$prereq,
141 map { @$_ }
142 map { @$_ }
143 grep $_,
144 ($self->build_requires, $self->requires)
145 );
146
147 # merge both kinds of requires into prereq_pm
148 my $subdirs = ($args->{DIR} ||= []);
149 if ($self->bundles) {
150 foreach my $bundle (@{ $self->bundles }) {
151 my ($file, $dir) = @$bundle;
152 push @$subdirs, $dir if -d $dir;
153 delete $prereq->{$file};
154 }
155 }
156
157 if ( my $perl_version = $self->perl_version ) {
158 eval "use $perl_version; 1"
159 or die "ERROR: perl: Version $] is installed, "
160 . "but we need version >= $perl_version";
161 }
162
163 $args->{INSTALLDIRS} = $self->installdirs;
164
165 my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
166
167 my $user_preop = delete $args{dist}->{PREOP};
168 if (my $preop = $self->admin->preop($user_preop)) {
169 $args{dist} = $preop;
170 }
171
172 my $mm = ExtUtils::MakeMaker::WriteMakefile(%args);
173 $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile');
145174 }
146175
147176 sub fix_up_makefile {
148 my $self = shift;
149 my $makefile_name = shift;
150 my $top_class = ref($self->_top) || '';
151 my $top_version = $self->_top->VERSION || '';
152
153 my $preamble = $self->preamble
154 ? "# Preamble by $top_class $top_version\n"
155 . $self->preamble
156 : '';
157 my $postamble = "# Postamble by $top_class $top_version\n"
158 . ($self->postamble || '');
159
160 local *MAKEFILE;
161 open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
162 my $makefile = do { local $/; <MAKEFILE> };
163 close MAKEFILE or die $!;
164
165 $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
166 $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
167 $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
168 $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
169 $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
170
171 # Module::Install will never be used to build the Core Perl
172 # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
173 # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
174 $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
175 #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
176
177 # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
178 $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
179
180 # XXX - This is currently unused; not sure if it breaks other MM-users
181 # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
182
183 open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
184 print MAKEFILE "$preamble$makefile$postamble" or die $!;
185 close MAKEFILE or die $!;
186
187 1;
177 my $self = shift;
178 my $makefile_name = shift;
179 my $top_class = ref($self->_top) || '';
180 my $top_version = $self->_top->VERSION || '';
181
182 my $preamble = $self->preamble
183 ? "# Preamble by $top_class $top_version\n"
184 . $self->preamble
185 : '';
186 my $postamble = "# Postamble by $top_class $top_version\n"
187 . ($self->postamble || '');
188
189 local *MAKEFILE;
190 open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
191 my $makefile = do { local $/; <MAKEFILE> };
192 close MAKEFILE or die $!;
193
194 $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
195 $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
196 $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
197 $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
198 $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m;
199
200 # Module::Install will never be used to build the Core Perl
201 # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks
202 # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist
203 $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
204 #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
205
206 # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
207 $makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
208
209 # XXX - This is currently unused; not sure if it breaks other MM-users
210 # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
211
212 open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
213 print MAKEFILE "$preamble$makefile$postamble" or die $!;
214 close MAKEFILE or die $!;
215
216 1;
188217 }
189218
190219 sub preamble {
191 my ($self, $text) = @_;
192 $self->{preamble} = $text . $self->{preamble} if defined $text;
193 $self->{preamble};
220 my ($self, $text) = @_;
221 $self->{preamble} = $text . $self->{preamble} if defined $text;
222 $self->{preamble};
194223 }
195224
196225 sub postamble {
197 my ($self, $text) = @_;
198 $self->{postamble} ||= $self->admin->postamble;
199 $self->{postamble} .= $text if defined $text;
200 $self->{postamble}
226 my ($self, $text) = @_;
227 $self->{postamble} ||= $self->admin->postamble;
228 $self->{postamble} .= $text if defined $text;
229 $self->{postamble}
201230 }
202231
203232 1;
204233
205234 __END__
206235
207 #line 334
236 #line 363
55
66 use vars qw{$VERSION $ISCORE @ISA};
77 BEGIN {
8 $VERSION = '0.64';
8 $VERSION = '0.67';
99 $ISCORE = 1;
1010 @ISA = qw{Module::Install::Base};
1111 }
1212
1313 my @scalar_keys = qw{
1414 name module_name abstract author version license
15 distribution_type perl_version tests
15 distribution_type perl_version tests installdirs
1616 };
1717
1818 my @tuple_keys = qw{
5555 };
5656 }
5757
58 # configure_requires is currently a null-op
59 sub configure_requires { 1 }
60
61 # Aliases for build_requires that will have alternative
62 # meanings in some future version of META.yml.
63 sub test_requires { shift->build_requires(@_) }
64 sub install_requires { shift->build_requires(@_) }
65
66 # Aliases for installdirs options
67 sub install_as_core { $_[0]->installdirs('perl') }
68 sub install_as_cpan { $_[0]->installdirs('site') }
69 sub install_as_site { $_[0]->installdirs('site') }
70 sub install_as_vendor { $_[0]->installdirs('vendor') }
71
5872 sub sign {
5973 my $self = shift;
60 return $self->{'values'}{'sign'} if defined wantarray and !@_;
74 return $self->{'values'}{'sign'} if defined wantarray and ! @_;
6175 $self->{'values'}{'sign'} = ( @_ ? $_[0] : 1 );
6276 return $self;
6377 }
278292
279293 if (
280294 $self->_slurp($file) =~ m/
281 =head \d \s+
282 (?:licen[cs]e|licensing|copyright|legal)\b
283 (.*?)
295 (
296 =head \d \s+
297 (?:licen[cs]e|licensing|copyright|legal)\b
298 .*?
299 )
284300 (=head\\d.*|=cut.*|)
285301 \z
286302 /ixms
288304 {
289305 my $license_text = $1;
290306 my @phrases = (
291 'under the same (?:terms|license) as perl itself' => 'perl',
292 'GNU public license' => 'gpl',
293 'GNU lesser public license' => 'gpl',
294 'BSD license' => 'bsd',
295 'Artistic license' => 'artistic',
296 'GPL' => 'gpl',
297 'LGPL' => 'lgpl',
298 'BSD' => 'bsd',
299 'Artistic' => 'artistic',
307 'under the same (?:terms|license) as perl itself' => 'perl', 1,
308 'GNU public license' => 'gpl', 1,
309 'GNU lesser public license' => 'gpl', 1,
310 'BSD license' => 'bsd', 1,
311 'Artistic license' => 'artistic', 1,
312 'GPL' => 'gpl', 1,
313 'LGPL' => 'lgpl', 1,
314 'BSD' => 'bsd', 1,
315 'Artistic' => 'artistic', 1,
316 'MIT' => 'mit', 1,
317 'proprietary' => 'proprietary', 0,
300318 );
301 while ( my ( $pattern, $license ) = splice( @phrases, 0, 2 ) ) {
319 while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) {
302320 $pattern =~ s{\s+}{\\s+}g;
303321 if ( $license_text =~ /\b$pattern\b/i ) {
322 if ( $osi and $license_text =~ /All rights reserved/i ) {
323 warn "LEGAL WARNING: 'All rights reserved' may invalidate Open Source licenses. Consider removing it.";
324 }
304325 $self->license($license);
305326 return 1;
306327 }
55
66 use vars qw{$VERSION $ISCORE @ISA};
77 BEGIN {
8 $VERSION = '0.64';
8 $VERSION = '0.67';
99 $ISCORE = 1;
1010 @ISA = qw{Module::Install::Base};
1111 }
55
66 use vars qw{$VERSION $ISCORE @ISA};
77 BEGIN {
8 $VERSION = '0.64';
8 $VERSION = '0.67';
99 $ISCORE = 1;
1010 @ISA = qw{Module::Install::Base};
1111 }
2727 # This is not enforced yet, but will be some time in the next few
2828 # releases once we can make sure it won't clash with custom
2929 # Module::Install extensions.
30 $VERSION = '0.64';
30 $VERSION = '0.67';
3131 }
3232
3333 # Whether or not inc::Module::Install is actually loaded, the
00 package Net::Sieve::Script::Action;
11 use strict;
2 #use warnings;
2 use warnings;
33
44 use base qw(Class::Accessor::Fast);
55
66 use vars qw($VERSION);
77
8 $VERSION = '0.0.5';
8 $VERSION = '0.06';
99
1010 __PACKAGE__->mk_accessors(qw(command param));
1111
00 package Net::Sieve::Script::Condition;
11 use strict;
2 #use warnings;
2 use warnings;
33
44 use base qw(Class::Accessor::Fast);
55
66 use vars qw($VERSION);
77
8 $VERSION = '0.0.5';
8 $VERSION = '0.06';
99
1010 __PACKAGE__->mk_accessors(qw(test not id condition parent AllConds key_list header_list address_part match_type comparator require));
1111
191191 my $self = shift;
192192 my $line = $self->not.' '.$self->test.' ';
193193
194 my $comparator = ':comparator '.$self->comparator if ($self->comparator);
194 my $comparator = ($self->comparator)?':comparator '.$self->comparator : '';
195195
196196 if ( $self->test eq 'address' ) {
197197 $line .= $self->address_part.' '.$comparator.' '.$self->match_type;
212212 };
213213
214214
215 $line.=' '.$self->header_list.' '.$self->key_list;
215 my $header_list = ($self->header_list)?$self->header_list:'';
216 my $key_list = ($self->key_list)?$self->key_list:'';
217
218 $line.=' '.$header_list.' '.$key_list;
216219
217220 $line =~ s/^\s+//;
218221 $line =~ s/\s+$//;
00 package Net::Sieve::Script::Rule;
11 use strict;
2 #use warnings;
2 use warnings;
33 use base qw(Class::Accessor::Fast);
44
55 use vars qw($VERSION);
66
7 $VERSION = '0.0.5';
7 $VERSION = '0.06';
88
99 use Net::Sieve::Script::Action;
1010 use Net::Sieve::Script::Condition;
113113 return $self->write_action;
114114 }
115115
116 return $self->alternate.' '.
117 $self->write_condition."\n".
116 my $write_condition = ($self->write_condition)?$self->write_condition:'';
117 my $write_action = ($self->write_action)?$self->write_action:'';
118
119 return $self->alternate.' '.
120 $write_condition."\n".
118121 ' {'.
119 "\n".$self->write_action.
122 "\n".$write_action.
120123 ' } ';
121124 }
122125
153156 {
154157 my $self = shift;
155158
156 my $actions;
159 my $actions = '';
157160 my $require = $self->require();
158161
159162 foreach my $command ( @{$self->actions()} ) {
00 package Net::Sieve::Script;
11 use strict;
2 #use warnings;
2 use warnings;
33
44 BEGIN {
55 use Exporter ();
66 use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);
7 $VERSION = '0.05';
7 $VERSION = '0.06';
88 @ISA = qw(Exporter);
99 #Give a hoot don't pollute, do not export more than needed by default
1010 @EXPORT = qw(_strip);
112112
113113 # break if more than 50 rules
114114 die "50 rules does not sound reasonable !"
115 if ( $self->max_priority() >= 50 );
115 if ( $self->max_priority() && $self->max_priority() >= 50 );
116116
117117 return $self;
118118 }
149149 foreach my $rule ( sort { $a->priority() <=> $b->priority() } @{$self->rules()} ) {
150150 $text .= $rule->write."\n";
151151 foreach my $req ($rule->require()) {
152 $require{$req->[0]} = 1;
152 $require{$req->[0]} = 1 if defined $req->[0];
153153 }
154154 }
155155
412412
413413 =head1 COPYRIGHT
414414
415 Copyright 2008 Yves Agostini - <agostini@univ-metz.fr>
416
415417 This program is free software; you can redistribute
416418 it and/or modify it under the same terms as Perl itself.
417419