view release on metacpan or search on metacpan
lib/Data/URIID/Service.pm view on Meta::CPAN
P10689 => 'osm-way',
P10787 => 'factgrid-identifier',
P11693 => 'osm-node',
(map {$_ => 'musicbrainz-identifier'} @musicbrainz_wikidata_relations),
},
endpoint => {
sparql => 'https://query.wikidata.org/sparql',
entitydata => 'https://www.wikidata.org/wiki/Special:EntityData/%s.json?flavor=dump',
},
prefix => 'http://www.wikidata.org/entity/',
uuid_relations => \@musicbrainz_wikidata_relations,
lib/Data/URIID/Service.pm view on Meta::CPAN
idmap => {
P76 => 'gnd-identifier',
P378 => 'viaf-identifier',
P980 => 'iconclass-identifier',
},
endpoint => {
sparql => 'https://database.factgrid.de/sparql',
entitydata => 'https://database.factgrid.de/wiki/Special:EntityData/%s.json?flavor=dump',
},
prefix => 'https://database.factgrid.de/entity/',
attributes => [
lib/Data/URIID/Service.pm view on Meta::CPAN
return undef unless scalar @ids;
{
my $q = sprintf('SELECT * WHERE { { %s } } LIMIT 1', join('} UNION {', @ids));
my $res = $self->_get_json($config->{endpoint}{sparql}, query => {format => 'json', query => $q});
my $item = eval {$res->{results}{bindings}[0]{item}};
return undef unless $item;
return undef unless ($item->{type} // '') eq 'uri';
if (($item->{value} // '') =~ m#^\Q$config->{prefix}\E([QP][1-9][0-9]*)$#) {
return $1;
lib/Data/URIID/Service.pm view on Meta::CPAN
sub _online_lookup__wikibase__stage_1 {
my ($self, $result, $id, $config) = @_;
my %ids = ($config->{type} => $id);
my %attr;
my %res = (id => \%ids, attributes => \%attr);
my $data = $self->_get_json(sprintf($config->{endpoint}{entitydata}, $id), local_override => ['%s.json', $id]);
$data = $data->{entities}{$id};
$attr{displayname} = {map {$_ => $data->{labels}{$_}{value}} keys %{$data->{labels}}};
$attr{description} = {map {$_ => $data->{descriptions}{$_}{value}} keys %{$data->{descriptions}}};
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Database/Async/Engine/PostgreSQL.pm view on Meta::CPAN
# socket and other types.
$self->{uri} ||= $self->uri_for_service($self->service) if $self->service;
my $uri = $self->uri;
die 'bad URI' unless ref $uri;
$log->tracef('URI for connection is %s', "$uri");
my $endpoint = join ':', $uri->host, $uri->port;
$log->tracef('Will connect to %s', $endpoint);
$self->{ssl} = do {
my $mode = $uri->query_param('sslmode') // 'prefer';
$Protocol::Database::PostgreSQL::Constants::SSL_NAME_MAP{$mode} // die 'unknown SSL mode ' . $mode;
};
lib/Database/Async/Engine/PostgreSQL.pm view on Meta::CPAN
my $sock = await $loop->connect(@connect_params);
if ($sock->sockdomain == Socket::PF_INET or $sock->sockdomain == Socket::PF_INET6) {
my $local = join ':', $sock->sockhost_service(1);
my $remote = join ':', $sock->peerhost_service(1);
$log->tracef('Connected to %s as %s from %s', $endpoint, $remote, $local);
} elsif ($sock->sockdomain == Socket::PF_UNIX) {
$log->tracef('Connected to %s as %s', $endpoint, $sock->peerpath);
}
# We start with a null handler for read, because our behaviour varies depending on
# whether we want to go through the SSL dance or not.
$self->add_child(
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Database/Async.pm view on Meta::CPAN
Supports the following named parameters:
=over 4
=item * C<uri> - the endpoint to use when connecting a new engine instance
=item * C<engine> - the parameters to pass when instantiating a new L<Database::Async::Engine>
=item * C<pool> - parameters for setting up the pool, or a L<Database::Async::Pool> instance
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Datahub/Factory/Importer/EIZ.pm view on Meta::CPAN
use File::Basename qw(fileparse);
use namespace::clean;
with 'Datahub::Factory::Importer';
has endpoint => (is => 'ro', required => 1);
has metadata_prefix => (is => 'ro', default => sub {
return 'oai_lido';
});
has handler => (is => 'ro');
has set => (is => 'ro');
lib/Datahub/Factory/Importer/EIZ.pm view on Meta::CPAN
has password => (is => 'ro');
sub _build_importer {
my $self = shift;
my $options = {
url => $self->endpoint,
handler => $self->handler,
metadataPrefix => $self->metadata_prefix,
from => $self->from,
until => $self->until,
set => $self->set,
lib/Datahub/Factory/Importer/EIZ.pm view on Meta::CPAN
=encoding utf-8
=head1 NAME
Datahub::Factory::Importer::EIZ - Import data from the ErfgoedInzicht
L<OAI-PMH|https://www.openarchives.org/pmh/> endpoint
=head1 SYNOPSIS
use Datahub::Factory::Importer::EIZ;
use Data::Dumper qw(Dumper);
my $oai = Datahub::Factory::Importer::EIZ->new(
url => 'https://endpoint.eiz.be/oai',
metadataPrefix => 'oai_lido',
set => '2011',
);
$oai->importer->each(sub {
lib/Datahub/Factory/Importer/EIZ.pm view on Meta::CPAN
});
=head1 DESCRIPTION
Datahub::Factory::Importer::EIZ imports data from the ErfgoedInzicht OAI-PMH
endpoint. By default it uses the C<ListRecords> verb to return all records using
the I<oai_lido> format. It is possible to only return records from a single
I<Set> or those created, modified or deleted between two dates (I<from> and
I<until>).
It automatically deals with I<resumptionTokens>, so client code does not have to
implement paging.
=head1 PARAMETERS
The C<endpoint> parameter and some
L<PID module parameters|Datahub::Factory::Module::PID> are required.
To link PIDs (Persistent Identifiers) to MSK records, it is necessary to use the
PID module to fetch a CSV from either a Rackspace Cloud Files (protected by
username and password) instance or a public website. Depending on whether you
lib/Datahub/Factory/Importer/EIZ.pm view on Meta::CPAN
your fixes. See L<msk.fix|https://github.com/VlaamseKunstcollectie/Datahub-Fixes/blob/master/msk.fix>
for an example.
=over
=item C<endpoint>
URL of the OAI endpoint.
=item handler( sub {} | $object | 'NAME' | '+NAME' )
Handler to transform each record from XML DOM (L<XML::LibXML::Element>) into
Perl hash.
lib/Datahub/Factory/Importer/EIZ.pm view on Meta::CPAN
In addition there is L<Catmandu::Importer::OAI::Parser::raw> to return the XML
as it is.
=item C<metadata_prefix>
Any metadata prefix the endpoint supports. Defaults to C<oai_lido>.
=item C<set>
Optionally, a set to get records from.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Datahub/Factory/Command/transport.pm view on Meta::CPAN
[Importer]
plugin = OAI
id_path = 'lidoRecID.0._'
[plugin_importer_OAI]
endpoint = https://oai.my.museum/oai
[Fixer]
plugin = Fix
[plugin_fixer_Fix]
lib/Datahub/Factory/Command/transport.pm view on Meta::CPAN
The C<[plugin_fixer_Fix]> can directly load a fix file (via the option
C<file_name>) or can be configured to conditionally load a different
fix file to support multiple fix files for the same data stream (e.g.
when two institutions with different data models use the same API
endpoint). This is done by setting the C<condition> and C<fixers>
options.
=head4 Conditional fixers
[plugin_fixer_Fix]
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Date/Piece.pm view on Meta::CPAN
This module allows you to do I<nominal> math on dates. That is, rather
than worrying about time zones and DST while adding increments of
24*60**2 seconds to a date&time object, you simply discard the time
component and do math directly on the date. If you need a time-of-day
on the calculated date, the at() method returns a Time::Piece object,
thus allowing you to be specific about the endpoints of a nominal
interval.
This is useful for constructs such as "tomorrow", "yesterday", "this
time tomorrow", "one week from today", "one month later", "my 31st
birthday", and various other not-necessarily-numeric intervals on the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Date/RetentionPolicy.pm view on Meta::CPAN
boundary.
=head2 auto_sync
While walking backward through time intervals looking for backups, adjust the
interval endpoint to be closer to whatever match it found. This might allow
the algorithm to essentially adjust the C<reference_date> to match whatever
schedule your backups are running on. This is not enabled by default.
=head1 METHODS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Date/Span.pm view on Meta::CPAN
return @results;
}
#pod =func range_expand
#pod
#pod my @endpoint_pairs = range_expand($start, $end);
#pod
#pod Given C<$start> and C<$end> as timestamps (in epoch seconds),
#pod C<range_durations> returns a list of arrayrefs. Each arrayref is a start and
#pod end timestamp. No pair of start and end times will cross a date boundary, and
#pod the set of ranges as a whole will be identical to the passed start and end.
lib/Date/Span.pm view on Meta::CPAN
(expressed as epoch seconds at midnight) and the number of seconds for which
the given range intersects with the date.
=head2 range_expand
my @endpoint_pairs = range_expand($start, $end);
Given C<$start> and C<$end> as timestamps (in epoch seconds),
C<range_durations> returns a list of arrayrefs. Each arrayref is a start and
end timestamp. No pair of start and end times will cross a date boundary, and
the set of ranges as a whole will be identical to the passed start and end.
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
t/19spanset_daylight_savings.t view on Meta::CPAN
use DateTime;
use DateTime::SpanSet;
# Check that SpanSets return spans with the correct endpoints during daylight
# savings changeovers given a weekly recurrence.
BEGIN {
if (eval 'use DateTime::Event::Recurrence; 1') {
plan tests => 552;
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Decision/ParseTree.pm view on Meta::CPAN
=item * ARRAYS are a series of rules run in order
=item * HASHES are a series of answers
=item * SCALARS are endpoints
=back
=head2 Why add more parts, why blow everything in to separate objects.
lib/Decision/ParseTree.pm view on Meta::CPAN
=head2 ParseTree($tree, $rules, $obj)
Runs $obj thru $tree, using $rules as the library of rules.
Returns the first endpoint that you run into as the answer.
=cut
#=== FUNCTION ================================================================
# NAME: ParseTree
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Deplide/RFID/EPCISSubmitter.pm view on Meta::CPAN
sub new {
my $class = shift;
my $user = shift;
my $password = shift;
my $endpointURL = shift || $Deplide::RFID::EPCISSubmitter::DEFAULT_ENDPOINT_URL;
my $ua = LWP::UserAgent->new();
$ua->agent("Deplide::RFID::EPCISSubmitter/$Deplide::RFID::EPCISSubmitter::VERSION");
my $self = {
_user => $user,
_password => $password,
_url => $endpointURL,
_ua => $ua
};
bless $self, ref($class) || $class;
return $self;
lib/Deplide/RFID/EPCISSubmitter.pm view on Meta::CPAN
Deplide::RFID::EPCISSubmitter - Perl extension for submission of EPCIS documents with RFID reading data to Deplide
=head1 SYNOPSIS
use Deplide::RFID::EPCISSubmitter;
my $submitter = Deplide::RFID::EPCISSubmitter->new($user, $password, $endpointURL);
$submitter->submit($epcisMessage);
=head1 DESCRIPTION
Deplide::RFID::EPCISSubmitter lets you submit data to the EPCIS Train RFID streams
view all matches for this distribution
view release on metacpan or search on metacpan
0.24 2018-08-29T15:01:51Z
- good bye Magnum CI
0.23 2018-08-28T16:31:09Z
- use https endpoint
0.22 2018-01-16T17:38:24Z
- support perl 5.8.1 or later
0.21 2017-10-01T05:36:04Z
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Cover/Report/Coveralls.pm view on Meta::CPAN
$json->{repo_token} = $ENV{COVERALLS_REPO_TOKEN} if $ENV{COVERALLS_REPO_TOKEN};
$json->{flag_name} = $ENV{COVERALLS_FLAG_NAME} if $ENV{COVERALLS_FLAG_NAME};
$json->{parallel} = \1 if $ENV{COVERALLS_PARALLEL};
my $is_travis;
my $endpoint = ($ENV{COVERALLS_ENDPOINT} || $API_ENDPOINT) . $API_ENDPOINT_STEM;
if ($ENV{TRAVIS}) {
$is_travis = 1;
$json->{service_name} = $config->{service_name} || 'travis-ci';
$json->{service_job_id} = $ENV{TRAVIS_JOB_ID};
if($ENV{TRAVIS_PULL_REQUEST} && $ENV{TRAVIS_PULL_REQUEST} ne 'false'){
lib/Devel/Cover/Report/Coveralls.pm view on Meta::CPAN
if (exists $ENV{COVERALLS_PERL_SERVICE_NAME} && $ENV{COVERALLS_PERL_SERVICE_NAME}) {
$json->{service_name} = $ENV{COVERALLS_PERL_SERVICE_NAME};
}
return ($json, $endpoint);
}
sub _parse_line ($) {
my $c = shift;
lib/Devel/Cover/Report/Coveralls.pm view on Meta::CPAN
my $c = $f->statement();
push @sfs, get_source( $file, _parse_line $c );
}
my ($json, $endpoint) = get_config();
$json->{git} = eval { get_git_info() } || {};
$json->{source_files} = \@sfs;
my $coder = JSON::PP->new->ascii;
my $response = HTTP::Tiny->new( verify_SSL => 1 )
->post_form( $endpoint, { json => $coder->encode($json) } );
my $res = eval { decode_json $response->{content} };
print("- Report::Coveralls --------\n");
view all matches for this distribution
view release on metacpan or search on metacpan
Devel/Debug/DBGp.pm view on Meta::CPAN
DB::connectOrReconnect();
Connects to the debugger client (closes the current connection if any).
If the debugger client is not listening at the specified endpoint,
debugging is disabled (via L</disable>) and execution continues
normally.
=head2 isConnected
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Devel/Probe.pm view on Meta::CPAN
One typical use case would be to have a signal handler associated with a
specific signal, which when triggered would disable the module, read the
configuration from a given place, reconfigure the module accordingly and then
enable it. Similarly, this kind of control can be implemented using remote
endpoints to deal with reconfiguring, disabling and enabling the module.
=head1 TODO
=over 4
view all matches for this distribution
view release on metacpan or search on metacpan
azure-pipelines.yml view on Meta::CPAN
resources:
repositories:
- repository: ci-perl-helpers
type: github
name: houseabsolute/ci-perl-helpers
endpoint: houseabsolute
stages:
- template: templates/helpers/build.yml@ci-perl-helpers
parameters:
debug: true
view all matches for this distribution
view release on metacpan or search on metacpan
linux-labjack/INSTALL view on Meta::CPAN
HID NOTE: If the hid module is loaded (use lsmod to view the modules and
look for "hid"), the provided labjack driver will not work correctly.
Since the Labjack is classified as a HID device, the hid driver will
claim the device. However, the hid driver does not support the "Interrupt"
out endpoint used by the Labjack and thus cannot communicate with the
Labjack. You must remove the hid driver prior to loading the labjack
driver. The following command, as root, should suffice:
# modprobe -r hid
linux-labjack/INSTALL view on Meta::CPAN
HID NOTE: If the hid module is loaded (use lsmod to view the modules and
look for "hid"), the provided labjack driver will not work correctly.
Since the Labjack is classified as a HID device, the hid driver will claim
the device. However, the hid driver does not support the "Interrupt" out
endpoint used by the Labjack and thus cannot communicate with the Labjack.
You must remove the hid driver prior to loading the labjack driver. The
following command, as root, should suffice:
# modprobe -r hid
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/Serial/MSLuRM.pm view on Meta::CPAN
This variant of L<Device::Serial::SLuRM> allows communication with a
collection of nodes using Multi-drop SLµRM over a serial port, such as over
an RS-485 bus.
The endpoint running with this module takes the role of the bus controller.
Currently this module does not support being a non-controller node.
=cut
use constant is_multidrop => 1;
view all matches for this distribution
view release on metacpan or search on metacpan
Win32Async.pm view on Meta::CPAN
functionality is the same as the libusb function whose name is
the method name prepended with "usb_".
Generally, define a $Context variable which the library will use to keep track of
the asynchronous call. Activate the transfer (read or write, depending on the
endpoint) using submit_async() as shown, then loop calling reap_async_nocancel()
while checking the return code.
You can have any number of async operations pending on different endpoints - just
define multiple context variables as needed (ie - $Context1, $Context2, &c).
=cut
Win32Async.pm view on Meta::CPAN
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=item Packetsize
The size of the isochronous packets
Win32Async.pm view on Meta::CPAN
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
Win32Async.pm view on Meta::CPAN
A scalar to store opaque information about the operation
=item Endpoint
The endpoint the asynchronous operation will use
=back
Returns 0 on success, < 0 on error (consult errno.h for explanation)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Device/USB.pm view on Meta::CPAN
=item level
0 disables debugging, 1 enables some debug messages, and 2 enables verbose
debug messages
Any other values are forced to the nearest endpoint.
=back
=cut
lib/Device/USB.pm view on Meta::CPAN
=item libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size)
=item libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size)
=item libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout)
lib/Device/USB.pm view on Meta::CPAN
int libusb_get_descriptor(void *dev, unsigned char type, unsigned char index, char *buf, int size)
{
return usb_get_descriptor((usb_dev_handle *)dev, type, index, buf, size);
}
int libusb_get_descriptor_by_endpoint(void *dev, int ep, unsigned char type, unsigned char index, char *buf, int size)
{
return usb_get_descriptor_by_endpoint((usb_dev_handle *)dev, ep, type, index, buf, size);
}
int libusb_bulk_write(void *dev, int ep, char *bytes, int size, int timeout)
{
return usb_bulk_write((usb_dev_handle *)dev, ep, bytes, size, timeout);
lib/Device/USB.pm view on Meta::CPAN
return newRV_noinc( (SV*)hash );
}
/*
* Given a pointer to a usb_endpoint_descriptor struct, create a reference
* to a Device::USB::DevEndpoint object that represents it.
*/
static SV* build_endpoint( struct usb_endpoint_descriptor* endpt )
{
HV* hash = newHV();
hashStoreInt( hash, "bDescriptorType", endpt->bDescriptorType );
hashStoreInt( hash, "bEndpointAddress", endpt->bEndpointAddress );
lib/Device/USB.pm view on Meta::CPAN
gv_stashpv( "Device::USB::DevEndpoint", 1 )
);
}
/*
* Given a pointer to an array of usb_endpoint_descriptor structs, create a
* reference to a Perl array containing the same data.
*/
static SV* list_endpoints( struct usb_endpoint_descriptor* endpt, unsigned count )
{
AV* array = newAV();
unsigned i = 0;
for(i=0; i < count; ++i)
{
av_push( array, build_endpoint( endpt+i ) );
}
return newRV_noinc( (SV*)array );
}
lib/Device/USB.pm view on Meta::CPAN
hashStoreInt( hash, "bNumEndpoints", inter->bNumEndpoints );
hashStoreInt( hash, "bInterfaceClass", inter->bInterfaceClass );
hashStoreInt( hash, "bInterfaceSubClass", inter->bInterfaceSubClass );
hashStoreInt( hash, "bInterfaceProtocol", inter->bInterfaceProtocol );
hashStoreInt( hash, "iInterface", inter->iInterface );
hashStoreSV( hash, "endpoints",
list_endpoints( inter->endpoint, inter->bNumEndpoints )
);
/* TODO: handle the 'extra' data */
return sv_bless( newRV_noinc( (SV*)hash ),
gv_stashpv( "Device::USB::DevInterface", 1 )
view all matches for this distribution
view release on metacpan or search on metacpan
my $at_frame_id = $api->at( 'AO', pack( 'C', 1 ) );
[1mremote_at[0m
Send an AT command to a remote module. Accepts three parameters: a
hashref with endpoint addresses, command options, frame_id; the AT
command name (as two-character string); and the third as the expected
data for that command (if any) as a string. See the XBee datasheet for
a list of supported AT commands and expected data for each.
Endpoint addresses should be specified as a hashref containing the
my $rx = $api->rx();
warn Dumper( $rx );
[1mtx[0m
Sends a transmit request to the XBee. Accepts three parameters, the
first is the endpoint address, the second is a scalar containing the
data to be sent, and the third is an optional flag (known as the async
flag) specifying whether or not the method should wait for an
acknowledgement from the XBee.
Endpoint addresses should be specified as a hashref containing the
view all matches for this distribution