blob: 943b8dd4abfadf6003a6eb8d767877336537d3a1 (
plain) (
tree)
|
|
package Nix::Utils;
$urlRE = "(?: [a-zA-Z][a-zA-Z0-9\+\-\.]*\:[a-zA-Z0-9\%\/\?\:\@\&\=\+\$\,\-\_\.\!\~\*]+ )";
sub checkURL {
my ($url) = @_;
die "invalid URL ‘$url’\n" unless $url =~ /^ $urlRE $ /x;
}
|