4 #use FS::Record qw(qsearch);
6 # careful about importing anything here--it will end up in a LOT of
9 #use vars qw(@subclasses $DEBUG $conf);
13 # any subclass that can have MAC addresses needs to be added here
14 #@subclasses = (qw(FS::svc_broadband FS::svc_cable));
17 # $conf ||= FS::Conf->new;
22 FS::MAC_Mixin - Mixin class for objects that have MAC addresses assigned.
40 $self->mac_addr_formatted('U',':');
43 =item mac_addr_formatted CASE DELIMITER
45 Format the MAC address (for use by exports). If CASE starts with "l"
46 (for "lowercase"), it's returned in lowercase. DELIMITER is inserted
51 sub mac_addr_formatted {
53 my ($case, $delim) = @_;
54 my $addr = $self->mac_addr;
55 $addr = lc($addr) if $case =~ /^l/i;
56 join( $delim || '', $addr =~ /../g );