diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-03-07 16:57:12 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2017-03-07 16:57:12 +0200 |
commit | 25cc6f28c808169f1b91b319b68a1f2757532f25 (patch) | |
tree | fefb6b9ed29638a29bb74d0c324292da5fcfa222 /lib/App/Beam/List.pm | |
parent | 068dcd502cc83d60c90443127352ec255df442db (diff) | |
download | beam-25cc6f28c808169f1b91b319b68a1f2757532f25.tar.gz beam-25cc6f28c808169f1b91b319b68a1f2757532f25.tar.bz2 |
Initial implementation of the list subcommand
* MANIFEST: Update
* lib/App/Beam/List.pm: New file.
* beam (list): New subcommand
* lib/App/Beam.pm: End with 1;
* lib/App/Beam/Command.pm: Likewise.
* lib/App/Beam/Config.pm: Likewise.
* lib/App/Beam/Config/Locus.pm: Likewise.
Diffstat (limited to 'lib/App/Beam/List.pm')
-rw-r--r-- | lib/App/Beam/List.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/App/Beam/List.pm b/lib/App/Beam/List.pm new file mode 100644 index 0000000..3bba7e0 --- /dev/null +++ b/lib/App/Beam/List.pm @@ -0,0 +1,25 @@ +package App::Beam::List; + +use strict; +use Carp; +use POSIX qw(strftime); + +require App::Beam; +our @ISA = qw(App::Beam); + +sub run { + my $self = shift; + + $self->lock(); + my @stat = @{$self->{status}}; + shift @stat; + foreach my $ent (@stat) { + print strftime "%c ", localtime $ent->{timestamp}; + printf("% 3d% 3d% 3d %s", $ent->{cycle}, $ent->{round}, $ent->{level}, + $ent->{result}); + print "\n"; + } + $self->unlock(); +} + +1; |