Add missing file
This commit is contained in:
parent
e94806d030
commit
babe54bf97
1 changed files with 8 additions and 0 deletions
8
perl/lib/Nix/Utils.pm
Normal file
8
perl/lib/Nix/Utils.pm
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
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;
|
||||||
|
}
|
Loading…
Reference in a new issue