mirror of
https://github.com/NixOS/nix
synced 2025-06-28 22:01:15 +02:00
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…
Add table
Add a link
Reference in a new issue