Skip to content

Commit

Permalink
tidy code
Browse files Browse the repository at this point in the history
  • Loading branch information
dmanto committed Aug 12, 2024
1 parent 70d0517 commit 706d652
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 28 deletions.
47 changes: 24 additions & 23 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
/blib/
/.build/
_build/
cover_db/
inc/
Build
!Build/
Build.bat
!Build/
!LICENSE
!META.json
*.bs
*.o
.last_cover_stats
/Makefile
/Makefile.old
.tidyall.d/
.vscode/
.vstags
/.build
/.build/
/Build
/Build.bat
/MANIFEST.bak
/META.yml
/MYMETA.*
nytprof.out
/pm_to_blib
*.o
*.bs
/_eumm/
Mojolicious-Plugin-Cron-*
/Makefile
/Makefile.old
/Mojolicious-Plugin-Cron-*
/.build
/_build_params
/Build
/Build.bat
!Build/
!META.json
!LICENSE
.vstags
.vscode/
/_eumm/
/blib/
/pm_to_blib
Build
Build.bat
Mojolicious-Plugin-Cron-*
_build/
cover_db/
inc/
nytprof.out
14 changes: 14 additions & 0 deletions .perltidyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-pbp # Start with Perl Best Practices
-nst # for tidyall
-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
-wn # Weld nested containers
-isbc # Don't indent comments without leading space
8 changes: 8 additions & 0 deletions .tidyallrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[PerlTidy]
select = **/*.{pl,pm,t}
select = Build.PL
select = {mod2html,podtree2html,pods2html,perl2html}
argv = --profile=$ROOT/.perltidyrc

[SortLines]
select = .gitignore
2 changes: 1 addition & 1 deletion t/basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use warnings;
use Test::More tests => 1;

BEGIN {
use_ok('Mojolicious::Plugin::Cron');
use_ok('Mojolicious::Plugin::Cron');
}

diag("Testing M::P::Cron $Mojolicious::Plugin::Cron::VERSION");
6 changes: 3 additions & 3 deletions t/cron.t
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ ff(Algorithm::Cron->new(base => 'utc', crontab => '0 15 * * *')->next_time(time)

undef %global_tstamps;
my @utc_at13pm = gmtime;
my $gday = substr fmt_time(@utc_at13pm), 0, 10;
my $gday = substr fmt_time(@utc_at13pm), 0, 10;

ff(3610); # 1 h 30 secs from 3PM

Expand All @@ -104,8 +104,8 @@ is \%global_tstamps, {
"$gday 15:50" => {sched1 => 1},
"$gday 15:58" => {sched3 => 1},
"$gday 15:59" => {
sched3 => 1, # means locking works
sched4 => 2 # means all_proc flag works
sched3 => 1, # means locking works
sched4 => 2 # means all_proc flag works
}, # no more because hour is always 15 utc
},
'exact tstamps';
Expand Down
2 changes: 1 addition & 1 deletion t/one_crontab.t
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ff(Algorithm::Cron->new(base => 'local', crontab => '0 15 * * *')
->next_time(time) - time);
undef %local_tstamps;
my @local_at13pm = localtime;
my $lday = substr fmt_time(@local_at13pm), 0, 10;
my $lday = substr fmt_time(@local_at13pm), 0, 10;
ff(3630); # 1 h 30 secs from 3PM, local time
is \%local_tstamps,
{
Expand Down

0 comments on commit 706d652

Please sign in to comment.