use Test::More 'no_plan'; BEGIN { require 5.006_001 or plan 'skip_all'; close *STDERR; open *STDERR, '>', \my $stderr; *CORE::GLOBAL::exit = sub { die $stderr }; } BEGIN { $INFILE = $0; $OUTFILE = $0; $LEN = 42; $H = 2; $W = -10; $TIMEOUT = 7; @ARGV = ( "-i $INFILE", "-out=", $OUTFILE, "-lgth $LEN", "-step ${H}x${W}", '-v', "--timeout $TIMEOUT", '-w', 's p a c e s', 7, ); } if (eval { require Getopt::Euclid; Getopt::Euclid->import(qw( :minimal_keys )); 1; } ) { is 0 => 'Succeeded unexpectedly'; } else { my $error = $@; like $error, qr{\AInternal error: minimalist mode caused arguments} => 'Clashed as expected'; like $error, qr{'-step} => 'Clashed on -step'; like $error, qr{''} => 'Clashed on '; } __END__ =head1 NAME orchestrate - Convert a file to Melkor's .orc format =head1 VERSION This documentation refers to orchestrate version 1.9.4 =head1 USAGE orchestrate -in source.txt --out dest.orc -verbose -len=24 =head1 REQUIRED ARGUMENTS =over =item -i[nfile] [=] Specify input file =for Euclid: file.type: readable file.default: '-' =item -o[ut][file]= Specify output file =for Euclid: file.type: writable file.default: '-' =back =head1 OPTIONS =over =item -step x Specify height and width =item -l[[en][gth]] Display length [default: 24 ] =for Euclid: l.type: int > 0 l.default: 24 =item -girth Display girth [default: 42 ] =for Euclid: g.default: 42 =item -v[erbose] Print all warnings =item --timeout [] [] =for Euclid: min.type: int max.type: int max.default: -1 =item -w Test something spaced =item Step size =item --version =item --usage =item --help =item --man Print the usual program information =back =begin remainder of documentation here... =end =head1 AUTHOR Damian Conway (damian@conway.org) =head1 BUGS There are undoubtedly serious bugs lurking somewhere in this code. Bug reports and other feedback are most welcome. =head1 COPYRIGHT Copyright (c) 2002, Damian Conway. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the terms of the Perl Artistic License (see http://www.perl.com/perl/misc/Artistic.html)