diff options
author | Joachim Tingvold <joachim@tingvold.com> | 2016-03-02 23:41:57 +0100 |
---|---|---|
committer | Joachim Tingvold <joachim@tingvold.com> | 2016-03-02 23:43:48 +0100 |
commit | 2c625018a15e628f82e91126eb544d7af4dd5088 (patch) | |
tree | 44a61e43047765bc7b2630fdb39300743d22db96 /web/streamlib/stream.pm | |
parent | 559267d660f41e2e0f1119e59d4350be48071923 (diff) |
Cleaned up some.
Diffstat (limited to 'web/streamlib/stream.pm')
-rw-r--r-- | web/streamlib/stream.pm | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/web/streamlib/stream.pm b/web/streamlib/stream.pm deleted file mode 100644 index c28136e..0000000 --- a/web/streamlib/stream.pm +++ /dev/null @@ -1,36 +0,0 @@ -package stream; -use strict; -use warnings; - -BEGIN { - use Exporter(); - - our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); - - @ISA = qw(Exporter); - $VERSION = 1.00; - @EXPORT = qw(&is_ip_local); - -} - -sub is_ip_local($$$) { - my $clip = shift; - my $v4net = shift; - my $v6net = shift; - return 0 unless defined($clip); - - my $is_local = 0; - if ($clip =~ m/\:/){ - if (NetAddr::IP->new($clip)->within($v6net)){ - $is_local = 1; - } - } else { - if (NetAddr::IP->new($clip)->within($v4net)){ - $is_local = 1; - } - } - return $is_local; -} - - -1; |