Commits

Toby Inkster committed 2fbcb63 Draft

initial version

  • Participants
  • Tags 0.001

Comments (0)

Files changed (15)

+use inc::Module::Package 'RDF:tobyink 0.009';
+

File lib/P5U/Command/Peek.pm

+package P5U::Command::Peek;
+
+use 5.010;
+use strict;
+use utf8;
+use P5U-command;
+
+BEGIN {
+	$P5U::Command::Peek::AUTHORITY = 'cpan:TOBYINK';
+	$P5U::Command::Peek::VERSION   = '0.001';
+}
+
+use constant {
+	abstract    => q[peek at an SV],
+	usage_desc  => q[%c peek CODE],
+};
+
+sub command_names {qw{ peek }}
+
+sub opt_spec
+{
+	qw()
+}
+
+use constant description => <<'DESC';
+This is a simple wrapper around Devel::Peek.
+
+Examples:
+
+	p5u peek '[]'
+	p5u peek 'my @arr; push @arr, 1; \@arr'
+DESC
+
+sub execute
+{
+	require Devel::Peek;
+	my $__sub = eval "no strict; sub { @{[ join ';', @{ $_[2] } ]} }";
+	Devel::Peek::Dump( $__sub->() );
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+P5U::Command::Peek - p5u extension to peek at SVs
+
+=head1 SYNOPSIS
+
+  p5u peek '[]'
+
+  p5u peek 'my @arr; push @arr, 1; \@arr'
+
+=head1 DESCRIPTION
+
+This is a simple wrapper around Devel::Peek.
+
+=head1 BUGS
+
+Please report any bugs to
+L<http://rt.cpan.org/Dist/Display.html?Queue=P5U-Command-Peek>.
+
+=head1 SEE ALSO
+
+L<P5U>.
+
+=head1 AUTHOR
+
+Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
+
+=head1 COPYRIGHT AND LICENCE
+
+This software is copyright (c) 2012 by Toby Inkster.
+
+This is free software; you can redistribute it and/or modify it under
+the same terms as the Perl 5 programming language system itself.
+
+=head1 DISCLAIMER OF WARRANTIES
+
+THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+

File meta/changes.pret

+# This file acts as the project's changelog.
+
+`P5U-Command-Peek 0.001 cpan:TOBYINK`
+	issued  2012-10-03;
+	label   "Initial release".
+

File meta/doap.pret

+# This file contains general metadata about the project.
+
+@prefix : <http://usefulinc.com/ns/doap#>.
+
+`P5U-Command-Peek`
+	:programming-language "Perl" ;
+	:shortdesc            "p5u extension to peek at SVs";
+	:homepage             <https://metacpan.org/release/P5U-Command-Peek>;
+	:download-page        <https://metacpan.org/release/P5U-Command-Peek>;
+	:bug-database         <http://rt.cpan.org/Dist/Display.html?Queue=P5U-Command-Peek>;
+	:repository           [ a :HgRepository; :browse <https://bitbucket.org/tobyink/p5-p5u-command-peek> ];
+	:created              2012-10-03;
+	:license              <http://dev.perl.org/licenses/>;
+	:maintainer           cpan:TOBYINK;
+	:developer            cpan:TOBYINK.
+
+<http://dev.perl.org/licenses/>
+	dc:title  "the same terms as the perl 5 programming language system itself".
+

File meta/makefile.pret

+# This file provides instructions for packaging.
+
+`P5U-Command-Peek`
+	perl_version_from m`P5U::Command::Peek`;
+	version_from      m`P5U::Command::Peek`;
+	readme_from       m`P5U::Command::Peek`;
+	requires          p`P5U`;
+	test_requires     p`Test::More 0.61` ;
+	.
+

File meta/people.pret

+# This file contains data about the project developers.
+
+@prefix : <http://xmlns.com/foaf/0.1/>.
+
+cpan:TOBYINK
+	:name  "Toby Inkster";
+	:mbox  <mailto:tobyink@cpan.org>.
+
+use Test::More tests => 1;
+BEGIN { use_ok('P5U::Command::Peek') };
+
+use Test::More;
+eval "use Test::Pod 1.00";
+plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
+all_pod_files_ok();
+

File xt/02pod_coverage.config

+{"skip_all":"irrelevent test"}

File xt/02pod_coverage.t

+use XT::Util;
+use Test::More;
+use Test::Pod::Coverage;
+
+plan skip_all => __CONFIG__->{skip_all}
+	if __CONFIG__->{skip_all};
+
+if ( __CONFIG__->{modules} )
+{
+	my @modules = @{ __CONFIG__->{modules} };
+	pod_coverage_ok($_, "$_ is covered") for @modules;
+	done_testing(scalar @modules);
+}
+else
+{
+	all_pod_coverage_ok();
+}
+

File xt/03meta_uptodate.config

+{"package":"P5U-Command-Peek"}
+

File xt/03meta_uptodate.t

+use XT::Util;
+use Test::More tests => 1;
+use Test::RDF::DOAP::Version;
+doap_version_ok(__CONFIG__->{package}, __CONFIG__->{version_from});
+
+use Test::EOL;
+all_perl_files_ok();
+use Test::Tabs;
+all_perl_files_ok();

File xt/06versions.t

+use XT::Util;
+use Test::More;
+use Test::HasVersion;
+
+plan skip_all => __CONFIG__->{skip_all}
+	if __CONFIG__->{skip_all};
+
+if ( __CONFIG__->{modules} )
+{
+	my @modules = @{ __CONFIG__->{modules} };
+	pm_version_ok($_, "$_ is covered") for @modules;
+	done_testing(scalar @modules);
+}
+else
+{
+	all_pm_version_ok();
+}
+