sub
initialize {
my
$self
=
shift
;
$self
->SUPER::initialize;
$self
->{
defined
}{ArchiveName} =
'libevent'
;
$self
->{
defined
}{VersionForm} =
'\d\.\d\.\d{1,2}'
;
$self
->{
defined
}{IndexSite} =
$self
->{
defined
}{DownloadSite} =
$self
->{
defined
}{IndexParserForm} = \
&set_index_parser_form
;
$self
->{
defined
}{Filename} = \
&set_filename
;
$self
->{
defined
}{TestAction} =
'verify'
;
return
$self
;
}
sub
set_filename {
my
$attributes
=
shift
;
my
$filename
=
$attributes
->ArchiveName .
'-'
.
$attributes
->Version .
'-stable.'
.
$attributes
->Extension;
return
$filename
;
}
sub
set_index_parser_form {
my
$attributes
=
shift
;
my
$parser
=
'href="'
.
quotemeta
(
$attributes
->DownloadSite ).
quotemeta
(
$attributes
->ArchiveName ).
'-'
.
$attributes
->VersionForm .
'-stable.'
.
quotemeta
(
$attributes
->Extension ) .
'">'
;
return
$parser
;
}
1;