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


DBD-ODBC

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    data was in, in the database. This was inconvenient and arguably a
    mistake. Columns like nchar/nvarchar etc were bound as SQL_WCHAR and
    returned as Unicode. This release changes the behaviour in a unicode
    build of DBD::ODBC to bind all char columns as SQL_WCHAR. This may
    inconvenience a few people who expected 8bit chars back, knew the
    char set and decoded them (sorry). See odbc_old_unicode to return
    to old behaviour.

  [ENHANCEMENTS]

  * added -w option to Makefile.PL to add "-Wall" to CCFLAGS and

 view all matches for this distribution


DBD-Oracle

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


   - OCI_THREADED setting had been accidentally removed, causing potential
    crashes when using threads. (RT#92229, Martin J. Evans, reported
    by Detlef Lütticke)

  - When using fetch*_hashref the values are decoded but
    not the keys so if you have unicode column names they were not
    returned correctly.  (RT#92134, Martin J. Evans, reported by
    Marcel Montes)


 view all matches for this distribution


DBD-Patroni

 view release on metacpan or  search on metacpan

lib/DBD/Patroni.pm  view on Meta::CPAN

    for my $url ( split /[,\s]+/, $urls ) {
        next unless $url;
        my $resp = $ua->get($url);
        next unless $resp->is_success;

        my $data = eval { JSON::decode_json( $resp->decoded_content ) };
        next if $@ or !$data->{members} or ref( $data->{members} ) ne 'ARRAY';

        my ($leader) = grep { $_->{role} eq 'leader' } @{ $data->{members} };
        my @replicas = grep { $_->{role} ne 'leader' } @{ $data->{members} };

 view all matches for this distribution


DBD-SQLcipher

 view release on metacpan or  search on metacpan

sqlite3.c  view on Meta::CPAN

#define PTF_LEAF      0x08

/*
** As each page of the file is loaded into memory, an instance of the following
** structure is appended and initialized to zero.  This structure stores
** information about the page that is decoded from the raw file page.
**
** The pParent field points back to the parent page.  This allows us to
** walk up the BTree from any leaf to the root.  Care must be taken to
** unref() the parent page pointer when this page is no longer referenced.
** The pageDestructor() routine handles that chore.

sqlite3.c  view on Meta::CPAN

}

/*
** Given the nKey-byte encoding of a record in pKey[], populate the 
** UnpackedRecord structure indicated by the fourth argument with the
** contents of the decoded record.
*/ 
SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(
  KeyInfo *pKeyInfo,     /* Information about the record format */
  int nKey,              /* Size of the binary record */
  const void *pKey,      /* The binary record */

sqlite3.c  view on Meta::CPAN

  BtCursor *pCrsr;   /* The BTree cursor */
  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
  int len;           /* The length of the serialized data for the column */
  int i;             /* Loop counter */
  Mem *pDest;        /* Where to write the extracted value */
  Mem sMem;          /* For storing the record being decoded */
  const u8 *zData;   /* Part of the record being decoded */
  const u8 *zHdr;    /* Next unparsed byte of the header */
  const u8 *zEndHdr; /* Pointer to first byte after the header */
  u32 offset;        /* Offset into the data */
  u32 szField;       /* Number of bytes in the content of a field */
  u32 avail;         /* Number of bytes of available data */

sqlite3.c  view on Meta::CPAN

** Attempt the transfer optimization on INSERTs of the form
**
**     INSERT INTO tab1 SELECT * FROM tab2;
**
** The xfer optimization transfers raw records from tab2 over to tab1.  
** Columns are not decoded and reassembled, which greatly improves
** performance.  Raw index records are transferred in the same way.
**
** The xfer optimization is only attempted if tab1 and tab2 are compatible.
** There are lots of rules for determining compatibility - see comments
** embedded in the code for details.

sqlite3.c  view on Meta::CPAN

/*
** Convert raw bits from the on-disk RTree record into a coordinate value.
** The on-disk format is big-endian and needs to be converted for little-
** endian platforms.  The on-disk record stores integer coordinates if
** eInt is true and it stores 32-bit floating point records if eInt is
** false.  a[] is the four bytes of the on-disk record to be decoded.
** Store the results in "r".
**
** There are three versions of this macro, one each for little-endian and
** big-endian processors and a third generic implementation.  The endian-
** specific implementations are much faster and are preferred if the

sqlite3.c  view on Meta::CPAN

** implementation will only be used if this module is compiled as part
** of the amalgamation.
*/
#if defined(SQLITE_BYTEORDER) && SQLITE_BYTEORDER==1234
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    c.u = ((c.u>>24)&0xff)|((c.u>>8)&0xff00)|                   \
          ((c.u&0xff)<<24)|((c.u&0xff00)<<8);                   \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif defined(SQLITE_BYTEORDER) && SQLITE_BYTEORDER==4321
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#else
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16)                     \
           +((u32)a[2]<<8) + a[3];                              \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#endif

 view all matches for this distribution


DBD-SQLeet

 view release on metacpan or  search on metacpan

sqlite3.c  view on Meta::CPAN

** the last integer which is specified by three characters.  The meaning
** of a four-character format specifiers ABCD is:
**
**    A:   number of digits to convert.  Always "2" or "4".
**    B:   minimum value.  Always "0" or "1".
**    C:   maximum value, decoded as:
**           a:  12
**           b:  14
**           c:  24
**           d:  31
**           e:  59

sqlite3.c  view on Meta::CPAN

}

/*
** Given the nKey-byte encoding of a record in pKey[], populate the 
** UnpackedRecord structure indicated by the fourth argument with the
** contents of the decoded record.
*/ 
SQLITE_PRIVATE void sqlite3VdbeRecordUnpack(
  KeyInfo *pKeyInfo,     /* Information about the record format */
  int nKey,              /* Size of the binary record */
  const void *pKey,      /* The binary record */

sqlite3.c  view on Meta::CPAN

  BtCursor *pCrsr;   /* The BTree cursor */
  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
  int len;           /* The length of the serialized data for the column */
  int i;             /* Loop counter */
  Mem *pDest;        /* Where to write the extracted value */
  Mem sMem;          /* For storing the record being decoded */
  const u8 *zData;   /* Part of the record being decoded */
  const u8 *zHdr;    /* Next unparsed byte of the header */
  const u8 *zEndHdr; /* Pointer to first byte after the header */
  u64 offset64;      /* 64-bit offset */
  u32 t;             /* A type code from the record header */
  Mem *pReg;         /* PseudoTable input register */

sqlite3.c  view on Meta::CPAN

**
** P2 is a register that holds the name of a virtual table in database 
** P1. Call the xCreate method for that table.
*/
case OP_VCreate: {
  Mem sMem;          /* For storing the record being decoded */
  const char *zTab;  /* Name of the virtual table */

  memset(&sMem, 0, sizeof(sMem));
  sMem.db = db;
  /* Because P2 is always a static string, it is impossible for the

sqlite3.c  view on Meta::CPAN

** Attempt the transfer optimization on INSERTs of the form
**
**     INSERT INTO tab1 SELECT * FROM tab2;
**
** The xfer optimization transfers raw records from tab2 over to tab1.  
** Columns are not decoded and reassembled, which greatly improves
** performance.  Raw index records are transferred in the same way.
**
** The xfer optimization is only attempted if tab1 and tab2 are compatible.
** There are lots of rules for determining compatibility - see comments
** embedded in the code for details.

sqlite3.c  view on Meta::CPAN

/*
** Convert raw bits from the on-disk RTree record into a coordinate value.
** The on-disk format is big-endian and needs to be converted for little-
** endian platforms.  The on-disk record stores integer coordinates if
** eInt is true and it stores 32-bit floating point records if eInt is
** false.  a[] is the four bytes of the on-disk record to be decoded.
** Store the results in "r".
**
** There are five versions of this macro.  The last one is generic.  The
** other four are various architectures-specific optimizations.
*/
#if SQLITE_BYTEORDER==1234 && MSVC_VERSION>=1300
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = _byteswap_ulong(*(u32*)a);                            \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif SQLITE_BYTEORDER==1234 && GCC_VERSION>=4003000
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = __builtin_bswap32(*(u32*)a);                          \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif SQLITE_BYTEORDER==1234
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    c.u = ((c.u>>24)&0xff)|((c.u>>8)&0xff00)|                   \
          ((c.u&0xff)<<24)|((c.u&0xff00)<<8);                   \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#elif SQLITE_BYTEORDER==4321
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    memcpy(&c.u,a,4);                                           \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#else
#define RTREE_DECODE_COORD(eInt, a, r) {                        \
    RtreeCoord c;    /* Coordinate decoded */                   \
    c.u = ((u32)a[0]<<24) + ((u32)a[1]<<16)                     \
           +((u32)a[2]<<8) + a[3];                              \
    r = eInt ? (sqlite3_rtree_dbl)c.i : (sqlite3_rtree_dbl)c.f; \
}
#endif

sqlite3.c  view on Meta::CPAN

static void fts5DecodeFunction(
  sqlite3_context *pCtx,          /* Function call context */
  int nArg,                       /* Number of args (always 2) */
  sqlite3_value **apVal           /* Function arguments */
){
  i64 iRowid;                     /* Rowid for record being decoded */
  int iSegid,iHeight,iPgno,bDlidx;/* Rowid components */
  const u8 *aBlob; int n;         /* Record to decode */
  u8 *a = 0;
  Fts5Buffer s;                   /* Build up text to return here */
  int rc = SQLITE_OK;             /* Return code */

 view all matches for this distribution


DBD-SQLite-Amalgamation

 view release on metacpan or  search on metacpan

sqlite-amalgamation.c  view on Meta::CPAN

#define PTF_LEAF      0x08

/*
** As each page of the file is loaded into memory, an instance of the following
** structure is appended and initialized to zero.  This structure stores
** information about the page that is decoded from the raw file page.
**
** The pParent field points back to the parent page.  This allows us to
** walk up the BTree from any leaf to the root.  Care must be taken to
** unref() the parent page pointer when this page is no longer referenced.
** The pageDestructor() routine handles that chore.

sqlite-amalgamation.c  view on Meta::CPAN

  u32 *aType;        /* aType[i] holds the numeric type of the i-th column */
  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
  u32 nField;        /* number of fields in the record */
  int len;           /* The length of the serialized data for the column */
  int i;             /* Loop counter */
  char *zData;       /* Part of the record being decoded */
  Mem *pDest;        /* Where to write the extracted value */
  Mem sMem;          /* For storing the record being decoded */

  sMem.flags = 0;
  sMem.db = 0;
  sMem.zMalloc = 0;
  assert( p1<p->nCursor );

sqlite-amalgamation.c  view on Meta::CPAN

**
**    (6)  The SELECT statement is a simple (not a compound) select that
**         contains only tab2 in its FROM clause
**
** This method for implementing the INSERT transfers raw records from
** tab2 over to tab1.  The columns are not decoded.  Raw records from
** the indices of tab2 are transfered to tab1 as well.  In so doing,
** the resulting tab1 has much less fragmentation.
**
** This routine returns TRUE if the optimization is attempted.  If any
** of the conditions above fail so that the optimization should not

sqlite-amalgamation.c  view on Meta::CPAN

static void dlrDestroy(DLReader *pReader){
  SCRAMBLE(pReader);
}

#ifndef NDEBUG
/* Verify that the doclist can be validly decoded.  Also returns the
** last docid found because it is convenient in other assertions for
** DLWriter.
*/
static void docListValidate(DocListType iType, const char *pData, int nData,
                            sqlite_int64 *pLastDocid){

sqlite-amalgamation.c  view on Meta::CPAN

** case the first item would be delta-encoded.
**
** iLastDocid is the final docid in the doclist in pData.  It is
** needed to create the new iPrevDocid for future delta-encoding.  The
** code could decode the passed doclist to recreate iLastDocid, but
** the only current user (docListMerge) already has decoded this
** information.
*/
/* TODO(shess) This has become just a helper for docListMerge.
** Consider a refactor to make this cleaner.
*/

sqlite-amalgamation.c  view on Meta::CPAN

}

/*******************************************************************/
/* PLReader is used to read data from a document's position list.  As
** the caller steps through the list, data is cached so that varints
** only need to be decoded once.
**
** plrInit, plrDestroy - create/destroy a reader.
** plrColumn, plrPosition, plrStartOffset, plrEndOffset - accessors
** plrAtEnd - at end of stream, only call plrDestroy once true.
** plrStep - step to the next element.

 view all matches for this distribution


DBD-SQLite

 view release on metacpan or  search on metacpan

lib/DBD/SQLite.pm  view on Meta::CPAN

binary data, pre-encoded UTF-8 strings, etc.

=item * DBD_SQLITE_STRING_MODE_UNICODE_FALLBACK: All Perl strings are encoded
to UTF-8 before being given to SQLite. Perl will B<try> to decode SQLite
strings as UTF-8 when giving them to Perl. Should any such string not be
valid UTF-8, a warning is thrown, and the string is left undecoded.

This is appropriate for strings that are decoded to characters via,
e.g., L<Encode/decode>.

Also note that, due to some bizarreness in SQLite's type system (see
L<https://www.sqlite.org/datatype3.html>), if you want to retain
blob-style behavior for B<some> columns under DBD_SQLITE_STRING_MODE_UNICODE_FALLBACK

lib/DBD/SQLite.pm  view on Meta::CPAN

  SELECT * FROM foo ORDER BY name COLLATE perllocale

=head2 Unicode handling

Depending on the C<< $dbh->{sqlite_string_mode} >> value, strings coming
from the database and passed to the collation function may be decoded as
UTF-8. This only works, though, if the C<sqlite_string_mode> attribute is
set B<before> the first call to a perl collation sequence. The recommended
way to activate unicode is to set C<sqlite_string_mode> at connection time:

  my $dbh = DBI->connect(

 view all matches for this distribution


DBD-SQLite2

 view release on metacpan or  search on metacpan

dbdimp.c  view on Meta::CPAN

    for (i = 0; i < numFields; i++) {
        char *val = imp_sth->results[i];
        /* warn("fetching: %d == %s\n", i, val); */
        if (val != NULL) {
            size_t len = strlen(val);
            char *decoded;
            if (chopBlanks) {
                val = savepv(val);
                while(len > 0 && val[len-1] == ' ') {
                    len--;
                }
                val[len] = '\0';
            }
            decoded = sqlite2_decode(imp_dbh, val, &len);
            sv_setpvn(AvARRAY(av)[i], decoded, len);
            Safefree(decoded);
            if (chopBlanks) Safefree(val);

            /* if (!imp_dbh->no_utf8_flag) {
            sv_utf8_encode(AvARRAY(av)[i]);
            } */

 view all matches for this distribution


DBD-XBase

 view release on metacpan or  search on metacpan

lib/XBase/Index.pm  view on Meta::CPAN


(this -type option may not work with all index formats at the moment
-- will be fixed and patches always welcome).

You can use C<-ddebug> option to indexdump to see how pages are
fetched and decoded, or run debugger to see the calls and parsing.

=head2 Using the index files to speed up searches in dbf

The syntax for using the index files to access data in the dbf file is
generally

 view all matches for this distribution


DBD-cubrid

 view release on metacpan or  search on metacpan

cci-src/src/cci/cci_handle_mng.c  view on Meta::CPAN

      for (i = 0; i < fetched_tuple; i++)
	{
#if defined(WINDOWS)
	  for (j = 0; j < req_handle->num_col_info; j++)
	    {
	      FREE_MEM (req_handle->tuple_value[i].decoded_ptr[j]);
	    }

	  FREE_MEM (req_handle->tuple_value[i].decoded_ptr);
#endif
	  FREE_MEM (req_handle->tuple_value[i].column_ptr);
	}
      FREE_MEM (req_handle->tuple_value);
    }

 view all matches for this distribution


DBD-mysql

 view release on metacpan or  search on metacpan

lib/DBD/mysql.pm  view on Meta::CPAN

  $sth->bind_param(2, $byte_param, DBI::SQL_BINARY); # set correct binary type

  $sth->execute();

  my $output = $sth->fetchall_arrayref();
  # returned data in $output reference should be already UTF-8 decoded as appropriate

=item mysql_enable_utf8mb4

This is similar to mysql_enable_utf8, but is capable of handling 4-byte
UTF-8 characters.

 view all matches for this distribution


DBGp-Client

 view release on metacpan or  search on metacpan

lib/DBGp/Client/Response.pod  view on Meta::CPAN


=item type

=item content

decoded content

=back

=head2 notify

lib/DBGp/Client/Response.pod  view on Meta::CPAN


It always returns C<0> unless C<children> is true

=item value

The decoded value of scalar properties (typically useful when
C<children> is false).

=item childs

Array of C<DBGp::Client::Response::Property> objects. Returns an empty

 view all matches for this distribution


DBI

 view release on metacpan or  search on metacpan

ex/unicode_test.pl  view on Meta::CPAN


# NOTE: some DBs may uppercase table names
sub find_table {
    my ($h, $table) = @_;

    # won't find a match if the returned data is not utf8 decoded
    my $s = $h->table_info(undef, undef, undef, 'TABLE');
    my $r = $s->fetchall_arrayref;
    my $found = first { $_->[2] =~ /$table/i} @$r;
    ok($found, 'unicode table found in unqualified table_info');

    SKIP: {
          skip "table found via table_info", 1 if $found;

          $found = first { Encode::decode_utf8($_->[2]) =~ /$table/i} @$r;
          ok(!$found, "Table not found initially but when table name decoded it was found as $table");
    };
    my $found_some_utf8_tables;
    foreach ($r) {
        $found_some_utf8_tables++ if Encode::is_utf8($_->[2]);
    }

 view all matches for this distribution


DBIO-GraphQL

 view release on metacpan or  search on metacpan

lib/DBIO/GraphQL.pm  view on Meta::CPAN

  if (my $cursor_args = $args->{cursor}) {
    my $first = $cursor_args->{first} // 10;
    my $after = $cursor_args->{after};

    if ($after) {
      my @decoded = _decode_cursor($after);
      if (@pk_cols == 1) {
        $rs = $rs->search({ $pk_cols[0] => { '>' => $decoded[0] } });
      }
      else {
        my %after_cond = map { $pk_cols[$_] => { '>' => $decoded[$_] } }
                             0 .. $#pk_cols;
        $rs = $rs->search(\%after_cond);
      }
    }

 view all matches for this distribution


DBIO-PostgreSQL-Age

 view release on metacpan or  search on metacpan

lib/DBIO/PostgreSQL/Age/Storage.pm  view on Meta::CPAN


  my $first = substr($raw, 0, 1);

  # Map or list: hand off to JSON.
  if ($first eq '{' || $first eq '[') {
    my $decoded = eval { $JSON->decode($raw) };
    return $decoded unless $@;
    return $raw;
  }

  # Quoted string scalar: "foo" -> foo. Decode any JSON-escaped chars.
  if ($first eq '"') {
    my $decoded = eval { $JSON->decode($raw) };
    return $decoded unless $@;
    # Fallback: naive strip of outer quotes.
    my $inner = substr($raw, 1, length($raw) - 2);
    return $inner;
  }

lib/DBIO/PostgreSQL/Age/Storage.pm  view on Meta::CPAN

(L<DBIO::PostgreSQL::Age::Storage::Async>) so sync and async build identical SQL
and decode identically.

All result columns from C<cypher()> are declared as C<agtype> — Apache AGE's
JSON-superset type that represents vertices, edges, paths, and scalar values.
Values are returned as strings and can be decoded with a JSON parser.

=head1 METHODS

=head2 connect_call_load_age

lib/DBIO/PostgreSQL/Age/Storage.pm  view on Meta::CPAN

=item * Vertex / edge — same as the underlying map; a trailing C<::vertex> /
C<::edge> cast annotation (only emitted by older AGE versions) is stripped
before decoding. C<id>, C<label>, C<start_id>, C<end_id>, C<properties> are
preserved as JSON keys.

=item * Path — arrayref of decoded vertices and edges (structure preserved,
not unwrapped)

=item * Anything else — returned as-is so the caller can post-process it

=back

 view all matches for this distribution


DBIO-PostgreSQL-PostGIS

 view release on metacpan or  search on metacpan

lib/DBIO/PostgreSQL/PostGIS/Geometry.pm  view on Meta::CPAN

}


sub from_ewkb_hex {
  my ($class, $hex) = @_;
  my $decoded = eval {
    DBIO::PostgreSQL::PostGIS::Codec::WKB::Decoder->decode_hex($hex);
  };
  return undef unless $decoded && $decoded->{type} ne 'unknown';
  return $class->new(
    ewkb_hex      => $hex,
    srid          => $decoded->{srid},
    geometry_type => $decoded->{type},
    coordinates   => $decoded->{coords},
  );
}


sub point {

lib/DBIO/PostgreSQL/PostGIS/Geometry.pm  view on Meta::CPAN

=head2 from_ewkb_hex

  my $g = DBIO::PostgreSQL::PostGIS::Geometry->from_ewkb_hex($hex);

Constructs from PostGIS's default hex-encoded EWKB output. Stores the
hex unparsed; geometry_type/coordinates are decoded lazily on demand.

=head2 point

  my $p = DBIO::PostgreSQL::PostGIS::Geometry->point($x, $y, srid => 4326);
  my $p = DBIO::PostgreSQL::PostGIS::Geometry->point($x, $y, $z, srid => 4326);

 view all matches for this distribution


DBIO-PostgreSQL

 view release on metacpan or  search on metacpan

lib/DBIO/PostgreSQL/Introspect/Policies.pm  view on Meta::CPAN

version 0.900001

=head1 DESCRIPTION

Fetches Row Level Security policy metadata from C<pg_catalog.pg_policy>.
Policy command types and USING/WITH CHECK expressions are decoded from
PostgreSQL's internal representation.

=head1 METHODS

=head2 fetch

 view all matches for this distribution


DBIO

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        - Make resultset chaining consistent wrt selection specification
        - Storage::DBI::Replicated cleanup
        - Fix autoinc PKs without an autoinc flag on Sybase ASA

0.08118 2010-02-08 11:53:00 (UTC)
        - Fix a bug causing UTF8 columns not to be decoded (RT#54395)
        - Fix bug in One->Many->One prefetch-collapse handling (RT#54039)
        - Cleanup handling of relationship accessor types

0.08117 2010-02-05 17:10:00 (UTC)
        - Perl 5.8.1 is now the minimum supported version

 view all matches for this distribution


DBIx-Class-Async

 view release on metacpan or  search on metacpan

lib/DBIx/Class/Async/Schema.pm  view on Meta::CPAN

                $map->{$source_name}{$col} = {
                    inflate => sub {
                        my $val = shift;
                        return $val if !defined $val || ref($val);

                        my $decoded;
                        eval  {
                            $decoded = $json->decode($val); 1;
                        }
                        or do {
                            warn "Failed to inflate JSON in $col: $@ (Value: $val)";
                            return $val;
                        };
                        return $decoded;
                    },
                    deflate => sub {
                        my $val = shift;
                        return $val if !defined $val || !ref($val);

 view all matches for this distribution


DBIx-Class-EncodeColumns

 view release on metacpan or  search on metacpan

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

=head1 METHODS

=head2 decode_columns($encoding)

Use this function to set the default encoding of all your columns.
The data of all columns will be decoded to internal encoding of perl.

=cut

=head2 encode_columns($encoding)

 view all matches for this distribution


DBIx-Class-Schema-GraphQL

 view release on metacpan or  search on metacpan

lib/DBIx/Class/Schema/GraphQL.pm  view on Meta::CPAN

    if (my $cursor_args = $args->{cursor}) {
        my $first = $cursor_args->{first} // 10;
        my $after = $cursor_args->{after};

        if ($after) {
            my @decoded = _decode_cursor($after);
            if (@pk_cols == 1) {
                # Simple: WHERE pk > cursor_val (works for ordered-by-PK default)
                $rs = $rs->search({ $pk_cols[0] => { '>' => $decoded[0] } });
            }
            else {
                # Composite PK: fetch everything after decoded position
                # by re-applying a compound condition
                my %after_cond = map { $pk_cols[$_] => { '>' => $decoded[$_] } }
                                     0 .. $#pk_cols;
                $rs = $rs->search(\%after_cond);
            }
        }

 view all matches for this distribution


DBIx-Class

 view release on metacpan or  search on metacpan

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

    $self->next::method( $column, $value );

    return $copy || $value;
}

# override this if you want to force everything to be encoded/decoded
sub _is_utf8_column {
  # my ($self, $col) = @_;
  return ($_[0]->utf8_columns || {})->{$_[1]};
}

 view all matches for this distribution


DBIx-Oracle-Unwrap

 view release on metacpan or  search on metacpan

lib/DBIx/Oracle/Unwrap.pm  view on Meta::CPAN


=head1 METHODS

=cut

# this is the substituion table. All the characters in the base64 decoded text
# must be replaced with its lookup

Readonly::Array my @sub_table => (
    0x3d, 0x65, 0x85, 0xb3, 0x18, 0xdb, 0xe2, 0x87, 0xf1, 0x52, 0xab, 0x63,
    0x4b, 0xb5, 0xa0, 0x5f, 0x7d, 0x68, 0x7b, 0x9b, 0x24, 0xc2, 0x28, 0x67,

lib/DBIx/Oracle/Unwrap.pm  view on Meta::CPAN

    my $text = shift;
    
    return unless $text;

    # Decode text and ignore the SHA1 hash (first 20 characters)
    my $decoded = substr(decode_base64($text), 20, length($text) - 1);
    return unless $decoded;

    my ($zipped, $source);

    #Translate each character
    foreach my $byte (split //, $decoded) {
        $zipped .= chr($sub_table[ord($byte)]);
    }

    # Uncompress (inflate) the data
    my $status = inflate \$zipped => \$source

 view all matches for this distribution


DBIx-QuickORM

 view release on metacpan or  search on metacpan

lib/DBIx/QuickORM/Row.pm  view on Meta::CPAN

    return undef unless exists $from->{$field};
    my $val = $from->{$field};

    # A staged SQL literal (\'NOW()' or [\'expr ?', @binds]) is not table data;
    # it must pass through untouched. Deflating it would corrupt the literal.
    # This is deliberately narrow: a decoded JSON hashref/arrayref is data and
    # must still be deflated back to its stored form, so only literal shapes
    # pass through here.
    return $val if literal_write_value($val);

    return $val->qorm_deflate($self->conflate_args($field, $val))

 view all matches for this distribution


DBIx-Schema-Annotate

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension DBIx-Schema-Annotate

0.06 2015-05-26T08:48:55Z

    - table ddl acquired from database is decoded

0.05 2015-05-21T06:07:10Z

    - not do anything if there is no difference

 view all matches for this distribution


DBIx-Squirrel

 view release on metacpan or  search on metacpan

lib/DBIx/Squirrel/Crypt/Fernet.pm  view on Meta::CPAN

    $obj = DBIx::Squirrel::Crypt::Fernet->new($key);

A constructor (also see L<Fernet>).

If no arguments are passed then a random 32-byte Fernet key is generated. If
a Base64-encoded key is passed then it will be decoded and its signing and
encryption key fields extracted.

Take care never to display the binary signing and extraction keys, but to use
the C<to_string> method (or stringification) to recombine them into a Base64-
encoded Fernet key.

lib/DBIx/Squirrel/Crypt/Fernet.pm  view on Meta::CPAN

Alternative constructor (also see L<new>).

Returns a new C<DBIx::Squirrel::Crypt::Fernet> object.

If no arguments are passed then a random 32-byte Fernet key is generated. If
a Base64-encoded key is passed then it will be decoded and its signing and
encryption key fields extracted.

Take care never to display the binary signing and extraction keys, but to use
the C<to_string> method (or stringification) to recombine them into a Base64-
encoded Fernet key.

 view all matches for this distribution


DBIx-XML_RDB

 view release on metacpan or  search on metacpan

XML_RDB.pm  view on Meta::CPAN

Another use is a simple database extraction tool, which is included, called sql2xml.
This tool simply dumps a table in a database to an XML file. This can be used in
conjunction with xml2sql (part of the XML::DBI(?) package) to transfer databases
from one platform or database server to another.

Binary data is encoded using UTF-8. This is automatically decoded when parsing
with XML::Parser.

Included with the distribution is a "Scriptlet" - this is basically a Win32 OLE
wrapper around this class, allowing you to call this module from any application
that supports OLE. To install it, first install the scriptlets download from

 view all matches for this distribution


DDC-Concordance

 view release on metacpan or  search on metacpan

lib/DDC/Client.pm  view on Meta::CPAN

  my $msg = join('',@_);
  $msg = encode($dc->{encoding},$msg) if ($dc->{encoding} && utf8::is_utf8($msg));
  return pack($ifmt,length($msg)) . $msg;
}

## $decoded = $dc->ddc_decode($response_buf)
sub ddc_decode {
  my $dc  = shift;
  my $buf = unpack("$ifmt/a*",$_[0]);
  $buf = decode($dc->{encoding},$buf) if ($dc->{encoding});
  return $buf;

 view all matches for this distribution


DDC-XS

 view release on metacpan or  search on metacpan

XS/CQuery.pod  view on Meta::CPAN

to the latter.


=head1 KNOWN BUGS

Objects should be transparently encoded/decoded to and from perl hash representations.

=head1 SEE ALSO

perl(1),
DDC::XS(3perl),

 view all matches for this distribution


DDCCI

 view release on metacpan or  search on metacpan

lib/DDCCI.pm  view on Meta::CPAN

	# create a new object, using first found monitor
	my $ddcci = DDCCI->new($monitors->[0]->{'dev'});

	# get monitor EDID and decode it
	my $edid = $ddcci->read_edid();
	my $decoded = decode_edid($edid);
	print "id: $decoded->{'id'}, s/n: $decoded->{'sn'}, type: $decoded->{'type'}\n";

	# get monitor capabilities (from the firmware)
	my $caps = $ddcci->read_caps();
	print "Monitor capabilities: $cap\n";

 view all matches for this distribution


( run in 1.244 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )