DBM-Deep
view release on metacpan or search on metacpan
t/44_upgrade_db.t
t/45_references.t
t/46_blist_reindex.t
t/47_odd_reference_behaviors.t
t/48_autoexport_after_delete.t
t/50_deletes.t
t/52_memory_leak.t
t/53_misc_transactions.t
t/54_output_punct_vars.t
t/55_recursion.t
t/56_unicode.t
t/57_old_db.t
t/58_cache.t
t/96_virtual_functions.t
t/97_dump_file.t
t/98_pod.t
t/99_pod_coverage.t
t/common.pm
t/etc/db-0-983
t/etc/db-0-99_04
t/etc/db-1-0000
These are the transactional functions. "TRANSACTIONS" for more
information.
* supports( $option )
This returns a boolean indicating whether this instance of DBM::Deep
supports that feature. $option can be one of:
* transactions
* unicode
* db_version()
This returns the version of the database format that the current
database is in. This is specified as the earliest version of
DBM::Deep that supports it.
For the File back end, this will be 1.0003 or 2.
For the DBI back end, it is currently always 1.0020.
lib/DBM/Deep.pod view on Meta::CPAN
X<supports>
This returns a boolean indicating whether this instance of DBM::Deep
supports that feature. C<$option> can be one of:
=over 4
=item * transactions
X<translation>
=item * unicode
X<unicode>
=back
=item * db_version()
X<db_version>
This returns the version of the database format that the current database
is in. This is specified as the earliest version of DBM::Deep that supports
it.
lib/DBM/Deep/Engine/File.pm view on Meta::CPAN
sub set_chains_loc { $_[0]{chains_loc} = $_[1] }
sub supports {
my $self = shift;
my ($feature) = @_;
if ( $feature eq 'transactions' ) {
return $self->num_txns > 1;
}
return 1 if $feature eq 'singletons';
return 1 if $feature eq 'unicode';
return;
}
sub db_version {
return $_[0]{v} == 3 ? '1.0003' : 2;
}
sub clear {
my $self = shift;
my $obj = shift;
t/56_unicode.t view on Meta::CPAN
use utf8;
use DBM::Deep;
my $dbm_factory = new_dbm();
while ( my $dbm_maker = $dbm_factory->() ) {
my $db = $dbm_maker->();
SKIP: {
skip "This engine does not support Unicode", 1
unless $db->supports( 'unicode' );
my $quote
= 'á¼Î³á½³Î½ÎµÏο δὲ λόγῳ μὲν δημοκÏαÏία, λόγῳ δὲ Ïοῦ ÏÏá½½ÏοÏ
á¼Î½Î´Ïá½¸Ï á¼ÏÏá½µ.'
.' âÎοÏ
κÏ
δίδηÏ';
$db->{'ÑÑкÑÑ'} = $quote;
is join("-", keys %$db), 'ÑÑкÑÑ', 'Unicode keys';
is $db->{'ÑÑкÑÑ'}, $quote, 'Unicode values';
{
( run in 0.629 second using v1.01-cache-2.11-cpan-88abd93f124 )