X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Faddr_block.pm;h=8dd09ab962536168c35c12a2aa317c3592900463;hb=32072dbf59a054529f5304574c0f56f9567d14d0;hp=778c124f22bd55015a5b654f0b2e96067a25350b;hpb=66c235e33563ccd785ff9e0828398f778a75fb9f;p=freeside.git diff --git a/FS/FS/addr_block.pm b/FS/FS/addr_block.pm index 778c124f2..8dd09ab96 100755 --- a/FS/FS/addr_block.pm +++ b/FS/FS/addr_block.pm @@ -1,18 +1,14 @@ package FS::addr_block; +use base qw(FS::Record); use strict; -use vars qw( @ISA ); -use FS::Record qw( qsearchs qsearch dbh ); -use FS::router; -use FS::addr_range; -use FS::svc_broadband; -use FS::Conf; -use FS::IP_Mixin; -use NetAddr::IP; use Carp qw( carp ); use List::Util qw( first ); - -@ISA = qw( FS::Record ); +use NetAddr::IP; +use FS::Conf; +use FS::Record qw( qsearch dbh ); #qsearchs +use FS::IP_Mixin; +use FS::addr_range; =head1 NAME @@ -184,25 +180,11 @@ sub check { Returns the FS::router object corresponding to this object. If the block is unassigned, returns undef. -=cut - -sub router { - my $self = shift; - return qsearchs('router', { routernum => $self->routernum }); -} - =item svc_broadband Returns a list of FS::svc_broadband objects associated with this object. -=cut - -sub svc_broadband { - my $self = shift; - return qsearch('svc_broadband', { blocknum => $self->blocknum }); -} - =item NetAddr Returns a NetAddr::IP object for this block's address and netmask. @@ -393,12 +375,6 @@ To be implemented. Returns the agent (see L) for this address block, if one exists. -=cut - -sub agent { - qsearchs('agent', { 'agentnum' => shift->agentnum } ); -} - =item label Returns text including the router name, gateway ip, and netmask for this