From e4def22486bd7d7e2a431ad3af6d13f0f7d0a905 Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Mon, 2 Oct 2017 19:07:07 -0500 Subject: [PATCH] perltidy --- .perltidyrc | 13 +++++++++++++ install_check.pl | 10 +++++----- jailkit-lib.pl | 23 ++++++++++++----------- 3 files changed, 30 insertions(+), 16 deletions(-) create mode 100644 .perltidyrc diff --git a/.perltidyrc b/.perltidyrc new file mode 100644 index 0000000..fc877be --- /dev/null +++ b/.perltidyrc @@ -0,0 +1,13 @@ +-pbp # Start with Perl Best Practices +-nst # Non-standard output (allow operate in-place) +-w # Show all warnings +-iob # Ignore old breakpoints +-l=80 # 80 characters per line +-mbl=2 # No more than 2 blank lines +-i=2 # Indentation is 2 columns +-ci=2 # Continuation indentation is 2 columns +-vt=0 # Less vertical tightness +-pt=2 # High parenthesis tightness +-bt=2 # High brace tightness +-sbt=2 # High square bracket tightness +-isbc # Don't indent comments without leading space diff --git a/install_check.pl b/install_check.pl index 6c1bff7..e3fc16d 100644 --- a/install_check.pl +++ b/install_check.pl @@ -9,10 +9,10 @@ # For mode 1, returns 2 if the server is installed and configured for use by # Webmin, 1 if installed but not configured, or 0 otherwise. # For mode 0, returns 1 if installed, 0 if not -sub is_installed -{ -my ($mode) = @_; +sub is_installed { + my ($mode) = @_; + # Available config file in the default location? -return 0 if (!-r $config{'jailkit_init_ini'}); -return $mode ? 2 : 0; + return 0 if (!-r $config{'jailkit_init_ini'}); + return $mode ? 2 : 0; } diff --git a/jailkit-lib.pl b/jailkit-lib.pl index 82de1eb..61420f1 100644 --- a/jailkit-lib.pl +++ b/jailkit-lib.pl @@ -16,7 +16,7 @@ =head1 jailkit-lib.pl =cut -BEGIN { push(@INC, ".."); }; +BEGIN { push(@INC, ".."); } use WebminCore; init_config(); @@ -27,10 +27,11 @@ =head2 get_jk_init_ini() =cut sub get_jk_init_ini { - use Config::IniFiles; + use Config::IniFiles; - my $jk_init_ini = new Config::IniFiles( -file=>"$config{'jailkit_config_dir'}/jk_init.ini" ); - return $jk_init_ini; + my $jk_init_ini = new Config::IniFiles( + -file => "$config{'jailkit_config_dir'}/jk_init.ini"); + return $jk_init_ini; } =head2 write_jk_init_ini(\%jk_init_ini) @@ -40,13 +41,13 @@ =head2 write_jk_init_ini(\%jk_init_ini) =cut sub write_jk_init_ini { - use Config::IniFiles; - my ($jk_init_ini) = @_; - my $result = $jk_init_ini->RewriteConfig($config{'jk_init_ini'}); - unless ($result) { - error($text{'error_save_failed'}); - } - return; + use Config::IniFiles; + my ($jk_init_ini) = @_; + my $result = $jk_init_ini->RewriteConfig($config{'jk_init_ini'}); + unless ($result) { + error($text{'error_save_failed'}); + } + return; } 1;