Add missing file

This commit is contained in:
Eelco Dolstra 2012-08-27 11:11:30 -04:00
parent e94806d030
commit babe54bf97

8
perl/lib/Nix/Utils.pm Normal file
View 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;
}