Skip to content

Commit

Permalink
perltidy
Browse files Browse the repository at this point in the history
  • Loading branch information
swelljoe committed Oct 3, 2017
1 parent 46f3397 commit e4def22
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 16 deletions.
13 changes: 13 additions & 0 deletions .perltidyrc
Original file line number Diff line number Diff line change
@@ -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
10 changes: 5 additions & 5 deletions install_check.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
23 changes: 12 additions & 11 deletions jailkit-lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ =head1 jailkit-lib.pl
=cut

BEGIN { push(@INC, ".."); };
BEGIN { push(@INC, ".."); }
use WebminCore;
init_config();

Expand All @@ -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)
Expand All @@ -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;

0 comments on commit e4def22

Please sign in to comment.