The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

## name Basic failure
## failures 2
## cut
@list = ('foo', 'bar', 'baz-bot');
@list = ('foo',
'bar',
'baz-bot');
#-----------------------------------------------------------------------------
## name Non-word lists
## failures 0
## cut
@list = ('3/4', '-123', '#@$%');
@list = ('3/4',
'-123',
'#@$%');
#-----------------------------------------------------------------------------
## name Basic passing
## failures 0
## cut
('foo');
@list = ();
@list = ('foo');
@list = ('foo', 'bar', 'bee baz');
@list = ('foo', 'bar', q{bee baz});
@list = ('foo', 'bar', q{});
@list = ('foo', 'bar', 1.0);
@list = ('foo', 'bar', 'foo'.'bar');
@list = ($foo, 'bar', 'baz');
@list = (foo => 'bar');
%hash = ('foo' => 'bar', 'fo' => 'fum');
my_function('foo', 'bar', 'fudge');
&my_function('foo', 'bar', 'fudge');
$an_object->a_method('foo', 'bar', 'fudge');
$a_sub_routine_ref->('foo', 'bar', 'fudge');
foreach ('foo', 'bar', 'nuts'){ do_something($_) }
#-----------------------------------------------------------------------------
## name Three elements with minimum set to four
## failures 0
## parms {min_elements => 4}
## cut
@list = ('foo', 'bar', 'baz');
#-----------------------------------------------------------------------------
## name Four elements with minimum set to four
## failures 1
## parms {min_elements => 4}
## cut
@list = ('foo', 'bar', 'baz', 'nuts');
#-----------------------------------------------------------------------------
## name Failing 'use' statements
## failures 1
## cut
use Foo ('foo', 'bar', 'baz');
#-----------------------------------------------------------------------------
## name Passing 'use' statements
## failures 0
## cut
use Foo ();
use Foo ('foo', 1, 'bar', '1/2');
use Foo ('foo' => 'bar', 'baz' => 'nuts');
## name Non-word lists in strict mode.
## failures 3
## parms { strict => 1 }
## cut
use Foo ('foo', 'bar', '1/2');
@list = ('3/4', '-123', '#@$%');
@list = ('3/4',
'-123',
'#@$%');
#-----------------------------------------------------------------------------
##############################################################################
# $Date: 2009-02-15 10:57:40 -0600 (Sun, 15 Feb 2009) $
# $Author: clonezone $
# $Revision: 3115 $
##############################################################################
# Local Variables:
# mode: cperl
# cperl-indent-level: 4
# fill-column: 78
# indent-tabs-mode: nil
# c-indentation-style: bsd
# End:
# ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :