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