view release on metacpan or search on metacpan
--- #YAML:1.0
name: AI-Prolog
version: 0.741
abstract: Perl extension for logic programming.
author:
- Curtis "Ovid" Poe
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AI/SimulatedAnnealing.htm view on Meta::CPAN
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#prerequisites">PREREQUISITES</a></li>
<li><a href="#methods">METHODS</a></li>
<li><a href="#author">AUTHOR</a></li>
<li><a href="#copyright_and_license">COPYRIGHT AND LICENSE</a></li>
</ul>
<hr/>
<h1><a name="name">NAME</a></h1>
<p>AI::SimulatedAnnealing – optimize a list of numbers according
lib/AI/SimulatedAnnealing.htm view on Meta::CPAN
<p>The function returns a reference to an array containing the
optimized list of numbers.</p>
</dd>
</dl>
<hr/>
<h1><a name="author">AUTHOR</a></h1>
<p>Benjamin Fitch, <<a
href="mailto:blernflerkl@yahoo.com">blernflerkl@yahoo.com</a>></p>
<hr/>
<h1><a name="copyright_and_license">COPYRIGHT AND LICENSE</a></h1>
<p>Copyright 2010 by Benjamin Fitch.</p>
view all matches for this distribution
view release on metacpan or search on metacpan
CONTRIBUTING view on Meta::CPAN
By contributing to this repository, you agree that any and all such Contributions and derivative works thereof shall immediately become part of the APTech Family of software and documentation, and you accept and agree to the following legally-binding...
1. Definitions.
"You" or "Your" shall mean the copyright owner, or legal entity authorized by the copyright owner, that is making this Agreement. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are und...
"APTech" is defined as the Delaware corporation named Auto-Parallel Technologies, Inc. with a primary place of business in Cedar Park, Texas, USA.
The "APTech Family of software and documentation" (hereinafter the "APTech Family") is defined as all copyrightable works identified as "part of the APTech Family" immediately following their copyright notice, and includes but is not limited to this ...
"Team APTech" is defined as all duly-authorized contributors to the APTech Family, including You after making Your first Contribution to the APTech Family under the terms of this Agreement.
"Team APTech Leadership" is defined as all duly-authorized administrators and official representatives of the APTech Family, as listed publicly on the most up-to-date copy of the AutoParallel.com website.
"Contribution" shall mean any original work of authorship, including any changes or additions or enhancements to an existing work, that is intentionally submitted by You to this repository for inclusion in, or documentation of, any of the products or...
2. Assignment of Copyright. Subject to the terms and conditions of this Agreement, and for good and valuable consideration, receipt of which You acknowledge, You hereby transfer to the Delaware corporation named Auto-Parallel Technologies, Inc. with...
You hereby agree that if You have or acquire hereafter any patent or interface copyright or other intellectual property interest dominating the software or documentation contributed to by the Work (or use of that software or documentation), such domi...
CONTRIBUTING view on Meta::CPAN
Copyright © 2001, 2008, 2009, 2014 Free Software Foundation, Inc.
The quoted text below is not modified, and is licensed under a Creative Commons Attribution-NoDerivs 3.0 United States License.
http://www.gnu.org/licenses/why-assign.en.html
http://creativecommons.org/licenses/by-nd/3.0/us/
"Under US copyright law, which is the law under which most free software programs have historically been first published, there are very substantial procedural advantages to registration of copyright. And despite the broad right of distribution conv...
In order to make sure that all of our copyrights can meet the recordkeeping and other requirements of registration, and in order to be able to enforce the GPL most effectively, FSF requires that each author of code incorporated in FSF projects provid...
<<<=== COMMITMENT TO FREE & OPEN SOURCE SOFTWARE ===>>>
Auto-Parallel Technologies, Inc. is committed to maintaining the free-and-open-source software (FOSS) basis of the APTech Family.
view all matches for this distribution
view release on metacpan or search on metacpan
--- #YAML:1.0
name: AI-Termites
version: 0.02
abstract: Artificial termites simulation
author:
- Salvador Fandino <sfandino@yahoo.com>
license: unknown
distribution_type: module
configure_requires:
ExtUtils::MakeMaker: 0
view all matches for this distribution
view release on metacpan or search on metacpan
},
"configure_requires" => {
"Module::Build" => "0.28"
},
"dist_abstract" => "Perl wrapper for XGBoost library L<https://github.com/dmlc/xgboost>",
"dist_author" => [
"Pablo Rodr\x{ed}guez Gonz\x{e1}lez <pablo.rodriguez.gonzalez\@gmail.com>"
],
"dist_name" => "AI-XGBoost",
"dist_version" => "0.11",
"license" => "apache",
view all matches for this distribution
view release on metacpan or search on metacpan
Cookies appear to be disabled in your web browser.
Cookie string: $ENV{HTTP_COOKIE}
This program uses a session and authentication system
(AIS, the Authenticated Identity Service)
that relies on cookies.
Please enable cookies and try again. (you may have to log in)
$Identity = $Sessions{$Coo}->{identity};
if($Identity eq 'ERROR'){
print <<EOF;
Content-type: text/plain
There was an error with the authentication layer
of this web service: $Sessions{$Coo}->{error}
please contact $ENV{SERVER_ADMIN} to report this.
EOF
1;
__END__
=head1 NAME
AIS::client - get an authenticated e-mail address for users of your web service
=head1 SYNOPSIS
BEGIN{umask(0077 & umask())}; # if your web server gives you a 0177 umask
use AIS::client;
__END__
=head1 DESCRIPTION
The goal of AIS::client is to provide a very easy way to require an
authenticated identity for a perl web application. The user's e-mail
address appears in a global variable C<$AIS_IDENTITY> and a persistent
session stash is available in C<%AIS_STASH>.
=head1 USE-LINE CONFIGURATION OPTIONS
view all matches for this distribution
view release on metacpan or search on metacpan
Copyright (c) 2002 Chuck Ritter
You may distribute under the terms of either the GNU General Public License
or the Artistic License, as specified in the Perl README file, with the
exception that it cannot be placed on a CD-ROM or similar media for commercial
distribution without the prior approval of the author.
This code is provided with no warranty of any kind, and is used entirely at
your own risk.
This code was written by the author as a private individual, and is in no way
endorsed or warrantied by IBM.
WHAT IS IT?
-----------
This set of modules provides AIX-specific functionality, related to obtaining
view all matches for this distribution
view release on metacpan or search on metacpan
The purpose of this License is to make a manual, textbook, or other
functional and useful document "free" in the sense of freedom: to
assure everyone the effective freedom to copy and redistribute it,
with or without modifying it, either commercially or noncommercially.
Secondarily, this License preserves for the author and publisher a way
to get credit for their work, while not being considered responsible
for modifications made by others.
This License is a kind of "copyleft", which means that derivative
works of the document must themselves be free in the same sense. It
Document or a portion of it, either copied verbatim, or with
modifications and/or translated into another language.
A "Secondary Section" is a named appendix or a front-matter section of
the Document that deals exclusively with the relationship of the
publishers or authors of the Document to the Document's overall subject
(or to related matters) and contains nothing that could fall directly
within that overall subject. (Thus, if the Document is in part a
textbook of mathematics, a Secondary Section may not explain any
mathematics.) The relationship could be a matter of historical
connection with the subject or with related matters, or of legal,
that this Transparent copy will remain thus accessible at the stated
location until at least one year after the last time you distribute an
Opaque copy (directly or through your agents or retailers) of that
edition to the public.
It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give
them a chance to provide you with an updated version of the Document.
4. MODIFICATIONS
A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions
(which should, if there were any, be listed in the History section
of the Document). You may use the same title as a previous version
if the original publisher of that version gives permission.
B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified
Version, together with at least five of the principal authors of the
Document (all of its principal authors, if it has fewer than five),
unless they release you from this requirement.
C. State on the Title page the name of the publisher of the
Modified Version, as the publisher.
D. Preserve all the copyright notices of the Document.
E. Add an appropriate copyright notice for your modifications
terms of this License, in the form shown in the Addendum below.
G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.
H. Include an unaltered copy of this License.
I. Preserve the section Entitled "History", Preserve its Title, and add
to it an item stating at least the title, year, new authors, and
publisher of the Modified Version as given on the Title Page. If
there is no section Entitled "History" in the Document, create one
stating the title, year, authors, and publisher of the Document as
given on its Title Page, then add an item describing the Modified
Version as stated in the previous sentence.
J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise
the network locations given in the Document for previous versions
These titles must be distinct from any other section titles.
You may add a section Entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various
parties--for example, statements of peer review or that the text has
been approved by an organization as the authoritative definition of a
standard.
You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list
of Cover Texts in the Modified Version. Only one passage of
includes a cover text for the same cover, previously added by you or
by arrangement made by the same entity you are acting on behalf of,
you may not add another; but you may replace the old one, on explicit
permission from the previous publisher that added the old one.
The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version.
5. COMBINING DOCUMENTS
The combined work need only contain one copy of this License, and
multiple identical Invariant Sections may be replaced with a single
copy. If there are multiple Invariant Sections with the same name but
different contents, make the title of each such section unique by
adding at the end of it, in parentheses, the name of the original
author or publisher of that section if known, or else a unique number.
Make the same adjustment to the section titles in the list of
Invariant Sections in the license notice of the combined work.
In the combination, you must combine any sections Entitled "History"
in the various original documents, forming one section Entitled
view all matches for this distribution
view release on metacpan or search on metacpan
{
"abstract" : "readonly access to pacman's libalpm.",
"author" : [
"Andrew Gregory <apg@cpan.org>",
"Justin Davis <juster at cpan dot org>"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.143240",
view all matches for this distribution
view release on metacpan or search on metacpan
examples/get-brightcove-videos-metadata.pl view on Meta::CPAN
my $service = 'com.brightcove.templating.TemplatingFacade';
my $method = 'getContentForTemplateInstance';
my $client = new AMF::Connection( $endpoint );
# $client->config( ... ); # LWP::UserAgent extra params (proxy, auth etc... )
#$client->setEncoding(3);
#$client->setHTTPProxy('http://127.0.0.1:8888');
#$client->setHTTPCookieJar( HTTP::Cookies->new(file => "/tmp/lwpcookies.txt", autosave => 1, ignore_discard => 1 ) );
view all matches for this distribution
view release on metacpan or search on metacpan
doc/examples/petmarket/petmarket/api/userservice.pm view on Meta::CPAN
my @shippingFields = ("shippingstreet1", "shippingstreet2", "shippingcity", "shippingcountry", "shippingzip", "shippingphone");
my @fields = ("email", "password", @userFields, @shippingFields);
sub authenticate
{
my ($self, $email, $password) = @_;
my $ary_ref = $self->dbh->selectall_arrayref("SELECT count(*) FROM user_details where email='$email' AND password='$password'");
return $ary_ref->[0]->[0] > 0;
doc/examples/petmarket/petmarket/api/userservice.pm view on Meta::CPAN
sub getUser
{
my ($self, $email, $password) = @_;
return 0 unless $self->authenticate($email, $password);
my $result = new AMF::Perl::Util::Object;
my $hash_ref = $self->dbh->selectall_hashref("SELECT * FROM user_details WHERE email='$email'", "email");
doc/examples/petmarket/petmarket/api/userservice.pm view on Meta::CPAN
sub updateUser
{
my ($self, $userObject) = @_;
return 0 unless $self->authenticate($userObject->{"email"}, $userObject->{"password"});
my $setString = "";
my @setStringArray = map {"$_='".$userObject->{$_}."'"} @userFields;
$setString = join ",", @setStringArray;
view all matches for this distribution
view release on metacpan or search on metacpan
{
"abstract" : "A naive custom RIPv2 daemon",
"author" : [
"Heikki Hannikainen, OH7LZB <hessu@hes.iki.fi>"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112621",
"license" : [
view all matches for this distribution
view release on metacpan or search on metacpan
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
view all matches for this distribution
view release on metacpan or search on metacpan
examples/git.pl view on Meta::CPAN
#!/usr/bin/perl
use strict;
use warnings;
# Git commits by week by author
use ANSI::Heatmap;
use List::Util qw(max min);
my $LIMIT = 20;
my $PER_ROW = 4;
view all matches for this distribution
view release on metacpan or search on metacpan
{
"abstract" : "ANSI Color palettes",
"author" : [
"LNATION <email@lnation.org>"
],
"dynamic_config" : 1,
"generated_by" : "ExtUtils::MakeMaker version 7.7702, CPAN::Meta::Converter version 2.150010",
"license" : [
view all matches for this distribution
view release on metacpan or search on metacpan
return;
}
sub new {
my ($tochost, $authorizer, $port, $nickname) = @_;
my $self;
my $ipaddr;
if ($port =~ /\D/) { $port = getservbyname($port, 'tcp') }
die "invalid port" unless $port;
$ipaddr = inet_aton($tochost);
die "unknown host" unless $ipaddr;
$self = {
tochost => $tochost,
authorizer => $authorizer,
ipaddr => $ipaddr,
port => $port,
nickname => $nickname,
sequence => 1
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Assembla.pm view on Meta::CPAN
sub make_req {
my ($self, $path) = @_;
my $req = HTTP::Request->new(GET => $self->url.$path);
$req->header(Accept => 'application/xml');
$req->authorization_basic($self->username, $self->password);
return $req;
}
__PACKAGE__->meta->make_immutable;
lib/API/Assembla.pm view on Meta::CPAN
=head1 UNDER CONSTRUCTION
API::Assembla is not feature-complete. It's a starting point. The Assembla
API has LOTS of stuff that this module does not yet contain. These features
will be added as needed by the author or as gifted by thoughtful folks who
write patches! ;)
=head1 SYNOPSIS
use API::Assembla;
view all matches for this distribution
view release on metacpan or search on metacpan
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
view all matches for this distribution
view release on metacpan or search on metacpan
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/CLI.pm view on Meta::CPAN
use Moo;
has dir => ( is => 'ro' );
has openapi => ( is => 'ro' );
sub add_auth {
my ($self, $req) = @_;
my $appconfig = $self->read_appconfig;
my $token = $appconfig->{token};
$req->header(Authorization => "Bearer $token");
}
lib/API/CLI.pm view on Meta::CPAN
options => $opt,
parameters => $params,
verbose => $opt->{verbose} ? 1 : 0,
);
$self->add_auth($REQ);
if ($method =~ m/^(POST|PUT|PATCH|DELETE)$/) {
my $data_file = $opt->{'data-file'};
if (defined $data_file) {
open my $fh, '<', $data_file or die "Could not open '$data_file': $!";
lib/API/CLI.pm view on Meta::CPAN
use API::CLI::App::Spec;
package API::CLI::MetaCPAN;
use base 'API::CLI';
sub add_auth {
}
package main;
my $appspec_file = "$Bin/../metacpancl-appspec.yaml";
lib/API/CLI.pm view on Meta::CPAN
=head1 METHODS
=over 4
=item add_auth
=item apicall
=item dir
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/CPanel.pm view on Meta::CPAN
use API::CPanel::Package;
use API::CPanel::Domain;
use API::CPanel::Mysql;
our @EXPORT = qw/get_auth_hash refs is_success query_abstract is_ok get_error/;
our @EXPORT_OK = qw//;
our $VERSION = 0.09;
our $DEBUG = '';
our $FAKE_ANSWER = '';
lib/API/CPanel.pm view on Meta::CPAN
=head1 SYNOPSIS
use API::CPanel;
my $connection_params = {
auth_user => 'username',
auth_passwd => 'qwerty',
host => '11.22.33.44',
};
### Get all panel IP
my $ip_list = API::CPanel::ip::list( $connection_params );
lib/API/CPanel.pm view on Meta::CPAN
# Make request to server and get answer
# STATIC (STRING: query_string)
sub mk_query_to_server {
my $auth_hash = shift;
my $query_string = shift;
return '' unless ( $query_string && $auth_hash );
warn "Auth hash: $auth_hash\nQuery string: $query_string\n" if $DEBUG;
my $ua = LWP::UserAgent->new;
my $request = HTTP::Request->new( GET => $query_string );
$request->header( Authorization => $auth_hash );
my $response = $ua->request( $request );
my $content = $response->content;
if ($response->header('content-type') eq 'text/xml') {
warn $content if $DEBUG;
lib/API/CPanel.pm view on Meta::CPAN
# Get + deparse
# STATIC(STRING: query_string)
sub process_query {
my %params = @_;
my $auth_hash = $params{auth_hash};
my $query_string = $params{query_string};
my $xml_parser_params = $params{parser_params} || '';
my $fake_answer = $API::CPanel::FAKE_ANSWER || '';
return '' unless $query_string;
my $answer = $fake_answer ? $fake_answer : mk_query_to_server( $auth_hash, $query_string );
warn $answer if $answer && $DEBUG;
return $answer ?
parse_answer(
answer => $answer,
lib/API/CPanel.pm view on Meta::CPAN
# Get access key, time to live -- 30 minutes
# STATIC(HASHREF: params_hash)
# params_hash:
# - all elements from mk_full_query_string +
# - auth_user*
# - auth_passwd*
sub get_auth_hash {
my %params_raw = @_;
warn 'get_auth_hash params: ' . Dumper(\%params_raw) if $DEBUG;
my $params = filter_hash(
\%params_raw,
[ 'auth_user', 'auth_passwd' ]
);
# Check this sub params
unless ($params->{auth_user} && $params->{auth_passwd}) {
return '';
}
return "Basic " . MIME::Base64::encode( $params->{auth_user} . ":" . $params->{auth_passwd} );
}
# Wrapper for "ref" on undef value, without warnings :)
# Possible very stupid sub :)
# STATIC(REF: our_ref)
lib/API/CPanel.pm view on Meta::CPAN
} else {
return $want_hash ? {} : '';
}
}
# all params derived from get_auth_hash
sub query_abstract {
my %params = @_;
my $params_raw = $params{params};
my $func_name = $params{func};
lib/API/CPanel.pm view on Meta::CPAN
my $allowed_fields;
warn 'query_abstract ' . Dumper( \%params ) if $DEBUG;
return '' unless $params_raw && $func_name;
$fields = "host path allow_http auth_user auth_passwd container $fields";
@$allowed_fields = split(' ', $fields);
my $xml_parser_params = $params{parser_params};
my $auth_hash = get_auth_hash( %$params_raw );
warn "Auth_hash: $auth_hash\n" if $DEBUG;
if ( $auth_hash ) {
my $params = filter_hash( $params_raw, $allowed_fields );
my $query_string = mk_full_query_string( {
func => $func_name,
%$params,
} );
warn Dumper $query_string if $DEBUG;
my $server_answer = process_query(
auth_hash => $auth_hash,
query_string => $query_string,
parser_params => $xml_parser_params,
);
warn Dumper $server_answer if $DEBUG;
lib/API/CPanel.pm view on Meta::CPAN
$API::CPanel::last_answer = $server_answer;
warn "wrong server answer" if $DEBUG;
return '';
};
} else {
$API::CPanel::last_answer = 'auth_hash not found';
warn "auth_hash not found" if $DEBUG;
return '';
}
}
# Abstract sub for action methods
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Client.pm view on Meta::CPAN
return $self->dispatch(%args, method => 'put');
}
method prepare(Object $ua, Object $tx, Any %args) {
$self->set_auth($ua, $tx, %args);
$self->set_headers($ua, $tx, %args);
$self->set_identity($ua, $tx, %args);
return $self;
}
lib/API/Client.pm view on Meta::CPAN
timeout => $self->timeout,
url => $self->url->to_string,
};
}
method set_auth($ua, $tx, %args) {
if ($self->can('auth')) {
$tx->req->url->userinfo(join ':', @{$self->auth});
}
return $self;
}
lib/API/Client.pm view on Meta::CPAN
use Data::Object::Class;
extends 'API::Client';
sub auth {
['admin', 'secret']
}
sub headers {
[['Accept', '*/*']]
lib/API/Client.pm view on Meta::CPAN
my $hookbin = Hookbin->new;
This package was designed to be subclassed and provides hooks into the client
building and request dispatching processes. Specifically, there are three
useful hooks (i.e. methods, which if present are used to build up the client
object and requests), which are, the C<auth> hook, which should return a
C<Tuple[Str, Str]> which is used to configure the basic auth header, the
C<base> hook which should return a C<Tuple[Str]> which is used to configure the
base URL, and the C<headers> hook, which should return a
C<ArrayRef[Tuple[Str, Str]]> which are used to configure the HTTP request
headers.
view all matches for this distribution
view release on metacpan or search on metacpan
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/DirectAdmin.pm view on Meta::CPAN
sub new {
my $class = shift;
$class = ref ($class) || $class;
my $self = {
auth_user => '',
auth_passwd => '',
host => '',
ip => '',
debug => $DEBUG,
allow_https => 1,
fake_answer => $FAKE_ANSWER,
(@_)
};
confess "Required auth_user!" unless $self->{auth_user};
confess "Required auth_passwd!" unless $self->{auth_passwd};
confess "Required host!" unless $self->{host};
return bless $self, $class;
}
lib/API/DirectAdmin.pm view on Meta::CPAN
}
return $new_hash;
}
# all params derived from get_auth_hash
sub query {
my ( $self, %params ) = @_;
my $command = delete $params{command};
my $fields = $params{allowed_fields} || '';
lib/API/DirectAdmin.pm view on Meta::CPAN
my $allowed_fields;
warn 'query_abstract ' . Dumper( \%params ) if $self->{debug};
confess "Empty command" unless $command;
$fields = "host port auth_user auth_passwd method allow_https command $fields";
@$allowed_fields = split /\s+/, $fields;
my $params = $self->filter_hash( $params{params}, $allowed_fields );
my $query_string = $self->mk_full_query_string( {
lib/API/DirectAdmin.pm view on Meta::CPAN
delete $params->{allow_https};
my $host = $self->{host};
my $port = $self->{port} || 2222;
my $command = delete $params->{command};
my $auth_user = $self->{auth_user};
my $auth_passwd = $self->{auth_passwd};
$self->kill_start_end_slashes();
my $query_path = ( $allow_https ? 'https' : 'http' ) . "://$auth_user:$auth_passwd\@$host:$port/$command?";
return $query_path . $self->mk_query_string($params);
}
# Make query string
# STATIC(HASHREF: params)
lib/API/DirectAdmin.pm view on Meta::CPAN
=head1 SYNOPSIS
use API::DirectAdmin;
my %auth = (
auth_user => 'admin_name',
auth_passwd => 'admin_passwd',
host => '11.22.33.44',
);
# init
my $da = API::DirectAdmin->new(%auth);
### Get all panel IP
my $ip_list = $da->ip->list();
unless ($ip_list && ref $ip_list eq 'ARRAY' && scalar @$ip_list) {
lib/API/DirectAdmin.pm view on Meta::CPAN
=item show_packages
Return list of available packages.
Note: If you created packages through administrator user - you must use admin's login and password for authorisation. Obviously, if packages was created by reseller user - use reseller authorisation.
Example:
my $packages = $da->user->show_packages();
lib/API/DirectAdmin.pm view on Meta::CPAN
=item add
Add new domain to user through you connect to server.
Note: For adding domains for customers and you don't khow their password use: auth_user = 'admin_name|customer_name' in auth hash.
Example:
my %auth = (
auth_user => 'admin_name|customer_name',
auth_passwd => 'admin_passwd',
host => '11.22.33.44',
);
# init
my $da = API::DirectAdmin->new(%auth);
$result = $da->domain->add({
domain => 'newdomain.com',
php => 'ON',
cgi => 'ON',
lib/API/DirectAdmin.pm view on Meta::CPAN
Add database to user. Prefix "username_" will be added to 'name' and 'user';
Example:
my %auth = (
auth_user => 'admin_name|customer',
auth_passwd => 'admin_passwd',
host => '11.22.33.44',
);
# init
my $da = API::DirectAdmin->new(%auth);
my $result = $da->mysql->adddb( {
name => 'default', # will be 'customer_default'
user => 'default', # will be 'customer_default'
passwd => 'password',
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Docker.pm view on Meta::CPAN
Directory holding the TLS certificates, in the layout the C<docker> CLI
writes: F<ca.pem> as the trust anchor, F<cert.pem> and F<key.pem> as this
client's certificate and key. Defaults to C<$ENV{DOCKER_CERT_PATH}>.
Each file is used if it is there. F<ca.pem> alone is a daemon this client
verifies but does not authenticate to; F<cert.pem> without F<key.pem> or the
reverse is a croak, since half a client certificate is an accident rather than
a mode. A C<cert_path> naming something that is not a directory croaks too.
B<Read only when L</tls> is set.> The default comes from the environment, and
C<DOCKER_CERT_PATH> is exported on plenty of machines that run the C<docker>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/API/Drip/Request.pm view on Meta::CPAN
my $request = HTTP::Request->new( $method => $uri->as_string, );
if ( ref($content) ) {
$request->content_type('application/vnd.api+json');
$request->content( encode_json( $content ) );
}
$request->authorization_basic( $self->{DRIP_TOKEN}, '' );
$self->{agent} //= LWP::UserAgent->new( agent => $self->{DRIP_AGENT} );
my $result = $self->{agent}->request( $request );
unless ( $result->is_success ) {
view all matches for this distribution
view release on metacpan or search on metacpan
examples/edw/Rest.pl view on Meta::CPAN
# @file Rest.pl
#
# @brief Example of Eulerian Data Warehouse Peer performing an Analysis using
# Rest Protocol.
#
# @author Thorillon Xavier:x.thorillon@eulerian.com
#
# @date 25/11/2021
#
# @version 1.0
#
view all matches for this distribution
view release on metacpan or search on metacpan
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
view all matches for this distribution
view release on metacpan or search on metacpan
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
view all matches for this distribution
view release on metacpan or search on metacpan
The license agreements of most software companies try to keep users
at the mercy of those companies. By contrast, our General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. The
General Public License applies to the Free Software Foundation's
software and to any other program whose authors commit to using it.
You can use it for your programs, too.
When we speak of free software, we are referring to freedom, not
price. Specifically, the General Public License is designed to make
sure that you have the freedom to give away or sell copies of free
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
Software Foundation. If the Program does not specify a version number of
the license, you may choose any version ever published by the Free Software
Foundation.
8. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the
"copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) 19yy <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) 19xx name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the
view all matches for this distribution