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


DBD-cubrid

 view release on metacpan or  search on metacpan

cci-src/config/ltmain.sh  view on Meta::CPAN

EOF
    fi

    $run $mv "${libobj}T" "${libobj}"

    # Unlock the critical section if it was locked
    if test "$need_locks" != no; then
      $run $rm "$lockfile"
    fi

    exit $EXIT_SUCCESS

 view all matches for this distribution


DBD_SQLFLEX

 view release on metacpan or  search on metacpan

dbdimp.c  view on Meta::CPAN

  "Illegal argument",              /* 102 */
  "Bad key descriptor",            /* 103 */
  "Too many files",                /* 104 */
  "Corrupted isam file",           /* 105 */
  "Need exclusive access",         /* 106 */
  "Record or file locked",         /* 107 */
  "Index already exists",          /* 108 */
  "Illegal primary key operation", /* 109 */
  "End of file",                   /* 110 */
  "Record not found",              /* 111 */
  "No current record",             /* 112 */

 view all matches for this distribution


DBI

 view release on metacpan or  search on metacpan

DBI.pm  view on Meta::CPAN

drivers may attempt to implement this method by executing
"C<select max($field) from $table>". Drivers using any approach
like this should issue a warning if C<AutoCommit> is true because
it is generally unsafe - another process may have modified the table
between your insert and the select. For situations where you know
it is safe, such as when you have locked the table, you can silence
the warning by passing C<Warn> => 0 in \%attr.

B<*> If no insert has been performed yet, or the last insert failed,
then the value is implementation defined.

 view all matches for this distribution


DBIx-Admin-DSNManager

 view release on metacpan or  search on metacpan

lib/DBIx/Admin/DSNManager.pm  view on Meta::CPAN

For cases like SQLite, testing code can either look in dsn.ini, or manufacture a temporary directory and file name
for testing.

This leads to a new question: If the testing code finds a DSN in dsn.ini which is marked use_for_testing = 0,
should that code still generate another DSN for testing? My suggestions is: Yes, since the one in dsn.ini does
not indicate that all possible DSNs should be blocked from testing.

=back

=head1 The Format of dsn.ini

 view all matches for this distribution


DBIx-Class-Async

 view release on metacpan or  search on metacpan

t/benchmark.pl  view on Meta::CPAN

    printf "  - Time Saved:          %.4f seconds (%.1f%% improvement)\n",
        $total_time_saved, $total_improvement;

    printf "\nEvent Loop Health:\n";
    printf "  - Average Responsiveness: %.1f%%\n", $avg_responsiveness;
    printf "  - Sequential Blocking:    0.0%% (completely blocked)\n";

    print "\n What This Means:\n";
    print "  - TRUE parallel query execution across network connections\n";

    if ($avg_speedup > 50) {

 view all matches for this distribution


DBIx-Class-EasyFixture

 view release on metacpan or  search on metacpan

lib/DBIx/Class/EasyFixture/Tutorial.pm  view on Meta::CPAN


=head1 CREATING YOUR FIXTURE CLASS

To use C<DBIx::Class::EasyFixture>, you must first create a subclass of it.
It's required to define two methods: C<get_fixture> and C<all_fixture_names>.
You may implement those any way you wish and you're not locked into a
particular format. Here's one way to do it, using a big hash (there are plenty
of other ways to do this, but this is easy for a tutorial.

    package My::Fixtures;
    use Moo;    # (Moose is also fine)

 view all matches for this distribution


DBIx-Class-MoreHelpers

 view release on metacpan or  search on metacpan

lib/DBIx/Class/Helper/ResultSet/Shortcut/Search/Is.pm  view on Meta::CPAN

version 1.0001

=head2 is(@columns || \@columns)

 $rs->is('active');
 $rs->is(['active', 'blocked']);

=head1 AUTHOR

D Ruth Holloway <ruth@hiruthie.me>

 view all matches for this distribution


DBIx-Class-Schema-Loader

 view release on metacpan or  search on metacpan

maint/travis-ci_scripts/10_before_install.bash  view on Meta::CPAN

if [[ "$(free -m | grep 'buffers/cache:' | perl -p -e '$_ = (split /\s+/, $_)[3]')" -lt "$CI_VM_MIN_FREE_MB" ]]; then
  export SHORT_CIRCUIT_SMOKE=1
  echo_err "
=============================================================================

CI virtual machine stuck in a state with a lot of memory locked for no reason.
Under Travis this state usually results in a failed build.
Short-circuiting buildjob to avoid false negatives, please restart it manually.

============================================================================="
fi

 view all matches for this distribution


DBIx-Class

 view release on metacpan or  search on metacpan

lib/DBIx/Class/ResultSet.pm  view on Meta::CPAN

      carp_unique("Fast-path populate() of non-uniquely identifiable rows with related data is not possible - falling back to regular create()");
      return my $throwaway = $self->populate(@_);
    }
  }

### inherit the data locked in the conditions of the resultset
  my ($rs_data) = $self->_merge_with_rscond({});
  delete @{$rs_data}{@$colnames};  # passed-in stuff takes precedence

  # if anything left - decompose rs_data
  my $rs_data_vals;

lib/DBIx/Class/ResultSet.pm  view on Meta::CPAN

  my $fresh_rs = (ref $self)->new (
    $self->result_source,
    {},
  );

  # these pieces will be locked in the subquery
  delete $fresh_rs->{cond};
  delete @{$fresh_rs->{attrs}}{qw/where bind/};

  return $fresh_rs->search( {}, {
    from => [{

 view all matches for this distribution


DBIx-Counter

 view release on metacpan or  search on metacpan

lib/DBIx/Counter.pm  view on Meta::CPAN

    return $v;
}

sub lock   { 0 }
sub unlock { 0 }
sub locked { 0 }

1;

__END__

lib/DBIx/Counter.pm  view on Meta::CPAN


=item unlock

Noop. Only provided for API compatibility with File::CounterFile.

=item locked

Noop. Only provided for API compatibility with File::CounterFile.

=back

 view all matches for this distribution


DBIx-JCL

 view release on metacpan or  search on metacpan

lib/DBIx/JCL.pm  view on Meta::CPAN

    ## log file rotation if generations > 0
    if ( -e $log_filefull && $log_gdg > 0 ) {
        _log_rotate();
    }

    ## create new locked log file
    ## if the file is already locked, will wait until the file is unlocked
    my $fh = new IO::LockedFile(">$log_filefull")
        or sys_die( 'Failed opening log file', 0 );
    ## close and unlock the file
    $fh->close();

lib/DBIx/JCL.pm  view on Meta::CPAN

    my $preamble = time2str( '%Y/%m/%d %T', time );
    if ( $level eq 'FATAL' ) { $preamble .= ' FATAL'; }
    if ( $level eq 'ERROR' ) { $preamble .= ' ERROR'; }
    if ( $level eq 'WARN'  ) { $preamble .= ' WARNING'; }

    ## open locked log file for appending
    ## if the file is already locked, will wait until the file is unlocked
    my $fh = new IO::LockedFile(">>$log_filefull")
        or sys_die( 'Failed opening log file', 0 );
    print {$fh} "$preamble $message\n";
    ## close and unlock the file
    $fh->close();

 view all matches for this distribution


DBIx-Lite

 view release on metacpan or  search on metacpan

lib/DBIx/Lite/ResultSet.pm  view on Meta::CPAN

=head2 for_update

This method accepts no argument. It enables the addition of the SQL C<FOR UPDATE>
clause at the end of the query, which allows to fetch data and lock it for updating.
It returns a L<DBIx::Lite::ResultSet> object to allow for further method chaining.
Note that no records are actually locked until the query is executed with L<single()>,
L<all()> or L<next()>.

    $dbix->txn(sub {
        my $author = $dbix->table('authors')->find($id)->for_update->single
            or die "Author not found";

 view all matches for this distribution


DBIx-Locker

 view release on metacpan or  search on metacpan

lib/DBIx/Locker.pm  view on Meta::CPAN

#pod database connection failure, silently losing the connection-based lock.
#pod DBIx::Locker locks by creating a persistent row in a "locks" table.
#pod
#pod Because DBIx::Locker locks are stored in a table, they won't go away.  They
#pod have to be purged regularly.  (A program for doing this, F<dbix_locker_purge>,
#pod is included.)  The locked resource is just a string.  All records in the lock
#pod (or semaphore) table are unique on the lock string.
#pod
#pod This is the I<entire> mechanism.  This is quick and dirty and quite effective,
#pod but it's not highly efficient.  If you need high speed locks with multiple
#pod levels of resolution, or anything other than a quick and brutal solution,

lib/DBIx/Locker.pm  view on Meta::CPAN

#pod
#pod =item * C<created> datetime
#pod
#pod =item * C<expires> datetime
#pod
#pod =item * C<locked_by> text
#pod
#pod =back
#pod
#pod See the C<sql> directory included in this dist for DDL for your database.
#pod

lib/DBIx/Locker.pm  view on Meta::CPAN

  Carp::confess("expires must be a positive integer")
    unless $expires > 0 and $expires == int $expires;

  $expires = time + $expires;

  my $locked_by = {
    host => Sys::Hostname::hostname(),
    guid => Data::GUID->new->as_string,
    pid  => $$,
  };

lib/DBIx/Locker.pm  view on Meta::CPAN


  local $dbh->{RaiseError} = 0;
  local $dbh->{PrintError} = 0;

  my $rows  = $dbh->do(
    "INSERT INTO $table (lockstring, created, expires, locked_by)
    VALUES (?, ?, ?, ?)",
    undef,
    $lockstring,
    $self->_time_to_string,
    $self->_time_to_string([ localtime($expires) ]),
    $JSON->encode($locked_by),
  );

  die(
    "could not lock resource <$lockstring>" . (
      $dbh->err && $dbh->errstr

lib/DBIx/Locker.pm  view on Meta::CPAN


  my $lock = DBIx::Locker::Lock->new({
    locker    => $self,
    lock_id   => $self->last_insert_id,
    expires   => $expires,
    locked_by => $locked_by,
    lockstring => $lockstring,
  });

  return $lock;
}

lib/DBIx/Locker.pm  view on Meta::CPAN

database connection failure, silently losing the connection-based lock.
DBIx::Locker locks by creating a persistent row in a "locks" table.

Because DBIx::Locker locks are stored in a table, they won't go away.  They
have to be purged regularly.  (A program for doing this, F<dbix_locker_purge>,
is included.)  The locked resource is just a string.  All records in the lock
(or semaphore) table are unique on the lock string.

This is the I<entire> mechanism.  This is quick and dirty and quite effective,
but it's not highly efficient.  If you need high speed locks with multiple
levels of resolution, or anything other than a quick and brutal solution,

lib/DBIx/Locker.pm  view on Meta::CPAN


=item * C<created> datetime

=item * C<expires> datetime

=item * C<locked_by> text

=back

See the C<sql> directory included in this dist for DDL for your database.

 view all matches for this distribution


DBIx-Mint

 view release on metacpan or  search on metacpan

lib/DBIx/Mint.pm  view on Meta::CPAN

 $team->name('Los Invencibles');
 $team->update;
 
 Bloodbowl::Coach->update(
    { status   => 'suspended' }, 
    { password => 'blocked' });
 
Declaring the schema allows you to modify the data. To define a schema and to learn about data modification methods, look into L<DBIx::Mint::Schema> and L<DBIx::Mint::Table>. 

If you only need to query the database, no schema is needed. L<DBIx::Mint::ResultSet> objects build database queries and fetch the resulting records:
  

 view all matches for this distribution


DBIx-MyParse

 view release on metacpan or  search on metacpan

lib/DBIx/MyParse/Query.pm  view on Meta::CPAN


=back

=head2 C<"SQLCOM_LOCK_TABLES"> and C<"SQLCOM_UNLOCK_TABLES">

You can use C<getTables()> to get a list of the tables being locked. Calling C<getOptions()> returns a list of lock
types so that the first lock type in the list corresponds to the first table and so on in a one-to-one relationship.

=head2 C<"SQLCOM_DROP_TABLE">, C<"SQLCOM_TRUNCATE"> and C<"SQLCOM_RENAME_TABLE">

For C<"SQLCOM_DROP_TABLE"> and C<"SQLOM_TRUNCATE">, use C<getTables()> to obtain a reference to an array of

 view all matches for this distribution


DBIx-NinjaORM

 view release on metacpan or  search on metacpan

lib/DBIx/NinjaORM.pm  view on Meta::CPAN

		skip_cache => 1,
	) // die 'Book with ISBN 9781449303587 does not exist';

=item * lock (default: 0)

By default, the underlying row is not locked when retrieving an object via
C<new()>. Setting C<lock> to 1 forces the ORM to bypass the cache if any, and
to lock the rows in the database as it retrieves them.

	my $object = My::Model::Book->new(
		{ isbn => '9781449303587' },

lib/DBIx/NinjaORM.pm  view on Meta::CPAN

		if defined( $args{'query_extensions'}->{'joined_fields'} );

	# We need to make an exception for lock=1 when using SQLite, since
	# SQLite doesn't support FOR UPDATE.
	# Per http://sqlite.org/cvstrac/wiki?p=UnsupportedSql, the entire
	# database is locked when updating any bit of it, so we can simply
	# ignore the locking request here.
	my $lock = '';
	if ( $args{'lock'} )
	{
		my $database_type = $dbh->{'Driver'}->{'Name'} || '';

lib/DBIx/NinjaORM.pm  view on Meta::CPAN

			"Performing pre-locking query:\n%s\nValues:\n%s",
			$query,
			\@query_values,
		) if $args{'show_queries'};

		my $locked_ids;
		try
		{
			local $dbh->{'RaiseError'} = 1;
			$locked_ids = $dbh->selectall_arrayref(
				$query,
				{
					Columns => [ 1 ],
				},
				@query_values

lib/DBIx/NinjaORM.pm  view on Meta::CPAN

				\@query_values,
			);
			croak "Failed select: $_";
		};

		if ( !defined( $locked_ids ) || ( scalar( @$locked_ids ) == 0 ) )
		{
			return [];
		}

		$where = sprintf(
			'WHERE %s.%s IN ( %s )',
			$quoted_table_name,
			$quoted_primary_key_name,
			join( ', ', ( ('?') x scalar( @$locked_ids ) ) ),
		);
		$where_values = [ [ map { $_->[0] } @$locked_ids ] ];
		$lock = '';
	}

	# Prepare the query elements.
	my $query = sprintf(

 view all matches for this distribution


DBIx-OnlineDDL

 view release on metacpan or  search on metacpan

lib/DBIx/OnlineDDL/Helper/SQLite.pm  view on Meta::CPAN


    # Disable /x flag to allow for whitespace within string, but turn it on for newlines
    # and comments.
    return $error =~ m<
        # Locks
        (?-x:database( table)? is locked)|

        # Connections
        (?-x:attempt to [\w\s]+ on inactive database handle)|

        # Queries

 view all matches for this distribution


DBIx-ParseError-MySQL

 view release on metacpan or  search on metacpan

lib/DBIx/ParseError/MySQL.pm  view on Meta::CPAN

        (?-x:Query execution was interrupted(?!, maximum statement execution time exceeded))|

        # Initial connection failure
        (?-x:Bad handshake)|
        (?-x:Too many connections)|
        (?-x:Host '\S+' is blocked because of many connection errors)|
        (?-x:Can't get hostname for your address)|
        (?-x:Can't connect to (?:local )?MySQL server)|

        # Packet corruption
        (?-x:Got a read error from the connection pipe)|

 view all matches for this distribution


DBIx-Path

 view release on metacpan or  search on metacpan

lib/DBIx/Path.pm  view on Meta::CPAN

	no strict 'refs';
	*{$field}=sub { $_[0]->{$field} }
}

{
    my $locked=0;
    sub _lock {
        my($me, $type)=@_;
        $locked++;
        if($locked == 1 and $me->{hooks}{lock}) {
            $me->{hooks}{lock}->($me->{dbh}, $type);
 	    }
    }
    sub _unlock {
        my($me, $type)=@_;
        if($locked == 1) {
            $me->{hooks}{unlock}->($me->{dbh}, $type) if $me->{hooks}{unlock};
		}
        elsif($locked == 0) {
            croak "DBIx::Path: PANIC: Key won't fit in lock";
		}
        $locked--;
    }
    END {
	    if($locked) {
            warn "DBIx::Path: WARNING: Program may have exited with lock(s) still held";
		}
    }
}

 view all matches for this distribution


DBIx-QueryByName

 view release on metacpan or  search on metacpan

lib/DBIx/QueryByName/SthPool.pm  view on Meta::CPAN

    while (1) {

        # Normally, if traffic between the client and the database
        # server is interupted (cable cut, whatever), the client will
        # timeout after 1min (observed on osx). But it has been
        # observed on some setups (client on linux, server blocked by
        # drop rule in firewall) that the client hang forever in
        # execute(). The following code is a workaround:
        #
        #         my $did_timeout = 0;
        #         eval {

 view all matches for this distribution


DBIx-Schema-Changelog

 view release on metacpan or  search on metacpan

examples/changelog/changelog-002-tables.yml  view on Meta::CPAN

      type: uuid
    - name: msg_user
      type: uuid
    - default: 0
      length: 1
      name: locked
      type: bit
    - default: now()
      name: last_read
      type: timestamp
    name: msg_session_members

 view all matches for this distribution


DBIx-Simple-Class

 view release on metacpan or  search on metacpan

t/01-dbix-simple-class-schema-mysql.t  view on Meta::CPAN

$dbix->query('DROP TABLE IF EXISTS `groups`');
$dbix->query(<<'TAB');
CREATE TABLE  IF NOT EXISTS groups(
  id INTEGER PRIMARY KEY AUTO_INCREMENT,
  group_name VARCHAR(12),
  `is blocked` INT,
  data TEXT

  ) DEFAULT CHARSET=utf8 COLLATE=utf8_bin
TAB

 view all matches for this distribution


DBIx-Struct

 view release on metacpan or  search on metacpan

README.pod  view on Meta::CPAN

   NoUser->throw("User is not logged in or does not exist") unless defined $session;
 # get client's row
   my $client = $session->Client;
 # strip microseconds part
   $client->filter_timestamp;
 # throw exception if client is blocked
   BlkUser->throw   if $client->state eq 'blocked';
 # set expire date
   $session->expire(\"now() + interval '2 day'");
 # update session
   $session->update;
 # get usd client's balance from client_balance

 view all matches for this distribution


DBIx-TextIndex

 view release on metacpan or  search on metacpan

lib/DBIx/TextIndex.pm  view on Meta::CPAN

	_log("field$fno ", scalar keys %{$self->{TERM_DOCS_VINT}->[$fno]},
             " distinct terms\n") if $PA;

	my $s_sth;

	# SQLite chokes with "database table is locked" unless s_sth
	# is finished before i_sth->execute
	unless ($self->{DBD_TYPE} eq 'SQLite') {
	    $s_sth = $self->{INDEX_DBH}->prepare(
		         $self->{DB}->inverted_select(
			    $self->{INVERTED_TABLES}->[$fno] ) );

 view all matches for this distribution


DBIx-TryAgain

 view release on metacpan or  search on metacpan

lib/DBIx/TryAgain.pm  view on Meta::CPAN


 my $dbh = DBI->connect(... dbi params.. { RootClass => "DBIx::TryAgain" } ) or die $DBI::errstr;

 $dbh->try_again_algorithm('fibonacci');
 $dbh->try_again_max_retries(5);
 $dbh->try_again_on_messages([ qr/database is locked/i ]);
 $dbh->try_again_on_prepare(1);

=head1 DESCRIPTION

This is a subclass of DBI which simply tries to execute a query
again whenever the error string matches a given set of patterns.

By default the only pattern is qr[database is locked], which is
what is returned by SQLite when the database is locked.

There is a delay between retries.  Setting try_again_algorithm
to 'constant', 'linear', 'fibonacci', or 'exponential' causes
the corresponding algorithm to be used.  The first five
values for these algorithsm are :

 view all matches for this distribution


DBIx-TxnPool

 view release on metacpan or  search on metacpan

lib/DBIx/TxnPool.pm  view on Meta::CPAN


The size of pool when a commit method will be called when feeding reaches the same size.

=item block_signals B<(Optional)>

An arrayref of signals (strings) which should be blocked in slippery places for
this I<pool>. Defaults are [ qw( TERM INT ) ]. You can change globaly this list
by setting: C<< $DBIx::TxnPool::BlockSignals = [ qw( TERM INT ALARM ... ) ] >>.
For details to see here L</"SIGNAL HANDLING">

=item max_repeated_deadlocks B<(Optional)>

 view all matches for this distribution


DBIx-Web

 view release on metacpan or  search on metacpan

lib/DBIx/Web.pod  view on Meta::CPAN

=item varLoad (?lock) -> self object

C<Persistent Variables>.
Loads variables into C<-var>.
Default lock level is LOCK_SH.
File will be locked until C<end> call.


=item varLock (?lock) -> success

C<Persistent Variables>.
Locks variables file.
Default is LOCK_EX.
File will be locked until C<end> call.


=item varStore () -> self

C<Persistent Variables>.
Stores C<-var> into variables file.
LOCK_EX is used.
File will be locked until C<end> call.


=item w32adhi () -> Active Directory Host Info object

C<User Identification>.

 view all matches for this distribution


DBIx-Wrapper

 view release on metacpan or  search on metacpan

lib/DBIx/Wrapper/Changes.pm  view on Meta::CPAN


=over 4

=item Fixed tests using SQLite

SQLite sometimes fails with a "database locked" error if the db
file is opened more than once.  This may be because File::Temp is
locking the file.

See RT 76411 (L<https://rt.cpan.org/Public/Bug/Display.html?id=76411>)

 view all matches for this distribution


DBM-Deep

 view release on metacpan or  search on metacpan

lib/DBM/Deep/Storage.pm  view on Meta::CPAN

Take a lock usable for reading.

=item * unlock( $obj )

Releases the last lock taken. If this is the outermost lock, then the
object is actually unlocked.

=back

=cut

 view all matches for this distribution


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