| 1 | # ================================================================ | ||||||||||
| 2 | package App::iTan::Command::Reset; | ||||||||||
| 3 | # ================================================================ | ||||||||||
| 4 | 1 | ▶ | use utf8; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use 5.0100; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use MooseX::App::Command; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | with qw(App::iTan::Utils); | |||||||||
| 10 | |||||||||||
| 11 | 0 | ▶ | sub execute { | ||||||||
|
Subroutine
execute: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 12 | 0 | my ( $self, $opts, $args ) = @_; | |||||||||
| 13 | |||||||||||
| 14 | 0 | say 'All unused iTANs have been marked as invalid'; | |||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | $self->dbh->do('UPDATE itan SET valid = 0') | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | or die "ERROR: Cannot execute: " . $self->dbh->errstr(); | ||||||||||
| 18 | |||||||||||
| 19 | 0 | return; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 23 | 1 | 1; | |||||||||
| 24 | |||||||||||
| 25 | =pod | ||||||||||
| 26 | |||||||||||
| 27 | =encoding utf8 | ||||||||||
| 28 | |||||||||||
| 29 | =head1 NAME | ||||||||||
| 30 | |||||||||||
| 31 | App::iTan::Command::Reset - Reset unused iTANs | ||||||||||
| 32 | |||||||||||
| 33 | =head1 SYNOPSIS | ||||||||||
| 34 | |||||||||||
| 35 | itan reset | ||||||||||
| 36 | |||||||||||
| 37 | =head1 DESCRIPTION | ||||||||||
| 38 | |||||||||||
| 39 | Mark all unused iTANs as invalid | ||||||||||
| 40 | |||||||||||
| 41 | =cut | ||||||||||