Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Documenting Net::BitTorrent::Network::IPFilter::Rule

  • Loading branch information...
commit 37b9072cbf09fded76809b66c5ffc366862e2aa1 1 parent d790265
@sanko authored
Showing with 77 additions and 2 deletions.
  1. +77 −2 lib/Net/BitTorrent/Network/IPFilter/Rule.pm
View
79 lib/Net/BitTorrent/Network/IPFilter/Rule.pm
@@ -54,18 +54,93 @@ package Net::BitTorrent::Network::IPFilter::Rule;
=head1 NAME
-Net::BitTorrent::Network::IPFilter::Rule -
+Net::BitTorrent::Network::IPFilter::Rule - A single block of IP addresses
=head1 Description
-Nothing to see here.
+This is a single range of addresses (IPv4 or IPv6) which all share a single
+access level.
+
+=head1 my $rule = Net::BitTorrent::Network::IPFilter::Rule->B<new>( ... )
+
+This constructs a new object. The following arguments are required:
+
+=over
+
+=item C<access_level>
+
+This is an integer value.
+
+=item C<description>
+
+This is a string. You should put the reason why this range exists here.
+
+=item C<upper>
+
+This is the address at the highest end of this range.
+
+=item C<lower>
+
+This is the address at the lowest end of this range.
+
+=back
+
+=head1 $filter->B<access_level>( )
+
+Returns the access level currently defined for this range. See
+L<< Net::BitTorrent::Network::IPFilter->is_banned( ... )|Net::BitTorrent::Network::IPFilter/"$filter->B<is_banned>( $ip )" >>.
+
+=head1 $filter->B<set_access_level>( $value )
+
+Sets the access level for this range.
+
+=head1 $filter->B<increase_access_level>( [ $inc ] )
+
+Sets the access level for this range C<$inc> degrees higher. The default value
+of C<$inc> is C<1>.
+
+=head1 $filter->B<decrease_access_level>( [ $dec ] )
+
+Sets the access level for this range C<$dec> degrees lower. The default value
+of C<$dec> is C<1>.
+
+=head1 $filter->B<in_range>( $address )
+
+If the given address is within this rule's range, a true value is returned
+otherwise a false value is returned.
+
+=head1 $filter->B<description>( )
+
+This is original string value you passed during construction.
+
+=head1 $filter->B<upper>( )
+
+This returns the address at the highest end of the range.
+
+=head1 $filter->B<lower>( )
+
+This returns the address at the lowest end of the range.
=head1 Author
+=begin :html
+
+L<Sanko Robinson|http://sankorobinson.com/>
+<L<sanko@cpan.org|mailto://sanko@cpan.org>> -
+L<http://sankorobinson.com/|http://sankorobinson.com/>
+
+CPAN ID: L<SANKO|http://search.cpan.org/~sanko>
+
+=end :html
+
+=begin :text
+
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
CPAN ID: SANKO
+=end :text
+
=head1 License and Legal
Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>
Please sign in to comment.
Something went wrong with that request. Please try again.