NAME

App::newver::Scanner - Scan webpage for new software versions

SYNOPSIS

use App::newver::Scanner qw(scan_version);

my $scan = scan_version(
  program => 'perl',
  version => '5.16',
  page    => 'https://github.com/Perl/perl5/tags',
  match   => 'v@VERSION@.tar.gz',
);

DESCRIPTION

App::newver::Scanner is a module that provides the scan_version() subroutine for scanning software's upstream webpages for new software versions. This is a private module, please consult the newver manual for user documentation.

SUBROUTINES

No subroutines are exported by default.

\%scan = scan_version(%params)

Scans the webpage given webpage for software versions newer than the current version, and returns a hash ref of the new software version if one is found, or undef you're up-to-date.

The following fields are required for %params.

program

The name of the software.

version

The current software version.

page

The URL of the web page to scan.

match

Regex to use for matching software versoin hrefs in <a> elements. Regex must contain @VERSION@, which matches the href's version component.

GLOBAL VARIBES

$App::newver::Scanner::user_agent

User agent to use when fetching web pages.

$App::newver::MAYBE_VERSION_RX

Regex used by @VERSION@.

AUTHOR

Written by Samuel Young

This project's source can be found on its Codeberg page. Comments and pull requests are welcome.

COPYRIGHT

Copyright (C) 2025 Samuel Young.

This program is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0.

SEE ALSO

newver