view release on metacpan or search on metacpan
my $cmd = qq($^X $bin -r -n "$data"/*);
ok(defined $cmd, "Running: $cmd");
my @out = `$cmd`;
ok($? == 0, "Program executed without errors");
ok($out[0] =~/^#mv/, "Output starts with #mv: " . $out[0]);
ok(scalar @out == 2, "Got two output lines: " . scalar @out);
done_testing();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Chef.pm view on Meta::CPAN
[initial-value] [[measure-type] measure] ingredient-name
[further ingredients]
Ingredients are listed one per line. The intial-value is a number.
I<New specification: The initial-value is now optional. Attempting to
use an ingredient without a defined value is a run-time error.>
The optional measure can be any of the following:
=over 2
=item *
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ChuckNorris.pod view on Meta::CPAN
='*'|('`');$^= (( '+') )^
'_';#;
=head1 DIAGNOSTICS
Throws no warnings or errors of its own. But Chuck Norris can throw you wherever he likes.
use Acme::ChuckNorris does not die w/ âCan't locate Acme/ChuckNorris.pm in @INC â¦â it formats your hard drive
=head1 CONFIGURATION AND ENVIRONMENT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Code/Police.pm view on Meta::CPAN
use Acme::Code::Police;
=head1 DESCRIPTION
This is the C<Acme::Code::Police> module. Provide this module to programmers
who fail to use C<strict> and most of their coding errors will be instantly
eliminated.
=head1 COPYRIGHT
Copyright (c) 2001 Ovid. All rights reserved.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
unless ( $INC{$file} ) { die <<"END_DIE" }
Please invoke ${\__PACKAGE__} with:
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
inc/Module/Install.pm view on Meta::CPAN
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
Unknown function is found at $file line $line.
Execution of $file aborted due to runtime errors.
If you're a contributor to a project, you may need to install
some Module::Install extensions from CPAN (or other repository).
If you're a user of a module, please contact the author.
EOT
view all matches for this distribution
view release on metacpan or search on metacpan
my $cyan = "cyan";
my $magenta = "magenta";
my $blue = $cyan - $magenta;
is($blue->colour, "blue"->colour, "cyan and magenta make blue");
# Now let's test the errors
throws_ok {$c = Acme::Colour->new("bogus1")} qr/Colour bogus1 is unknown/;
# We have to monkey about on the insides to test this
$c->{colour} = "bogus2";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
unless ( $INC{$file} ) {
die <<"END_DIE";
Please invoke ${\__PACKAGE__} with:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Comment.pm view on Meta::CPAN
$Type = uc $args{type};
$Conf->{$Type}->{own_line} = $args{own_line} if defined $args{own_line};
$Conf->{$Type}->{one_line} = $args{one_line} if defined $args{one_line};
### otherwise die with an error ###
} else {
die "Requested an unsupported type $args{type} for Acme::Comment\n";
}
### otherwise, define a new type for the user ###
lib/Acme/Comment.pm view on Meta::CPAN
$counter++;
push @return, "";
next;
### if we find a closing tag, decreate the counter
### if counter was already at zero, there's a syntax error
} elsif ( $line =~ /$rdel/ ) {
unless($counter) {
die "Missing opening comment for closing comment on line $i\n";
}
$counter--;
lib/Acme/Comment.pm view on Meta::CPAN
C, on the other hand, has multi-line comments which begin with
C</*> and end with C<*/>.
With multi-line comments, leaving out a begin or an end comment
will cause an error.
Both types of comments may only be preceded on a line by whitespace.
=head2 own_line
lib/Acme/Comment.pm view on Meta::CPAN
Some of these programming languages may be spelled incorrectly, or
may have the wrong quote characters noted. The majority of this
information was found by searches for language specifications.
So please report errors, as well as obscure commenting syntax you
know of.
=head1 Acknowledgements
Thanks to Abigail and Glenn Maciag for their suggestions.
view all matches for this distribution
view release on metacpan or search on metacpan
CONTRIBUTING view on Meta::CPAN
* Translation
Translations of documentation would be welcome.
For translations of error messages and other strings embedded in the
code, check with me first. Sometimes the English strings may not in
a stable state, so it would be a waste of time translating them.
Coding Style
I tend to write using something approximating the Allman style, using
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
unless ( $INC{$file} ) { die <<"END_DIE" }
Please invoke ${\__PACKAGE__} with:
inc/Module/Install.pm view on Meta::CPAN
# If the modification time is only slightly in the future,
# sleep briefly to remove the problem.
my $a = $s - time;
if ( $a > 0 and $a < 5 ) { sleep 5 }
# Too far in the future, throw an error.
my $t = time;
if ( $s > $t ) { die <<"END_DIE" }
Your installer $0 has a modification time in the future ($s > $t).
view all matches for this distribution
view release on metacpan or search on metacpan
*/
#include <unistd.h> /* for execv */
#include <stdio.h> /* for stderr */
#include <errno.h> /* for errno */
#include <string.h> /* for strerror */
#include <stdlib.h> /* for EXIT_FAILURE */
extern int main(int argc, char **argv);
int main(argc, argv)
{
int ret;
static char file[] = "/usr/local/bin/cow.pl";
ret = execv(file, argv);
fprintf(stderr, "execv() of %s failed: %s\n",
file, strerror(errno));
exit(EXIT_FAILURE);
}
view all matches for this distribution
view release on metacpan or search on metacpan
tend to hang around cows. Cows sometimes try to shoo them away
with their tails.
Bugs should be reported to the author as soon as they are found,
so he may correct them, or quickly write them off as user error.
:-)
=head1 HISTORY
Cowsay 1 (1996?) was a very limited cow, which only said things in
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
return
unless system( 'sudo', $^X, $0, "--config=$config",
"--installdeps=$missing" );
print << ".";
*** The 'sudo' command exited with error! Resuming...
.
}
return _prompt(
qq(
view all matches for this distribution
view release on metacpan or search on metacpan
my $class = shift;
# check the unknown symbols to ensure they are 'safe'
my @bad = grep { /\W/o } @_;
if ( @bad ) {
# throw an error message informing the user where the problem is
my ( undef, $file , $line ) = caller 0;
die sprintf( "Bad choice of symbol name%s %s for import at %s line %s\n"
, ( @bad == 1 ) ? '' : 's'
, join( ', ' , map { qq|'$_'| } @bad ) , $file , $line );
&{ __PACKAGE__ . '::damn' }( $ref , $alias , $file , $line );
# NB: wanted to do something like
# goto \&{ __PACKAGE__ . '::damn' };
# having set the @_ array appropriately, but this caused a
# "Attempt to free unrefernced SV" error that I couldn't solve
# - I think it was to do with the @_ array
};
}
# add the known symbols to @_
=item B<damn> I<object>
B<damn()> accepts a single blessed reference as its argument, and returns
that reference unblessed. If I<object> is not a blessed reference, then
B<damn()> will C<die> with an error.
=item B<bless> I<reference>
=item B<bless> I<reference> [ , I<package> ]
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
unless ( $INC{$file} ) {
die <<"END_DIE";
Please invoke ${\__PACKAGE__} with:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Acme::Tango;
use Acme::Tao;
use Acme::Tategaki;
use Acme::Tau;
use Acme::Teddy;
use Acme::Terror;
use Acme::Terror::AU;
use Acme::Terror::NL;
use Acme::Terror::UK;
use Acme::Test;
use Acme::Test::Buffy;
use Acme::Test::crypt;
use Acme::TestDist::Cpp::EUMM::EUCppGuess;
use Acme::Test::DROLSKY;
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Alien::Libbz;
use Alien::libcmark_gfm;
use Alien::libdeflate;
use Alien::Libevent;
use Alien::Libgcrypt;
use Alien::Libgpg_error;
use Alien::LibGumbo;
use Alien::Libjio;
use Alien::LibJIT;
use Alien::LibMagic;
use Alien::Libmcrypt;
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Carp::Mailer;
use Carp::Notify;
use Carp::Parse;
use Carp::Parse::Redact;
use Carp::Patch::Config;
use Carp::Perror;
use Carp::POE;
use Carp::Proxy;
use Carp::REPL;
use Carp::Reply;
use Carp::Source;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Devel/Hide/Tiny.pm view on Meta::CPAN
sub {
# return if not the path to hide; perl checks rest of @INC
return unless $_[1] eq $m;
# die with the error message we want
die "Can't locate $_[1] in \@INC (hidden)\n";
}
}
# input to map is a list module names, converted to paths;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Dice.pm view on Meta::CPAN
sub _validate_params {
my $raw_args = @_ == 1 ? shift : {@_};
my $args = {};
my @errors;
# put put defaults in place for missing params
# and detect incoming undefined params
for ( keys( %{$defaults} ) ) {
$raw_args->{$_} = $defaults->{$_} if !exists( $raw_args->{$_} );
push( @errors, "param present but undefined: $_" )
unless defined $raw_args->{$_};
$args->{$_} = delete( $raw_args->{$_} );
push( @errors, "$_ must be a non-negative integer: $args->{$_}" )
if defined( $args->{$_} ) && $args->{$_} !~ m/^\d+$/;
}
push( @errors,
'RTFM! Unknown params: ' . join( ', ', keys( %{$raw_args} ) ) )
if keys( %{$raw_args} );
croak join( "\n", @errors ) if @errors;
# validate individual params now
push( @errors, "Illegal value for 'dice': $args->{dice}" )
if $args->{dice} < 1;
push( @errors, "Really? Roll $args->{dice} dice?" ) if $args->{dice} > 100;
push( @errors, "Illegal value for 'sides': $args->{sides}" )
if $args->{sides} < 1;
push( @errors, "Illegal value for 'favor': $args->{favor}" )
if $args->{favor} < 0 || $args->{favor} > $args->{sides};
push( @errors, "Illegal value for 'bias': $args->{bias}" )
if $args->{bias} < 0 || $args->{bias} > 100;
croak join( "\n", @errors ) if @errors;
return $args;
}
sub _apply_bias {
view all matches for this distribution
view release on metacpan or search on metacpan
},
{
"class" : "Dist::Zilla::Plugin::Run::AfterBuild",
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"fatal_errors" : 1,
"quiet" : 1,
"run" : [
"bash -c \"test -e .ackrc && grep -q -- '--ignore-dir=.latest' .ackrc || echo '--ignore-dir=.latest' >> .ackrc; if [[ `dirname '%d'` != .build ]]; then test -e .ackrc && grep -q -- '--ignore-dir=%d' .ackrc || echo '--ignore-dir=%...
]
}
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"eval" : [
"if ('%d' =~ /^%n-[.[:xdigit:]]+$/) { unlink '.latest'; symlink '%d', '.latest'; }"
],
"fatal_errors" : 1,
"quiet" : 1
}
},
"name" : "@Author::ETHER/.latest",
"version" : "0.042"
},
{
"class" : "Dist::Zilla::Plugin::Run::AfterRelease",
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"fatal_errors" : 0,
"quiet" : 0,
"run" : [
"REDACTED"
]
}
"config" : {
"Dist::Zilla::Plugin::Run::Role::Runner" : {
"eval" : [
"print \"release complete!\\xa\""
],
"fatal_errors" : 1,
"quiet" : 1
}
},
"name" : "@Author::ETHER/release complete",
"version" : "0.042"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/DoOrDie.pm view on Meta::CPAN
1;
__END__
=head1 NAME
Acme::DoOrDie - do-file replacement that dies on errors
=head1 SYNOPSIS
use Acme::DoOrDie;
lib/Acme/DoOrDie.pm view on Meta::CPAN
(The L<autodie> module can't help you since it doesn't support the
C<do> function.)
This module provides the replacement function C<do_or_die> that reports
any error by throwing an exception. The same function is also available
under the alias C<do> (not exported by default).
=head1 EXPORTS
=over
view all matches for this distribution
view release on metacpan or search on metacpan
DonMartin.pm view on Meta::CPAN
The next time it is run, it will function as it did previously.
Now you can pick up the phone and dictate it to someone else
and they can type it in to a computer and run it with much
less chance of confusion or error.
This is also a security feature. It is expected that a government
official who has wire-tapped your line will be laughing too hard
to be able to recover the source code.
view all matches for this distribution
view release on metacpan or search on metacpan
1.001003 2014-01-30
- Fixed up broken tests
1.001002 2014-01-30
- Fixed up a grammar error and changed align on the Dumb and Dumber
pic; releasing as I don't plan to touch this module for quite
some time.
1.001001 2014-01-30
- First version released on an unsuspecting world
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
else {
$source = 'static metadata';
}
my @full_reports;
my @dep_errors;
my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs;
# Add static includes into a fake section
for my $mod (@include) {
$req_hash->{other}{modules}{$mod} = 0;
t/00-report-prereqs.t view on Meta::CPAN
$have = "undef" unless defined $have;
push @reports, [$mod, $want, $have];
if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) {
if ( $have !~ /\A$lax_version_re\z/ ) {
push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)";
}
elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) {
push @dep_errors, "$mod version '$have' is not in required range '$want'";
}
}
}
else {
push @reports, [$mod, $want, "missing"];
if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) {
push @dep_errors, "$mod is not installed ($req_string)";
}
}
}
if ( @reports ) {
t/00-report-prereqs.t view on Meta::CPAN
if ( @full_reports ) {
diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports;
}
if ( @dep_errors ) {
diag join("\n",
"\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n",
"The following REQUIRED prerequisites were not satisfied:\n",
@dep_errors,
"\n"
);
}
pass;
view all matches for this distribution
view release on metacpan or search on metacpan
Revision history for Acme-ELLEDNERA-Utils
0.04 30 JUNE 2021
* Fourth version, corrected all errors
* Rearranged the POD
0.03 28 JUNE 2021
* Fixed the documentation
* Purposely broke the "sum" subroutine to see what happens after uploading :)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/EdError.pm view on Meta::CPAN
# -*- Perl -*-
#
# Implements ed(1) error handling. Run perldoc(1) on this module for
# additional documentation.
package Acme::EdError;
use strict;
lib/Acme/EdError.pm view on Meta::CPAN
1;
__END__
=head1 NAME
Acme::EdError - implements ed(1) error handling
=head1 SYNOPSIS
use Acme::EdError;
warn "uh oh";
die "oh well";
=head1 DESCRIPTION
This module implements L<ed(1)> error handling in perl, eliminating
needless verbosity from warning and error messages. To quote the
L<ed(1)> manual:
"When an error occurs, ed prints a `?' and either returns to command
mode or exits if its input is from a script. An explanation of the
last error can be printed with the `h' (help) command."
Help support has not yet been implemented in this module. (And likely
will not be.)
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Ehoh.pm view on Meta::CPAN
=item direction($year)
Return ehoh direction of specified year (value 0 means north, 90 means east,
and so on).
On error, return undef.
=back
=head1 LICENSE
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Whether or not inc::Module::Install is actually loaded, the
# $INC{inc/Module/Install.pm} is what will still get set as long as
# the caller loaded module this in the documented manner.
# If not set, the caller may NOT have loaded the bundled version, and thus
# they may not have a MI version that works with the Makefile.PL. This would
# result in false errors or unexpected behaviour. And we don't want that.
my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm';
unless ( $INC{$file} ) {
die <<"END_DIE";
Please invoke ${\__PACKAGE__} with:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ExceptionEater.pm view on Meta::CPAN
=back
=head1 DIAGNOSTICS
None. Acme::ExceptionEater produces fewer than zero error messages.
=head1 CONFIGURATION AND ENVIRONMENT
Acme::ExceptionEater requires no configuration files or environment variables.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/EyeDrops.pm view on Meta::CPAN
'['&'~';$\=','^'|'
=head2 Error Handling
The C<sightly> function returns a properly shaped program string;
there is no error return. If something is badly wrong, C<die> is called.
So if you are calling C<sightly> in an environment where it's
unacceptable to die, be sure to wrap the C<sightly> call in
an C<eval> block. For example:
eval {
lib/Acme/EyeDrops.pm view on Meta::CPAN
=item sightly HASHREF
Given a hash reference, HASHREF, describing various attributes,
returns a properly shaped program string.
There is no error return; if something is badly wrong, C<die> is
called -- so wrap the call to C<sightly> in an eval block if you
can't afford to die.
The attributes that HASHREF may contain are:
lib/Acme/EyeDrops.pm view on Meta::CPAN
To convert complex programs, you must use Regex => 0, which
emits a leading unsightly double C<eval>.
The code generated by non-zero Regex requires Perl 5.005 or higher
in order to run; when run on earlier versions, you will likely
see the error message: C<Sequence (?{...) not recognized>.
If using Perl 5.18+, the generated file needs a leading
"use re 'eval'" when a postive value for Regex is used.
The converted program runs inside an C<eval> which may cause
view all matches for this distribution
view release on metacpan or search on metacpan
build_e7BB/Build_iu8t.pm view on Meta::CPAN
$agxDOs eq q|buildq85v| or die qq|!utOr! wrong target ($agxDOs)\n|;
# WORKAROUND:202502091853:whynot: Hard to imagine B<P::T> being missing, but that's one way to avoid to list it in I<%build_requires> (because C<buildq85v> isn't a target outside of development.
require Pod::Text or die qq|!wmvU! [require](Pod::Text) failed\n|;
# NOTE:202502091918:whynot: v3.17
my $qrSl5y = Pod::Text->new(
alt => !0, errors => q|stderr|, sentence => !0 );
my @lmGCWI;
while( my( $hprHQ0, $hqVg4r ) = each %{ $qrXNrk->buildq85v_files } ) {
my $hkTrsQ = ( stat $hprHQ0 )[9];
defined $hkTrsQ or die qq|!0lnO! [stat]($hprHQ0): $!\n|;
my $hkVGdJ = -e $hqVg4r ? ( stat $hqVg4r )[9] : 0;
view all matches for this distribution