mirror of
https://codeberg.org/scip/Data-Interactive-Inspect.git
synced 2025-12-17 04:31:00 +01:00
fixed list array
This commit is contained in:
@@ -1,4 +1,9 @@
|
||||
NEXT
|
||||
0.06
|
||||
fixed crash, which happened when one executed the
|
||||
'list' command if inside an array. now we divert
|
||||
to 'show' in such a case.
|
||||
|
||||
0.05
|
||||
signal value matches in search with quotes
|
||||
|
||||
0.04
|
||||
|
||||
23
Inspect.pm
23
Inspect.pm
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/perl
|
||||
#
|
||||
# Copyright (c) 2015 T.v.Dein <tlinden |AT| cpan.org>.
|
||||
# All Rights Reserved. Std. disclaimer applies.
|
||||
# Artistic License, same as perl itself. Have fun.
|
||||
# Copyright (c) 2015-2017 T.v.Dein <tlinden |AT| cpan.org>. All
|
||||
# Rights Reserved. Std. disclaimer applies. Artistic License, same as
|
||||
# perl itself. Have fun.
|
||||
#
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ no strict 'refs';
|
||||
|
||||
use Data::Dumper;
|
||||
|
||||
$Data::Interactive::Inspect::VERSION = 0.05;
|
||||
$Data::Interactive::Inspect::VERSION = 0.06;
|
||||
|
||||
use vars qw(@ISA);
|
||||
|
||||
@@ -580,8 +580,15 @@ sub edit {
|
||||
|
||||
sub list {
|
||||
my $self = shift;
|
||||
|
||||
if (ref($self->{db}) eq 'ARRAY') {
|
||||
# already implements array listing
|
||||
$self->show;
|
||||
}
|
||||
else {
|
||||
print join "\n", sort keys %{$self->{db}};
|
||||
print "\n";
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -589,8 +596,6 @@ sub list {
|
||||
sub show {
|
||||
my ($self, $indent) = @_;
|
||||
|
||||
|
||||
|
||||
if (ref($self->{db}) =~ /array/i) {
|
||||
my $pos = 0;
|
||||
foreach my $item (@{$self->{db}}) {
|
||||
@@ -1133,8 +1138,8 @@ http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data::Interactive::Inspect
|
||||
|
||||
=head1 COPYRIGHT
|
||||
|
||||
Copyright (c) 2015 by T.v.Dein <tlinden@cpan.org>.
|
||||
All rights reserved.
|
||||
Copyright (c) 2015-2017 by T.v.Dein <tlinden@cpan.org>. All rights
|
||||
reserved.
|
||||
|
||||
=head1 LICENSE
|
||||
|
||||
@@ -1143,6 +1148,6 @@ and/or modify it under the same terms as Perl itself.
|
||||
|
||||
=head1 VERSION
|
||||
|
||||
This is the manual page for L<Data::Interactive::Inspect> Version 0.05.
|
||||
This is the manual page for L<Data::Interactive::Inspect> Version 0.06.
|
||||
|
||||
=cut
|
||||
|
||||
4
README
4
README
@@ -44,7 +44,7 @@ BUGS
|
||||
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data::Interactive::Inspect
|
||||
|
||||
COPYRIGHT
|
||||
Copyright (c) 2015 by T.v.Dein <tlinden@cpan.org>. All rights
|
||||
Copyright (c) 2015-2017 by T.v.Dein <tlinden@cpan.org>. All rights
|
||||
reserved.
|
||||
|
||||
LICENSE
|
||||
@@ -52,4 +52,4 @@ LICENSE
|
||||
under the same terms as Perl itself.
|
||||
|
||||
VERSION
|
||||
This is the manual page for Data::Interactive::Inspect Version 0.01.
|
||||
This is the manual page for Data::Interactive::Inspect Version 0.06.
|
||||
|
||||
Reference in New Issue
Block a user