ARSperl
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
#
sub findAPIVersion {
my $path_to_api_dir = shift;
my $ar_fname = join('/', $path_to_api_dir, 'include', 'ar.h');
open ($ar_fh, '<'. $ar_fname) or
die "couldn't open ar.h include file from: \"$ar_fname\": $!\n";
my $api_version = undef;
# the line we want to parse looks like:
#
##define AR_CURRENT_API_VERSION 10 /* current api version */
while (<$ar_fh>) {
chomp;
if (m/^\s*#define\s*AR_CURRENT_API_VERSION\s*(\d+)/) {
$api_version = $1;
last;
}
}
html/manual/ars_GetListEntryWithFields.html view on Meta::CPAN
list of hash references a la <code>ars_GetListEntry</code>. If not specified, the default
result list fields for the schema are returned.
</p>
<p>
The other arguments are identical in function to <code><a href=
"ars_GetListEntry.html">ars_GetListEntry</a></code>.
</p>
<p>
The format of the returned list/hash is <i>(entry_id, {field_value_hash})</i> pairs. The
returned list can be stored in an array or hash. Using an array preserves the sort order, if
one was specified. Each referenced field_value_hash looks like the return of a single
<code>ars_GetEntry</code> call: the hash keys are the fieldIDs and the hash values are the
field values.
</p>
<p></p>
<dl>
<dt class="c1">
On success
</dt>
<dd>
Returns a list of <i>(entry_id, {field_value_hash})</i> pairs.
{
HV *hash = newHV();
hv_store(hash, "commonProps", strlen("commonProps") ,
perl_ARList(ctrl,
(ARList *) & in->commonProps,
(ARS_fn) perl_ARPropStruct,
sizeof(ARPropStruct)), 0);
/*
* the part of ARDisplayInstanceList after ARPropList looks like
* ARS's other list structures, so take address of numItems field and
* pass that to perl_ARList
*/
hv_store(hash, "numItems", strlen("numItems") , newSViv(in->numItems), 0);
hv_store(hash, "dInstanceList", strlen("dInstanceList") ,
perl_ARList(ctrl,
(ARList *) & in->numItems,
(ARS_fn) perl_ARDisplayInstanceStruct,
sizeof(ARDisplayInstanceStruct)), 0);
( run in 0.443 second using v1.01-cache-2.11-cpan-64827b87656 )