Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LemonLDAP NG
lemonldap-ng
Commits
273e84b3
Commit
273e84b3
authored
May 07, 2018
by
Yadd
Browse files
Clean some Dumper usage (
#1416
)
parent
fdf2327b
Changes
28
Hide whitespace changes
Inline
Side-by-side
lemonldap-ng-common/eg/llng-app.psgi
View file @
273e84b3
#!/usr/bin/perl
use
Data::
Dumper
;
use
Plack::
Builder
;
# Basic test app
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Cli.pm
View file @
273e84b3
...
...
@@ -2,7 +2,6 @@ package Lemonldap::NG::Common::Cli;
use
strict
;
use
Mouse
;
use
Data::
Dumper
;
use
Lemonldap::NG::Common::
Conf
;
our
$VERSION
=
'
2.0.0
';
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/SAML/Metadata.pm
View file @
273e84b3
...
...
@@ -9,7 +9,6 @@ use strict;
use
Mouse
;
use
Crypt::OpenSSL::
RSA
;
use
Crypt::OpenSSL::
X509
;
use
Data::
Dumper
;
use
HTML::
Template
;
use
MIME::
Base64
;
use
Safe
;
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/Serializer.pm
View file @
273e84b3
...
...
@@ -131,7 +131,7 @@ sub oldUnserialize {
if
(
$k
=~
$hashParameters
and
$v
||=
{}
and
not
ref
(
$v
)
)
{
$conf
->
{
$k
}
=
{};
# Value should be a Data::Dumper, else this is an old format
# Value should be a Data::Dumper, else this is an old
-old
format
if
(
defined
(
$v
)
and
$v
!~
/^\$/
)
{
$
Lemonldap::NG::Common::Conf::
msg
.=
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Cli/Lib.pm
View file @
273e84b3
...
...
@@ -125,6 +125,7 @@ sub jsonResponse {
or
die
"
PSGI lib has refused my get, aborting
";
unless
(
$res
->
[
0
]
==
200
)
{
require
Data::
Dumper
;
$
Data::Dumper::
Useperl
=
1
;
print
STDERR
"
Result dump :
\n
"
.
Data::Dumper::
Dumper
(
$res
);
die
"
Manager lib does not return a 200 code, aborting
";
}
...
...
@@ -139,6 +140,7 @@ sub jsonPostResponse {
or
die
"
PSGI lib has refused my post, aborting
";
unless
(
$res
->
[
0
]
==
200
)
{
require
Data::
Dumper
;
$
Data::Dumper::
Useperl
=
1
;
print
STDERR
"
Result dump :
\n
"
.
Data::Dumper::
Dumper
(
$res
);
die
"
Manager lib does not return a 200 code, aborting
";
}
...
...
@@ -153,6 +155,7 @@ sub jsonPutResponse {
or
die
"
PSGI lib has refused my put, aborting
";
unless
(
$res
->
[
0
]
==
200
)
{
require
Data::
Dumper
;
$
Data::Dumper::
Useperl
=
1
;
print
STDERR
"
Result dump :
\n
"
.
Data::Dumper::
Dumper
(
$res
);
die
"
Manager lib does not return a 200 code, aborting
";
}
...
...
lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI/Router.pm
View file @
273e84b3
...
...
@@ -117,8 +117,6 @@ sub handlerAbort {
sub
handler
{
my
(
$self
,
$req
)
=
@_
;
#print STDERR Dumper($self->routes);use Data::Dumper;
# Reinitialize configuration message
$
Lemonldap::NG::Common::Conf::
msg
=
'';
...
...
lemonldap-ng-handler/lib/Lemonldap/NG/Handler/Lib/Status.pm
View file @
273e84b3
...
...
@@ -6,7 +6,6 @@ package Lemonldap::NG::Handler::Lib::Status;
use
strict
;
use
POSIX
qw(setuid setgid)
;
use
JSON
qw(to_json)
;
use
Data::
Dumper
;
our
$VERSION
=
'
2.0.0
';
...
...
lemonldap-ng-handler/t/60-Lemonldap-NG-Handler-PSGI.t
View file @
273e84b3
use
Test::
More
;
use
JSON
;
use
Data::
Dumper
;
use
MIME::
Base64
;
require
'
t/test-psgi-lib.pm
';
...
...
lemonldap-ng-handler/t/61-Lemonldap-NG-Handler-PSGI-Server.t
View file @
273e84b3
use
Test::
More
;
use
JSON
;
use
Data::
Dumper
;
use
MIME::
Base64
;
require
'
t/test-psgi-lib.pm
';
...
...
lemonldap-ng-handler/t/62-Lemonldap-NG-Handler-Nginx.t
View file @
273e84b3
use
Test::
More
;
use
JSON
;
use
Data::
Dumper
;
use
MIME::
Base64
;
require
'
t/test-psgi-lib.pm
';
...
...
lemonldap-ng-handler/t/63-Lemonldap-NG-Handler-PSGI-Try.t
View file @
273e84b3
use
Test::
More
;
use
JSON
;
use
Data::
Dumper
;
use
MIME::
Base64
;
require
'
t/test-psgi-lib.pm
';
...
...
lemonldap-ng-handler/t/64-Lemonldap-NG-Handler-PSGI-DevOps.t
View file @
273e84b3
use
Test::
More
;
use
JSON
;
use
Data::
Dumper
;
use
MIME::
Base64
;
use
LWP::
UserAgent
;
...
...
lemonldap-ng-handler/t/66-Lemonldap-NG-Handler-PSGI-wildcard.t
View file @
273e84b3
use
Test::
More
;
use
JSON
;
use
Data::
Dumper
;
use
MIME::
Base64
;
BEGIN
{
...
...
lemonldap-ng-handler/t/test-psgi-lib.pm
View file @
273e84b3
# Base library for tests
use
strict
;
use
Data::
Dumper
;
use
5.10.0
;
use
POSIX
'
strftime
';
use_ok
('
Lemonldap::NG::Common::PSGI::Cli::Lib
');
our
$client
;
our
$count
=
1
;
$
Data::Dumper::
Deparse
=
1
;
no
warnings
'
redefine
';
...
...
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Cli.pm
View file @
273e84b3
...
...
@@ -6,6 +6,7 @@ use Data::Dumper;
use
Lemonldap::NG::Common::Conf::
ReConstants
;
our
$VERSION
=
'
2.0.0
';
$
Data::Dumper::
Useperl
=
1
;
extends
('
Lemonldap::NG::Manager::Cli::Lib
');
...
...
lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Conf/Parser.pm
View file @
273e84b3
...
...
@@ -79,6 +79,7 @@ sub hdebug {
foreach
my
$d
(
@
_
)
{
if
(
ref
$d
)
{
require
Data::
Dumper
;
$
Data::Dumper::
Useperl
=
1
;
print
STDERR
Data::Dumper::
Dumper
(
$d
);
}
else
{
print
STDERR
"
$d
\n
"
}
...
...
lemonldap-ng-manager/scripts/lmConfigEditor
View file @
273e84b3
...
...
@@ -32,7 +32,8 @@ $refConf->{cfgLog} = '';
# Sort keys
$
Data::Dumper::
Sortkeys
=
1
;
my
$tmp
=
Dumper
(
$refConf
);
$
Data::Dumper::
Useperl
=
1
;
my
$tmp
=
Dumper
(
$refConf
);
my
$refFile
=
File::
Temp
->
new
(
UNLINK
=>
1
);
my
$editFile
=
File::
Temp
->
new
(
UNLINK
=>
1
);
...
...
@@ -68,12 +69,13 @@ if (`diff $refFile $editFile`) {
{
refConf
=>
$refConf
,
newConf
=>
$VAR1
,
req
=>
1
,
req
=>
1
,
}
);
unless
(
$parser
->
testNewConf
)
{
unless
(
$parser
->
testNewConf
)
{
print
STDERR
"
Configuration seems to have some errors:
\n
";
print
STDERR
Dumper
({
errors
=>
$parser
->
errors
,
warnings
=>
$parser
->
warnings
});
print
STDERR
Dumper
(
{
errors
=>
$parser
->
errors
,
warnings
=>
$parser
->
warnings
}
);
print
STDERR
"
Are you sure you want to write it ? (yes/no)
";
my
$resp
=
<
STDIN
>
;
die
"
Aborted
"
unless
$resp
=~
/^yes$/i
;
...
...
lemonldap-ng-manager/t/03-HTML-forms.t
View file @
273e84b3
...
...
@@ -3,7 +3,6 @@
use
Test::
More
;
use
strict
;
use
Data::
Dumper
;
my
$formDir
=
'
site/htdocs/static/forms
';
...
...
lemonldap-ng-manager/t/05-rest-api.t
View file @
273e84b3
...
...
@@ -43,7 +43,6 @@ foreach my $query (@bad) {
or
print
STDERR
"
# Receive a
$res
->[0] code
";
my
$href
;
#print STDERR Dumper($res->[2]);use Data::Dumper;
ok
(
$href
=
from_json
(
$res
->
[
2
]
->
[
0
]
),
'
Response is JSON
'
);
ok
(
$href
->
{
error
},
"
Receive an explanation message (
$href
->{error})
"
);
count
(
3
);
...
...
lemonldap-ng-manager/t/06-rest-api.t
View file @
273e84b3
...
...
@@ -29,6 +29,4 @@ ok( $res->[0] == 200, "Result code is 200" );
ok
(
$key
=
from_json
(
$res
->
[
2
]
->
[
0
]
),
'
Response is JSON
'
);
count
(
3
);
#print STDERR Dumper($key);use Data::Dumper;
done_testing
(
count
()
);
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment