logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Sisimai::RFC791 - IP related class

Author

       azumakuniyuki

Class Methods

"is_ipv4address(String)"
       "is_ipv4address" method returns 1 if the argument is an valid IPv4 address.

           print Sisimai::RFC791->is_ipv4address("192.0.2.25");   # 1
           print Sisimai::RFC791->is_ipv4address("123.456.78.9"); # 0

   "find(String)"
       "find" method return all the IPv4 address found in the given string.

           my $v = "connection refused from 192.0.2.1, DNSBL returned 127.0.0.2";
           my $p = Sisimai::RFC791->find($v); # ["192.0.2.1", "127.0.0.2"]

Description

       "Sisimai::RFC791" is a class related to IP

License

       This software is distributed under The BSD 2-Clause License.

perl v5.40.1                                       2025-04-12                               Sisimai::RFC791(3pm)

Name

       Sisimai::RFC791 - IP related class

Synopsis

           use Sisimai::RFC791;

           my $p = Sisimai::RFC791->find("mx7.example.jp:[192.0.2.27]"); # ["192.0.2.27"]

See Also