view release on metacpan or search on metacpan
example/lib/Example.pm view on Meta::CPAN
arguments => ['Example::API::System'],
},
);
my @plugins = grep { /^RPC::/ } keys %{ config->{plugins} };
for my $plugin (@plugins) {
$system_config->register_endpoint($plugin, '/system');
}
}
{
my $db_config = Example::EndpointConfig->new(
example/lib/Example.pm view on Meta::CPAN
}
);
my @plugins = grep { /^RPC::/ } keys %{ config->{plugins} };
for my $plugin (@plugins) {
for my $path (keys %{ config->{plugins}{$plugin} }) {
$db_config->register_endpoint($plugin, $path);
}
}
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
example/app.pl view on Meta::CPAN
# That's it. Seriously, that's all you need.
# Below you'll see how to customize the behavior further by configuring one or
# more hooks that the SPID plugin will call.
# This hook is called when the login endpoint is called and the AuthnRequest
# is about to be crafted.
hook 'plugin.SPID.before_login' => sub {
# ...
};
example/app.pl view on Meta::CPAN
hook 'plugin.SPID.after_failed_login' => sub {
my $statuscode = shift;
info "SPID login failed: $statuscode";
};
# This hook is called when the logout endpoint is called and the LogoutRequest
#Â is about to be crafted.
hook 'plugin.SPID.before_logout' => sub {
debug "User " . spid_session->nameid . " is about to logout";
};
# This hook is called when a SPID session is terminated (this might be triggered
# also when user initiated logout from another Service Provider or directly
# within the Identity Provider, thus without calling our logout endpoint and
# the 'before_logout' hook).
hook 'plugin.SPID.after_logout' => sub {
my $success = shift; # 'success' or 'partial'
debug "User " . spid_session->nameid . " logged out";
};
view all matches for this distribution
view release on metacpan or search on metacpan
share/assets/dash_core_components/async~plotlyjs.js view on Meta::CPAN
(window.webpackJsonpdash_core_components=window.webpackJsonpdash_core_components||[]).push([[5],{685:function(t,e){!function(r){"object"==typeof e&&void 0!==t?t.exports=r():"function"==typeof define&&define.amd?define([],r):("undefined"!=typeof windo...
view all matches for this distribution
view release on metacpan or search on metacpan
examples/simple_flex_rpc/SimpleFlexRPC.mxml view on Meta::CPAN
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo"
>
<fx:Declarations>
<s:RemoteObject id="helloService"
endpoint="http://localhost:5000/amf/gateway"
destination="perlamf"
source="HelloController"
showBusyCursor="true"
result="log(event.result);"
fault="log(event.fault.faultDetail)"
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/AnyXfer/Elastic/Index.pm view on Meta::CPAN
sub suggest {
my ( $self, %args ) = @_;
# perform the suggestions search as part of a
# normal search now that the suggest endpoint has been removed
my $results = $self->search( #
%args, body => { suggest => $args{body} }
);
return $results->{suggest};
view all matches for this distribution
view release on metacpan or search on metacpan
t/01boolfield.t view on Meta::CPAN
is_deeply( { unpack_BYTES( "\x05" ) }, { first => 1, second => !1, third => 1 },
'unpack_BYTES' );
}
# endpoints
{
bitfield { format => "bytes-LE" }, U32L =>
high => boolfield(31),
low => boolfield(0);
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-basic.t view on Meta::CPAN
ok $rel <= $alpha * 1.001, sprintf("q=%.3f: rel err %.4f <= alpha", $q, $rel)
or diag "est=$est true=$true";
}
diag sprintf("worst relative error: %.5f (alpha=%.3f)", $worst, $alpha);
# quantile endpoints
cmp_ok abs($dd->quantile(0) - 1) / 1, '<=', $alpha * 1.001, 'q=0 ~ min';
cmp_ok abs($dd->quantile(1) - $N) / $N, '<=', $alpha * 1.001, 'q=1 ~ max';
# median convenience
is $dd->median, $dd->quantile(0.5), 'median == quantile(0.5)';
}
view all matches for this distribution
view release on metacpan or search on metacpan
eg/components.pl view on Meta::CPAN
else { unshift @INC, "$FindBin::Bin/../lib" }
}
use Data::DisjointSet::Shared;
# Connected components of an undirected graph via union-find. We have a fixed
# set of vertices (0 .. N-1) and a fixed edge list; unioning the endpoints of
# every edge collapses each connected component into one disjoint set. We then
# report how many components there are and the size of each.
my $N = 10; # vertices 0 .. 9
view all matches for this distribution
view release on metacpan or search on metacpan
sample/formats/sample.yml view on Meta::CPAN
# ================================================================
# Hybrid Cloud Information.
# ================================================================
hybrid:
# The Keystone Identity service endpoint host. Enter either the host FQDN or
# it's IP address. This value is not validated. Please ensure it is correct.
# The value is defaulted to 192.168.101.10 for the ICOS Hybrid cloud.
keystone_endpoint_host: 192.168.101.10
# The Identity service admin tenant name. The value is defaulted to
# on-prem-admin for the ICOS Hybrid cloud.
admin_tenant_name: on-prem-admin
# The Identity service admin user name. The value is defaulted to
# admin-on-prem for the ICOS Hybrid cloud.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/IntervalTree/Shared.pm view on Meta::CPAN
Endpoints are B<signed 64-bit integers> (timestamps, IP addresses, genomic
coordinates -- exact, with no floating-point edge cases). Each interval carries a
user-supplied 64-bit B<id> (defaulting to its insertion index), returned with
every match. Internally it is an B<augmented balanced binary search tree> keyed
by the low endpoint, each node caching the maximum high endpoint of its subtree
so a query prunes whole subtrees that end before it.
Intervals are B<appended in O(1)> and the balanced tree is B<bulk-built on the
first query> after any insert, so query recursion is O(log n + k) deep (k =
matches) regardless of insertion order -- no risk of a degenerate, deep tree.
lib/Data/IntervalTree/Shared.pm view on Meta::CPAN
my $i = $it->add($lo, $hi); # id defaults to the insertion index
my $i = $it->add($lo, $hi, $id); # attach an explicit 64-bit id
$it->build; # (optional) force a rebuild now
C<add> appends one interval with integer endpoints C<$lo E<lt>= $hi> (croaks
otherwise) and an optional integer C<$id>, returning its insertion index; it
croaks if the tree is full. Intervals are treated as B<closed> (both endpoints
inclusive). C<build> forces the balanced tree to be (re)built immediately; you
rarely need it, since queries build automatically after inserts.
=head2 Queries
view all matches for this distribution
view release on metacpan or search on metacpan
msgpack-3.3.0/example/boost/asio_send_recv.cpp view on Meta::CPAN
boost::asio::io_service ios;
std::uint16_t const port = 12345;
// Server
std::size_t const window_size = 10;
boost::asio::ip::tcp::acceptor ac(ios, boost::asio::ip::tcp::endpoint(boost::asio::ip::tcp::v4(), port));
boost::asio::ip::tcp::socket ss(ios);
std::function<void()> do_accept;
std::function<void()> do_async_read_some;
msgpack::unpacker unp;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Password/zxcvbn/RankedDictionaries/English.pm view on Meta::CPAN
'endothelial' => 14677,
'endow' => 27227,
'endowed' => 7483,
'endowment' => 5819,
'endowments' => 15728,
'endpoint' => 17164,
'endpoints' => 18628,
'endurance' => 6038,
'endured' => 8359,
'endures' => 24936,
'enduring' => 6682,
'enduro' => 27036,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Random/dict view on Meta::CPAN
endowed
endowing
endowment
endowments
endows
endpoint
ends
endurable
endurably
endurance
endure
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/api.pm view on Meta::CPAN
$forker->put( '174' );
$forker->expect( '175' );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.05695|1568050706.05696 0`29`0',47 );
$forker->put( '176' );
$forker->expect( '177' );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.06095|1568050706.06097 0`29`1`ENDPOINT`vlocalhost/app-endpoint',81 );
$forker->put( '178' );
$forker->expect( '179' );
$provider->stow( 'Yote|1568050706.03146|1568050706.06187 domains`r6`root_dir`v/opt/yote/`config`r57',4 );
$forker->put( '180' );
$forker->expect( '181' );
t/lib/api.pm view on Meta::CPAN
$forker->put( '141' );
$forker->expect( '142' );
$provider->stow( 'Yote::App::PageCounter|1568050706.05239|1568050706.05493 _session_pool`r16`_app_path`vpageCounter2`_methods_access_levels`r12`_site`vlocalhost`_domain`r7`_session`r14`_login`r20`_resets`r18`_email`r22',11 );
$forker->put( '143' );
$forker->expect( '144' );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.0606|1568050706.06062 0`29`1`ENDPOINT`vlocalhost/app-endpoint',78 );
$forker->put( '145' );
$forker->expect( '146' );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.05706|1568050706.05711 0`29`3`update_counter`v1`fetch`v1`update`v1',48 );
$forker->put( '147' );
$forker->expect( '148' );
t/lib/api.pm view on Meta::CPAN
$provider->stow( 'Data::ObjectStore::Hash|1568050706.26025|1568050706.26051 0`29`1`PUBLIC`r98',97 );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.05742|1568050706.25844 0`29`3`update_counter`v1`fetch`v1`update`v1',51 );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.25923|1568050706.26156 0`29`1`localhost`r93',92 );
$provider->stow( 'Yote|1568050706.03146|1568050706.2621 domains`r6`root_dir`v/opt/yote/`config`r91',4 );
$provider->stow( 'Data::ObjectStore::Array|1568050706.26045|1568050706.2605 0`1000000`3`0`vupdate_counter`vupdate`vfetch',98 );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.26153|1568050706.26155 0`29`1`ENDPOINT`vlocalhost/app-endpoint',103 );
$provider->stow( 'Data::ObjectStore::Hash|1568050706.26108|1568050706.2613 0`29`1`PUBLIC`r102',101 );
$provider->stow( 'Data::ObjectStore::Container|1568050706.0199|1568050706.27449 db_version`v5.03`created_time`v1568050706.0199`last_update_time`v1568050706.26213`root`r2`ObjectStore_version`v2.10',1 );
$provider->commit_transaction( );
$provider->fetch( 39 );
$provider->lock( 'Yote::App::SESSION' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Riak.pm view on Meta::CPAN
=head2 status
Attempts to retrieve information about the performance and configuration of the
Riak node. Returns a hash reference containing the data provided by the
C</stats> endpoint of the Riak node or throws an exception if the status
information could not be retrieved.
=head2 _buckets
Get the list of buckets. This is NOT RECOMMENDED for production systems, as Riak
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Seek.pm view on Meta::CPAN
values, or as a hash object in the same shape as the original.
=head1 ENCODING
During the processing of flattening a data structure with nested data, the
following data structure would be converted into a collection of endpoint/value
pairs.
{
'id' => 12345,
'patient' => {
lib/Data/Seek.pm view on Meta::CPAN
}],
}]
}
Given the aforementioned data structure, the following would be the resulting
flattened structure comprised of endpoint/value pairs.
{
'id' => 12345,
'medications:0.aceInhibitors:0.dose' => '1 tab',
'medications:0.aceInhibitors:0.name' => 'lisinopril',
lib/Data/Seek.pm view on Meta::CPAN
'medications:0.antianginal:0.strength' => '0.4 mg Sublingual Tab',
'patient.name.first' => 'Bob'
'patient.name.last' => 'Bee',
}
This structure provides the endpoint strings which will be matched against using
the querying strategy.
=head1 QUERYING
During the processing of querying the data structure, the criteria (query
expressions) are converted into a series of regular expressions to be applied
sequentially, filtering/reducing the endpoints and producing a data set of
matching nodes or throwing an exception explaining the search failure.
=over 4
=item * B<Node Expression>
lib/Data/Seek.pm view on Meta::CPAN
The follow is a short and simple overview of the strategy and syntax used by
Data::Seek to query complex data structures. The overall idea behind Data::Seek
is to flatten/fold the data structure, reduce it by applying a series patterns,
then, unflatten/unfold and operate on the new data structure. The introspection
strategy is to flatten the data structure producing a non-hierarchical data
structure where its keys represent endpoints (using dot-notation and colons to
separate (and denote) nested hash keys and array indices respectively) within
the structure.
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/SplitSerializer.pm view on Meta::CPAN
my $prh = { $path => $ref }; # single row answer
return $prh if blessed $ref; # down that path leads madness...
my $type = ref $ref || return $prh; # that covers SCALARs...
return $prh unless $type =~ /HASH|ARRAY/; # ...and all other endpoints
# Blessed is the path
unless (blessed $path) {
$path = $self->path_style->new(
%{ $self->path_options },
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Transfigure.pm view on Meta::CPAN
=head1 DESCRIPTION
C<Data::Transfigure> allows you to write reusable rules ('transfigurators') to modify
parts (or all) of a data structure. There are many possible applications of this,
but it was primarily written to handle converting object graphs of ORM objects
into a structure that could be converted to JSON and delivered as an API endpoint
response. One of the challenges of such a system is being able to reuse code
because many different controllers could need to convert the an object type to
the same structure, but then other controllers might need to convert that same
type to a different structure.
view all matches for this distribution
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/Database/BI/Controller/Dashboard.pm view on Meta::CPAN
# Blocked targets:
# localhost / 127.0.0.0/8 / 0.0.0.0 / ::1 -- loopback aliases
# 10.0.0.0/8 -- RFC 1918 private (literal IP)
# 172.16.0.0/12 -- RFC 1918 private (literal IP)
# 192.168.0.0/16-- RFC 1918 private (literal IP)
# 169.254.0.0/16-- link-local; AWS/GCP/Azure metadata endpoint (literal IP)
# 100.64.0.0/10 -- CGNAT / Tailscale shared space (literal IP)
#
# Hostname-based targets (e.g. http://internal.corp.example.com/) are allowed
# at this layer; block them with egress firewall rules instead.
sub _is_safe_url {
lib/Database/BI/Controller/Dashboard.pm view on Meta::CPAN
# Returns: {"url":"/open?path=/.../.uploads/.../sales.csv","path":"/.../.uploads/.../sales.csv"}
=head1 DESCRIPTION
All user-facing routes in C<Database::BI> are handled by this controller.
See the individual action POD above for per-endpoint documentation.
=head2 Filter operators
The C<f=col:op:val> filter spec supports:
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/Cmp.pm view on Meta::CPAN
The right-hand date. Accepts the same types as C<$left>.
=item C<$complain> (optional)
A CODE reference invoked with a diagnostic string for ambiguous conditions:
equal range endpoints or an inverted range. C<undef> and other falsy values
are silently ignored (the guard is never triggered). A truthy non-CODE
value causes an immediate C<croak>.
=back
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