Right, now I've gone a bit more towards a TAP approach, but I'm having difficulties getting my plans to run. So far I've got:

C:\Users\Theseus\perlmonks\sopw\11102936>dmake test C:\"Dwimperl\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Har +ness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib +', 'blib\arch')" t/*.t t/00-load.t ....... # Testing SoPW_11102936 0.01, Perl 5.014002, C:\Dw +imperl\perl\bin\perl.exe t/00-load.t ....... ok t/01-works.t ...... Not an ARRAY reference at C:\Users\Theseus\perlmon +ks\sopw\11102936\blib\lib/SoPW_11102936.pm line 78. t/01-works.t ...... 1/9 # Looks like you planned 9 tests but ran 1. # Looks like your test exited with 255 just after 1. t/01-works.t ...... Dubious, test returned 255 (wstat 65280, 0xff00) Failed 8/9 subtests t/manifest.t ...... skipped: Author tests not required for installatio +n t/pod-coverage.t .. skipped: Author tests not required for installatio +n t/pod.t ........... skipped: Author tests not required for installatio +n Test Summary Report ------------------- t/01-works.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 9 tests but ran 1. Files=5, Tests=2, 1 wallclock secs ( 0.05 usr + 0.05 sys = 0.09 CPU +) Result: FAIL Failed 1/5 test programs. 0/2 subtests failed. dmake: Error code 255, while making 'test_dynamic'

The Module and Test as is:

package SoPW_11102936; use 5.006; use strict; use warnings FATAL => 'all'; =head1 NAME SoPW_11102936 - The great new SoPW_11102936! shift on empty array in list context broken =head1 VERSION Version 0.01 =cut our $VERSION = '0.01'; =head1 SYNOPSIS Quick summary of what the module does. Perhaps a little code snippet. use SoPW_11102936; my $foo = SoPW_11102936->new(); ... =head1 EXPORT A list of functions that can be exported. You can delete this section if you don't export anything, such as for a purely object-oriented mod +ule. =head1 SUBROUTINES/METHODS =head2 new =cut sub new { my $class = shift; bless [], $class; } =head2 _empty =cut sub _empty { my $self = shift; $self; } =head2 _undef =cut sub _undef { my $self = shift; undef $self->[0]; $self; } =head2 context_scalar_shift =cut sub context_scalar_shift { my $self = shift; my $s = shift $self->[0]; $self->[0] = \$_; $self; } =head2 context_list_shift =cut sub context_list_shift { my $self = shift; my @a = shift $self->[0]; $self->[0] = \@a; $self; } =head2 context_scalar_splice =cut sub context_scalar_splice { my $self = shift; my $s = splice( $self->[0], 0 , 1 ); $self->[0] = \$s; $self; } =head2 context_list_splice =cut sub context_list_splice { my $self = shift; my @a = splice( $self->[0], 0 , 1 ); $self->[0] = \@a; $self; } sub unload { my $self=shift; return $self->[0]; } =head1 AUTHOR Don Coyote, C<< <tbc at tbc> >> =head1 BUGS Please report any bugs or feature requests to C<bug-sopw_11102936 at r +t.cpan.org>, or through the web interface at L<https://rt.cpan.org/NoAuth/ReportBug.html?Queue +=SoPW_11102936>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc SoPW_11102936 You can also look for information at: =over 4 =item * RT: CPAN's request tracker (report bugs here) L<https://rt.cpan.org/NoAuth/Bugs.html?Dist=SoPW_11102936> =item * AnnoCPAN: Annotated CPAN documentation L<http://annocpan.org/dist/SoPW_11102936> =item * CPAN Ratings L<https://cpanratings.perl.org/d/SoPW_11102936> =item * Search CPAN L<https://metacpan.org/release/SoPW_11102936> =back =head1 ACKNOWLEDGEMENTS =head1 LICENSE AND COPYRIGHT This software is Copyright (c) 2019 by Don Coyote. This is free software, licensed under: The Artistic License 2.0 (GPL Compatible) =cut 1; # End of SoPW_11102936
#!perl -T use 5.006; use strict; use warnings FATAL => 'all'; use Test::More; use SoPW_11102936; my @methods = qw/ new _empty _undef context_scalar_shift context_list_shift context_scalar_splice context_list_splice unload /; my @t_methods = grep /\Acontext/, @methods; plan tests => 1 + ( scalar( @t_methods ) * 2 ); my $foo = SoPW_11102936->new; isa_ok($foo, 'SoPW_11102936', 'its an SoPW object'); for my $method ( @t_methods ){ $foo->_empty(); $foo->$method(); is($foo->unload, (), "$method is empty"); }; for my $method ( @t_methods ){ $foo->_undef(); $foo->$method(); is($foo->unload, undef, "$method is undef"); }; diag( "Testing SoPW_11102936 $SoPW_11102936::VERSION, Perl $], $^X" );

fyi report bugs here in the thread is fine. I've not uploaded to cpan.


In reply to Re^8: shift on empty array in list context broken (show context) by Don Coyote
in thread shift on empty array in list context broken by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.