Result:
found more than 559 distributions - search limited to the first 2001 files matching your query ( run in 0.787 )


Alt-Sub-Delete-NewPackageSeparator

 view release on metacpan or  search on metacpan

t/Test/Builder.pm  view on Meta::CPAN


If all your tests passed, Test::Builder will exit with zero (which is
normal).  If anything failed it will exit with how many failed.  If
you run less (or more) tests than you planned, the missing (or extras)
will be considered failures.  If no tests were ever run Test::Builder
will throw a warning and exit with 255.  If the test died, even after
having successfully completed all its tests, it will still be
considered a failure and will exit with 255.

So the exit codes are...

 view all matches for this distribution


Alvis-Pipeline

 view release on metacpan or  search on metacpan

bin/alvis-zsink.pl  view on Meta::CPAN

	# Do nothing: this allows for a bug in ZOOM-C (as of YAZ
	# version 2.1.27) whereby a no-opping call to connect() does
	# not clear any old error indication.
	print "ignoring re-occurrence of old error in connect()\n";
    } elsif ($@) {
	die $@; # re-throw
    }

    if (!$connected) {
	print "connected to Z39.50 server\n";
	$connected = 1;

 view all matches for this distribution


Alvis-TermTagger

 view release on metacpan or  search on metacpan

lib/Alvis/TermTagger.pm  view on Meta::CPAN

    while($line1 = <DESC_TERMLIST>) {
	chomp $line1;
	utf8::decode($line1);
	$line=$line1;

	# Blank and comment lines are throw away
	if (($line !~ /^\s*\#/o)&&($line !~ /^\s*\/\//o)&&($line !~ /^\s*$/o)) {
	    # Term is split from the other information
	    my @tab = split / ?[\|:] ?/, $line;
	     if ($tab[0] !~ /^\s*$/) {
		 # TODO better

 view all matches for this distribution


Alzabo-GUI-Mason

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

- Made it work under Catalyst (sort of) or mod_perl.


0.10    2004-06-29

- If an Alzabo::Exception::RDBMSRules exception is thrown, the full
  exception (with stack trace) is now output to STDERR.  This helps
  debugging in case the exception is due to an error in Alzabo, as
  opposed to user error.

- Some submission handling components were redirecting to the wrong

 view all matches for this distribution


Alzabo

 view release on metacpan or  search on metacpan

lib/Alzabo/BackCompat.pm  view on Meta::CPAN

use File::Spec;
use Storable;
use Tie::IxHash;

use Params::Validate qw( :all );
Params::Validate::validation_options( on_fail => sub { Alzabo::Exception::Params->throw( error => join '', @_ ) } );

use vars qw($VERSION);

$VERSION = 2.0;

lib/Alzabo/BackCompat.pm  view on Meta::CPAN

        copy($file, $backup);
    }

    my $fh = do { local *FH; *FH };
    open $fh, "<$c_file"
        or Alzabo::Exception::System->throw( error => "Unable to open $c_file: $!" );
    my $raw = Storable::fd_retrieve($fh)
        or Alzabo::Exception::System->throw( error => "Can't read filehandle" );
    close $fh
        or Alzabo::Exception::System->throw( error => "Unable to close $c_file: $!" );

    foreach (@cb)
    {
        $_->($raw);
        $_->( $raw->{original} ) if $raw->{original};
    }

    open $fh, ">$c_file"
        or Alzabo::Exception::System->throw( error => "Unable to write to $c_file: $!" );
    Storable::nstore_fd( $raw, $fh )
        or Alzabo::Exception::System->throw( error => "Can't store to filehandle" );
    close $fh
        or Alzabo::Exception::System->throw( error => "Unable to close $c_file: $!" );

    my $version_file =
        File::Spec->catfile( Alzabo::Config::schema_dir(),
                             $p{name}, "$p{name}.version" );

    open $fh, ">$version_file"
        or Alzabo::Exception::System->throw( error => "Unable to write to $version_file: $!" );
    print $fh $Alzabo::VERSION
        or Alzabo::Exception::System->throw( error => "Can't write to $version_file: $!" );
    close $fh
        or Alzabo::Exception::System->throw( error => "Unable to close $version_file: $!" );

    Alzabo::Create::Schema->load_from_file( name => $p{name} )->save_to_file;

    if ($create_loaded)
    {

 view all matches for this distribution


Amazon-CloudFront-SignedURL

 view release on metacpan or  search on metacpan

t/01_new.t  view on Meta::CPAN

use t::Util;

my $private_key = slurp( File::Spec->catfile( dirname(__FILE__), 'test.pem' ) );

subtest 'invalid arguments' => sub {
    throws_ok {
        Amazon::CloudFront::SignedURL->new();
    }
    qr/Attribute \(private_key_string\) is required/;

    throws_ok {
        Amazon::CloudFront::SignedURL->new( private_key_string => $private_key, );
    }
    qr/Attribute \(key_pair_id\) is required/;
};

 view all matches for this distribution


Amazon-DynamoDB

 view release on metacpan or  search on metacpan

CHANGES  view on Meta::CPAN


  Change: e8d62ef4aef5570bb66eeb396d33db8aaed88fd9
  Author: Rusty Conover <rusty@luckydinosaur.com>
  Date : 2014-05-12 11:45:18 +0000

    Don't include keys that are the empty string which throw validation
    errors.

    Add a bit more type checking

    Bump to version 0.11 

 view all matches for this distribution


Amazon-MWS

 view release on metacpan or  search on metacpan

lib/Amazon/MWS/Client.pm  view on Meta::CPAN


The marketplace id for the calls being made by this object.

=head1 EXCEPTIONS

Any of the L<API METHODS> can throw the following exceptions
(Exception::Class).  They are all subclasses of Amazon::MWS::Exception.

=head2 Amazon::MWS::Exception::MissingArgument

The call to the API method was missing a required argument.  The name of the

lib/Amazon/MWS/Client.pm  view on Meta::CPAN

available at $e->errors, and the entire xml response is available at $e->xml.

=head2 Amazon::MWS::Exception::BadChecksum

If Amazon sends the 'Content-MD5' header and it does not match the content,
this exception will be thrown.  The response can be found in $e->response.

=head1 INTERNAL METHODS

=head2 agent

 view all matches for this distribution


Amazon-S3

 view release on metacpan or  search on metacpan

lib/Amazon/S3/Bucket.pm  view on Meta::CPAN

=back

=back

The method returns C<undef> if the key does not exist in the
bucket and throws an exception (dies) on server errors.

On success, the method returns a HASHREF containing:

=over

lib/Amazon/S3/Bucket.pm  view on Meta::CPAN

the multipart process will be completed.

=item fh

File handle of an open file. The file must be greater than the minimum
chunk size for multipart uploads otherwise the method will throw an
exception.

=item abort_on_error

Indicates whether the multipart upload should be aborted if an error

 view all matches for this distribution


Amazon-SES

 view release on metacpan or  search on metacpan

lib/Email/Sender/Transport/SES.pm  view on Meta::CPAN

  
  my $r = $self->call('SendRawEmail', {
      'RawMessage.Data' => MIME::Base64::encode_base64($string)
  });
 
  $r->is_success or  Email::Sender::Failure->throw("couldn't send message via Amazon SES: " . $r->error_message);
 
  return $self->success;
}
 
no Moo;

 view all matches for this distribution


Amazon-SQS-Client

 view release on metacpan or  search on metacpan

bin/QueueDaemon.pl  view on Meta::CPAN


=item 7. To exit the daemon when your handler returns a non-true value
set the --exit-when option to 'false' or in the [error] section of your .ini
file, set 'exit = false'.

=item 8. To exit the daemon if your handler throws an exception, 
set the --exit-when option to 'error' or in the [error] section of your .ini
file, set 'exit = error'.

=back

 view all matches for this distribution


Amazon-Sites

 view release on metacpan or  search on metacpan

t/02-include-exclude.t  view on Meta::CPAN

use Test::More import => [qw( done_testing is_deeply ok )];
use Test::Exception;

use Amazon::Sites;

throws_ok { Amazon::Sites->new( include => [ 'UK' ], exclude => [ 'US' ]) }
  qr[You can't specify both include and exclude],
  'Can\'t specify both include and exclude';

my $sites = Amazon::Sites->new(exclude => [ 'US' ]);
my $az_us = $sites->site('US');

 view all matches for this distribution


Ambassador-API-V2

 view release on metacpan or  search on metacpan

lib/Ambassador/API/V2.pm  view on Meta::CPAN

    my $response = $api->get($method, \%args);

Call an Ambassador API C<$method> with the given C<%args>.

If successful, it returns an L<Ambassdor::API::V2::Response>.
If it fails, it will throw an L<Ambassador::API::V2::Error>.

See the L<Ambassador API docs|https://docs.getambassador.com/docs/>
for what $methods are available, what C<%args> they take, and which
should be called with C<get> or C<post>.

 view all matches for this distribution


Ambrosia

 view release on metacpan or  search on metacpan

lib/Ambrosia/Addons/Accessor.pm  view on Meta::CPAN

        }
    
        sub accessor
        {
            no warnings;
            return __PACKAGE__->instance($PROCESS_MAP{$$} || throw Ambrosia::error::Exception::BadUsage("First access to Ambrosia::Addons::Accessor without assign to access."), @_);
        }
    }

    sub authenticate
    {

 view all matches for this distribution


Amce-CNA

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN


my $x = eval { Thing->deos_stuff };
my $e = $@;

is($x, undef, "the thing doesn't do stuff");
like($e, qr/object method/, "throws exception");

{
  package Thing;
  require Amce::CNA;
  Amce::CNA->import;

 view all matches for this distribution


Amethyst

 view release on metacpan or  search on metacpan

Amethyst/Brain/Infobot/Module/Math.pm  view on Meta::CPAN

	$content =~ s/\s*$//g;
	$content =~ s/\s+/ /g;

	# print STDERR "Math: Final stage: '$content'\n";

	# Now for the throw outs:
	return undef if $content !~ /\S/;				# Empty
	return undef if									# Not an exp
			$content !~ /^[-+\/\*\d*\.\s()^\|\&]+$/;
	return undef if $content !~ /\d/;				# Boring
	return undef if									# Trivial

 view all matches for this distribution


Amon2-Auth

 view release on metacpan or  search on metacpan

lib/Amon2/Auth/Site/Twitter.pm  view on Meta::CPAN

	my $verifier = $c->req->param('oauth_verifier');
    my ($access_token, $access_token_secret, $user_id, $screen_name) = eval {
        $nt->request_access_token(verifier => $verifier);
    };
    if ($@) {
        # Net::Twitter::Lite throws exception like following
        # GET https://twitter.com/oauth/access_token failed: 401 Unauthorized at /Users/tokuhirom/perl5/perlbrew/perls/perl-5.15.2/lib/site_perl/5.15.2/Net/Twitter/Lite.pm line 237.
		return $callback->{on_error}->($@);
    } else {
        return $callback->{on_finished}->($access_token, $access_token_secret, $user_id, $screen_name);
    }

 view all matches for this distribution


Amon2-CLI

 view release on metacpan or  search on metacpan

lib/Amon2/CLI.pm  view on Meta::CPAN


=head1 DESCRIPTION

Amon2::CLI is B<ALPHA QUALITY>. B<I may change interfaces without a notice>.

This module gives you the easy way of CLI for Amon2 App. It handles to load class, to get options and to throw error.


=head1 CONFIGURE PLUGIN

You can write your own C<MyApp::CLI> class for customizing the way instead of C<Amon2::CLI>.

 view all matches for this distribution


Amon2-Plugin-LogDispatch

 view release on metacpan or  search on metacpan

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


Amon2-Plugin-Web-FormValidator-Simple

 view release on metacpan or  search on metacpan

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


Amon2-Web-Dispatcher-RouterSimple-Extended

 view release on metacpan or  search on metacpan

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


Amon2

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


    [BUG FIX]
    * 6fe10a5 Flavor::Large: fixed broken links to jQuery
    * 481bc53 Setup::Large: Do not create lib/My/App/Web.pm,
      lib/My/App/Web/ in Large flavor.
    * 2d10c86 Setup::Basic, Setup::Large: mysql throws exception
      with empty statements.

3.25 2011-11-13

    [INCOMPATIBLE CHANGE]

 view all matches for this distribution


Analizo

 view release on metacpan or  search on metacpan

t/Analizo/Command.t  view on Meta::CPAN

  is($return, "command fake executed");
}

sub executing_commands_with_version_argument_is_not_allowed : Tests {
  my $analizo = Analizo->new;
  throws_ok {
    $analizo->execute_command( $analizo->prepare_command('fake', '--version') )
  } qr /Invalid option/;
}

__PACKAGE__->runtests;

 view all matches for this distribution


Anarres-Mud-Driver

 view release on metacpan or  search on metacpan

lib/Driver/Compiler/Node.pm  view on Meta::CPAN

package Anarres::Mud::Driver::Compiler::Node;

# A lot of things throw code into this package's namespace.

use strict;
use vars qw(@ISA @EXPORT_OK %EXPORT_TAGS @NODETYPES);
use Exporter;
use Carp qw(confess);

 view all matches for this distribution


Ancient

 view release on metacpan or  search on metacpan

lib/util.pm  view on Meta::CPAN


    my $val = dig($hashref, @keys);
    my $val = dig($hashref, 'a', 'b', 'c');  # $hashref->{a}{b}{c}

Safely traverses a nested hash structure. Returns undef if any key
is missing, without throwing an exception.

=head2 tap

    my $result = tap(\&block, $value);
    my $result = tap(sub { print "Debug: $_\n" }, $value);

 view all matches for this distribution


Android-ElectricSheep-Automator

 view release on metacpan or  search on metacpan

lib/Android/ElectricSheep/Automator/ADB.pm  view on Meta::CPAN

	}
	my $res = eval {
	  IPC::Run::run(
		\@cmd,
		\$in, \$out, \$err,
		# AHP: on timeout it throws an exception matching
		#   /^IPC::Run: .*timed out/
		# or specify your own exception name (see doc)
		# I can't find what unit the timeout interval is!
		IPC::Run::timeout(1000)
	  )

 view all matches for this distribution


Aniki

 view release on metacpan or  search on metacpan

t/lib/t/DB.pm  view on Meta::CPAN

                if (t::DB::Exception->caught($reason)) {
                    Test::Builder->new->note($reason->message);
                    Test::Builder->new->plan(skip_all => "Cannot use $database");
                    return;
                }
                die $reason; # rethrow
            }
            $subclass->$code($database);
        });
    }
}

t/lib/t/DB.pm  view on Meta::CPAN

    if ($schema_class->context->db eq 'MySQL') {
        eval {
            require DBD::mysql;
            require Test::mysqld;
        };
        t::DB::Exception->throw(message => $@) if $@;

        Test::Builder->new->note('launch mysqld ...');
        my $mysqld = Test::mysqld->new(
            my_cnf => {
                'skip-networking' => '', # no TCP socket
            }
        );
        t::DB::Exception->throw(message => $Test::mysqld::errstr) unless $mysqld;

        my $dbh = DBI->connect($mysqld->dsn(dbname => 'test'), 'root', '', {
            AutoCommit => 1,
            PrintError => 0,
            RaiseError => 1,

t/lib/t/DB.pm  view on Meta::CPAN

    elsif ($schema_class->context->db eq 'PostgreSQL') {
        eval {
            require DBD::Pg;
            require Test::postgresql;
        };
        t::DB::Exception->throw(message => $@) if $@;

        Test::Builder->new->note('launch postgresql ...');
        my $pgsql = Test::postgresql->new();
        t::DB::Exception->throw(message => $Test::postgresql::errstr) unless $pgsql;

        my $dbh = DBI->connect($pgsql->dsn, '', '', {
            AutoCommit => 1,
            PrintError => 0,
            RaiseError => 1,

 view all matches for this distribution


Anki-Import

 view release on metacpan or  search on metacpan

lib/Anki/Import.pm  view on Meta::CPAN


# functions for first pass parsing of source data
sub validate_src_file {
  logi('Validating source file');

  # throw error if file is empty
  logf('Source data file is empty.') if !$lines[0];

  # outer loop for parsing notes
  my %fields;  # keeps track of number of fields for each type of note
  while (next_line()) {

lib/Anki/Import.pm  view on Meta::CPAN

section. If no note types are indicated in your source file, the
"Basic" note type is used.

Note types are used to help C<Anki::Import> ensure other notes of the same type
have the same number of fields. If the notes assigned to a particular note type
do not all have the same number of fields, an error is thrown so be sure each
note has the correct number of fields.

Note: note type sections can be split across the file (i.e. you do not have to
group the notes of a particular note type together).

 view all matches for this distribution


Announcements

 view release on metacpan or  search on metacpan

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


Any-Daemon

 view release on metacpan or  search on metacpan

lib/Any/Daemon.pm  view on Meta::CPAN

      { # re-seed the random number sequence per process
        srand(time+$$);

        # unhandled errors are to be treated seriously.
        my $rc = try { $child_task->(@_) };
        if(my $e = $@->wasFatal) { $e->throw(reason => 'ALERT'); $rc = 1 }
        $rc;
      };

    $SIG{CHLD} = sub { $child_died->($max_childs, $run_child) };
    $SIG{HUP}  = sub

lib/Any/Daemon.pm  view on Meta::CPAN

    my ($self, $run_task, %args) = @_;
    my $reconfig    = $self->_mkcall($args{reconfig}    || 'reconfigDaemon');

    # unhandled errors are to be treated seriously.
    my $rc = try { $run_task->(@_) };
    if(my $e = $@->wasFatal) { $e->throw(reason => 'ALERT'); $rc = 1 }

    $SIG{HUP}  = sub
      { notice "daemon received signal HUP";
        $reconfig->(keys %childs);
      };

 view all matches for this distribution


( run in 0.787 second using v1.01-cache-2.11-cpan-39bf76dae61 )