Perl: parse json file

This commit is contained in:
Steffen Lange 2024-05-31 19:07:40 +02:00
parent d0d16b5f93
commit 96154af588

View file

@ -5,8 +5,8 @@ class StrawberryPerl extends PatchBase {
parent::__construct('Adam Kennedy', 'Strawberry Perl', 'https://strawberryperl.com/');
}
function check() : bool {
if ($this->fetch('https://strawberryperl.com/'))
return $this->parse('_/strawberry-perl-([\d\.]+)-\d+bit\.msi_');
if ($this->fetch_json('https://strawberryperl.com/releases.json'))
return $this->parse_json('version');
return false;
}
}