Subject: | Net::SIP::Debug level typo |
Date: | Mon, 24 Jul 2017 10:32:51 +0000 |
To: | "bug-Net-SIP [...] rt.cpan.org" <bug-Net-SIP [...] rt.cpan.org> |
From: | Richard Carver <richard.carver [...] cloudmont.co.uk> |
Net::SIP::Debug level contains these lines:
my @names = ( $name );
push @names, "Net::".$name if $name =m{^SIP\b};
push @names, "Net::SIP::".$name if $name !~m{^Net::SIP\b};
the second line has '=' instead of '=~', which results in $name being assigned as empty, which in turn causes the third line to add 'Net::SIP::' to the names to assign this level.
Consequently if I set the default debug level to 10 and then set the level for Net::SIP::Leg=100 it results in all submodules of Net::SIP also having debug level 100.
Changing the '=' to '=~' on the second line resolves the issue.