CLI/Command/Update.pm

filter: Statementstmt 66.6% 12 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 69.2% 18 / 26 CC 1 SCAR 2.9
CC
1
Cov
67%
abstract
2.0
execute
2.0
BEGIN
1.0
CRAP 1.3
« CLI/Command/Build.pm ↑ Summary CLI.pm »
1 package Luv::CLI::Command::Update;
2  
3 # ABSTRACT: refresh the local library registry cache
4  
5 1 ▶use v5.38;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use App::Cmd::Setup -command;
Subroutine BEGIN: called CC=1 SCAR=0.0
8 1 ▶use File::HomeDir;
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 1 ▶use Luv::CLI::Registry;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 0 ▶sub abstract {"Refreshes the local library registry cache."}
Subroutine abstract: not called CC=1 SCAR=6.9
Pod documented
13  
14 0 ▶sub execute ( $self, $opt, $args ) {
Subroutine execute: not called CC=1 SCAR=6.9
Pod documented
15 0 my $cache_path = File::HomeDir->my_home . '/.cache/luv/registry.json';
16 0 my $registry = Luv::CLI::Registry->new( cache_path => $cache_path );
17  
18 0 my $count = $registry->refresh;
19 0 print "Registry updated: $count libraries indexed\n";
20 0 return;
21 }
22  
23 1 1;
24  
25 __END__
« CLI/Command/Build.pm ↑ Summary CLI.pm »