| 1 | package App::ListOrgTodos; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use 5.010; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 1 | ▶ | use Log::ger; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | |||||||||||||
| 8 | 1 | ▶ | use App::ListOrgHeadlines qw(list_org_headlines); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 1 | ▶ | use Exporter 'import'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | 1 | ▶ | use Perinci::Sub::Util qw(gen_modified_sub); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | |||||||||||||
| 12 | 1 | our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY | |||||||||||
| 13 | 1 | our $DATE = '2026-07-22'; # DATE | |||||||||||
| 14 | 1 | our $DIST = 'App-OrgUtils'; # DIST | |||||||||||
| 15 | 1 | our $VERSION = '0.489'; # VERSION | |||||||||||
| 16 | |||||||||||||
| 17 | 1 | our @EXPORT_OK = qw(list_org_todos); | |||||||||||
| 18 | |||||||||||||
| 19 | 1 | our %SPEC; | |||||||||||
| 20 | |||||||||||||
| 21 | gen_modified_sub( | ||||||||||||
| 22 | output_name => 'list_org_todos', | ||||||||||||
| 23 | summary => 'List all todo items in all Org files', | ||||||||||||
| 24 | |||||||||||||
| 25 | base_name => 'App::ListOrgHeadlines::list_org_headlines', | ||||||||||||
| 26 | remove_args => ['todo'], | ||||||||||||
| 27 | modify_args => { | ||||||||||||
| 28 | 1 | ▶ | done => sub { my $as = shift; $as->{schema}[1]{default} = 0 }, | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 29 | 1 | ▶ | sort => sub { my $as = shift; $as->{schema}[1]{default} = 'due_date' }, | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 30 | }, | ||||||||||||
| 31 | 1 | ▶ | modify_meta => sub { | ||||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||||
| 32 | 1 | my $meta = shift; | |||||||||||
| 33 | 1 | $meta->{"x.dist.zilla.plugin.rinci.wrap.wrap_args"} = {validate_args=>0, validate_result=>0}; # don't bother checking arguments, they will be checked in list_org_headlines() | |||||||||||
| 34 | }, | ||||||||||||
| 35 | 0 | ▶ | output_code => sub { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 36 | 0 | my %args = @_; | |||||||||||
| 37 | |||||||||||||
| 38 | 0 | ▶ | $args{done} //= 0; | ||||||||||
|
Condition0%0/2
$args{"done"} //= 0
MC/DC0%0/1
$args{"done"} //= 0
$args{"done"}
Truth table0%0/2
A
A= $args{"done"}
| |||||||||||||
| 39 | |||||||||||||
| 40 | 0 | App::ListOrgHeadlines::list_org_headlines(%args, todo=>1, _raw=>0); | |||||||||||
| 41 | }, | ||||||||||||
| 42 | 1 | ); | |||||||||||
| 43 | |||||||||||||
| 44 | 1 | 1; | |||||||||||
| 45 | # ABSTRACT: List all todo items in all Org files | ||||||||||||
| 46 | |||||||||||||
| 47 | __END__ | ||||||||||||