Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

make Perl::Critic happy

Signed-off-by: Alexei Znamensky <russoz@cpan.org>
  • Loading branch information...
commit d5b721ea782f1be33370b6768062432c8b5b7b88 1 parent 58cdc30
@russoz russoz authored
View
8 lib/Net/LDAP/SimpleServer.pm
@@ -17,7 +17,7 @@ sub import {
$personality = shift || 'Fork';
use Net::Server;
- eval "use base qw{Net::Server::$personality}";
+ eval "use base qw{Net::Server::$personality}"; ## no critic
croak $@ if $@;
@Net::LDAP::SimpleServer::ISA = qw(Net::Server);
@@ -25,6 +25,7 @@ sub import {
#use Data::Dumper;
#print STDERR Data::Dumper->Dump( [ \@Net::LDAP::SimpleServer::ISA ],
# ['ISA'] );
+ return;
}
use File::Basename;
@@ -35,10 +36,12 @@ use Scalar::Util qw{reftype};
use Net::LDAP::SimpleServer::LDIFStore;
use Net::LDAP::SimpleServer::ProtocolHandler;
+## no critic
use constant BASEDIR => File::Spec->catfile( home(), '.ldapsimpleserver' );
use constant LOGDIR => File::Spec->catfile( BASEDIR, 'log' );
use constant DEFAULT_CONFIG_FILE => File::Spec->catfile( BASEDIR, 'config' );
use constant DEFAULT_DATA_FILE => File::Spec->catfile( BASEDIR, 'server.ldif' );
+## use critic
make_path(LOGDIR);
@@ -62,6 +65,7 @@ sub options {
#use Data::Dumper;
#print STDERR Data::Dumper->Dump( [$self], ['options_END'] );
+ return;
}
sub default_values {
@@ -90,6 +94,7 @@ sub _make_dir {
return if -d $dir;
make_path($dir);
+ return;
}
sub post_configure_hook {
@@ -110,6 +115,7 @@ sub post_configure_hook {
$prop->{store} =
Net::LDAP::SimpleServer::LDIFStore->new( $prop->{ldap_data} )
|| croak q{Cannot create data store!};
+ return;
}
sub process_request {
View
1  lib/Net/LDAP/SimpleServer/LDIFStore.pm
@@ -31,6 +31,7 @@ sub load {
$self->{ldifobj} = _open_ldif($param);
$self->{list} = _load_ldif( $self->{ldifobj} );
+ return;
}
sub ldif {
View
7 lib/Net/LDAP/SimpleServer/ProtocolHandler.pm
@@ -1,5 +1,8 @@
package Net::LDAP::SimpleServer::ProtocolHandler;
+use strict;
+use warnings;
+
use common::sense;
# ABSTRACT: LDAP protocol handler used with Net::LDAP::SimpleServer
@@ -24,10 +27,12 @@ sub _get_ldap_constant {
my $code = shift;
return $code if looks_like_number($code);
return $_ldap_cache{$code} if exists $_ldap_cache{$code};
+ ## no critic
return $_ldap_cache{$code} = eval qq{
use Net::LDAP::Constant qw|$code|;
$code;
};
+ ## use critic
}
sub _make_result {
@@ -69,7 +74,7 @@ sub new {
return $self;
}
-sub bind {
+sub bind { ## no critic
# my $r = _bind(@_);
# print STDERR q{response = } . Dumper($r);
View
7 t/00.load.t
@@ -1,7 +0,0 @@
-use Test::More tests => 1;
-
-BEGIN {
- use_ok('Net::LDAP::SimpleServer');
-}
-
-diag("Testing Net::LDAP::SimpleServer $Net::LDAP::SimpleServer::VERSION");
View
0  t/01.load.handler.t → t/01-load-handler.t
File renamed without changes
View
0  t/01.load.store.t → t/01-load-store.t
File renamed without changes
View
3  t/02.handler.t → t/02-handler.t
@@ -1,4 +1,4 @@
-use Test::More tests => 8;
+use Test::More tests => 9;
use Net::LDAP::SimpleServer::LDIFStore;
use Net::LDAP::SimpleServer::ProtocolHandler;
@@ -23,6 +23,7 @@ diag("Testing the constructor params for ProtocolHandler\n");
my $store =
Net::LDAP::SimpleServer::LDIFStore->new('examples/single-entry.ldif');
+isa_ok( $store, 'Net::LDAP::SimpleServer::LDIFStore' );
my $in = *STDIN{IO};
my $out = *STDOUT{IO};
View
0  t/02.store.t → t/02-store.t
File renamed without changes
View
0  t/03.param.t → t/03-param.t
File renamed without changes
View
0  t/04.bind.t → t/04-bind.t
File renamed without changes
Please sign in to comment.
Something went wrong with that request. Please try again.