code stringlengths 2 1.05M | repo_name stringlengths 5 101 | path stringlengths 4 991 | language stringclasses 3 values | license stringclasses 5 values | size int64 2 1.05M |
|---|---|---|---|---|---|
=pod
=head1 NAME
pkeyutl - public key algorithm utility
=head1 SYNOPSIS
B<openssl> B<pkeyutl>
[B<-in file>]
[B<-out file>]
[B<-sigfile file>]
[B<-inkey file>]
[B<-keyform PEM|DER>]
[B<-passin arg>]
[B<-peerkey file>]
[B<-peerform PEM|DER>]
[B<-pubin>]
[B<-certin>]
[B<-rev>]
[B<-sign>]
[B<-verify>]
[B<-verifyrecover>]
[B<-encrypt>]
[B<-decrypt>]
[B<-derive>]
[B<-pkeyopt opt:value>]
[B<-hexdump>]
[B<-asn1parse>]
[B<-engine id>]
=head1 DESCRIPTION
The B<pkeyutl> command can be used to perform public key operations using
any supported algorithm.
=head1 COMMAND OPTIONS
=over 4
=item B<-in filename>
This specifies the input filename to read data from or standard input
if this option is not specified.
=item B<-out filename>
specifies the output filename to write to or standard output by
default.
=item B<-inkey file>
the input key file, by default it should be a private key.
=item B<-keyform PEM|DER>
the key format PEM, DER or ENGINE.
=item B<-passin arg>
the input key password source. For more information about the format of B<arg>
see the B<PASS PHRASE ARGUMENTS> section in L<openssl(1)>.
=item B<-peerkey file>
the peer key file, used by key derivation (agreement) operations.
=item B<-peerform PEM|DER>
the peer key format PEM, DER or ENGINE.
=item B<-engine id>
specifying an engine (by its unique B<id> string) will cause B<pkeyutl>
to attempt to obtain a functional reference to the specified engine,
thus initialising it if needed. The engine will then be set as the default
for all available algorithms.
=item B<-pubin>
the input file is a public key.
=item B<-certin>
the input is a certificate containing a public key.
=item B<-rev>
reverse the order of the input buffer. This is useful for some libraries
(such as CryptoAPI) which represent the buffer in little endian format.
=item B<-sign>
sign the input data and output the signed result. This requires
a private key.
=item B<-verify>
verify the input data against the signature file and indicate if the
verification succeeded or failed.
=item B<-verifyrecover>
verify the input data and output the recovered data.
=item B<-encrypt>
encrypt the input data using a public key.
=item B<-decrypt>
decrypt the input data using a private key.
=item B<-derive>
derive a shared secret using the peer key.
=item B<-hexdump>
hex dump the output data.
=item B<-asn1parse>
asn1parse the output data, this is useful when combined with the
B<-verifyrecover> option when an ASN1 structure is signed.
=back
=head1 NOTES
The operations and options supported vary according to the key algorithm
and its implementation. The OpenSSL operations and options are indicated below.
Unless otherwise mentioned all algorithms support the B<digest:alg> option
which specifies the digest in use for sign, verify and verifyrecover operations.
The value B<alg> should represent a digest name as used in the
EVP_get_digestbyname() function for example B<sha1>.
=head1 RSA ALGORITHM
The RSA algorithm supports encrypt, decrypt, sign, verify and verifyrecover
operations in general. Some padding modes only support some of these
operations however.
=over 4
=item -B<rsa_padding_mode:mode>
This sets the RSA padding mode. Acceptable values for B<mode> are B<pkcs1> for
PKCS#1 padding, B<sslv23> for SSLv23 padding, B<none> for no padding, B<oaep>
for B<OAEP> mode, B<x931> for X9.31 mode and B<pss> for PSS.
In PKCS#1 padding if the message digest is not set then the supplied data is
signed or verified directly instead of using a B<DigestInfo> structure. If a
digest is set then the a B<DigestInfo> structure is used and its the length
must correspond to the digest type.
For B<oaep> mode only encryption and decryption is supported.
For B<x931> if the digest type is set it is used to format the block data
otherwise the first byte is used to specify the X9.31 digest ID. Sign,
verify and verifyrecover are can be performed in this mode.
For B<pss> mode only sign and verify are supported and the digest type must be
specified.
=item B<rsa_pss_saltlen:len>
For B<pss> mode only this option specifies the salt length. Two special values
are supported: -1 sets the salt length to the digest length. When signing -2
sets the salt length to the maximum permissible value. When verifying -2 causes
the salt length to be automatically determined based on the B<PSS> block
structure.
=back
=head1 DSA ALGORITHM
The DSA algorithm supports signing and verification operations only. Currently
there are no additional options other than B<digest>. Only the SHA1
digest can be used and this digest is assumed by default.
=head1 DH ALGORITHM
The DH algorithm only supports the derivation operation and no additional
options.
=head1 EC ALGORITHM
The EC algorithm supports sign, verify and derive operations. The sign and
verify operations use ECDSA and derive uses ECDH. Currently there are no
additional options other than B<digest>. Only the SHA1 digest can be used and
this digest is assumed by default.
=head1 EXAMPLES
Sign some data using a private key:
openssl pkeyutl -sign -in file -inkey key.pem -out sig
Recover the signed data (e.g. if an RSA key is used):
openssl pkeyutl -verifyrecover -in sig -inkey key.pem
Verify the signature (e.g. a DSA key):
openssl pkeyutl -verify -in file -sigfile sig -inkey key.pem
Sign data using a message digest value (this is currently only valid for RSA):
openssl pkeyutl -sign -in file -inkey key.pem -out sig -pkeyopt digest:sha256
Derive a shared secret value:
openssl pkeyutl -derive -inkey key.pem -peerkey pubkey.pem -out secret
=head1 SEE ALSO
L<genpkey(1)>, L<pkey(1)>, L<rsautl(1)>
L<dgst(1)>, L<rsa(1)>, L<genrsa(1)>
| vbloodv/blood | extern/openssl.orig/doc/apps/pkeyutl.pod | Perl | mit | 5,693 |
###########################################################################
#
# This file is auto-generated by the Perl DateTime Suite time locale
# generator (0.04). This code generator comes with the
# DateTime::Locale distribution in the tools/ directory, and is called
# generate_from_cldr.
#
# This file as generated from the CLDR XML locale data. See the
# LICENSE.cldr file included in this distribution for license details.
#
# This file was generated from the source file ja.xml.
# The source file version number was 1.114, generated on
# 2007/07/24 23:39:15.
#
# Do not edit this file directly.
#
###########################################################################
package DateTime::Locale::ja;
use strict;
BEGIN
{
if ( $] >= 5.006 )
{
require utf8; utf8->import;
}
}
use DateTime::Locale::root;
@DateTime::Locale::ja::ISA = qw(DateTime::Locale::root);
my @day_names = (
"ζζζ₯",
"η«ζζ₯",
"ζ°΄ζζ₯",
"ζ¨ζζ₯",
"ιζζ₯",
"εζζ₯",
"ζ₯ζζ₯",
);
my @day_abbreviations = (
"ζ",
"η«",
"ζ°΄",
"ζ¨",
"ι",
"ε",
"ζ₯",
);
my @day_narrows = (
"ζ",
"η«",
"ζ°΄",
"ζ¨",
"ι",
"ε",
"ζ₯",
);
my @month_names = (
"1\ ζ",
"2\ ζ",
"3\ ζ",
"4\ ζ",
"5\ ζ",
"6\ ζ",
"7\ ζ",
"8\ ζ",
"9\ ζ",
"10\ ζ",
"11\ ζ",
"12\ ζ",
);
my @month_abbreviations = (
"1\ ζ",
"2\ ζ",
"3\ ζ",
"4\ ζ",
"5\ ζ",
"6\ ζ",
"7\ ζ",
"8\ ζ",
"9\ ζ",
"10\ ζ",
"11\ ζ",
"12\ ζ",
);
my @month_narrows = (
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"11",
"12",
);
my @quarter_names = (
"第\ 1\ εεζ",
"第\ 2\ εεζ",
"第\ 3\ εεζ",
"第\ 4\ εεζ",
);
my @quarter_abbreviations = (
"Q1",
"Q2",
"Q3",
"Q4",
);
my @am_pms = (
"εε",
"εεΎ",
);
my @era_names = (
"η΄ε
ε",
"θ₯Ώζ¦",
);
my @era_abbreviations = (
"η΄ε
ε",
"θ₯Ώζ¦",
);
my $date_before_time = "1";
my $date_parts_order = "ymd";
sub day_names { \@day_names }
sub day_abbreviations { \@day_abbreviations }
sub day_narrows { \@day_narrows }
sub month_names { \@month_names }
sub month_abbreviations { \@month_abbreviations }
sub month_narrows { \@month_narrows }
sub quarter_names { \@quarter_names }
sub quarter_abbreviations { \@quarter_abbreviations }
sub am_pms { \@am_pms }
sub era_names { \@era_names }
sub era_abbreviations { \@era_abbreviations }
sub full_date_format { "\%\{ce_year\}εΉ΄\%\{month\}ζ\%\{day\}ζ₯\%A" }
sub long_date_format { "\%\{ce_year\}εΉ΄\%\{month\}ζ\%\{day\}ζ₯" }
sub medium_date_format { "\%\{ce_year\}\/\%m\/\%d" }
sub short_date_format { "\%y\/\%m\/\%d" }
sub full_time_format { "\%\{hour\}ζ\%Mε\%Sη§v" }
sub long_time_format { "\%\{hour\}\:\%M\:\%S\:\%\{time_zone_long_name\}" }
sub medium_time_format { "\%\{hour\}\:\%M\:\%S" }
sub short_time_format { "\%\{hour\}\:\%M" }
sub date_before_time { $date_before_time }
sub date_parts_order { $date_parts_order }
1;
| carlgao/lenga | images/lenny64-peon/usr/share/perl5/DateTime/Locale/ja.pm | Perl | mit | 3,216 |
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
package BMS::SnpTracker::MapLoc::Text;
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
=head1 DESCRIPTION
=head1 SYNOPSIS
=head1 AUTHOR
Charles Tilford <podmail@biocode.fastmail.fm>
//Subject __must__ include 'Perl' to escape mail filters//
=head1 LICENSE
Copyright 2014 Charles Tilford
http://mit-license.org/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
=cut
use strict;
use BMS::SnpTracker::MapLoc::Tagged;
use vars qw(@ISA);
@ISA = qw(BMS::SnpTracker::MapLoc::Tagged);
sub new {
my $proto = shift;
my $class = ref($proto) || $proto;
my ($ml, $txt) = @_;
return undef unless ($txt);
my $self = {
TEXT => $txt,
MAPLOC => $ml,
};
bless ($self, $class);
return $self;
}
sub obj_type { return "Text"; }
# ::Text
sub to_one_line {
my $self = shift;
return sprintf("[%d] %s", $self->handle(), $self->text());
}
# ::Text
sub to_text {
my $self = shift;
$self->bench_start();
my $pre = shift || "";
my $txt = sprintf("%s%s [%s]\n", $pre, $self->text(), $self->handle());
$txt .= $self->tag_text($pre." ");
$self->bench_end();
return $txt;
}
sub to_html {
my $self = shift;
$self->bench_start();
my $html = sprintf("<div class='%s'><span class='medlabel'>%s</span> <span class='pkey'>%s</span><br />\n", $self->obj_type(), $self->text(), $self->handle());
$html .= $self->tag_html();
$html .= "</div>\n";
$self->bench_end();
return $html;
}
*name = \&text;
*txt = \&text;
sub text {
return shift->{TEXT};
}
*text_id = \&pkey;
*txt_id = \&pkey;
*id = \&pkey;
*handle = \&pkey;
sub pkey {
my $self = shift;
return $self->{TXT_ID} ||= $self->maploc->text_to_pkey( $self->{TEXT} );
}
*is_in_db = \&is_known;
sub is_known {
my $self = shift;
return ($self->{TXT_ID}) if ($self->{TXT_ID});
$self->bench_start();
my $ml = $self->maploc();
my $txt = $self->text();
my $sth = $ml->{STH}{CHECK_FOR_KNOWNTEXT} ||= $ml->dbh->prepare
( -name => "Check for existing text in DB",
-sql => "SELECT txt_id FROM normtxt ".
"WHERE md5sum = md5(?) AND txt = ?");
my @ids = $sth->get_array_for_field( $txt, $txt);
$self->bench_end();
return 0 if ($#ids == -1);
return $self->{TXT_ID} = $ids[0];
}
sub read {
my $self = shift;
$self->read_tags();
}
# ::Text
*update = \&write;
sub write {
my $self = shift;
$self->write_tags();
}
# ::Text
sub json_data {
my $self = shift;
$self->bench_start();
$self->read();
my $rv = {
text => $self->text(),
tags => $self->all_tag_values(),
pid => $self->pkey(),
};
$self->bench_end();
return $rv;
}
| VCF/MapLoc | BMS/SnpTracker/MapLoc/Text.pm | Perl | mit | 3,992 |
#!/usr/bin/perl
use Getopt::Std;
############################################################################
# makephases.pl - Generates a phases.c file on stdout
#
# Copyright (c) 2002-2011, R. Bryant and D. O'Hallaron, All rights reserved.
############################################################################
$| = 1; # autoflush output on every print statement
#
# Some constant strings that are used in the phase declarations.
#
$MIN_BASE = 2; # Min and max base values for various recursive sequences
$MAX_BASE = 4;
#
# Some functions for generating random values that will be plugged
# into the phase source files.
# Return a letter from the alphabet
sub choose_letter
{
my (@list) = ("a" .. "z");
return $list[rand(@list)];
}
# Return an integer in the range [50,1000]
sub choose_positive
{
return int(rand(951)) + 50;
}
# Return the sum of six integers in the range [1,16]
sub choose_sum_of_six
{
my (@array) = (2,
10,
6,
1,
12,
16,
9,
3,
4,
7,
14,
5,
11,
8,
15,
13);
my ($sum) = 0;
my ($i);
my (@tmp);
$sum_of_six_inv = "";
for ($i=0; $i < 6; $i++) {
$tmp[$i] = int(rand(16)); # index is [0,15]
$sum += $array[$tmp[$i]];
$tmp[$i] =~ s/10/:/;
$tmp[$i] =~ s/11/;/;
$tmp[$i] =~ s/12/</;
$tmp[$i] =~ s/13/=/;
$tmp[$i] =~ s/14/>/;
$tmp[$i] =~ s/15/?/;
$sum_of_six_inv = $sum_of_six_inv.$tmp[$i];
}
return $sum;
}
# Return a six-letter word
sub choose_short_word
{
my (@list) = ("devils", "flyers", "flames", "bruins", "sabres", "oilers");
return $list[rand(@list)];
}
# Return an integer in the range [0,15]
sub choose_count_value
{
return int(rand(1)) + 15;
}
# Return some string
sub choose_some_string
{
my (@list) = ("When I get angry, Mr. Bigglesworth gets upset.",
"Crikey! I have lost my mojo!",
"He is evil and fits easily into most overhead storage bins.",
"When a problem comes along, you must zip it!",
"I turned the moon into something I call a Death Star.",
"Why make trillions when we could make... billions?",
"The moon unit will be divided into two divisions.",
"The future will be better tomorrow.",
"Public speaking is very easy.",
"Verbosity leads to unclear, inarticulate things.",
"I am not part of the problem. I am a Republican.",
"Houses will begat jobs, jobs will begat houses.",
"I am for medical liability at the federal level.",
"Wow! Brazil is big.",
"Brownie, you are doing a heck of a job.",
"There are rumors on the internets.",
"I was trying to give Tina Fey more material.",
"You can Russia from land here in Alaska.",
"I am the mayor. I can do anything I want.",
"We have to stand with our North Korean allies.",
"I can see Russia from my house!",
"All your base are belong to us.",
"I am just a renegade hockey mom.",
"And they have no disregard for human life.",
"Border relations with Canada have never been better.",
"For NASA, space is still a high priority.");
return $list[rand(@list)];
}
# Return an integer in the range [2,9]
sub choose_place_in_list
{
return int(rand(8)) + 2;
}
# Return a factorial in the range [4!,10!]
sub choose_factorial
{
my(@list) = (24, 120, 720, 5040, 40320, 362880, 3628800);
return $list[rand(@list)];
}
# Return a Fibonacci number in the range [F(9), ..., F(23)]
sub choose_fib_number
{
my (@list) = (55, 89, 144, 233, 377, 610, 987, 1597, 2584,
4181, 6765, 10946, 17711, 28657, 46368);
return $list[rand(@list)];
}
# Return a sequence index (n) in the range [5, ..., 9]
sub choose_seq_index
{
return int(rand(5)) + 5;
}
# Return a sequence base in the range [MIN_BASE, ..., MAX_BASE]
sub choose_seq_base
{
return int(rand($MAX_BASE - $MIN_BASE + 1)) + $MIN_BASE;
}
# Return a number from the geometric sequence [49, 120,..., 5764801]
sub choose_geom_number
{
my (@list) = (49, 343, 2401, 16807, 117649, 823543, 5764801);
return $list[rand(@list)];
}
# Return a number in the range [0,7]
sub choose_random_path
{
return int(rand(8));
}
# Return sum of indexes in a binary search for over the range [0,14]
sub choose_search_sum
{
my (@list) = (7, 10, 11, 13, 15, 19, 21, 18, 27, 35, 37, 31, 43, 45);
return $list[rand(@list)];
}
##############
# Main routine
##############
#
# Parse and check the command line arguments
#
getopts('hnd:i:u:p:');
if ($opt_h) {
usage("");
}
# Is this a notifying custom bomb (default: no)
$notifying = $opt_n;
# Every bomb gets a positive integer bomb ID
if (!$bomb_id) {
$bomb_id = 0;
}
(($bomb_id = $opt_i) >= 0)
or usage("Invalid bomb ID (-i)");
# Generic bombs cannot be compiled with notification
if ($bomb_id == 0 and $notifying) {
usage("Generic bombs (-i 0) cannot notify (-n)");
}
# Arguments for custom (-i > 0) notifying (-n) bombs
if ($bomb_id > 0 and $notifying) {
($userid = $opt_u)
or usage("Missing arg required for notifying custom bomb (-u)");
}
# If -p, use specific phase variants, otherwise use random variants
if ($opt_p) {
@phases = split(//, $opt_p);
((@phases == 6) and (($opt_p =~ tr/a-c//) == 6))
or usage("Invalid phase pattern (-p)");
}
else {
@list = ("a", "b", "c");
for ($i=0; $i<6; $i++) {
$phases[$i] = $list[rand(@list)];
}
}
$phases[6] = ""; #secret phase
# Set the directory that contains the phase templates
$phasedir = $opt_d;
(-d $phasedir and -e $phasedir and -r $phasedir)
or die "$0: ERROR: Could not read directory $phasedir\n";
#
# Emit the phases.c header
#
system("cat $phasedir/phasehead.c") == 0
or die "$0: Could not read $phasedir/phasehead.c\n";
#
# Emit the global definitions
#
printf("/* Global bomb ID */\n");
printf("int bomb_id = $bomb_id;\n\n");
# Only emit these for notifying bombs
if ($bomb_id > 0 and $notifying) {
printf("/* Global userid */\n");
printf("char userid[1024] = \"$userid\";\n\n");
}
#
# Emit the bomb phases
#
for ($i = 1; $i <= 7; $i++) {
$infile = "$phasedir/phase$i$phases[$i-1].c";
open(INFILE, $infile)
or die "$0: ERROR: could not open $infile: $!\n";
# process each line in phase template
while (<INFILE>) {
$line = $_;
#
# First we'll substitute any tags that need to be remembered
# so that we can generate the solution.
#
if ($line =~ POSITIVE_SET) {
$positive = choose_positive();
$line =~ s/POSITIVE_SET/$positive/;
}
if ($line =~ SOME_STRING_SET) {
$some_string = choose_some_string();
$line =~ s/SOME_STRING_SET/$some_string/;
}
if ($line =~ FIB_NUMBER_SET) {
$fib_number = choose_fib_number();
$line =~ s/FIB_NUMBER_SET/$fib_number/;
}
if ($line =~ GEOM_NUMBER_SET) {
$geom_number = choose_geom_number();
$line =~ s/GEOM_NUMBER_SET/$geom_number/;
}
if ($line =~ FACTORIAL_SET) {
$factorial = choose_factorial();
$line =~ s/FACTORIAL_SET/$factorial/;
}
if ($line =~ SUM_OF_SIX_SET) { # also remembers inverse
$sum_of_six = choose_sum_of_six(); # in $sum_of_six_inv
$line =~ s/SUM_OF_SIX_SET/$sum_of_six/;
}
if ($line =~ PLACE_IN_LIST_SET) {
$place_in_list = choose_place_in_list();
$line =~ s/PLACE_IN_LIST_SET/$place_in_list/;
}
if ($line =~ COUNT_VALUE_SET) {
$count_value = choose_count_value();
$line =~ s/COUNT_VALUE_SET/$count_value/;
}
if ($line =~ SHORT_WORD_SET) {
$short_word = choose_short_word();
$line =~ s/SHORT_WORD_SET/$short_word/;
}
if ($line =~ LETTER_SET) {
$letter = choose_letter();
$line =~ s/LETTER_SET/$letter/;
}
if ($line =~ RANDOM_PATH_SET) {
$random_path = choose_random_path();
$line =~ s/RANDOM_PATH_SET/$random_path/;
}
if ($line =~ SEQ_INDEX_SET) {
$seq_index = choose_seq_index();
$line =~ s/SEQ_INDEX_SET/$seq_index/;
}
if ($line =~ SEQ_BASE_SET) {
$seq_base = choose_seq_base();
$line =~ s/SEQ_BASE_SET/$seq_base/;
}
if ($line =~ SEARCH_SUM_SET) {
$search_sum = choose_search_sum();
$line =~ s/SEARCH_SUM_SET/$search_sum/;
}
#
# Next, we substitute any tags we remembered for the solution
#
$line =~ s/POSITIVE_GET/$positive/;
$line =~ s/SOME_STRING_GET/$some_string/;
$line =~ s/FIB_NUMBER_GET/$fib_number/;
$line =~ s/GEOM_NUMBER_GET/$geom_number/;
$line =~ s/FACTORIAL_GET/$factorial/;
$line =~ s/PLACE_IN_LIST_GET/$place_in_list/;
$line =~ s/COUNT_VALUE_GET/$count_value/;
$line =~ s/SHORT_WORD_GET/$short_word/;
$line =~ s/LETTER_GET/$letter/;
$line =~ s/RANDOM_PATH_GET/$random_path/;
$line =~ s/SEQ_INDEX_GET/$seq_index/;
$line =~ s/SEQ_BASE_GET/$seq_base/;
$line =~ s/SEARCH_SUM_GET/$search_sum/;
#
# Next, we substitute tags whose inverses we
# remembered for solution
#
$line =~ s/SUM_OF_SIX_GET/$sum_of_six_inv/;
#
# Finally, we substitute any memoryless tags
#
$line =~ s/LETTER/choose_letter()/e;
$line =~ s/POSITIVE/choose_positive()/e;
$line =~ s/SUM_OF_SIX/choose_sum_of_six()/e;
$line =~ s/COUNT_VALUE/choose_count_value()/e;
$line =~ s/SOME_STRING/choose_some_string()/e;
$line =~ s/PLACE_IN_LIST/choose_place_in_list()/e;
$line =~ s/FACTORIAL/choose_factorial()/e;
$line =~ s/FIB_NUMBER/choose_fib_number()/e;
$line =~ s/GEOM_NUMBER/choose_geom_number()/e;
$line =~ s/RANDOM_PATH/choose_random_path()/e;
$line =~ s/MIN_BASE/$MIN_BASE/g;
$line =~ s/MAX_BASE/$MAX_BASE/g;
# Now output the modified line
print "$line";
}
close(INFILE);
}
exit;
#
# End of main routine
#
#
# usage - print help message and terminate
#
sub usage
{
printf STDERR "$_[0]\n";
printf STDERR "Usage: $0 [-hn] -d <dir> -i bombid [-u <userid> -p <phases>]\n";
printf STDERR "Options:\n";
printf STDERR " -d <dir> Directory of phase templates\n";
printf STDERR " -h Print this message\n";
printf STDERR " -i <bombid> Integer bomb ID (default: 0)\n";
printf STDERR " -n Make notifying (default: non-notifying)\n";
printf STDERR " -p <phases> Use specific [abc] phase variants (default: random)\n";
printf STDERR " e.g., '-p cababc' builds phases 1c, 2a, 3b, 4a, 5b, and 6c\n";
printf STDERR " -u <userid> Userid (notifying bombs only)\n";
die "\n";
}
| chaohu/Daily-Learning | Foundation-of-CS/ics14_lab1-3/lab2/src/makephases.pl | Perl | mit | 10,301 |
# This file is auto-generated by the Perl DateTime Suite time zone
# code generator (0.07) This code generator comes with the
# DateTime::TimeZone module distribution in the tools/ directory
#
# Generated from /tmp/BU3Xn7v6Kb/europe. Olson data version 2015g
#
# Do not edit this file directly.
#
package DateTime::TimeZone::Europe::London;
$DateTime::TimeZone::Europe::London::VERSION = '1.94';
use strict;
use Class::Singleton 1.03;
use DateTime::TimeZone;
use DateTime::TimeZone::OlsonDB;
@DateTime::TimeZone::Europe::London::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' );
my $spans =
[
[
DateTime::TimeZone::NEG_INFINITY, # utc_start
58283020875, # utc_end 1847-12-01 00:01:15 (Wed)
DateTime::TimeZone::NEG_INFINITY, # local_start
58283020800, # local_end 1847-12-01 00:00:00 (Wed)
-75,
0,
'LMT',
],
[
58283020875, # utc_start 1847-12-01 00:01:15 (Wed)
60443719200, # utc_end 1916-05-21 02:00:00 (Sun)
58283020875, # local_start 1847-12-01 00:01:15 (Wed)
60443719200, # local_end 1916-05-21 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60443719200, # utc_start 1916-05-21 02:00:00 (Sun)
60455210400, # utc_end 1916-10-01 02:00:00 (Sun)
60443722800, # local_start 1916-05-21 03:00:00 (Sun)
60455214000, # local_end 1916-10-01 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60455210400, # utc_start 1916-10-01 02:00:00 (Sun)
60471540000, # utc_end 1917-04-08 02:00:00 (Sun)
60455210400, # local_start 1916-10-01 02:00:00 (Sun)
60471540000, # local_end 1917-04-08 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60471540000, # utc_start 1917-04-08 02:00:00 (Sun)
60485536800, # utc_end 1917-09-17 02:00:00 (Mon)
60471543600, # local_start 1917-04-08 03:00:00 (Sun)
60485540400, # local_end 1917-09-17 03:00:00 (Mon)
3600,
1,
'BST',
],
[
60485536800, # utc_start 1917-09-17 02:00:00 (Mon)
60501780000, # utc_end 1918-03-24 02:00:00 (Sun)
60485536800, # local_start 1917-09-17 02:00:00 (Mon)
60501780000, # local_end 1918-03-24 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60501780000, # utc_start 1918-03-24 02:00:00 (Sun)
60518196000, # utc_end 1918-09-30 02:00:00 (Mon)
60501783600, # local_start 1918-03-24 03:00:00 (Sun)
60518199600, # local_end 1918-09-30 03:00:00 (Mon)
3600,
1,
'BST',
],
[
60518196000, # utc_start 1918-09-30 02:00:00 (Mon)
60533834400, # utc_end 1919-03-30 02:00:00 (Sun)
60518196000, # local_start 1918-09-30 02:00:00 (Mon)
60533834400, # local_end 1919-03-30 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60533834400, # utc_start 1919-03-30 02:00:00 (Sun)
60549645600, # utc_end 1919-09-29 02:00:00 (Mon)
60533838000, # local_start 1919-03-30 03:00:00 (Sun)
60549649200, # local_end 1919-09-29 03:00:00 (Mon)
3600,
1,
'BST',
],
[
60549645600, # utc_start 1919-09-29 02:00:00 (Mon)
60565284000, # utc_end 1920-03-28 02:00:00 (Sun)
60549645600, # local_start 1919-09-29 02:00:00 (Mon)
60565284000, # local_end 1920-03-28 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60565284000, # utc_start 1920-03-28 02:00:00 (Sun)
60583514400, # utc_end 1920-10-25 02:00:00 (Mon)
60565287600, # local_start 1920-03-28 03:00:00 (Sun)
60583518000, # local_end 1920-10-25 03:00:00 (Mon)
3600,
1,
'BST',
],
[
60583514400, # utc_start 1920-10-25 02:00:00 (Mon)
60597338400, # utc_end 1921-04-03 02:00:00 (Sun)
60583514400, # local_start 1920-10-25 02:00:00 (Mon)
60597338400, # local_end 1921-04-03 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60597338400, # utc_start 1921-04-03 02:00:00 (Sun)
60613149600, # utc_end 1921-10-03 02:00:00 (Mon)
60597342000, # local_start 1921-04-03 03:00:00 (Sun)
60613153200, # local_end 1921-10-03 03:00:00 (Mon)
3600,
1,
'BST',
],
[
60613149600, # utc_start 1921-10-03 02:00:00 (Mon)
60628183200, # utc_end 1922-03-26 02:00:00 (Sun)
60613149600, # local_start 1921-10-03 02:00:00 (Mon)
60628183200, # local_end 1922-03-26 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60628183200, # utc_start 1922-03-26 02:00:00 (Sun)
60645117600, # utc_end 1922-10-08 02:00:00 (Sun)
60628186800, # local_start 1922-03-26 03:00:00 (Sun)
60645121200, # local_end 1922-10-08 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60645117600, # utc_start 1922-10-08 02:00:00 (Sun)
60662052000, # utc_end 1923-04-22 02:00:00 (Sun)
60645117600, # local_start 1922-10-08 02:00:00 (Sun)
60662052000, # local_end 1923-04-22 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60662052000, # utc_start 1923-04-22 02:00:00 (Sun)
60674752800, # utc_end 1923-09-16 02:00:00 (Sun)
60662055600, # local_start 1923-04-22 03:00:00 (Sun)
60674756400, # local_end 1923-09-16 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60674752800, # utc_start 1923-09-16 02:00:00 (Sun)
60692896800, # utc_end 1924-04-13 02:00:00 (Sun)
60674752800, # local_start 1923-09-16 02:00:00 (Sun)
60692896800, # local_end 1924-04-13 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60692896800, # utc_start 1924-04-13 02:00:00 (Sun)
60706807200, # utc_end 1924-09-21 02:00:00 (Sun)
60692900400, # local_start 1924-04-13 03:00:00 (Sun)
60706810800, # local_end 1924-09-21 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60706807200, # utc_start 1924-09-21 02:00:00 (Sun)
60724951200, # utc_end 1925-04-19 02:00:00 (Sun)
60706807200, # local_start 1924-09-21 02:00:00 (Sun)
60724951200, # local_end 1925-04-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60724951200, # utc_start 1925-04-19 02:00:00 (Sun)
60739466400, # utc_end 1925-10-04 02:00:00 (Sun)
60724954800, # local_start 1925-04-19 03:00:00 (Sun)
60739470000, # local_end 1925-10-04 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60739466400, # utc_start 1925-10-04 02:00:00 (Sun)
60756400800, # utc_end 1926-04-18 02:00:00 (Sun)
60739466400, # local_start 1925-10-04 02:00:00 (Sun)
60756400800, # local_end 1926-04-18 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60756400800, # utc_start 1926-04-18 02:00:00 (Sun)
60770916000, # utc_end 1926-10-03 02:00:00 (Sun)
60756404400, # local_start 1926-04-18 03:00:00 (Sun)
60770919600, # local_end 1926-10-03 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60770916000, # utc_start 1926-10-03 02:00:00 (Sun)
60787245600, # utc_end 1927-04-10 02:00:00 (Sun)
60770916000, # local_start 1926-10-03 02:00:00 (Sun)
60787245600, # local_end 1927-04-10 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60787245600, # utc_start 1927-04-10 02:00:00 (Sun)
60802365600, # utc_end 1927-10-02 02:00:00 (Sun)
60787249200, # local_start 1927-04-10 03:00:00 (Sun)
60802369200, # local_end 1927-10-02 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60802365600, # utc_start 1927-10-02 02:00:00 (Sun)
60819904800, # utc_end 1928-04-22 02:00:00 (Sun)
60802365600, # local_start 1927-10-02 02:00:00 (Sun)
60819904800, # local_end 1928-04-22 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60819904800, # utc_start 1928-04-22 02:00:00 (Sun)
60834420000, # utc_end 1928-10-07 02:00:00 (Sun)
60819908400, # local_start 1928-04-22 03:00:00 (Sun)
60834423600, # local_end 1928-10-07 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60834420000, # utc_start 1928-10-07 02:00:00 (Sun)
60851354400, # utc_end 1929-04-21 02:00:00 (Sun)
60834420000, # local_start 1928-10-07 02:00:00 (Sun)
60851354400, # local_end 1929-04-21 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60851354400, # utc_start 1929-04-21 02:00:00 (Sun)
60865869600, # utc_end 1929-10-06 02:00:00 (Sun)
60851358000, # local_start 1929-04-21 03:00:00 (Sun)
60865873200, # local_end 1929-10-06 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60865869600, # utc_start 1929-10-06 02:00:00 (Sun)
60882199200, # utc_end 1930-04-13 02:00:00 (Sun)
60865869600, # local_start 1929-10-06 02:00:00 (Sun)
60882199200, # local_end 1930-04-13 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60882199200, # utc_start 1930-04-13 02:00:00 (Sun)
60897319200, # utc_end 1930-10-05 02:00:00 (Sun)
60882202800, # local_start 1930-04-13 03:00:00 (Sun)
60897322800, # local_end 1930-10-05 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60897319200, # utc_start 1930-10-05 02:00:00 (Sun)
60914253600, # utc_end 1931-04-19 02:00:00 (Sun)
60897319200, # local_start 1930-10-05 02:00:00 (Sun)
60914253600, # local_end 1931-04-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60914253600, # utc_start 1931-04-19 02:00:00 (Sun)
60928768800, # utc_end 1931-10-04 02:00:00 (Sun)
60914257200, # local_start 1931-04-19 03:00:00 (Sun)
60928772400, # local_end 1931-10-04 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60928768800, # utc_start 1931-10-04 02:00:00 (Sun)
60945703200, # utc_end 1932-04-17 02:00:00 (Sun)
60928768800, # local_start 1931-10-04 02:00:00 (Sun)
60945703200, # local_end 1932-04-17 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60945703200, # utc_start 1932-04-17 02:00:00 (Sun)
60960218400, # utc_end 1932-10-02 02:00:00 (Sun)
60945706800, # local_start 1932-04-17 03:00:00 (Sun)
60960222000, # local_end 1932-10-02 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60960218400, # utc_start 1932-10-02 02:00:00 (Sun)
60976548000, # utc_end 1933-04-09 02:00:00 (Sun)
60960218400, # local_start 1932-10-02 02:00:00 (Sun)
60976548000, # local_end 1933-04-09 02:00:00 (Sun)
0,
0,
'GMT',
],
[
60976548000, # utc_start 1933-04-09 02:00:00 (Sun)
60992272800, # utc_end 1933-10-08 02:00:00 (Sun)
60976551600, # local_start 1933-04-09 03:00:00 (Sun)
60992276400, # local_end 1933-10-08 03:00:00 (Sun)
3600,
1,
'BST',
],
[
60992272800, # utc_start 1933-10-08 02:00:00 (Sun)
61009207200, # utc_end 1934-04-22 02:00:00 (Sun)
60992272800, # local_start 1933-10-08 02:00:00 (Sun)
61009207200, # local_end 1934-04-22 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61009207200, # utc_start 1934-04-22 02:00:00 (Sun)
61023722400, # utc_end 1934-10-07 02:00:00 (Sun)
61009210800, # local_start 1934-04-22 03:00:00 (Sun)
61023726000, # local_end 1934-10-07 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61023722400, # utc_start 1934-10-07 02:00:00 (Sun)
61040052000, # utc_end 1935-04-14 02:00:00 (Sun)
61023722400, # local_start 1934-10-07 02:00:00 (Sun)
61040052000, # local_end 1935-04-14 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61040052000, # utc_start 1935-04-14 02:00:00 (Sun)
61055172000, # utc_end 1935-10-06 02:00:00 (Sun)
61040055600, # local_start 1935-04-14 03:00:00 (Sun)
61055175600, # local_end 1935-10-06 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61055172000, # utc_start 1935-10-06 02:00:00 (Sun)
61072106400, # utc_end 1936-04-19 02:00:00 (Sun)
61055172000, # local_start 1935-10-06 02:00:00 (Sun)
61072106400, # local_end 1936-04-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61072106400, # utc_start 1936-04-19 02:00:00 (Sun)
61086621600, # utc_end 1936-10-04 02:00:00 (Sun)
61072110000, # local_start 1936-04-19 03:00:00 (Sun)
61086625200, # local_end 1936-10-04 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61086621600, # utc_start 1936-10-04 02:00:00 (Sun)
61103556000, # utc_end 1937-04-18 02:00:00 (Sun)
61086621600, # local_start 1936-10-04 02:00:00 (Sun)
61103556000, # local_end 1937-04-18 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61103556000, # utc_start 1937-04-18 02:00:00 (Sun)
61118071200, # utc_end 1937-10-03 02:00:00 (Sun)
61103559600, # local_start 1937-04-18 03:00:00 (Sun)
61118074800, # local_end 1937-10-03 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61118071200, # utc_start 1937-10-03 02:00:00 (Sun)
61134400800, # utc_end 1938-04-10 02:00:00 (Sun)
61118071200, # local_start 1937-10-03 02:00:00 (Sun)
61134400800, # local_end 1938-04-10 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61134400800, # utc_start 1938-04-10 02:00:00 (Sun)
61149520800, # utc_end 1938-10-02 02:00:00 (Sun)
61134404400, # local_start 1938-04-10 03:00:00 (Sun)
61149524400, # local_end 1938-10-02 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61149520800, # utc_start 1938-10-02 02:00:00 (Sun)
61166455200, # utc_end 1939-04-16 02:00:00 (Sun)
61149520800, # local_start 1938-10-02 02:00:00 (Sun)
61166455200, # local_end 1939-04-16 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61166455200, # utc_start 1939-04-16 02:00:00 (Sun)
61185204000, # utc_end 1939-11-19 02:00:00 (Sun)
61166458800, # local_start 1939-04-16 03:00:00 (Sun)
61185207600, # local_end 1939-11-19 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61185204000, # utc_start 1939-11-19 02:00:00 (Sun)
61193671200, # utc_end 1940-02-25 02:00:00 (Sun)
61185204000, # local_start 1939-11-19 02:00:00 (Sun)
61193671200, # local_end 1940-02-25 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61193671200, # utc_start 1940-02-25 02:00:00 (Sun)
61231165200, # utc_end 1941-05-04 01:00:00 (Sun)
61193674800, # local_start 1940-02-25 03:00:00 (Sun)
61231168800, # local_end 1941-05-04 02:00:00 (Sun)
3600,
1,
'BST',
],
[
61231165200, # utc_start 1941-05-04 01:00:00 (Sun)
61239632400, # utc_end 1941-08-10 01:00:00 (Sun)
61231172400, # local_start 1941-05-04 03:00:00 (Sun)
61239639600, # local_end 1941-08-10 03:00:00 (Sun)
7200,
1,
'BDST',
],
[
61239632400, # utc_start 1941-08-10 01:00:00 (Sun)
61260195600, # utc_end 1942-04-05 01:00:00 (Sun)
61239636000, # local_start 1941-08-10 02:00:00 (Sun)
61260199200, # local_end 1942-04-05 02:00:00 (Sun)
3600,
1,
'BST',
],
[
61260195600, # utc_start 1942-04-05 01:00:00 (Sun)
61271082000, # utc_end 1942-08-09 01:00:00 (Sun)
61260202800, # local_start 1942-04-05 03:00:00 (Sun)
61271089200, # local_end 1942-08-09 03:00:00 (Sun)
7200,
1,
'BDST',
],
[
61271082000, # utc_start 1942-08-09 01:00:00 (Sun)
61291645200, # utc_end 1943-04-04 01:00:00 (Sun)
61271085600, # local_start 1942-08-09 02:00:00 (Sun)
61291648800, # local_end 1943-04-04 02:00:00 (Sun)
3600,
1,
'BST',
],
[
61291645200, # utc_start 1943-04-04 01:00:00 (Sun)
61303136400, # utc_end 1943-08-15 01:00:00 (Sun)
61291652400, # local_start 1943-04-04 03:00:00 (Sun)
61303143600, # local_end 1943-08-15 03:00:00 (Sun)
7200,
1,
'BDST',
],
[
61303136400, # utc_start 1943-08-15 01:00:00 (Sun)
61323094800, # utc_end 1944-04-02 01:00:00 (Sun)
61303140000, # local_start 1943-08-15 02:00:00 (Sun)
61323098400, # local_end 1944-04-02 02:00:00 (Sun)
3600,
1,
'BST',
],
[
61323094800, # utc_start 1944-04-02 01:00:00 (Sun)
61337610000, # utc_end 1944-09-17 01:00:00 (Sun)
61323102000, # local_start 1944-04-02 03:00:00 (Sun)
61337617200, # local_end 1944-09-17 03:00:00 (Sun)
7200,
1,
'BDST',
],
[
61337610000, # utc_start 1944-09-17 01:00:00 (Sun)
61354630800, # utc_end 1945-04-02 01:00:00 (Mon)
61337613600, # local_start 1944-09-17 02:00:00 (Sun)
61354634400, # local_end 1945-04-02 02:00:00 (Mon)
3600,
1,
'BST',
],
[
61354630800, # utc_start 1945-04-02 01:00:00 (Mon)
61363616400, # utc_end 1945-07-15 01:00:00 (Sun)
61354638000, # local_start 1945-04-02 03:00:00 (Mon)
61363623600, # local_end 1945-07-15 03:00:00 (Sun)
7200,
1,
'BDST',
],
[
61363616400, # utc_start 1945-07-15 01:00:00 (Sun)
61370877600, # utc_end 1945-10-07 02:00:00 (Sun)
61363620000, # local_start 1945-07-15 02:00:00 (Sun)
61370881200, # local_end 1945-10-07 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61370877600, # utc_start 1945-10-07 02:00:00 (Sun)
61387207200, # utc_end 1946-04-14 02:00:00 (Sun)
61370877600, # local_start 1945-10-07 02:00:00 (Sun)
61387207200, # local_end 1946-04-14 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61387207200, # utc_start 1946-04-14 02:00:00 (Sun)
61402327200, # utc_end 1946-10-06 02:00:00 (Sun)
61387210800, # local_start 1946-04-14 03:00:00 (Sun)
61402330800, # local_end 1946-10-06 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61402327200, # utc_start 1946-10-06 02:00:00 (Sun)
61416237600, # utc_end 1947-03-16 02:00:00 (Sun)
61402327200, # local_start 1946-10-06 02:00:00 (Sun)
61416237600, # local_end 1947-03-16 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61416237600, # utc_start 1947-03-16 02:00:00 (Sun)
61418653200, # utc_end 1947-04-13 01:00:00 (Sun)
61416241200, # local_start 1947-03-16 03:00:00 (Sun)
61418656800, # local_end 1947-04-13 02:00:00 (Sun)
3600,
1,
'BST',
],
[
61418653200, # utc_start 1947-04-13 01:00:00 (Sun)
61428934800, # utc_end 1947-08-10 01:00:00 (Sun)
61418660400, # local_start 1947-04-13 03:00:00 (Sun)
61428942000, # local_end 1947-08-10 03:00:00 (Sun)
7200,
1,
'BDST',
],
[
61428934800, # utc_start 1947-08-10 01:00:00 (Sun)
61436196000, # utc_end 1947-11-02 02:00:00 (Sun)
61428938400, # local_start 1947-08-10 02:00:00 (Sun)
61436199600, # local_end 1947-11-02 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61436196000, # utc_start 1947-11-02 02:00:00 (Sun)
61447687200, # utc_end 1948-03-14 02:00:00 (Sun)
61436196000, # local_start 1947-11-02 02:00:00 (Sun)
61447687200, # local_end 1948-03-14 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61447687200, # utc_start 1948-03-14 02:00:00 (Sun)
61467645600, # utc_end 1948-10-31 02:00:00 (Sun)
61447690800, # local_start 1948-03-14 03:00:00 (Sun)
61467649200, # local_end 1948-10-31 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61467645600, # utc_start 1948-10-31 02:00:00 (Sun)
61480951200, # utc_end 1949-04-03 02:00:00 (Sun)
61467645600, # local_start 1948-10-31 02:00:00 (Sun)
61480951200, # local_end 1949-04-03 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61480951200, # utc_start 1949-04-03 02:00:00 (Sun)
61499095200, # utc_end 1949-10-30 02:00:00 (Sun)
61480954800, # local_start 1949-04-03 03:00:00 (Sun)
61499098800, # local_end 1949-10-30 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61499095200, # utc_start 1949-10-30 02:00:00 (Sun)
61513610400, # utc_end 1950-04-16 02:00:00 (Sun)
61499095200, # local_start 1949-10-30 02:00:00 (Sun)
61513610400, # local_end 1950-04-16 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61513610400, # utc_start 1950-04-16 02:00:00 (Sun)
61529940000, # utc_end 1950-10-22 02:00:00 (Sun)
61513614000, # local_start 1950-04-16 03:00:00 (Sun)
61529943600, # local_end 1950-10-22 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61529940000, # utc_start 1950-10-22 02:00:00 (Sun)
61545060000, # utc_end 1951-04-15 02:00:00 (Sun)
61529940000, # local_start 1950-10-22 02:00:00 (Sun)
61545060000, # local_end 1951-04-15 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61545060000, # utc_start 1951-04-15 02:00:00 (Sun)
61561389600, # utc_end 1951-10-21 02:00:00 (Sun)
61545063600, # local_start 1951-04-15 03:00:00 (Sun)
61561393200, # local_end 1951-10-21 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61561389600, # utc_start 1951-10-21 02:00:00 (Sun)
61577114400, # utc_end 1952-04-20 02:00:00 (Sun)
61561389600, # local_start 1951-10-21 02:00:00 (Sun)
61577114400, # local_end 1952-04-20 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61577114400, # utc_start 1952-04-20 02:00:00 (Sun)
61593444000, # utc_end 1952-10-26 02:00:00 (Sun)
61577118000, # local_start 1952-04-20 03:00:00 (Sun)
61593447600, # local_end 1952-10-26 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61593444000, # utc_start 1952-10-26 02:00:00 (Sun)
61608564000, # utc_end 1953-04-19 02:00:00 (Sun)
61593444000, # local_start 1952-10-26 02:00:00 (Sun)
61608564000, # local_end 1953-04-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61608564000, # utc_start 1953-04-19 02:00:00 (Sun)
61623079200, # utc_end 1953-10-04 02:00:00 (Sun)
61608567600, # local_start 1953-04-19 03:00:00 (Sun)
61623082800, # local_end 1953-10-04 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61623079200, # utc_start 1953-10-04 02:00:00 (Sun)
61639408800, # utc_end 1954-04-11 02:00:00 (Sun)
61623079200, # local_start 1953-10-04 02:00:00 (Sun)
61639408800, # local_end 1954-04-11 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61639408800, # utc_start 1954-04-11 02:00:00 (Sun)
61654528800, # utc_end 1954-10-03 02:00:00 (Sun)
61639412400, # local_start 1954-04-11 03:00:00 (Sun)
61654532400, # local_end 1954-10-03 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61654528800, # utc_start 1954-10-03 02:00:00 (Sun)
61671463200, # utc_end 1955-04-17 02:00:00 (Sun)
61654528800, # local_start 1954-10-03 02:00:00 (Sun)
61671463200, # local_end 1955-04-17 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61671463200, # utc_start 1955-04-17 02:00:00 (Sun)
61685978400, # utc_end 1955-10-02 02:00:00 (Sun)
61671466800, # local_start 1955-04-17 03:00:00 (Sun)
61685982000, # local_end 1955-10-02 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61685978400, # utc_start 1955-10-02 02:00:00 (Sun)
61703517600, # utc_end 1956-04-22 02:00:00 (Sun)
61685978400, # local_start 1955-10-02 02:00:00 (Sun)
61703517600, # local_end 1956-04-22 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61703517600, # utc_start 1956-04-22 02:00:00 (Sun)
61718032800, # utc_end 1956-10-07 02:00:00 (Sun)
61703521200, # local_start 1956-04-22 03:00:00 (Sun)
61718036400, # local_end 1956-10-07 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61718032800, # utc_start 1956-10-07 02:00:00 (Sun)
61734362400, # utc_end 1957-04-14 02:00:00 (Sun)
61718032800, # local_start 1956-10-07 02:00:00 (Sun)
61734362400, # local_end 1957-04-14 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61734362400, # utc_start 1957-04-14 02:00:00 (Sun)
61749482400, # utc_end 1957-10-06 02:00:00 (Sun)
61734366000, # local_start 1957-04-14 03:00:00 (Sun)
61749486000, # local_end 1957-10-06 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61749482400, # utc_start 1957-10-06 02:00:00 (Sun)
61766416800, # utc_end 1958-04-20 02:00:00 (Sun)
61749482400, # local_start 1957-10-06 02:00:00 (Sun)
61766416800, # local_end 1958-04-20 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61766416800, # utc_start 1958-04-20 02:00:00 (Sun)
61780932000, # utc_end 1958-10-05 02:00:00 (Sun)
61766420400, # local_start 1958-04-20 03:00:00 (Sun)
61780935600, # local_end 1958-10-05 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61780932000, # utc_start 1958-10-05 02:00:00 (Sun)
61797866400, # utc_end 1959-04-19 02:00:00 (Sun)
61780932000, # local_start 1958-10-05 02:00:00 (Sun)
61797866400, # local_end 1959-04-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61797866400, # utc_start 1959-04-19 02:00:00 (Sun)
61812381600, # utc_end 1959-10-04 02:00:00 (Sun)
61797870000, # local_start 1959-04-19 03:00:00 (Sun)
61812385200, # local_end 1959-10-04 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61812381600, # utc_start 1959-10-04 02:00:00 (Sun)
61828711200, # utc_end 1960-04-10 02:00:00 (Sun)
61812381600, # local_start 1959-10-04 02:00:00 (Sun)
61828711200, # local_end 1960-04-10 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61828711200, # utc_start 1960-04-10 02:00:00 (Sun)
61843831200, # utc_end 1960-10-02 02:00:00 (Sun)
61828714800, # local_start 1960-04-10 03:00:00 (Sun)
61843834800, # local_end 1960-10-02 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61843831200, # utc_start 1960-10-02 02:00:00 (Sun)
61858951200, # utc_end 1961-03-26 02:00:00 (Sun)
61843831200, # local_start 1960-10-02 02:00:00 (Sun)
61858951200, # local_end 1961-03-26 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61858951200, # utc_start 1961-03-26 02:00:00 (Sun)
61877700000, # utc_end 1961-10-29 02:00:00 (Sun)
61858954800, # local_start 1961-03-26 03:00:00 (Sun)
61877703600, # local_end 1961-10-29 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61877700000, # utc_start 1961-10-29 02:00:00 (Sun)
61890400800, # utc_end 1962-03-25 02:00:00 (Sun)
61877700000, # local_start 1961-10-29 02:00:00 (Sun)
61890400800, # local_end 1962-03-25 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61890400800, # utc_start 1962-03-25 02:00:00 (Sun)
61909149600, # utc_end 1962-10-28 02:00:00 (Sun)
61890404400, # local_start 1962-03-25 03:00:00 (Sun)
61909153200, # local_end 1962-10-28 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61909149600, # utc_start 1962-10-28 02:00:00 (Sun)
61922455200, # utc_end 1963-03-31 02:00:00 (Sun)
61909149600, # local_start 1962-10-28 02:00:00 (Sun)
61922455200, # local_end 1963-03-31 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61922455200, # utc_start 1963-03-31 02:00:00 (Sun)
61940599200, # utc_end 1963-10-27 02:00:00 (Sun)
61922458800, # local_start 1963-03-31 03:00:00 (Sun)
61940602800, # local_end 1963-10-27 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61940599200, # utc_start 1963-10-27 02:00:00 (Sun)
61953300000, # utc_end 1964-03-22 02:00:00 (Sun)
61940599200, # local_start 1963-10-27 02:00:00 (Sun)
61953300000, # local_end 1964-03-22 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61953300000, # utc_start 1964-03-22 02:00:00 (Sun)
61972048800, # utc_end 1964-10-25 02:00:00 (Sun)
61953303600, # local_start 1964-03-22 03:00:00 (Sun)
61972052400, # local_end 1964-10-25 03:00:00 (Sun)
3600,
1,
'BST',
],
[
61972048800, # utc_start 1964-10-25 02:00:00 (Sun)
61984749600, # utc_end 1965-03-21 02:00:00 (Sun)
61972048800, # local_start 1964-10-25 02:00:00 (Sun)
61984749600, # local_end 1965-03-21 02:00:00 (Sun)
0,
0,
'GMT',
],
[
61984749600, # utc_start 1965-03-21 02:00:00 (Sun)
62003498400, # utc_end 1965-10-24 02:00:00 (Sun)
61984753200, # local_start 1965-03-21 03:00:00 (Sun)
62003502000, # local_end 1965-10-24 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62003498400, # utc_start 1965-10-24 02:00:00 (Sun)
62016199200, # utc_end 1966-03-20 02:00:00 (Sun)
62003498400, # local_start 1965-10-24 02:00:00 (Sun)
62016199200, # local_end 1966-03-20 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62016199200, # utc_start 1966-03-20 02:00:00 (Sun)
62034948000, # utc_end 1966-10-23 02:00:00 (Sun)
62016202800, # local_start 1966-03-20 03:00:00 (Sun)
62034951600, # local_end 1966-10-23 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62034948000, # utc_start 1966-10-23 02:00:00 (Sun)
62047648800, # utc_end 1967-03-19 02:00:00 (Sun)
62034948000, # local_start 1966-10-23 02:00:00 (Sun)
62047648800, # local_end 1967-03-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62047648800, # utc_start 1967-03-19 02:00:00 (Sun)
62067002400, # utc_end 1967-10-29 02:00:00 (Sun)
62047652400, # local_start 1967-03-19 03:00:00 (Sun)
62067006000, # local_end 1967-10-29 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62067002400, # utc_start 1967-10-29 02:00:00 (Sun)
62076679200, # utc_end 1968-02-18 02:00:00 (Sun)
62067002400, # local_start 1967-10-29 02:00:00 (Sun)
62076679200, # local_end 1968-02-18 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62076679200, # utc_start 1968-02-18 02:00:00 (Sun)
62098441200, # utc_end 1968-10-26 23:00:00 (Sat)
62076682800, # local_start 1968-02-18 03:00:00 (Sun)
62098444800, # local_end 1968-10-27 00:00:00 (Sun)
3600,
1,
'BST',
],
[
62098441200, # utc_start 1968-10-26 23:00:00 (Sat)
62193405600, # utc_end 1971-10-31 02:00:00 (Sun)
62098444800, # local_start 1968-10-27 00:00:00 (Sun)
62193409200, # local_end 1971-10-31 03:00:00 (Sun)
3600,
0,
'BST',
],
[
62193405600, # utc_start 1971-10-31 02:00:00 (Sun)
62205501600, # utc_end 1972-03-19 02:00:00 (Sun)
62193405600, # local_start 1971-10-31 02:00:00 (Sun)
62205501600, # local_end 1972-03-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62205501600, # utc_start 1972-03-19 02:00:00 (Sun)
62224855200, # utc_end 1972-10-29 02:00:00 (Sun)
62205505200, # local_start 1972-03-19 03:00:00 (Sun)
62224858800, # local_end 1972-10-29 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62224855200, # utc_start 1972-10-29 02:00:00 (Sun)
62236951200, # utc_end 1973-03-18 02:00:00 (Sun)
62224855200, # local_start 1972-10-29 02:00:00 (Sun)
62236951200, # local_end 1973-03-18 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62236951200, # utc_start 1973-03-18 02:00:00 (Sun)
62256304800, # utc_end 1973-10-28 02:00:00 (Sun)
62236954800, # local_start 1973-03-18 03:00:00 (Sun)
62256308400, # local_end 1973-10-28 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62256304800, # utc_start 1973-10-28 02:00:00 (Sun)
62268400800, # utc_end 1974-03-17 02:00:00 (Sun)
62256304800, # local_start 1973-10-28 02:00:00 (Sun)
62268400800, # local_end 1974-03-17 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62268400800, # utc_start 1974-03-17 02:00:00 (Sun)
62287754400, # utc_end 1974-10-27 02:00:00 (Sun)
62268404400, # local_start 1974-03-17 03:00:00 (Sun)
62287758000, # local_end 1974-10-27 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62287754400, # utc_start 1974-10-27 02:00:00 (Sun)
62299850400, # utc_end 1975-03-16 02:00:00 (Sun)
62287754400, # local_start 1974-10-27 02:00:00 (Sun)
62299850400, # local_end 1975-03-16 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62299850400, # utc_start 1975-03-16 02:00:00 (Sun)
62319204000, # utc_end 1975-10-26 02:00:00 (Sun)
62299854000, # local_start 1975-03-16 03:00:00 (Sun)
62319207600, # local_end 1975-10-26 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62319204000, # utc_start 1975-10-26 02:00:00 (Sun)
62331904800, # utc_end 1976-03-21 02:00:00 (Sun)
62319204000, # local_start 1975-10-26 02:00:00 (Sun)
62331904800, # local_end 1976-03-21 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62331904800, # utc_start 1976-03-21 02:00:00 (Sun)
62350653600, # utc_end 1976-10-24 02:00:00 (Sun)
62331908400, # local_start 1976-03-21 03:00:00 (Sun)
62350657200, # local_end 1976-10-24 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62350653600, # utc_start 1976-10-24 02:00:00 (Sun)
62363354400, # utc_end 1977-03-20 02:00:00 (Sun)
62350653600, # local_start 1976-10-24 02:00:00 (Sun)
62363354400, # local_end 1977-03-20 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62363354400, # utc_start 1977-03-20 02:00:00 (Sun)
62382103200, # utc_end 1977-10-23 02:00:00 (Sun)
62363358000, # local_start 1977-03-20 03:00:00 (Sun)
62382106800, # local_end 1977-10-23 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62382103200, # utc_start 1977-10-23 02:00:00 (Sun)
62394804000, # utc_end 1978-03-19 02:00:00 (Sun)
62382103200, # local_start 1977-10-23 02:00:00 (Sun)
62394804000, # local_end 1978-03-19 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62394804000, # utc_start 1978-03-19 02:00:00 (Sun)
62414157600, # utc_end 1978-10-29 02:00:00 (Sun)
62394807600, # local_start 1978-03-19 03:00:00 (Sun)
62414161200, # local_end 1978-10-29 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62414157600, # utc_start 1978-10-29 02:00:00 (Sun)
62426253600, # utc_end 1979-03-18 02:00:00 (Sun)
62414157600, # local_start 1978-10-29 02:00:00 (Sun)
62426253600, # local_end 1979-03-18 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62426253600, # utc_start 1979-03-18 02:00:00 (Sun)
62445607200, # utc_end 1979-10-28 02:00:00 (Sun)
62426257200, # local_start 1979-03-18 03:00:00 (Sun)
62445610800, # local_end 1979-10-28 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62445607200, # utc_start 1979-10-28 02:00:00 (Sun)
62457703200, # utc_end 1980-03-16 02:00:00 (Sun)
62445607200, # local_start 1979-10-28 02:00:00 (Sun)
62457703200, # local_end 1980-03-16 02:00:00 (Sun)
0,
0,
'GMT',
],
[
62457703200, # utc_start 1980-03-16 02:00:00 (Sun)
62477056800, # utc_end 1980-10-26 02:00:00 (Sun)
62457706800, # local_start 1980-03-16 03:00:00 (Sun)
62477060400, # local_end 1980-10-26 03:00:00 (Sun)
3600,
1,
'BST',
],
[
62477056800, # utc_start 1980-10-26 02:00:00 (Sun)
62490358800, # utc_end 1981-03-29 01:00:00 (Sun)
62477056800, # local_start 1980-10-26 02:00:00 (Sun)
62490358800, # local_end 1981-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62490358800, # utc_start 1981-03-29 01:00:00 (Sun)
62508502800, # utc_end 1981-10-25 01:00:00 (Sun)
62490362400, # local_start 1981-03-29 02:00:00 (Sun)
62508506400, # local_end 1981-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62508502800, # utc_start 1981-10-25 01:00:00 (Sun)
62521808400, # utc_end 1982-03-28 01:00:00 (Sun)
62508502800, # local_start 1981-10-25 01:00:00 (Sun)
62521808400, # local_end 1982-03-28 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62521808400, # utc_start 1982-03-28 01:00:00 (Sun)
62539952400, # utc_end 1982-10-24 01:00:00 (Sun)
62521812000, # local_start 1982-03-28 02:00:00 (Sun)
62539956000, # local_end 1982-10-24 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62539952400, # utc_start 1982-10-24 01:00:00 (Sun)
62553258000, # utc_end 1983-03-27 01:00:00 (Sun)
62539952400, # local_start 1982-10-24 01:00:00 (Sun)
62553258000, # local_end 1983-03-27 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62553258000, # utc_start 1983-03-27 01:00:00 (Sun)
62571402000, # utc_end 1983-10-23 01:00:00 (Sun)
62553261600, # local_start 1983-03-27 02:00:00 (Sun)
62571405600, # local_end 1983-10-23 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62571402000, # utc_start 1983-10-23 01:00:00 (Sun)
62584707600, # utc_end 1984-03-25 01:00:00 (Sun)
62571402000, # local_start 1983-10-23 01:00:00 (Sun)
62584707600, # local_end 1984-03-25 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62584707600, # utc_start 1984-03-25 01:00:00 (Sun)
62603456400, # utc_end 1984-10-28 01:00:00 (Sun)
62584711200, # local_start 1984-03-25 02:00:00 (Sun)
62603460000, # local_end 1984-10-28 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62603456400, # utc_start 1984-10-28 01:00:00 (Sun)
62616762000, # utc_end 1985-03-31 01:00:00 (Sun)
62603456400, # local_start 1984-10-28 01:00:00 (Sun)
62616762000, # local_end 1985-03-31 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62616762000, # utc_start 1985-03-31 01:00:00 (Sun)
62634906000, # utc_end 1985-10-27 01:00:00 (Sun)
62616765600, # local_start 1985-03-31 02:00:00 (Sun)
62634909600, # local_end 1985-10-27 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62634906000, # utc_start 1985-10-27 01:00:00 (Sun)
62648211600, # utc_end 1986-03-30 01:00:00 (Sun)
62634906000, # local_start 1985-10-27 01:00:00 (Sun)
62648211600, # local_end 1986-03-30 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62648211600, # utc_start 1986-03-30 01:00:00 (Sun)
62666355600, # utc_end 1986-10-26 01:00:00 (Sun)
62648215200, # local_start 1986-03-30 02:00:00 (Sun)
62666359200, # local_end 1986-10-26 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62666355600, # utc_start 1986-10-26 01:00:00 (Sun)
62679661200, # utc_end 1987-03-29 01:00:00 (Sun)
62666355600, # local_start 1986-10-26 01:00:00 (Sun)
62679661200, # local_end 1987-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62679661200, # utc_start 1987-03-29 01:00:00 (Sun)
62697805200, # utc_end 1987-10-25 01:00:00 (Sun)
62679664800, # local_start 1987-03-29 02:00:00 (Sun)
62697808800, # local_end 1987-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62697805200, # utc_start 1987-10-25 01:00:00 (Sun)
62711110800, # utc_end 1988-03-27 01:00:00 (Sun)
62697805200, # local_start 1987-10-25 01:00:00 (Sun)
62711110800, # local_end 1988-03-27 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62711110800, # utc_start 1988-03-27 01:00:00 (Sun)
62729254800, # utc_end 1988-10-23 01:00:00 (Sun)
62711114400, # local_start 1988-03-27 02:00:00 (Sun)
62729258400, # local_end 1988-10-23 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62729254800, # utc_start 1988-10-23 01:00:00 (Sun)
62742560400, # utc_end 1989-03-26 01:00:00 (Sun)
62729254800, # local_start 1988-10-23 01:00:00 (Sun)
62742560400, # local_end 1989-03-26 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62742560400, # utc_start 1989-03-26 01:00:00 (Sun)
62761309200, # utc_end 1989-10-29 01:00:00 (Sun)
62742564000, # local_start 1989-03-26 02:00:00 (Sun)
62761312800, # local_end 1989-10-29 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62761309200, # utc_start 1989-10-29 01:00:00 (Sun)
62774010000, # utc_end 1990-03-25 01:00:00 (Sun)
62761309200, # local_start 1989-10-29 01:00:00 (Sun)
62774010000, # local_end 1990-03-25 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62774010000, # utc_start 1990-03-25 01:00:00 (Sun)
62792758800, # utc_end 1990-10-28 01:00:00 (Sun)
62774013600, # local_start 1990-03-25 02:00:00 (Sun)
62792762400, # local_end 1990-10-28 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62792758800, # utc_start 1990-10-28 01:00:00 (Sun)
62806064400, # utc_end 1991-03-31 01:00:00 (Sun)
62792758800, # local_start 1990-10-28 01:00:00 (Sun)
62806064400, # local_end 1991-03-31 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62806064400, # utc_start 1991-03-31 01:00:00 (Sun)
62824208400, # utc_end 1991-10-27 01:00:00 (Sun)
62806068000, # local_start 1991-03-31 02:00:00 (Sun)
62824212000, # local_end 1991-10-27 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62824208400, # utc_start 1991-10-27 01:00:00 (Sun)
62837514000, # utc_end 1992-03-29 01:00:00 (Sun)
62824208400, # local_start 1991-10-27 01:00:00 (Sun)
62837514000, # local_end 1992-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62837514000, # utc_start 1992-03-29 01:00:00 (Sun)
62855658000, # utc_end 1992-10-25 01:00:00 (Sun)
62837517600, # local_start 1992-03-29 02:00:00 (Sun)
62855661600, # local_end 1992-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62855658000, # utc_start 1992-10-25 01:00:00 (Sun)
62868963600, # utc_end 1993-03-28 01:00:00 (Sun)
62855658000, # local_start 1992-10-25 01:00:00 (Sun)
62868963600, # local_end 1993-03-28 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62868963600, # utc_start 1993-03-28 01:00:00 (Sun)
62887107600, # utc_end 1993-10-24 01:00:00 (Sun)
62868967200, # local_start 1993-03-28 02:00:00 (Sun)
62887111200, # local_end 1993-10-24 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62887107600, # utc_start 1993-10-24 01:00:00 (Sun)
62900413200, # utc_end 1994-03-27 01:00:00 (Sun)
62887107600, # local_start 1993-10-24 01:00:00 (Sun)
62900413200, # local_end 1994-03-27 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62900413200, # utc_start 1994-03-27 01:00:00 (Sun)
62918557200, # utc_end 1994-10-23 01:00:00 (Sun)
62900416800, # local_start 1994-03-27 02:00:00 (Sun)
62918560800, # local_end 1994-10-23 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62918557200, # utc_start 1994-10-23 01:00:00 (Sun)
62931862800, # utc_end 1995-03-26 01:00:00 (Sun)
62918557200, # local_start 1994-10-23 01:00:00 (Sun)
62931862800, # local_end 1995-03-26 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62931862800, # utc_start 1995-03-26 01:00:00 (Sun)
62950006800, # utc_end 1995-10-22 01:00:00 (Sun)
62931866400, # local_start 1995-03-26 02:00:00 (Sun)
62950010400, # local_end 1995-10-22 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62950006800, # utc_start 1995-10-22 01:00:00 (Sun)
62956137600, # utc_end 1996-01-01 00:00:00 (Mon)
62950006800, # local_start 1995-10-22 01:00:00 (Sun)
62956137600, # local_end 1996-01-01 00:00:00 (Mon)
0,
0,
'GMT',
],
[
62956137600, # utc_start 1996-01-01 00:00:00 (Mon)
62963917200, # utc_end 1996-03-31 01:00:00 (Sun)
62956137600, # local_start 1996-01-01 00:00:00 (Mon)
62963917200, # local_end 1996-03-31 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62963917200, # utc_start 1996-03-31 01:00:00 (Sun)
62982061200, # utc_end 1996-10-27 01:00:00 (Sun)
62963920800, # local_start 1996-03-31 02:00:00 (Sun)
62982064800, # local_end 1996-10-27 02:00:00 (Sun)
3600,
1,
'BST',
],
[
62982061200, # utc_start 1996-10-27 01:00:00 (Sun)
62995366800, # utc_end 1997-03-30 01:00:00 (Sun)
62982061200, # local_start 1996-10-27 01:00:00 (Sun)
62995366800, # local_end 1997-03-30 01:00:00 (Sun)
0,
0,
'GMT',
],
[
62995366800, # utc_start 1997-03-30 01:00:00 (Sun)
63013510800, # utc_end 1997-10-26 01:00:00 (Sun)
62995370400, # local_start 1997-03-30 02:00:00 (Sun)
63013514400, # local_end 1997-10-26 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63013510800, # utc_start 1997-10-26 01:00:00 (Sun)
63026816400, # utc_end 1998-03-29 01:00:00 (Sun)
63013510800, # local_start 1997-10-26 01:00:00 (Sun)
63026816400, # local_end 1998-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63026816400, # utc_start 1998-03-29 01:00:00 (Sun)
63044960400, # utc_end 1998-10-25 01:00:00 (Sun)
63026820000, # local_start 1998-03-29 02:00:00 (Sun)
63044964000, # local_end 1998-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63044960400, # utc_start 1998-10-25 01:00:00 (Sun)
63058266000, # utc_end 1999-03-28 01:00:00 (Sun)
63044960400, # local_start 1998-10-25 01:00:00 (Sun)
63058266000, # local_end 1999-03-28 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63058266000, # utc_start 1999-03-28 01:00:00 (Sun)
63077014800, # utc_end 1999-10-31 01:00:00 (Sun)
63058269600, # local_start 1999-03-28 02:00:00 (Sun)
63077018400, # local_end 1999-10-31 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63077014800, # utc_start 1999-10-31 01:00:00 (Sun)
63089715600, # utc_end 2000-03-26 01:00:00 (Sun)
63077014800, # local_start 1999-10-31 01:00:00 (Sun)
63089715600, # local_end 2000-03-26 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63089715600, # utc_start 2000-03-26 01:00:00 (Sun)
63108464400, # utc_end 2000-10-29 01:00:00 (Sun)
63089719200, # local_start 2000-03-26 02:00:00 (Sun)
63108468000, # local_end 2000-10-29 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63108464400, # utc_start 2000-10-29 01:00:00 (Sun)
63121165200, # utc_end 2001-03-25 01:00:00 (Sun)
63108464400, # local_start 2000-10-29 01:00:00 (Sun)
63121165200, # local_end 2001-03-25 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63121165200, # utc_start 2001-03-25 01:00:00 (Sun)
63139914000, # utc_end 2001-10-28 01:00:00 (Sun)
63121168800, # local_start 2001-03-25 02:00:00 (Sun)
63139917600, # local_end 2001-10-28 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63139914000, # utc_start 2001-10-28 01:00:00 (Sun)
63153219600, # utc_end 2002-03-31 01:00:00 (Sun)
63139914000, # local_start 2001-10-28 01:00:00 (Sun)
63153219600, # local_end 2002-03-31 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63153219600, # utc_start 2002-03-31 01:00:00 (Sun)
63171363600, # utc_end 2002-10-27 01:00:00 (Sun)
63153223200, # local_start 2002-03-31 02:00:00 (Sun)
63171367200, # local_end 2002-10-27 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63171363600, # utc_start 2002-10-27 01:00:00 (Sun)
63184669200, # utc_end 2003-03-30 01:00:00 (Sun)
63171363600, # local_start 2002-10-27 01:00:00 (Sun)
63184669200, # local_end 2003-03-30 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63184669200, # utc_start 2003-03-30 01:00:00 (Sun)
63202813200, # utc_end 2003-10-26 01:00:00 (Sun)
63184672800, # local_start 2003-03-30 02:00:00 (Sun)
63202816800, # local_end 2003-10-26 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63202813200, # utc_start 2003-10-26 01:00:00 (Sun)
63216118800, # utc_end 2004-03-28 01:00:00 (Sun)
63202813200, # local_start 2003-10-26 01:00:00 (Sun)
63216118800, # local_end 2004-03-28 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63216118800, # utc_start 2004-03-28 01:00:00 (Sun)
63234867600, # utc_end 2004-10-31 01:00:00 (Sun)
63216122400, # local_start 2004-03-28 02:00:00 (Sun)
63234871200, # local_end 2004-10-31 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63234867600, # utc_start 2004-10-31 01:00:00 (Sun)
63247568400, # utc_end 2005-03-27 01:00:00 (Sun)
63234867600, # local_start 2004-10-31 01:00:00 (Sun)
63247568400, # local_end 2005-03-27 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63247568400, # utc_start 2005-03-27 01:00:00 (Sun)
63266317200, # utc_end 2005-10-30 01:00:00 (Sun)
63247572000, # local_start 2005-03-27 02:00:00 (Sun)
63266320800, # local_end 2005-10-30 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63266317200, # utc_start 2005-10-30 01:00:00 (Sun)
63279018000, # utc_end 2006-03-26 01:00:00 (Sun)
63266317200, # local_start 2005-10-30 01:00:00 (Sun)
63279018000, # local_end 2006-03-26 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63279018000, # utc_start 2006-03-26 01:00:00 (Sun)
63297766800, # utc_end 2006-10-29 01:00:00 (Sun)
63279021600, # local_start 2006-03-26 02:00:00 (Sun)
63297770400, # local_end 2006-10-29 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63297766800, # utc_start 2006-10-29 01:00:00 (Sun)
63310467600, # utc_end 2007-03-25 01:00:00 (Sun)
63297766800, # local_start 2006-10-29 01:00:00 (Sun)
63310467600, # local_end 2007-03-25 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63310467600, # utc_start 2007-03-25 01:00:00 (Sun)
63329216400, # utc_end 2007-10-28 01:00:00 (Sun)
63310471200, # local_start 2007-03-25 02:00:00 (Sun)
63329220000, # local_end 2007-10-28 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63329216400, # utc_start 2007-10-28 01:00:00 (Sun)
63342522000, # utc_end 2008-03-30 01:00:00 (Sun)
63329216400, # local_start 2007-10-28 01:00:00 (Sun)
63342522000, # local_end 2008-03-30 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63342522000, # utc_start 2008-03-30 01:00:00 (Sun)
63360666000, # utc_end 2008-10-26 01:00:00 (Sun)
63342525600, # local_start 2008-03-30 02:00:00 (Sun)
63360669600, # local_end 2008-10-26 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63360666000, # utc_start 2008-10-26 01:00:00 (Sun)
63373971600, # utc_end 2009-03-29 01:00:00 (Sun)
63360666000, # local_start 2008-10-26 01:00:00 (Sun)
63373971600, # local_end 2009-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63373971600, # utc_start 2009-03-29 01:00:00 (Sun)
63392115600, # utc_end 2009-10-25 01:00:00 (Sun)
63373975200, # local_start 2009-03-29 02:00:00 (Sun)
63392119200, # local_end 2009-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63392115600, # utc_start 2009-10-25 01:00:00 (Sun)
63405421200, # utc_end 2010-03-28 01:00:00 (Sun)
63392115600, # local_start 2009-10-25 01:00:00 (Sun)
63405421200, # local_end 2010-03-28 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63405421200, # utc_start 2010-03-28 01:00:00 (Sun)
63424170000, # utc_end 2010-10-31 01:00:00 (Sun)
63405424800, # local_start 2010-03-28 02:00:00 (Sun)
63424173600, # local_end 2010-10-31 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63424170000, # utc_start 2010-10-31 01:00:00 (Sun)
63436870800, # utc_end 2011-03-27 01:00:00 (Sun)
63424170000, # local_start 2010-10-31 01:00:00 (Sun)
63436870800, # local_end 2011-03-27 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63436870800, # utc_start 2011-03-27 01:00:00 (Sun)
63455619600, # utc_end 2011-10-30 01:00:00 (Sun)
63436874400, # local_start 2011-03-27 02:00:00 (Sun)
63455623200, # local_end 2011-10-30 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63455619600, # utc_start 2011-10-30 01:00:00 (Sun)
63468320400, # utc_end 2012-03-25 01:00:00 (Sun)
63455619600, # local_start 2011-10-30 01:00:00 (Sun)
63468320400, # local_end 2012-03-25 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63468320400, # utc_start 2012-03-25 01:00:00 (Sun)
63487069200, # utc_end 2012-10-28 01:00:00 (Sun)
63468324000, # local_start 2012-03-25 02:00:00 (Sun)
63487072800, # local_end 2012-10-28 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63487069200, # utc_start 2012-10-28 01:00:00 (Sun)
63500374800, # utc_end 2013-03-31 01:00:00 (Sun)
63487069200, # local_start 2012-10-28 01:00:00 (Sun)
63500374800, # local_end 2013-03-31 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63500374800, # utc_start 2013-03-31 01:00:00 (Sun)
63518518800, # utc_end 2013-10-27 01:00:00 (Sun)
63500378400, # local_start 2013-03-31 02:00:00 (Sun)
63518522400, # local_end 2013-10-27 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63518518800, # utc_start 2013-10-27 01:00:00 (Sun)
63531824400, # utc_end 2014-03-30 01:00:00 (Sun)
63518518800, # local_start 2013-10-27 01:00:00 (Sun)
63531824400, # local_end 2014-03-30 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63531824400, # utc_start 2014-03-30 01:00:00 (Sun)
63549968400, # utc_end 2014-10-26 01:00:00 (Sun)
63531828000, # local_start 2014-03-30 02:00:00 (Sun)
63549972000, # local_end 2014-10-26 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63549968400, # utc_start 2014-10-26 01:00:00 (Sun)
63563274000, # utc_end 2015-03-29 01:00:00 (Sun)
63549968400, # local_start 2014-10-26 01:00:00 (Sun)
63563274000, # local_end 2015-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63563274000, # utc_start 2015-03-29 01:00:00 (Sun)
63581418000, # utc_end 2015-10-25 01:00:00 (Sun)
63563277600, # local_start 2015-03-29 02:00:00 (Sun)
63581421600, # local_end 2015-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63581418000, # utc_start 2015-10-25 01:00:00 (Sun)
63594723600, # utc_end 2016-03-27 01:00:00 (Sun)
63581418000, # local_start 2015-10-25 01:00:00 (Sun)
63594723600, # local_end 2016-03-27 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63594723600, # utc_start 2016-03-27 01:00:00 (Sun)
63613472400, # utc_end 2016-10-30 01:00:00 (Sun)
63594727200, # local_start 2016-03-27 02:00:00 (Sun)
63613476000, # local_end 2016-10-30 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63613472400, # utc_start 2016-10-30 01:00:00 (Sun)
63626173200, # utc_end 2017-03-26 01:00:00 (Sun)
63613472400, # local_start 2016-10-30 01:00:00 (Sun)
63626173200, # local_end 2017-03-26 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63626173200, # utc_start 2017-03-26 01:00:00 (Sun)
63644922000, # utc_end 2017-10-29 01:00:00 (Sun)
63626176800, # local_start 2017-03-26 02:00:00 (Sun)
63644925600, # local_end 2017-10-29 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63644922000, # utc_start 2017-10-29 01:00:00 (Sun)
63657622800, # utc_end 2018-03-25 01:00:00 (Sun)
63644922000, # local_start 2017-10-29 01:00:00 (Sun)
63657622800, # local_end 2018-03-25 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63657622800, # utc_start 2018-03-25 01:00:00 (Sun)
63676371600, # utc_end 2018-10-28 01:00:00 (Sun)
63657626400, # local_start 2018-03-25 02:00:00 (Sun)
63676375200, # local_end 2018-10-28 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63676371600, # utc_start 2018-10-28 01:00:00 (Sun)
63689677200, # utc_end 2019-03-31 01:00:00 (Sun)
63676371600, # local_start 2018-10-28 01:00:00 (Sun)
63689677200, # local_end 2019-03-31 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63689677200, # utc_start 2019-03-31 01:00:00 (Sun)
63707821200, # utc_end 2019-10-27 01:00:00 (Sun)
63689680800, # local_start 2019-03-31 02:00:00 (Sun)
63707824800, # local_end 2019-10-27 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63707821200, # utc_start 2019-10-27 01:00:00 (Sun)
63721126800, # utc_end 2020-03-29 01:00:00 (Sun)
63707821200, # local_start 2019-10-27 01:00:00 (Sun)
63721126800, # local_end 2020-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63721126800, # utc_start 2020-03-29 01:00:00 (Sun)
63739270800, # utc_end 2020-10-25 01:00:00 (Sun)
63721130400, # local_start 2020-03-29 02:00:00 (Sun)
63739274400, # local_end 2020-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63739270800, # utc_start 2020-10-25 01:00:00 (Sun)
63752576400, # utc_end 2021-03-28 01:00:00 (Sun)
63739270800, # local_start 2020-10-25 01:00:00 (Sun)
63752576400, # local_end 2021-03-28 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63752576400, # utc_start 2021-03-28 01:00:00 (Sun)
63771325200, # utc_end 2021-10-31 01:00:00 (Sun)
63752580000, # local_start 2021-03-28 02:00:00 (Sun)
63771328800, # local_end 2021-10-31 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63771325200, # utc_start 2021-10-31 01:00:00 (Sun)
63784026000, # utc_end 2022-03-27 01:00:00 (Sun)
63771325200, # local_start 2021-10-31 01:00:00 (Sun)
63784026000, # local_end 2022-03-27 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63784026000, # utc_start 2022-03-27 01:00:00 (Sun)
63802774800, # utc_end 2022-10-30 01:00:00 (Sun)
63784029600, # local_start 2022-03-27 02:00:00 (Sun)
63802778400, # local_end 2022-10-30 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63802774800, # utc_start 2022-10-30 01:00:00 (Sun)
63815475600, # utc_end 2023-03-26 01:00:00 (Sun)
63802774800, # local_start 2022-10-30 01:00:00 (Sun)
63815475600, # local_end 2023-03-26 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63815475600, # utc_start 2023-03-26 01:00:00 (Sun)
63834224400, # utc_end 2023-10-29 01:00:00 (Sun)
63815479200, # local_start 2023-03-26 02:00:00 (Sun)
63834228000, # local_end 2023-10-29 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63834224400, # utc_start 2023-10-29 01:00:00 (Sun)
63847530000, # utc_end 2024-03-31 01:00:00 (Sun)
63834224400, # local_start 2023-10-29 01:00:00 (Sun)
63847530000, # local_end 2024-03-31 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63847530000, # utc_start 2024-03-31 01:00:00 (Sun)
63865674000, # utc_end 2024-10-27 01:00:00 (Sun)
63847533600, # local_start 2024-03-31 02:00:00 (Sun)
63865677600, # local_end 2024-10-27 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63865674000, # utc_start 2024-10-27 01:00:00 (Sun)
63878979600, # utc_end 2025-03-30 01:00:00 (Sun)
63865674000, # local_start 2024-10-27 01:00:00 (Sun)
63878979600, # local_end 2025-03-30 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63878979600, # utc_start 2025-03-30 01:00:00 (Sun)
63897123600, # utc_end 2025-10-26 01:00:00 (Sun)
63878983200, # local_start 2025-03-30 02:00:00 (Sun)
63897127200, # local_end 2025-10-26 02:00:00 (Sun)
3600,
1,
'BST',
],
[
63897123600, # utc_start 2025-10-26 01:00:00 (Sun)
63910429200, # utc_end 2026-03-29 01:00:00 (Sun)
63897123600, # local_start 2025-10-26 01:00:00 (Sun)
63910429200, # local_end 2026-03-29 01:00:00 (Sun)
0,
0,
'GMT',
],
[
63910429200, # utc_start 2026-03-29 01:00:00 (Sun)
63928573200, # utc_end 2026-10-25 01:00:00 (Sun)
63910432800, # local_start 2026-03-29 02:00:00 (Sun)
63928576800, # local_end 2026-10-25 02:00:00 (Sun)
3600,
1,
'BST',
],
];
sub olson_version {'2015g'}
sub has_dst_changes {115}
sub _max_year {2025}
sub _new_instance {
return shift->_init( @_, spans => $spans );
}
sub _last_offset { 0 }
my $last_observance = bless( {
'format' => 'GMT/BST',
'gmtoff' => '0:00',
'local_start_datetime' => bless( {
'formatter' => undef,
'local_rd_days' => 728659,
'local_rd_secs' => 0,
'offset_modifier' => 0,
'rd_nanosecs' => 0,
'tz' => bless( {
'name' => 'floating',
'offset' => 0
}, 'DateTime::TimeZone::Floating' ),
'utc_rd_days' => 728659,
'utc_rd_secs' => 0,
'utc_year' => 1997
}, 'DateTime' ),
'offset_from_std' => 0,
'offset_from_utc' => 0,
'until' => [],
'utc_start_datetime' => bless( {
'formatter' => undef,
'local_rd_days' => 728659,
'local_rd_secs' => 0,
'offset_modifier' => 0,
'rd_nanosecs' => 0,
'tz' => bless( {
'name' => 'floating',
'offset' => 0
}, 'DateTime::TimeZone::Floating' ),
'utc_rd_days' => 728659,
'utc_rd_secs' => 0,
'utc_year' => 1997
}, 'DateTime' )
}, 'DateTime::TimeZone::OlsonDB::Observance' )
;
sub _last_observance { $last_observance }
my $rules = [
bless( {
'at' => '1:00u',
'from' => '1981',
'in' => 'Mar',
'letter' => 'S',
'name' => 'EU',
'offset_from_std' => 3600,
'on' => 'lastSun',
'save' => '1:00',
'to' => 'max',
'type' => undef
}, 'DateTime::TimeZone::OlsonDB::Rule' ),
bless( {
'at' => '1:00u',
'from' => '1996',
'in' => 'Oct',
'letter' => '',
'name' => 'EU',
'offset_from_std' => 0,
'on' => 'lastSun',
'save' => '0',
'to' => 'max',
'type' => undef
}, 'DateTime::TimeZone::OlsonDB::Rule' )
]
;
sub _rules { $rules }
1;
| rosiro/wasarabi | local/lib/perl5/DateTime/TimeZone/Europe/London.pm | Perl | mit | 56,179 |
# This file is auto-generated by the Perl DateTime Suite time zone
# code generator (0.07) This code generator comes with the
# DateTime::TimeZone module distribution in the tools/ directory
#
# Generated from debian/tzdata/northamerica. Olson data version 2008c
#
# Do not edit this file directly.
#
package DateTime::TimeZone::America::Boise;
use strict;
use Class::Singleton;
use DateTime::TimeZone;
use DateTime::TimeZone::OlsonDB;
@DateTime::TimeZone::America::Boise::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' );
my $spans =
[
[
DateTime::TimeZone::NEG_INFINITY,
59418043200,
DateTime::TimeZone::NEG_INFINITY,
59418015311,
-27889,
0,
'LMT'
],
[
59418043200,
60502413600,
59418014400,
60502384800,
-28800,
0,
'PT'
],
[
60502413600,
60520554000,
60502388400,
60520528800,
-25200,
1,
'PDT'
],
[
60520554000,
60533863200,
60520525200,
60533834400,
-28800,
0,
'PST'
],
[
60533863200,
60552003600,
60533838000,
60551978400,
-25200,
1,
'PDT'
],
[
60552003600,
60663895200,
60551974800,
60663866400,
-28800,
0,
'PST'
],
[
60663895200,
61255472400,
60663870000,
61255447200,
-25200,
0,
'MST'
],
[
61255472400,
61366287600,
61255450800,
61366266000,
-21600,
1,
'MWT'
],
[
61366287600,
61370294400,
61366266000,
61370272800,
-21600,
1,
'MPT'
],
[
61370294400,
62051302800,
61370269200,
62051277600,
-25200,
0,
'MST'
],
[
62051302800,
62067024000,
62051281200,
62067002400,
-21600,
1,
'MDT'
],
[
62067024000,
62082752400,
62066998800,
62082727200,
-25200,
0,
'MST'
],
[
62082752400,
62098473600,
62082730800,
62098452000,
-21600,
1,
'MDT'
],
[
62098473600,
62114202000,
62098448400,
62114176800,
-25200,
0,
'MST'
],
[
62114202000,
62129923200,
62114180400,
62129901600,
-21600,
1,
'MDT'
],
[
62129923200,
62145651600,
62129898000,
62145626400,
-25200,
0,
'MST'
],
[
62145651600,
62161372800,
62145630000,
62161351200,
-21600,
1,
'MDT'
],
[
62161372800,
62177101200,
62161347600,
62177076000,
-25200,
0,
'MST'
],
[
62177101200,
62193427200,
62177079600,
62193405600,
-21600,
1,
'MDT'
],
[
62193427200,
62209155600,
62193402000,
62209130400,
-25200,
0,
'MST'
],
[
62209155600,
62224876800,
62209134000,
62224855200,
-21600,
1,
'MDT'
],
[
62224876800,
62240605200,
62224851600,
62240580000,
-25200,
0,
'MST'
],
[
62240605200,
62256326400,
62240583600,
62256304800,
-21600,
1,
'MDT'
],
[
62256326400,
62261938800,
62256301200,
62261913600,
-25200,
0,
'MST'
],
[
62261938800,
62264797200,
62261913600,
62264772000,
-25200,
0,
'MST'
],
[
62264797200,
62287776000,
62264775600,
62287754400,
-21600,
1,
'MDT'
],
[
62287776000,
62298061200,
62287750800,
62298036000,
-25200,
0,
'MST'
],
[
62298061200,
62319225600,
62298039600,
62319204000,
-21600,
1,
'MDT'
],
[
62319225600,
62334954000,
62319200400,
62334928800,
-25200,
0,
'MST'
],
[
62334954000,
62351280000,
62334932400,
62351258400,
-21600,
1,
'MDT'
],
[
62351280000,
62366403600,
62351254800,
62366378400,
-25200,
0,
'MST'
],
[
62366403600,
62382729600,
62366382000,
62382708000,
-21600,
1,
'MDT'
],
[
62382729600,
62398458000,
62382704400,
62398432800,
-25200,
0,
'MST'
],
[
62398458000,
62414179200,
62398436400,
62414157600,
-21600,
1,
'MDT'
],
[
62414179200,
62429907600,
62414154000,
62429882400,
-25200,
0,
'MST'
],
[
62429907600,
62445628800,
62429886000,
62445607200,
-21600,
1,
'MDT'
],
[
62445628800,
62461357200,
62445603600,
62461332000,
-25200,
0,
'MST'
],
[
62461357200,
62477078400,
62461335600,
62477056800,
-21600,
1,
'MDT'
],
[
62477078400,
62492806800,
62477053200,
62492781600,
-25200,
0,
'MST'
],
[
62492806800,
62508528000,
62492785200,
62508506400,
-21600,
1,
'MDT'
],
[
62508528000,
62524256400,
62508502800,
62524231200,
-25200,
0,
'MST'
],
[
62524256400,
62540582400,
62524234800,
62540560800,
-21600,
1,
'MDT'
],
[
62540582400,
62555706000,
62540557200,
62555680800,
-25200,
0,
'MST'
],
[
62555706000,
62572032000,
62555684400,
62572010400,
-21600,
1,
'MDT'
],
[
62572032000,
62587760400,
62572006800,
62587735200,
-25200,
0,
'MST'
],
[
62587760400,
62603481600,
62587738800,
62603460000,
-21600,
1,
'MDT'
],
[
62603481600,
62619210000,
62603456400,
62619184800,
-25200,
0,
'MST'
],
[
62619210000,
62634931200,
62619188400,
62634909600,
-21600,
1,
'MDT'
],
[
62634931200,
62650659600,
62634906000,
62650634400,
-25200,
0,
'MST'
],
[
62650659600,
62666380800,
62650638000,
62666359200,
-21600,
1,
'MDT'
],
[
62666380800,
62680294800,
62666355600,
62680269600,
-25200,
0,
'MST'
],
[
62680294800,
62697830400,
62680273200,
62697808800,
-21600,
1,
'MDT'
],
[
62697830400,
62711744400,
62697805200,
62711719200,
-25200,
0,
'MST'
],
[
62711744400,
62729884800,
62711722800,
62729863200,
-21600,
1,
'MDT'
],
[
62729884800,
62743194000,
62729859600,
62743168800,
-25200,
0,
'MST'
],
[
62743194000,
62761334400,
62743172400,
62761312800,
-21600,
1,
'MDT'
],
[
62761334400,
62774643600,
62761309200,
62774618400,
-25200,
0,
'MST'
],
[
62774643600,
62792784000,
62774622000,
62792762400,
-21600,
1,
'MDT'
],
[
62792784000,
62806698000,
62792758800,
62806672800,
-25200,
0,
'MST'
],
[
62806698000,
62824233600,
62806676400,
62824212000,
-21600,
1,
'MDT'
],
[
62824233600,
62838147600,
62824208400,
62838122400,
-25200,
0,
'MST'
],
[
62838147600,
62855683200,
62838126000,
62855661600,
-21600,
1,
'MDT'
],
[
62855683200,
62869597200,
62855658000,
62869572000,
-25200,
0,
'MST'
],
[
62869597200,
62887737600,
62869575600,
62887716000,
-21600,
1,
'MDT'
],
[
62887737600,
62901046800,
62887712400,
62901021600,
-25200,
0,
'MST'
],
[
62901046800,
62919187200,
62901025200,
62919165600,
-21600,
1,
'MDT'
],
[
62919187200,
62932496400,
62919162000,
62932471200,
-25200,
0,
'MST'
],
[
62932496400,
62950636800,
62932474800,
62950615200,
-21600,
1,
'MDT'
],
[
62950636800,
62964550800,
62950611600,
62964525600,
-25200,
0,
'MST'
],
[
62964550800,
62982086400,
62964529200,
62982064800,
-21600,
1,
'MDT'
],
[
62982086400,
62996000400,
62982061200,
62995975200,
-25200,
0,
'MST'
],
[
62996000400,
63013536000,
62995978800,
63013514400,
-21600,
1,
'MDT'
],
[
63013536000,
63027450000,
63013510800,
63027424800,
-25200,
0,
'MST'
],
[
63027450000,
63044985600,
63027428400,
63044964000,
-21600,
1,
'MDT'
],
[
63044985600,
63058899600,
63044960400,
63058874400,
-25200,
0,
'MST'
],
[
63058899600,
63077040000,
63058878000,
63077018400,
-21600,
1,
'MDT'
],
[
63077040000,
63090349200,
63077014800,
63090324000,
-25200,
0,
'MST'
],
[
63090349200,
63108489600,
63090327600,
63108468000,
-21600,
1,
'MDT'
],
[
63108489600,
63121798800,
63108464400,
63121773600,
-25200,
0,
'MST'
],
[
63121798800,
63139939200,
63121777200,
63139917600,
-21600,
1,
'MDT'
],
[
63139939200,
63153853200,
63139914000,
63153828000,
-25200,
0,
'MST'
],
[
63153853200,
63171388800,
63153831600,
63171367200,
-21600,
1,
'MDT'
],
[
63171388800,
63185302800,
63171363600,
63185277600,
-25200,
0,
'MST'
],
[
63185302800,
63202838400,
63185281200,
63202816800,
-21600,
1,
'MDT'
],
[
63202838400,
63216752400,
63202813200,
63216727200,
-25200,
0,
'MST'
],
[
63216752400,
63234892800,
63216730800,
63234871200,
-21600,
1,
'MDT'
],
[
63234892800,
63248202000,
63234867600,
63248176800,
-25200,
0,
'MST'
],
[
63248202000,
63266342400,
63248180400,
63266320800,
-21600,
1,
'MDT'
],
[
63266342400,
63279651600,
63266317200,
63279626400,
-25200,
0,
'MST'
],
[
63279651600,
63297792000,
63279630000,
63297770400,
-21600,
1,
'MDT'
],
[
63297792000,
63309286800,
63297766800,
63309261600,
-25200,
0,
'MST'
],
[
63309286800,
63329846400,
63309265200,
63329824800,
-21600,
1,
'MDT'
],
[
63329846400,
63340736400,
63329821200,
63340711200,
-25200,
0,
'MST'
],
[
63340736400,
63361296000,
63340714800,
63361274400,
-21600,
1,
'MDT'
],
[
63361296000,
63372186000,
63361270800,
63372160800,
-25200,
0,
'MST'
],
[
63372186000,
63392745600,
63372164400,
63392724000,
-21600,
1,
'MDT'
],
[
63392745600,
63404240400,
63392720400,
63404215200,
-25200,
0,
'MST'
],
[
63404240400,
63424800000,
63404218800,
63424778400,
-21600,
1,
'MDT'
],
[
63424800000,
63435690000,
63424774800,
63435664800,
-25200,
0,
'MST'
],
[
63435690000,
63456249600,
63435668400,
63456228000,
-21600,
1,
'MDT'
],
[
63456249600,
63467139600,
63456224400,
63467114400,
-25200,
0,
'MST'
],
[
63467139600,
63487699200,
63467118000,
63487677600,
-21600,
1,
'MDT'
],
[
63487699200,
63498589200,
63487674000,
63498564000,
-25200,
0,
'MST'
],
[
63498589200,
63519148800,
63498567600,
63519127200,
-21600,
1,
'MDT'
],
[
63519148800,
63530038800,
63519123600,
63530013600,
-25200,
0,
'MST'
],
[
63530038800,
63550598400,
63530017200,
63550576800,
-21600,
1,
'MDT'
],
[
63550598400,
63561488400,
63550573200,
63561463200,
-25200,
0,
'MST'
],
[
63561488400,
63582048000,
63561466800,
63582026400,
-21600,
1,
'MDT'
],
[
63582048000,
63593542800,
63582022800,
63593517600,
-25200,
0,
'MST'
],
[
63593542800,
63614102400,
63593521200,
63614080800,
-21600,
1,
'MDT'
],
[
63614102400,
63624992400,
63614077200,
63624967200,
-25200,
0,
'MST'
],
[
63624992400,
63645552000,
63624970800,
63645530400,
-21600,
1,
'MDT'
],
[
63645552000,
63656442000,
63645526800,
63656416800,
-25200,
0,
'MST'
],
[
63656442000,
63677001600,
63656420400,
63676980000,
-21600,
1,
'MDT'
],
[
63677001600,
63687891600,
63676976400,
63687866400,
-25200,
0,
'MST'
],
[
63687891600,
63708451200,
63687870000,
63708429600,
-21600,
1,
'MDT'
],
];
sub olson_version { '2008c' }
sub has_dst_changes { 57 }
sub _max_year { 2018 }
sub _new_instance
{
return shift->_init( @_, spans => $spans );
}
sub _last_offset { -25200 }
my $last_observance = bless( {
'format' => 'M%sT',
'gmtoff' => '-7:00',
'local_start_datetime' => bless( {
'formatter' => undef,
'local_rd_days' => 720657,
'local_rd_secs' => 10800,
'offset_modifier' => 0,
'rd_nanosecs' => 0,
'tz' => bless( {
'name' => 'floating',
'offset' => 0
}, 'DateTime::TimeZone::Floating' ),
'utc_rd_days' => 720657,
'utc_rd_secs' => 10800,
'utc_year' => 1975
}, 'DateTime' ),
'offset_from_std' => 0,
'offset_from_utc' => -25200,
'until' => [],
'utc_start_datetime' => bless( {
'formatter' => undef,
'local_rd_days' => 720657,
'local_rd_secs' => 32400,
'offset_modifier' => 0,
'rd_nanosecs' => 0,
'tz' => bless( {
'name' => 'floating',
'offset' => 0
}, 'DateTime::TimeZone::Floating' ),
'utc_rd_days' => 720657,
'utc_rd_secs' => 32400,
'utc_year' => 1975
}, 'DateTime' )
}, 'DateTime::TimeZone::OlsonDB::Observance' )
;
sub _last_observance { $last_observance }
my $rules = [
bless( {
'at' => '2:00',
'from' => '2007',
'in' => 'Mar',
'letter' => 'D',
'name' => 'US',
'offset_from_std' => 3600,
'on' => 'Sun>=8',
'save' => '1:00',
'to' => 'max',
'type' => undef
}, 'DateTime::TimeZone::OlsonDB::Rule' ),
bless( {
'at' => '2:00',
'from' => '2007',
'in' => 'Nov',
'letter' => 'S',
'name' => 'US',
'offset_from_std' => 0,
'on' => 'Sun>=1',
'save' => '0',
'to' => 'max',
'type' => undef
}, 'DateTime::TimeZone::OlsonDB::Rule' )
]
;
sub _rules { $rules }
1;
| carlgao/lenga | images/lenny64-peon/usr/share/perl5/DateTime/TimeZone/America/Boise.pm | Perl | mit | 11,875 |
#!/usr/local/bin/perl
=head1 NAME
load-hybridized-overgos.pl - Loads overgo-clone associations into a core Ensembl DB
Adding misc_set manually for misc_feature type
=head1 SYNOPSIS
perl load-hybridized-overgos.pl [options] fpc.file
Options:
-h --help
-m --man
-r --registry_file
-s --species
=head1 OPTIONS
Reads the B<fpc.file>, and uses its clones to load the misc_attrib table.
B<-h --help>
Print a brief help message and exits.
B<-m --man>
Print man page and exit
B<-r --registry_file>
Use this Ensembl registry file for database connection info.
Default is <ENSEMBLHOME>/conf/ensembl.registry
B<-s --species>
Use this species entry from the registry file [REQUIRED].
=head1 DESCRIPTION
B<This program>
Loads overgo-clone associations into a core Ensembl DB
Maintained by Shiran Pasternak <shiranp@cshl.edu>
=cut
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
use Data::Dumper qw(Dumper); # For debug
use English;
use Carp;
use DBI;
use FindBin qw($Bin);
use File::Basename qw( dirname );
use vars qw($BASEDIR);
BEGIN {
# Set the perl libraries
$BASEDIR = dirname($Bin);
unshift @INC, $BASEDIR . '/ensembl-live/ensembl/modules';
}
use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::MiscFeature;
use Bio::EnsEMBL::Attribute;
use Bio::EnsEMBL::SimpleFeature;
use Bio::EnsEMBL::MiscSet;
use Bio::MapIO;
use Bio::EnsEMBL::Map::Marker;
use Bio::EnsEMBL::Map::MarkerSynonym;
use Bio::EnsEMBL::Map::MarkerFeature;
use vars qw($ENS_DBA $FPC_MAP);
my $help = 0;
my $man = 0;
my ($species_name, $registry_file);
GetOptions(
"help|?" => \$help,
"man" => \$man,
"species=s" => \$species_name,
"registry_file=s" => \$registry_file,
)
or pod2usage(2);
pod2usage(-verbose => 2) if $man;
pod2usage(1) if $help;
# Validate file paths
$registry_file ||= $BASEDIR . '/conf/SiteDefs.pm';
my $fpc_file = shift @ARGV;
$fpc_file
|| (warn("Need the path to an overgo hits file\n") && pod2usage(1));
map {
-e $_ || (warn("File $_ does not exist\n") && pod2usage(1));
-r $_ || (warn("Cannot read $_\n") && pod2usage(1));
-f $_ || (warn("File $_ is not plain-text\n") && pod2usage(1));
-s $_ || (warn("File $_ is empty\n") && pod2usage(1));
} $registry_file, $fpc_file;
# Load the ensembl file
$species_name || (warn("Need a --species\n") && pod2usage(1));
Bio::EnsEMBL::Registry->load_all($registry_file);
$ENS_DBA = Bio::EnsEMBL::Registry->get_DBAdaptor( $species_name, 'core' );
$ENS_DBA || (warn("No core DB for $species_name set in $registry_file\n")
&& pod2usage(1));
# Load the FPC file
warn( "Found an FPC file: $fpc_file. Loading...\n" );
my $mapio = new Bio::MapIO(-format => "fpc",
-file => "$fpc_file",
-readcor => 0,
-verbose => 0);
$FPC_MAP = $mapio->next_map(); # Single map per FPC file
# species info
my $meta = $ENS_DBA->get_MetaContainer();
my $species = $meta->get_Species
|| die("Cannot find the species in the meta table of the DB");
my $common_name = $species->common_name
|| die(
"Cannot find the species common name in the meta table of the DB");
$common_name = ucfirst($common_name);
###########
# Prepare some Ensembl adaptors
my $misc_feature_adaptor = $ENS_DBA->get_adaptor('MiscFeature');
my $attribute_adaptor = $ENS_DBA->get_adaptor('Attribute');
# store associations for each marker in the FPC datastruc
my @markers = $FPC_MAP -> each_markerid();
warn( " Num markers: ",scalar(@markers) );
my $associations = 0;
foreach my $marker (@markers){
# last if ($associations > 50);
my $markerobj = $FPC_MAP -> get_markerobj($marker);
my @clones = $markerobj -> each_cloneid();
my @contigs = $markerobj -> each_contigid();
# print "$marker\t";
# foreach my $contig (@contigs){
# print "$contig;";
# }
# print "\t";
# foreach my $clone (@clones){
# print "$clone;";
# }
# print "\n";
my $marker_attribute = get_overgo_attribute($marker);
for my $clone_name (@clones){
my $clone_features
= $misc_feature_adaptor->fetch_all_by_attribute_type_value('name', $clone_name);
if (scalar @$clone_features != 1) {
warn
"Unexpected feats for <$clone_name>; expected 1, got @{[scalar @$clone_features]}";
next;
}
my $clone_feature = $clone_features->[0];
my $ctg = $clone_feature->get_all_Attributes('superctg');
my $ctg_name = ($ctg->[0]) -> value();
if (clone_already_hybridized_with_overgo($clone_feature, $marker_attribute)){
warn "Clone $clone_name already associated with $marker\n";
}
else {
warn
"Associating $marker with: @{[$clone_feature->get_scalar_attribute('name')]}\n";
# $clone_feature->add_Attribute($marker_attribute);
# $attribute_adaptor->store_on_MiscFeature($clone_feature,
# [$marker_attribute]);
$associations++;
}
}
}
#======================================================================
=pod
=head2 get_overgo_attribute
Ensure the existence of an overgo attribute type
=cut
sub get_overgo_attribute {
my ($attribute_value) = @_;
# my ($dba) = @_;
# my $attribute_adaptor = $dba->get_adaptor('Attribute');
return Bio::EnsEMBL::Attribute->new(
-CODE => 'clone_marker',
-NAME => 'Clone Marker',
-DESCRIPTION => 'A marker with which a clone is associated',
-VALUE => $attribute_value,
);
}
=pod
=head2 clone_already_hybridized_with_overgo
Determines if the attribute already exists
=cut
sub clone_already_hybridized_with_overgo {
my ($clone_feature, $overgo_attribute) = @_;
my @attributes =
@{$clone_feature->get_all_Attributes($overgo_attribute->code)};
return (grep { $overgo_attribute->value() eq $_->value() } @attributes) > 0;
}
#======================================================================
1;
| warelab/gramene-ensembl | maize/load-scripts/load-hybridized-overgos.pl | Perl | mit | 5,888 |
%query: select(o,i,o).
% mode: select[o,i,o]
select(X,[X|Xs],Xs).
select(X,[Y|Xs],[Y|Zs]) :- select(X,Xs,Zs).
| ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Logic_Programming/talp_apt/select.pl | Perl | mit | 116 |
use utf8;
package CSN::Schema::Result::Profilefollow;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
CSN::Schema::Result::Profilefollow
=cut
use strict;
use warnings;
use base 'DBIx::Class::Core';
=head1 COMPONENTS LOADED
=over 4
=item * L<DBIx::Class::InflateColumn::DateTime>
=back
=cut
__PACKAGE__->load_components("InflateColumn::DateTime");
=head1 TABLE: C<profilefollow>
=cut
__PACKAGE__->table("profilefollow");
=head1 ACCESSORS
=head2 account_id
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 followed
data_type: 'integer'
is_foreign_key: 1
is_nullable: 0
=head2 time
data_type: 'timestamp with time zone'
default_value: current_timestamp
is_nullable: 1
original: {default_value => \"now()"}
=cut
__PACKAGE__->add_columns(
"account_id",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"followed",
{ data_type => "integer", is_foreign_key => 1, is_nullable => 0 },
"time",
{
data_type => "timestamp with time zone",
default_value => \"current_timestamp",
is_nullable => 1,
original => { default_value => \"now()" },
},
);
=head1 PRIMARY KEY
=over 4
=item * L</account_id>
=item * L</followed>
=back
=cut
__PACKAGE__->set_primary_key("account_id", "followed");
=head1 RELATIONS
=head2 account
Type: belongs_to
Related object: L<CSN::Schema::Result::Account>
=cut
__PACKAGE__->belongs_to(
"account",
"CSN::Schema::Result::Account",
{ account_id => "account_id" },
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
);
=head2 followed
Type: belongs_to
Related object: L<CSN::Schema::Result::Account>
=cut
__PACKAGE__->belongs_to(
"followed",
"CSN::Schema::Result::Account",
{ account_id => "followed" },
{ is_deferrable => 0, on_delete => "CASCADE", on_update => "NO ACTION" },
);
# Created by DBIx::Class::Schema::Loader v0.07040 @ 2015-02-08 21:26:18
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:7GPJx3OJ3TWg5euPLiiO9A
# You can replace this text with custom code or comments, and it will be preserved on regeneration
1;
| CodingMinds/CSN | lib/CSN/Schema/Result/Profilefollow.pm | Perl | mit | 2,158 |
# This script runs `make config' to generate a Linux kernel
# configuration file. For each question (i.e. kernel configuration
# option), unless an override is provided, it answers "m" if possible,
# and otherwise uses the default answer (as determined by the default
# config for the architecture). Overrides are read from the file
# $KERNEL_CONFIG, which on each line contains an option name and an
# answer, e.g. "EXT2_FS_POSIX_ACL y". The script warns about ignored
# options in $KERNEL_CONFIG, and barfs if `make config' selects
# another answer for an option than the one provided in
# $KERNEL_CONFIG.
use strict;
use IPC::Open2;
use Cwd;
# exported via nix
my $debug = $ENV{'DEBUG'};
my $autoModules = $ENV{'AUTO_MODULES'};
my $preferBuiltin = $ENV{'PREFER_BUILTIN'};
my $ignoreConfigErrors = $ENV{'ignoreConfigErrors'};
my $buildRoot = $ENV{'BUILD_ROOT'};
my $makeFlags = $ENV{'MAKE_FLAGS'};
$SIG{PIPE} = 'IGNORE';
# Read the answers.
my %answers;
my %requiredAnswers;
open ANSWERS, "<$ENV{KERNEL_CONFIG}" or die "Could not open answer file";
while (<ANSWERS>) {
chomp;
s/#.*//;
if (/^\s*([A-Za-z0-9_]+)(\?)?\s+(.*\S)\s*$/) {
$answers{$1} = $3;
$requiredAnswers{$1} = !(defined $2);
} elsif (!/^\s*$/) {
die "invalid config line: $_";
}
}
close ANSWERS;
sub runConfig {
# Run `make config'.
my $pid = open2(\*IN, \*OUT, "make -C $ENV{SRC} O=$buildRoot config SHELL=bash ARCH=$ENV{ARCH} CC=$ENV{CC} HOSTCC=$ENV{HOSTCC} HOSTCXX=$ENV{HOSTCXX} $makeFlags");
# Parse the output, look for questions and then send an
# appropriate answer.
my $line = ""; my $s;
my %choices = ();
my ($prevQuestion, $prevName);
while (!eof IN) {
read IN, $s, 1 or next;
$line .= $s;
#print STDERR "LINE: $line\n";
if ($s eq "\n") {
print STDERR "GOT: $line" if $debug;
# Remember choice alternatives ("> 1. bla (FOO)" or " 2. bla (BAR) (NEW)").
if ($line =~ /^\s*>?\s*(\d+)\.\s+.*?\(([A-Za-z0-9_]+)\)(?:\s+\(NEW\))?\s*$/) {
$choices{$2} = $1;
} else {
# The list of choices has ended without us being
# asked. This happens for options where only one value
# is valid, for instance. The results can foul up
# later options, so forget about it.
%choices = ();
}
$line = "";
}
elsif ($line =~ /###$/) {
# The config program is waiting for an answer.
# Is this a regular question? ("bla bla (OPTION_NAME) [Y/n/m/...] ")
if ($line =~ /(.*) \(([A-Za-z0-9_]+)\) \[(.*)\].*###$/) {
my $question = $1; my $name = $2; my $alts = $3;
my $answer = "";
# Build everything as a module if possible.
$answer = "m" if $autoModules && $alts =~ /\/m/ && !($preferBuiltin && $alts =~ /Y/);
$answer = $answers{$name} if defined $answers{$name};
print STDERR "QUESTION: $question, NAME: $name, ALTS: $alts, ANSWER: $answer\n" if $debug;
print OUT "$answer\n";
die "repeated question: $question" if $prevQuestion && $prevQuestion eq $question && $name eq $prevName;
$prevQuestion = $question;
$prevName = $name;
}
# Is this a choice? ("choice[1-N]: ")
elsif ($line =~ /choice\[(.*)\]: ###$/) {
my $answer = "";
foreach my $name (keys %choices) {
$answer = $choices{$name} if ($answers{$name} || "") eq "y";
}
print STDERR "CHOICE: $1, ANSWER: $answer\n" if $debug;
print OUT "$answer\n" if $1 =~ /-/;
}
# Some questions lack the option name ("bla bla [Y/n/m/...] ").
elsif ($line =~ /(.*) \[(.*)\] ###$/) {
print OUT "\n";
}
else {
warn "don't know how to answer this question: $line\n";
print OUT "\n";
}
$line = "";
%choices = ();
}
}
close IN;
waitpid $pid, 0;
}
# Run `make config' several times to converge on the desired result.
# (Some options may only become available after other options are
# set in a previous run.)
runConfig;
runConfig;
# Read the final .config file and check that our answers are in
# there. `make config' often overrides answers if later questions
# cause options to be selected.
my %config;
open CONFIG, "<$buildRoot/.config" or die "Could not read .config";
while (<CONFIG>) {
chomp;
if (/^CONFIG_([A-Za-z0-9_]+)="(.*)"$/) {
# String options have double quotes, e.g. 'CONFIG_NLS_DEFAULT="utf8"' and allow escaping.
($config{$1} = $2) =~ s/\\([\\"])/$1/g;
} elsif (/^CONFIG_([A-Za-z0-9_]+)=(.*)$/) {
$config{$1} = $2;
} elsif (/^# CONFIG_([A-Za-z0-9_]+) is not set$/) {
$config{$1} = "n";
}
}
close CONFIG;
my $ret = 0;
foreach my $name (sort (keys %answers)) {
my $f = $requiredAnswers{$name} && $ignoreConfigErrors ne "1"
? sub { warn "error: " . $_[0]; $ret = -1; } : sub { warn "warning: " . $_[0]; };
&$f("unused option: $name\n") unless defined $config{$name};
&$f("option not set correctly: $name (wanted '$answers{$name}', got '$config{$name}')\n")
if $config{$name} && $config{$name} ne $answers{$name};
}
exit $ret;
| NixOS/nixpkgs | pkgs/os-specific/linux/kernel/generate-config.pl | Perl | mit | 5,512 |
=pod
=head1 NAME
EVP_PKEY_meth_get_count, EVP_PKEY_meth_get0, EVP_PKEY_meth_get0_info - enumerate public key methods
=head1 SYNOPSIS
#include <openssl/evp.h>
The following functions have been deprecated since OpenSSL 3.0, and can be
hidden entirely by defining B<OPENSSL_API_COMPAT> with a suitable version value,
see L<openssl_user_macros(7)>:
size_t EVP_PKEY_meth_get_count(void);
const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx);
void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
const EVP_PKEY_METHOD *meth);
=head1 DESCRIPTION
All of the functions described on this page are deprecated.
Applications should instead use the OSSL_PROVIDER APIs.
EVP_PKEY_meth_count() returns a count of the number of public key methods
available: it includes standard methods and any methods added by the
application.
EVP_PKEY_meth_get0() returns the public key method B<idx>. The value of B<idx>
must be between zero and EVP_PKEY_meth_get_count() - 1.
EVP_PKEY_meth_get0_info() returns the public key ID (a NID) and any flags
associated with the public key method B<*meth>.
=head1 RETURN VALUES
EVP_PKEY_meth_count() returns the number of available public key methods.
EVP_PKEY_meth_get0() return a public key method or B<NULL> if B<idx> is
out of range.
EVP_PKEY_meth_get0_info() does not return a value.
=head1 SEE ALSO
L<EVP_PKEY_new(3)>
=head1 HISTORY
All of these functions were deprecated in OpenSSL 3.0.
=head1 COPYRIGHT
Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.
=cut
| openssl/openssl | doc/man3/EVP_PKEY_meth_get_count.pod | Perl | apache-2.0 | 1,804 |
=head1 LICENSE
Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=cut
=pod
=head1 NAME
Bio::EnsEMBL::Compara::Production::Projection::RunnableDB::RunnableLogger
=head1 DESCRIPTION
This class is a mirror of the calls we can expect to use on a L<Log::Log4perl>
logger class. This allows runnables to use Log4perl should it exist on
a user's @INC otherwise it defaults to the more normal logging to stdout. It
does not provide catagory support just the basic logging interface.
=head1 AUTHOR
Andy Yates (ayatesatebiacuk)
=head1 CONTACT
This modules is part of the EnsEMBL project (http://www.ensembl.org)
Questions can be posted to the dev mailing list: http://lists.ensembl.org/mailman/listinfo/dev
=cut
package Bio::EnsEMBL::Compara::Production::Projection::RunnableDB::RunnableLogger;
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
=head2 new()
Arg[DEBUG] : Indicates if debug mode is on.
Arg[STDERR] : Indicates we need to write out to STDERR
Arg[TRACE] : Indicates if trace mode is on (defaults to 0)
Description : Constructor for the logger
=cut
sub new {
my ( $class, @args ) = @_;
my $self = bless( {}, ref($class) || $class );
my ( $debug, $stderr, $trace ) = rearrange( [qw(debug stderr trace)], @args );
$self->_debug($debug);
$self->_stderr($stderr);
$self->_trace($trace);
return $self;
}
sub _debug {
my ($self, $_debug) = @_;
$self->{_debug} = $_debug if defined $_debug;
return $self->{_debug};
}
sub _stderr {
my ($self, $_stderr) = @_;
$self->{_stderr} = $_stderr if defined $_stderr;
return $self->{_stderr};
}
sub _trace {
my ($self, $_trace) = @_;
$self->{_trace} = $_trace if defined $_trace;
return $self->{_trace};
}
=head2 fatal()
Issues an Ensembl warning with the message
=cut
sub fatal {
my ($self, $message) = @_;
$self->_print("FATAL: $message");
return;
}
=head2 is_fatal()
Always returns true
=cut
sub is_fatal {
return 1;
}
=head2 error()
Issues an Ensembl warning with the message
=cut
sub error {
my ($self, $message) = @_;
$self->_print("ERROR: $message");
return;
}
=head2 is_error()
Always returns true
=cut
sub is_error {
return 1;
}
=head2 warning()
Issues an Ensembl warning with the message
=cut
sub warning {
my ($self, $message) = @_;
$self->_print("WARN: $message");
return;
}
=head2 is_warning()
Always returns true
=cut
sub is_warning {
return 1;
}
=head2 info()
Prints the message to STDOUT
=cut
sub info {
my ($self, $message) = @_;
$self->_print("INFO: $message");
return;
}
=head2 is_info()
Always returns true
=cut
sub is_info {
my ($self) = @_;
return 1;
}
=head2 debug()
Prints to STDOUT if the object was contstructed with the debug flag on
=cut
sub debug {
my ($self, $message) = @_;
return unless $self->is_debug();
$self->_print("DEBUG: $message");
return;
}
=head2 is_debug()
Returns true if debug was given as true during construction
=cut
sub is_debug {
my ($self) = @_;
return $self->_debug();
}
=head2 trace()
Prints the message to STDOUT if is_trace() responded true
=cut
sub trace {
my ($self, $message) = @_;
return unless $self->is_trace();
$self->_print("TRACE: $message");
return;
}
=head2 is_trace()
Returns true if debug was given as true during construction
=cut
sub is_trace {
my ($self) = @_;
return $self->_trace();
}
sub _print {
my ($self, $msg) = @_;
if($self->_stderr()) {
print STDERR $msg, "\n";
}
else {
print STDOUT $msg, "\n";
}
return;
}
1; | dbolser-ebi/ensembl-compara | modules/Bio/EnsEMBL/Compara/Production/Projection/RunnableDB/RunnableLogger.pm | Perl | apache-2.0 | 4,122 |
# common functionality for tests.
# imported into main for ease of use.
package main;
use Cwd;
use Config;
use File::Path;
use File::Copy;
use File::Basename;
# Set up for testing. Exports (as global vars):
# out: $home: $HOME env variable
# out: $cwd: here
# out: $scr: spamassassin script
#
sub sa_t_init {
my $tname = shift;
my $perl_path;
if ($config{PERL_PATH}) {
$perl_path = $config{PERL_PATH};
}
elsif ($^X =~ m|^/|) {
$perl_path = $^X;
}
else {
$perl_path = $Config{perlpath};
$perl_path =~ s|/[^/]*$|/$^X|;
}
$perl_path .= " -T" if !defined($ENV{'TEST_PERL_TAINT'}) or $ENV{'TEST_PERL_TAINT'} ne 'no';
$perl_path .= " -w" if !defined($ENV{'TEST_PERL_WARN'}) or $ENV{'TEST_PERL_WARN'} ne 'no';
$scr = $ENV{'SCRIPT'};
$scr ||= "$perl_path ../spamassassin";
$spamd = $ENV{'SPAMD_SCRIPT'};
$spamd ||= "$perl_path ../spamd/spamd -x";
$spamc = $ENV{'SPAMC_SCRIPT'};
$spamc ||= "../spamd/spamc";
$spamdport = $ENV{'SPAMD_PORT'};
$spamdport ||= 48373; # whatever
$spamd_cf_args = "-C log/test_rules_copy";
$spamd_localrules_args = " --siteconfigpath log/localrules.tmp";
$scr_localrules_args = " --siteconfigpath log/localrules.tmp";
$scr_cf_args = "-C log/test_rules_copy";
$scr_pref_args = "-p log/test_default.cf";
$scr_test_args = "";
$set_test_prefs = 0;
$default_cf_lines = "
bayes_path ./log/user_state/bayes
auto_whitelist_path ./log/user_state/auto-whitelist
";
(-f "t/test_dir") && chdir("t"); # run from ..
rmtree ("log");
mkdir ("log", 0755);
mkdir ("log/test_rules_copy", 0755);
for $file (<../rules/*.cf>) {
$base = basename $file;
copy ($file, "log/test_rules_copy/$base")
or warn "cannot copy $file to log/test_rules_copy/$base";
}
mkdir ("log/localrules.tmp", 0755);
copy ("../rules/user_prefs.template", "log/test_rules_copy/99_test_default.cf")
or die "user prefs copy failed";
open (PREFS, ">>log/test_rules_copy/99_test_default.cf");
print PREFS $default_cf_lines;
close PREFS;
# create an empty .prefs file
open (PREFS, ">>log/test_default.cf"); close PREFS;
mkdir("log/user_state",0755);
$home = $ENV{'HOME'};
$home ||= $ENV{'WINDIR'} if (defined $ENV{'WINDIR'});
$cwd = getcwd;
$ENV{'TEST_DIR'} = $cwd;
$testname = $tname;
}
sub sa_t_finish {
# no-op currently
}
sub tstfile {
my $file = shift;
open (OUT, ">log/mail.txt") or die;
print OUT $file; close OUT;
}
sub tstlocalrules {
my $lines = shift;
$set_local_rules = 1;
open (OUT, ">log/localrules.tmp/00test.cf") or die;
print OUT $lines; close OUT;
}
sub tstprefs {
my $lines = shift;
$set_test_prefs = 1;
# TODO: should we use -p, or modify the test_rules_copy/99_test_default.cf?
# for now, I'm taking the -p route, since we have to be able to test
# the operation of user-prefs in general, itself.
open (OUT, ">log/tst.cf") or die;
print OUT $lines; close OUT;
$scr_pref_args = "-p log/tst.cf";
}
# Run spamassassin. Calls back with the output.
# in $args: arguments to run with
# in $read_sub: callback for the output (should read from <IN>).
# This is called with no args.
#
# out: $sa_exitcode global: exitcode from sitescooper
# ret: undef if sitescooper fails, 1 for exit 0
#
sub sarun {
my $args = shift;
my $read_sub = shift;
rmtree ("log/outputdir.tmp"); # some tests use this
mkdir ("log/outputdir.tmp", 0755);
%found = ();
%found_anti = ();
if (defined $ENV{'SA_ARGS'}) {
$args = $ENV{'SA_ARGS'} . " ". $args;
}
$args = "$scr_cf_args $scr_localrules_args $scr_pref_args $scr_test_args $args";
# added fix for Windows tests from Rudif
my $scrargs = "$scr $args";
$scrargs =~ s!/!\\!g if ($^O =~ /^MS(DOS|Win)/i);
print ("\t$scrargs\n");
system ("$scrargs > log/$testname.${Test::ntest}");
$sa_exitcode = ($?>>8);
if ($sa_exitcode != 0) { return undef; }
&checkfile ("$testname.${Test::ntest}", $read_sub);
1;
}
sub scrun {
$spamd_never_started = 1;
spamcrun (@_);
}
sub spamcrun {
my $args = shift;
my $read_sub = shift;
if (defined $ENV{'SC_ARGS'}) {
$args = $ENV{'SC_ARGS'} . " ". $args;
}
my $spamcargs;
if($args !~ /\b(?:-p\s*[0-9]+|-o|-U)\b/)
{
$spamcargs = "$spamc -p $spamdport $args";
}
else
{
$spamcargs = "$spamc $args";
}
$spamcargs =~ s!/!\\!g if ($^O =~ /^MS(DOS|Win)/i);
print ("\t$spamcargs\n");
system ("$spamcargs > log/$testname.out");
$sa_exitcode = ($?>>8);
if ($sa_exitcode != 0) { stop_spamd(); return undef; }
%found = ();
%found_anti = ();
&checkfile ("$testname.out", $read_sub);
}
sub spamcrun_background {
my $args = shift;
my $read_sub = shift;
if (defined $ENV{'SC_ARGS'}) {
$args = $ENV{'SC_ARGS'} . " ". $args;
}
my $spamcargs;
if($args !~ /\b(?:-p\s*[0-9]+|-o|-U)\b/)
{
$spamcargs = "$spamc -p $spamdport $args";
}
else
{
$spamcargs = "$spamc $args";
}
$spamcargs =~ s!/!\\!g if ($^O =~ /^MS(DOS|Win)/i);
print ("\t$spamcargs &\n");
system ("$spamcargs > log/$testname.bg &") and return 0;
1;
}
sub sdrun {
my $sdargs = shift;
my $args = shift;
my $read_sub = shift;
start_spamd ($sdargs);
spamcrun ($args, $read_sub);
stop_spamd ();
1;
}
sub start_spamd {
my $sdargs = shift;
return if (defined($spamd_pid) && $spamd_pid > 0);
rmtree ("log/outputdir.tmp"); # some tests use this
mkdir ("log/outputdir.tmp", 0755);
if (defined $ENV{'SD_ARGS'}) {
$sdargs = $ENV{'SD_ARGS'} . " ". $sdargs;
}
my $spamdargs;
if($sdargs !~ /(?:-C\s*[^-]\S+)/) {
$sdargs = "$spamd_cf_args $spamd_localrules_args $sdargs";
}
if($sdargs !~ /(?:-p\s*[0-9]+|-o|--socketpath)/)
{
$spamdargs = "$spamd -D -p $spamdport $sdargs";
}
else
{
$spamdargs = "$spamd -D $sdargs";
}
$spamdargs =~ s!/!\\!g if ($^O =~ /^MS(DOS|Win)/i);
if ($set_test_prefs) {
warn "oops! SATest.pm: a test prefs file was created, but spamd isn't reading it\n";
}
print ("\t$spamdargs > log/$testname.spamd 2>&1 &\n");
system ("$spamdargs > log/$testname.spamd 2>&1 &");
# now find the PID
$spamd_pid = 0;
# note that the wait period increases the longer it takes,
# 20 retries works out to a total of 60 seconds
my $retries = 20;
my $wait = 0;
while ($spamd_pid <= 0) {
my $spamdlog = '';
if (open (IN, "<log/$testname.spamd")) {
while (<IN>) {
/Address already in use/ and $retries = 0;
/server pid: (\d+)/ and $spamd_pid = $1;
$spamdlog .= $_;
}
close IN;
last if ($spamd_pid);
}
sleep (int($wait++ / 4) + 1) if $retries > 0;
if ($retries-- <= 0) {
warn "spamd start failed: log: $spamdlog";
warn "\n\nMaybe you need to kill a running spamd process?\n\n";
return 0;
}
}
1;
}
sub stop_spamd {
return 0 if defined($spamd_never_started);
return 0 if defined($spamd_already_killed);
$spamd_pid ||= 0;
if ( $spamd_pid <= 1) {
print ("Invalid spamd pid: $spamd_pid. Spamd not started/crashed?\n");
return 0;
} else {
my $killed = kill (15, $spamd_pid);
print ("Killed $killed spamd instances\n");
# wait for it to exit, before returning.
for my $waitfor (0 .. 5) {
if (kill (0, $spamd_pid) == 0) { last; }
print ("Waiting for spamd at pid $spamd_pid to exit...\n");
sleep 1;
}
$spamd_pid = 0;
undef $spamd_never_started;
$spamd_already_killed = 1;
return $killed;
}
}
# ---------------------------------------------------------------------------
sub checkfile {
my $filename = shift;
my $read_sub = shift;
# print "Checking $filename\n";
if (!open (IN, "< log/$filename")) {
warn "cannot open log/$filename"; return undef;
}
&$read_sub();
close IN;
}
# ---------------------------------------------------------------------------
sub pattern_to_re {
my $pat = shift;
$pat = quotemeta($pat);
# make whitespace irrelevant; match any amount as long as the
# non-whitespace chars are OK.
$pat =~ s/\\\s/\\s\*/gs;
$pat;
}
# ---------------------------------------------------------------------------
sub patterns_run_cb {
local ($_);
my $string = shift;
if (defined $string) {
$_ = $string;
} else {
$_ = join ('', <IN>);
}
# create default names == the pattern itself, if not specified
foreach my $pat (keys %patterns) {
if ($patterns{$pat} eq '') {
$patterns{$pat} = $pat;
}
}
foreach my $pat (sort keys %patterns) {
my $safe = pattern_to_re ($pat);
# print "JMD $patterns{$pat}\n";
if ($_ =~ /${safe}/s) {
$found{$patterns{$pat}}++;
}
}
foreach my $pat (sort keys %anti_patterns) {
my $safe = pattern_to_re ($pat);
# print "JMD $patterns{$pat}\n";
if ($_ =~ /${safe}/s) {
$found_anti{$anti_patterns{$pat}}++;
}
}
}
sub ok_all_patterns {
foreach my $pat (sort keys %patterns) {
my $type = $patterns{$pat};
print "\tChecking $type\n";
if (defined $found{$type}) {
ok ($found{$type} == 1) or warn "Found more than once: $type\n";
} else {
warn "\tNot found: $type = $pat\n";
ok (0); # keep the right # of tests
}
}
foreach my $pat (sort keys %anti_patterns) {
my $type = $anti_patterns{$pat};
print "\tChecking for anti-pattern $type\n";
if (defined $found_anti{$type}) {
warn "\tFound anti-pattern: $type = $pat\n";
ok (0);
}
else
{
ok (1);
}
}
}
sub skip_all_patterns {
my $skip = shift;
foreach my $pat (sort keys %patterns) {
my $type = $patterns{$pat};
print "\tChecking $type\n";
if (defined $found{$type}) {
skip ($skip, $found{$type} == 1) or warn "Found more than once: $type\n";
warn "\tThis test should have been skipped: $skip\n" if $skip;
} else {
if ($skip) {
warn "\tTest skipped: $skip\n";
} else {
warn "\tNot found: $type = $pat\n";
}
skip ($skip, 0); # keep the right # of tests
}
}
foreach my $pat (sort keys %anti_patterns) {
my $type = $anti_patterns{$pat};
print "\tChecking for anti-pattern $type\n";
if (defined $found_anti{$type}) {
warn "\tFound anti-pattern: $type = $pat\n";
skip ($skip, 0);
}
else
{
skip ($skip, 1);
}
}
}
sub clear_pattern_counters {
%found = ();
%found_anti = ();
}
1;
| drlouie/public-views-extended | _client-workareas/USNV/software/SA/Mail-SpamAssassin-2.63/t/SATest.pm | Perl | apache-2.0 | 10,380 |
package Google::Ads::AdWords::v201402::AlertQuery;
use strict;
use warnings;
__PACKAGE__->_set_element_form_qualified(1);
sub get_xmlns { 'https://adwords.google.com/api/adwords/mcm/v201402' };
our $XML_ATTRIBUTE_CLASS;
undef $XML_ATTRIBUTE_CLASS;
sub __get_attr_class {
return $XML_ATTRIBUTE_CLASS;
}
use Class::Std::Fast::Storable constructor => 'none';
use base qw(Google::Ads::SOAP::Typelib::ComplexType);
{ # BLOCK to scope variables
my %clientSpec_of :ATTR(:get<clientSpec>);
my %filterSpec_of :ATTR(:get<filterSpec>);
my %types_of :ATTR(:get<types>);
my %severities_of :ATTR(:get<severities>);
my %triggerTimeSpec_of :ATTR(:get<triggerTimeSpec>);
my %triggerTime_of :ATTR(:get<triggerTime>);
my %clientCustomerIds_of :ATTR(:get<clientCustomerIds>);
__PACKAGE__->_factory(
[ qw( clientSpec
filterSpec
types
severities
triggerTimeSpec
triggerTime
clientCustomerIds
) ],
{
'clientSpec' => \%clientSpec_of,
'filterSpec' => \%filterSpec_of,
'types' => \%types_of,
'severities' => \%severities_of,
'triggerTimeSpec' => \%triggerTimeSpec_of,
'triggerTime' => \%triggerTime_of,
'clientCustomerIds' => \%clientCustomerIds_of,
},
{
'clientSpec' => 'Google::Ads::AdWords::v201402::ClientSpec',
'filterSpec' => 'Google::Ads::AdWords::v201402::FilterSpec',
'types' => 'Google::Ads::AdWords::v201402::AlertType',
'severities' => 'Google::Ads::AdWords::v201402::AlertSeverity',
'triggerTimeSpec' => 'Google::Ads::AdWords::v201402::TriggerTimeSpec',
'triggerTime' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'clientCustomerIds' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
},
{
'clientSpec' => 'clientSpec',
'filterSpec' => 'filterSpec',
'types' => 'types',
'severities' => 'severities',
'triggerTimeSpec' => 'triggerTimeSpec',
'triggerTime' => 'triggerTime',
'clientCustomerIds' => 'clientCustomerIds',
}
);
} # end BLOCK
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201402::AlertQuery
=head1 DESCRIPTION
Perl data type class for the XML Schema defined complexType
AlertQuery from the namespace https://adwords.google.com/api/adwords/mcm/v201402.
Querying criteria for getting alerts.
=head2 PROPERTIES
The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:
=over
=item * clientSpec
=item * filterSpec
=item * types
=item * severities
=item * triggerTimeSpec
=item * triggerTime
=item * clientCustomerIds
=back
=head1 METHODS
=head2 new
Constructor. The following data structure may be passed to new():
=head1 AUTHOR
Generated by SOAP::WSDL
=cut
| gitpan/GOOGLE-ADWORDS-PERL-CLIENT | lib/Google/Ads/AdWords/v201402/AlertQuery.pm | Perl | apache-2.0 | 2,792 |
# preamble.pl
$[/myProject/procedure_helpers/preamble]
use Carp;
my $PROJECT_NAME = '$[/myProject/projectName]';
my $PLUGIN_NAME = '@PLUGIN_NAME@';
my $PLUGIN_KEY = '@PLUGIN_KEY@';
$| = 1;
main();
sub main {
my $jboss = EC::JBoss->new(
project_name => $PROJECT_NAME,
plugin_name => $PLUGIN_NAME,
plugin_key => $PLUGIN_KEY,
no_cli_path_in_procedure_params => 1
);
$jboss->{hide_password} = 1;
my $params = $jboss->get_params_as_hashref(qw/
informationType
informationTypeContext
additionalOptions
/);
my $param_information_type = $params->{informationType};
my $param_information_type_context = $params->{informationTypeContext};
my $param_additional_options = $params->{additionalOptions};
my $property_path = "envInfo";
my $env_info;
my $cli_command;
my $json;
########
# check jboss launch type
########
$cli_command = ':read-attribute(name=launch-type)';
$json = run_command_and_get_json_with_exiting_on_error(
command => $cli_command,
jboss => $jboss
);
my $launch_type = lc $json->{result};
if (!$launch_type || ($launch_type ne "standalone" && $launch_type ne "domain")) {
$jboss->bail_out("Unknown JBoss launch type: '$launch_type'");
}
my $jboss_is_domain = 1 if $launch_type eq "domain";
$jboss->log_info("=======Started: getting environment information, information type - '$param_information_type'=======");
if ($param_information_type eq "systemDump") {
$env_info = get_env_info_system_dump(
jboss => $jboss,
additional_parameters => $param_additional_options
);
}
elsif ($param_information_type eq "profiles") {
$env_info = get_env_info_profiles(
jboss => $jboss,
additional_parameters => $param_additional_options
);
}
elsif ($param_information_type eq "dataSources" || $param_information_type eq "xaDataSources") {
my $get_xa = 1 if $param_information_type eq "xaDataSources";
if ($jboss_is_domain) {
if ($param_information_type_context) {
$env_info = get_env_info_data_sources_in_profile(
jboss => $jboss,
get_xa => $get_xa,
profile => $param_information_type_context,
additional_parameters => $param_additional_options
);
}
else {
$env_info = get_env_info_data_sources_in_all_profiles(
jboss => $jboss,
get_xa => $get_xa,
additional_parameters => $param_additional_options
);
}
}
else {
$env_info = get_env_info_data_sources_in_standalone(
jboss => $jboss,
get_xa => $get_xa,
additional_parameters => $param_additional_options
);
}
}
$env_info = replace_passwords_by_stars_in_cli_response($env_info);
$jboss->log_info("Requested Environment Information: $env_info");
$jboss->set_property($property_path, $env_info);
$jboss->log_info("=======Finished: getting environment information, information type - '$param_information_type'=======");
}
sub run_command_and_get_json_result_with_exiting_on_non_success {
my %args = @_;
my $command = $args{command} || croak "'command' is required param";
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $json = run_command_and_get_json_with_exiting_on_non_success(
command => $command,
jboss => $jboss
);
if (!defined $json->{result}) {
$jboss->bail_out("JBoss replied with undefined result when expectation was to verify the result: " . (encode_json $json));
}
return $json->{result};
}
sub run_command_and_get_json_with_exiting_on_non_success {
my %args = @_;
my $command = $args{command} || croak "'command' is required param";
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $json = run_command_and_get_json_with_exiting_on_error(
command => $command,
jboss => $jboss
);
if ($json->{outcome} ne "success") {
$jboss->bail_out("JBoss replied with outcome other than success: " . (encode_json $json));
}
return $json;
}
sub run_command_and_get_json_with_exiting_on_error {
my %args = @_;
my $command = $args{command} || croak "'command' is required param";
my $jboss = $args{jboss} || croak "'jboss' is required param";
my %result = run_command_with_exiting_on_error(command => $command, jboss => $jboss);
my $json = $jboss->decode_answer($result{stdout});
$jboss->bail_out("Cannot convert JBoss response into JSON") if !$json;
return $json;
}
sub run_command_with_exiting_on_error {
my %args = @_;
my $command = $args{command} || croak "'command' is required param";
my $jboss = $args{jboss} || croak "'jboss' is required param";
my %result = $jboss->run_command($command);
$jboss->process_response(%result);
if ($result{code}) {
exit 1;
}
return %result;
}
sub get_all_profiles {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $cli_command = qq|/:read-children-names(child-type=profile)|;
my $profiles = run_command_and_get_json_result_with_exiting_on_non_success(
command => $cli_command,
jboss => $jboss
);
return $profiles;
}
sub replace_passwords_by_stars_in_cli_response {
my $string = shift;
return $string unless $string;
$string =~ s/"password" => ".*?"/"password" => "***"/gs;
return $string;
}
sub is_datasources_subsystem_available_in_profile {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $profile = $args{profile} || croak "'profile' is required param";
my @subsystems = @{ get_all_subsystems_in_profile(jboss => $jboss, profile => $profile) };
my %subsystems_hash = map {$_ => 1} @subsystems;
if ($subsystems_hash{'datasources'}) {
return 1;
}
else {
return 0;
}
}
sub get_all_subsystems_in_profile {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $profile = $args{profile} || croak "'profile' is required param";
my $cli_command = qq|/profile=$profile/:read-children-names(child-type=subsystem)|;
my $subsystems = run_command_and_get_json_result_with_exiting_on_non_success(
command => $cli_command,
jboss => $jboss
);
return $subsystems;
}
sub get_env_info_system_dump {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $additional_parameters = $args{additional_parameters};
$additional_parameters = $additional_parameters ? $additional_parameters : "";
my $cli_command = "/:read-resource($additional_parameters)";
my %result = run_command_with_exiting_on_error(command => $cli_command, jboss => $jboss);
my $env_info = $result{stdout};
return $env_info;
}
sub get_env_info_profiles {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $additional_parameters = $args{additional_parameters};
$additional_parameters = $additional_parameters ? ",$additional_parameters" : "";
my $cli_command = "/:read-children-resources(child-type=profile$additional_parameters)";
my %result = run_command_with_exiting_on_error(command => $cli_command, jboss => $jboss);
my $env_info = $result{stdout};
return $env_info;
}
sub get_env_info_data_sources_in_standalone {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $get_xa = $args{get_xa};
my $additional_parameters = $args{additional_parameters};
my $xa_prefix = $get_xa ? "xa-" : "";
$additional_parameters = $additional_parameters ? ",$additional_parameters" : "";
my $cli_command = "/subsystem=datasources/:read-children-resources(child-type=${xa_prefix}data-source${additional_parameters})";
my %result = run_command_with_exiting_on_error(command => $cli_command, jboss => $jboss);
my $env_info = $result{stdout};
return $env_info;
}
sub get_env_info_data_sources_in_profile {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $profile = $args{profile} || croak "'profile' is required param";
my $get_xa = $args{get_xa};
my $additional_parameters = $args{additional_parameters};
my $xa_prefix = $get_xa ? "xa-" : "";
$additional_parameters = $additional_parameters ? ",$additional_parameters" : "";
my $cli_command = "/profile=${profile}/subsystem=datasources/:read-children-resources(child-type=${xa_prefix}data-source${additional_parameters})";
my %result = run_command_with_exiting_on_error(command => $cli_command, jboss => $jboss);
my $env_info = $result{stdout};
return $env_info;
}
sub get_env_info_data_sources_in_all_profiles {
my %args = @_;
my $jboss = $args{jboss} || croak "'jboss' is required param";
my $get_xa = $args{get_xa};
my $additional_parameters = $args{additional_parameters};
my @all_profiles = @{ get_all_profiles(jboss => $jboss) };
my %profiles_env_info;
foreach my $profile (@all_profiles) {
if (is_datasources_subsystem_available_in_profile(jboss => $jboss, profile => $profile)) {
$jboss->log_info("There is 'datasources' subsystem within '$profile' profile");
$profiles_env_info{$profile} = get_env_info_data_sources_in_profile(
jboss => $jboss,
get_xa => $get_xa,
profile => $profile,
additional_parameters => $additional_parameters
);
}
else {
$jboss->log_info("There is no 'datasources' subsystem within '$profile' profile");
$profiles_env_info{$profile} = "No 'datasources' subsystem";
}
}
my $env_info = join("\n", map {"Profile '$_': $profiles_env_info{$_}"} keys %profiles_env_info);
return $env_info;
} | electric-cloud/EC-JBoss | src/main/resources/project/server/getEnvInfo.pl | Perl | apache-2.0 | 10,465 |
use strict;
use warnings;
package Dist::Zilla::Plugin::RunExtraTests;
# ABSTRACT: support running xt tests via dzil test
our $VERSION = '0.025';
# Dependencies
use Dist::Zilla 4.3 ();
use Moose 2;
use namespace::autoclean 0.09;
# extends, roles, attributes, etc.
with 'Dist::Zilla::Role::TestRunner';
# methods
sub test {
my ($self, $target, $arg) = @_;
my %dirs; @dirs{ glob('xt/*') } = ();
delete $dirs{'xt/author'} unless $ENV{AUTHOR_TESTING};
delete $dirs{'xt/smoke'} unless $ENV{AUTOMATED_TESTING};
delete $dirs{'xt/release'} unless $ENV{RELEASE_TESTING};
my @dirs = sort keys %dirs;
return unless @dirs;
# If the dist hasn't been built yet, then build it:
unless ( -d 'blib' ) {
my @builders = @{ $self->zilla->plugins_with( -BuildRunner ) };
die "no BuildRunner plugins specified" unless @builders;
$_->build for @builders;
die "no blib; failed to build properly?" unless -d 'blib';
}
my $jobs = $arg && exists $arg->{jobs}
? $arg->{jobs}
: $self->can('default_jobs')
? $self->default_jobs
: 1;
my @v = $self->zilla->logger->get_debug ? ('-v') : ();
require App::Prove;
App::Prove->VERSION('3.00');
my $app = App::Prove->new;
$app->process_args( '-j', $jobs, @v, qw/-r -b/, @dirs );
$app->run or $self->log_fatal("Fatal errors in xt tests");
return;
}
__PACKAGE__->meta->make_immutable;
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
Dist::Zilla::Plugin::RunExtraTests - support running xt tests via dzil test
=head1 VERSION
version 0.025
=head1 SYNOPSIS
In your dist.ini:
[RunExtraTests]
=head1 DESCRIPTION
Runs F<xt> tests when the test phase is run (e.g. C<dzil test>, C<dzil release>
etc). F<xt/release>, F<xt/author>, and F<xt/smoke> will be tested based on the
values of the appropriate environment variables (C<RELEASE_TESTING>,
C<AUTHOR_TESTING>, and C<AUTOMATED_TESTING>), which are set by C<dzil test>.
Additionally, all other F<xt> files and directories will always be run.
If C<RunExtraTests> is listed after one of the normal test-running
plugins (e.g. C<MakeMaker> or C<ModuleBuild>), then the dist will not
be rebuilt between running the normal tests and the extra tests.
=for Pod::Coverage::TrustPod test
=head1 SEE ALSO
=over 4
=item *
L<Dist::Zilla>
=back
=head1 AUTHORS
=over 4
=item *
David Golden <dagolden@cpan.org>
=item *
Jesse Luehrs <doy@cpan.org>
=back
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2014 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
=cut
| gitpan/Dist-Zilla-Plugin-CheckExtraTests | lib/Dist/Zilla/Plugin/RunExtraTests.pm | Perl | apache-2.0 | 2,666 |
#
# Copyright 2015 Electric Cloud, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
use ElectricCommander;
use File::Basename;
use ElectricCommander::PropDB;
use ElectricCommander::PropMod;
$|=1;
my $ec = new ElectricCommander();
$ec->abortOnError(0);
my $cfgName = "$[gerrit_cfg]";
my $proj = "$[/myProject/projectName]";
my $cfg = new ElectricCommander::PropDB($ec,"/projects/$proj/gerrit_cfgs");
my %vals = $cfg->getRow($cfgName);
my $opts = \%vals;
# get pseudo code snippets
my $code = new ElectricCommander::PropDB($ec,"/projects/$proj/");
my %code_vals = $code->getRow("pseudo_code");
foreach my $snippet (keys %code_vals) {
$opts->{$snippet} = "$code_vals{$snippet}";
}
if (!defined $opts->{gerrit_server} || $opts->{gerrit_server} eq "") {
print "configuration [$cfgName] does not contain a gerrit server name\n";
exit 1;
}
## add other parms and values to opts
$opts->{gerrit_cfg} = "$cfgName";
$opts->{gerrit_working_dir} = "$[/myResource/gerrit_working_dir]";
$opts->{changeid} = ($ec->getProperty("changeid") )->findvalue("//value");
$opts->{patchid} = ($ec->getProperty("patchid") )->findvalue("//value");
$opts->{project} = ($ec->getProperty("project") )->findvalue("//value");
$opts->{group_build_changes} = ($ec->getProperty("group_build_changes") )->findvalue("//value");
if (!ElectricCommander::PropMod::loadPerlCodeFromProperty(
$ec,"/myProject/scm_driver/ECGerrit") ) {
print "Could not load ECGerrit.pm\n";
}
my $gt = new ECGerrit( $ec,
"$opts->{gerrit_user}",
"$opts->{gerrit_server}",
"$opts->{gerrit_port}",
"$opts->{gerrit_public_key}",
"$opts->{gerrit_private_key}",
$opts->{debug});
| electric-cloud/EC-Gerrit | src/main/resources/project/server/preamble.pl | Perl | apache-2.0 | 2,202 |
###################################################
# WARNING: Do not edit this file!
# If you do the changes will be lost!
# Instead edit the corresponding .txt file and run make.pl
#
# Don't forget to commit the changes to both .txt and the generated
# .pod to svn, since others won't run the local make.pl
####################################################
=head1 NAME
Major Teachers Union Launches New Site on mod_perl
=head1 Perrin Harkins E<lt>perrin (at) elem.comE<gt> exclaimed:
=over
=item *
Date: Thur, 27 Jan 2005 14:27:41 -0800
=item *
URL: http://www.uft.org/
=back
The New York-based United Federation of Teachers, a 150,000-member
teachers union for New York City's teachers in the city's five
boroughs and 1,300 schools, has moved their site from a proprietary
Windows-based system to a new system built on mod_perl and other open
source technologies.
The site uses the (mod_perl-based) Krang content management system
(http://krang.sf.net/) for publishing, enabling a wider range of
people to contribute content with a consistent look-and-feel and a
workflow system to handle the review process. The new site also
features integration with the union's existing AS/400 systems, and
further integration work is underway to bring more resources on-line
for a wider audience.
My company, Plus Three (http://plusthree.com/) did the technical work
on this project. Plus Three specializes in helping large non-profit
and political organizations achieve their goals with open source
software.
An article about the project was published in eWeek here:
http://www.eweek.com/article2/0,1759,1754012,00.asp
=cut
| Distrotech/mod_perl | docs/src/outstanding/success_stories/uft.org.pod | Perl | apache-2.0 | 1,690 |
#
# Copyright 2022 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package network::netgear::sseries::snmp::mode::hardware;
use base qw(centreon::plugins::templates::hardware);
use strict;
use warnings;
sub set_system {
my ($self, %options) = @_;
$self->{regexp_threshold_numeric_check_section_option} = '^(temperature|fan)$';
$self->{cb_hook2} = 'snmp_execute';
$self->{thresholds} = {
default => [
['notPresent', 'OK'],
['operational', 'OK'],
['failed', 'CRITICAL'],
['notpowering', 'WARNING'],
['powering', 'OK'],
['nopower', 'OK'],
['incompatible', 'WARNING']
],
temperature => [
['low', 'OK'],
['normal', 'OK'],
['warning', 'WARNING'],
['critical', 'CRITICAL'],
['notpresent', 'OK'],
['shutdown', 'OK'],
['notoperational', 'WARNING']
]
};
$self->{components_path} = 'network::netgear::sseries::snmp::mode::components';
$self->{components_module} = ['fan', 'psu', 'temperature'];
}
sub snmp_execute {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{results} = $self->{snmp}->get_multiple_table(oids => $self->{request});
}
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {});
return $self;
}
1;
__END__
=head1 MODE
Check hardware.
=over 8
=item B<--component>
Which component to check (Default: '.*').
Can be: 'fan', 'psu', 'temperature'.
=item B<--filter>
Exclude some parts (comma seperated list) (Example: --filter=fan --filter=psu)
Can also exclude specific instance: --filter=fan,1.1
=item B<--absent-problem>
Return an error if an entity is not 'present' (default is skipping) (comma seperated list)
Can be specific or global: --absent-problem=fan,1
=item B<--no-component>
Return an error if no compenents are checked.
If total (with skipped) is 0. (Default: 'critical' returns).
=item B<--threshold-overload>
Set to overload default threshold values (syntax: section,[instance,]status,regexp)
It used before default thresholds (order stays).
Example: --threshold-overload='psu,CRITICAL,^(?!(operational)$)'
=item B<--warning>
Set warning threshold for 'temperature', 'fan' (syntax: type,regexp,threshold)
Example: --warning='temperature,.*,40'
=item B<--critical>
Set critical threshold for 'temperature', 'fan' (syntax: type,regexp,threshold)
Example: --critical='temperature,.*,50'
=back
=cut
| centreon/centreon-plugins | network/netgear/sseries/snmp/mode/hardware.pm | Perl | apache-2.0 | 3,385 |
#
# Copyright 2022 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package storage::hitachi::standard::snmp::mode::components::dku;
use strict;
use warnings;
my %map_status = (
1 => 'noError',
2 => 'acute',
3 => 'serious',
4 => 'moderate',
5 => 'service',
);
my $mapping = {
dkuHWPS => { oid => '.1.3.6.1.4.1.116.5.11.4.1.1.7.1.2', map => \%map_status, type => 'psu' },
dkuHWFan => { oid => '.1.3.6.1.4.1.116.5.11.4.1.1.7.1.3', map => \%map_status, type => 'fan' },
dkuHWEnvironment => { oid => '.1.3.6.1.4.1.116.5.11.4.1.1.7.1.4', map => \%map_status, type => 'environment' },
dkuHWDrive => { oid => '.1.3.6.1.4.1.116.5.11.4.1.1.7.1.5', map => \%map_status, type => 'drive' },
};
my $oid_raidExMibDKUHWEntry = '.1.3.6.1.4.1.116.5.11.4.1.1.7.1';
sub load {
my ($self) = @_;
push @{$self->{request}}, { oid => $oid_raidExMibDKUHWEntry };
}
sub check {
my ($self) = @_;
$self->{output}->output_add(long_msg => "Checking drive chassis");
$self->{components}->{dku} = {name => 'dku', total => 0, skip => 0};
return if ($self->check_filter(section => 'dku'));
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_raidExMibDKUHWEntry}})) {
next if ($oid !~ /^$mapping->{dkuHWEnvironment}->{oid}\.(.*)$/);
my $instance = $1;
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_raidExMibDKUHWEntry}, instance => $instance);
$self->{components}->{dku}->{total}++;
foreach (keys %{$mapping}) {
next if ($self->check_filter(section => 'dku', instance => $1 . '.' . $mapping->{$_}->{type}));
$self->{output}->output_add(long_msg => sprintf("dku '%s' %s status is '%s' [instance: %s].",
$instance, $mapping->{$_}->{type}, $result->{$_},
$instance . '.' . $mapping->{$_}->{type}
));
my $exit = $self->get_severity(label => 'dk', section => 'dku', instance => $1 . '.' . $mapping->{$_}->{type}, value => $result->{$_});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("DKU '%s' %s status is '%s'",
$instance, $mapping->{$_}->{type}, $result->{$_}));
}
}
}
}
1; | centreon/centreon-plugins | storage/hitachi/standard/snmp/mode/components/dku.pm | Perl | apache-2.0 | 3,285 |
package Google::Ads::AdWords::v201402::CampaignAdExtensionService::get;
use strict;
use warnings;
{ # BLOCK to scope variables
sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201402' }
__PACKAGE__->__set_name('get');
__PACKAGE__->__set_nillable();
__PACKAGE__->__set_minOccurs();
__PACKAGE__->__set_maxOccurs();
__PACKAGE__->__set_ref();
use base qw(
SOAP::WSDL::XSD::Typelib::Element
Google::Ads::SOAP::Typelib::ComplexType
);
our $XML_ATTRIBUTE_CLASS;
undef $XML_ATTRIBUTE_CLASS;
sub __get_attr_class {
return $XML_ATTRIBUTE_CLASS;
}
use Class::Std::Fast::Storable constructor => 'none';
use base qw(Google::Ads::SOAP::Typelib::ComplexType);
{ # BLOCK to scope variables
my %serviceSelector_of :ATTR(:get<serviceSelector>);
__PACKAGE__->_factory(
[ qw( serviceSelector
) ],
{
'serviceSelector' => \%serviceSelector_of,
},
{
'serviceSelector' => 'Google::Ads::AdWords::v201402::Selector',
},
{
'serviceSelector' => 'serviceSelector',
}
);
} # end BLOCK
} # end of BLOCK
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201402::CampaignAdExtensionService::get
=head1 DESCRIPTION
Perl data type class for the XML Schema defined element
get from the namespace https://adwords.google.com/api/adwords/cm/v201402.
Returns a list of {@link CampaignAdExtension}s. @param serviceSelector The selector specifying the {@link CampaignAdExtension}s to return. @return The page containing the {@link CampaignAdExtension}s which meet the criteria specified by the selector. @throws ApiException when there is at least one error with the request.
=head1 PROPERTIES
The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:
=over
=item * serviceSelector
$element->set_serviceSelector($data);
$element->get_serviceSelector();
=back
=head1 METHODS
=head2 new
my $element = Google::Ads::AdWords::v201402::CampaignAdExtensionService::get->new($data);
Constructor. The following data structure may be passed to new():
{
serviceSelector => $a_reference_to, # see Google::Ads::AdWords::v201402::Selector
},
=head1 AUTHOR
Generated by SOAP::WSDL
=cut
| gitpan/GOOGLE-ADWORDS-PERL-CLIENT | lib/Google/Ads/AdWords/v201402/CampaignAdExtensionService/get.pm | Perl | apache-2.0 | 2,198 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% This file is part of VivoMind Prolog Unicode Resources
% SPDX-License-Identifier: CC0-1.0
%
% VivoMind Prolog Unicode Resources is free software distributed using the
% Creative Commons CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication
% license
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Last modified: March 13, 2012
unicode_name(0x01C5, 'LATIN CAPITAL LETTER D WITH SMALL LETTER Z WITH CARON').
unicode_name(0x01C8, 'LATIN CAPITAL LETTER L WITH SMALL LETTER J').
unicode_name(0x01CB, 'LATIN CAPITAL LETTER N WITH SMALL LETTER J').
unicode_name(0x01F2, 'LATIN CAPITAL LETTER D WITH SMALL LETTER Z').
unicode_name(0x1F88, 'GREEK CAPITAL LETTER ALPHA WITH PSILI AND PROSGEGRAMMENI').
unicode_name(0x1F89, 'GREEK CAPITAL LETTER ALPHA WITH DASIA AND PROSGEGRAMMENI').
unicode_name(0x1F8A, 'GREEK CAPITAL LETTER ALPHA WITH PSILI AND VARIA AND PROSGEGRAMMENI').
unicode_name(0x1F8B, 'GREEK CAPITAL LETTER ALPHA WITH DASIA AND VARIA AND PROSGEGRAMMENI').
unicode_name(0x1F8C, 'GREEK CAPITAL LETTER ALPHA WITH PSILI AND OXIA AND PROSGEGRAMMENI').
unicode_name(0x1F8D, 'GREEK CAPITAL LETTER ALPHA WITH DASIA AND OXIA AND PROSGEGRAMMENI').
unicode_name(0x1F8E, 'GREEK CAPITAL LETTER ALPHA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI').
unicode_name(0x1F8F, 'GREEK CAPITAL LETTER ALPHA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI').
unicode_name(0x1F98, 'GREEK CAPITAL LETTER ETA WITH PSILI AND PROSGEGRAMMENI').
unicode_name(0x1F99, 'GREEK CAPITAL LETTER ETA WITH DASIA AND PROSGEGRAMMENI').
unicode_name(0x1F9A, 'GREEK CAPITAL LETTER ETA WITH PSILI AND VARIA AND PROSGEGRAMMENI').
unicode_name(0x1F9B, 'GREEK CAPITAL LETTER ETA WITH DASIA AND VARIA AND PROSGEGRAMMENI').
unicode_name(0x1F9C, 'GREEK CAPITAL LETTER ETA WITH PSILI AND OXIA AND PROSGEGRAMMENI').
unicode_name(0x1F9D, 'GREEK CAPITAL LETTER ETA WITH DASIA AND OXIA AND PROSGEGRAMMENI').
unicode_name(0x1F9E, 'GREEK CAPITAL LETTER ETA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI').
unicode_name(0x1F9F, 'GREEK CAPITAL LETTER ETA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI').
unicode_name(0x1FA8, 'GREEK CAPITAL LETTER OMEGA WITH PSILI AND PROSGEGRAMMENI').
unicode_name(0x1FA9, 'GREEK CAPITAL LETTER OMEGA WITH DASIA AND PROSGEGRAMMENI').
unicode_name(0x1FAA, 'GREEK CAPITAL LETTER OMEGA WITH PSILI AND VARIA AND PROSGEGRAMMENI').
unicode_name(0x1FAB, 'GREEK CAPITAL LETTER OMEGA WITH DASIA AND VARIA AND PROSGEGRAMMENI').
unicode_name(0x1FAC, 'GREEK CAPITAL LETTER OMEGA WITH PSILI AND OXIA AND PROSGEGRAMMENI').
unicode_name(0x1FAD, 'GREEK CAPITAL LETTER OMEGA WITH DASIA AND OXIA AND PROSGEGRAMMENI').
unicode_name(0x1FAE, 'GREEK CAPITAL LETTER OMEGA WITH PSILI AND PERISPOMENI AND PROSGEGRAMMENI').
unicode_name(0x1FAF, 'GREEK CAPITAL LETTER OMEGA WITH DASIA AND PERISPOMENI AND PROSGEGRAMMENI').
unicode_name(0x1FBC, 'GREEK CAPITAL LETTER ALPHA WITH PROSGEGRAMMENI').
unicode_name(0x1FCC, 'GREEK CAPITAL LETTER ETA WITH PROSGEGRAMMENI').
unicode_name(0x1FFC, 'GREEK CAPITAL LETTER OMEGA WITH PROSGEGRAMMENI').
| LogtalkDotOrg/logtalk3 | library/unicode_data/unicode_names/unicode_name_lt_letter_titlecase.pl | Perl | apache-2.0 | 3,114 |
:- module(strapper,[main/0],[]).
:- use_module(library(concurrency)). %,[eng_killothers/0]).
:- use_module(library(read)).
:- use_module(library(write)).
:- use_module(library('ams/socket_serve'),[serve_socket_multi/2]).
:- use_module(library(sockets)).
:- use_module(library(use_url)).
%:- use_module(engine(internals),['$meta_call'/1]).
% ( '$meta_call'(Goal),
% instead of Mod:Goal (??)
:- redefining(debug/1). %also from io_aux
debug(M):- display(user_error,M), nl(user_error).
%debug(_).
main:-
debug(entering),
catch(boot(Answer,Port,Socket,Mod),Error,answer(Error)),
start_listening(Answer,Port,Socket,Mod),
debug(finished).
boot(Answer,Port,Socket,Mod):-
read(Mod),
read(Mid),
read(Length),
debug(read((Mod,Mid,Length))),
( load_module(Mod,Mid)
-> debug(loaded),
( bind_socket(Port,Length,Socket)
-> Answer = 0
; Answer = -2
)
; Answer = -4
).
load_module(class(Mod),Mid):- !, % for classes
use_module_url(Mod,Mid),
use_module_url(objects_rt,
"http://www.clip.dia.fi.upm.es/objects_rt.pl").
load_module(Mod,Mid):-
use_module_url(Mod,Mid).
answer(Answer):-
display_term(Answer),
flush_output.
start_listening(0,Port,Socket,Mod):- !,
debug(connected),
answer(Port),
debug(responded(Port)),
serve_socket_multi(Socket,listen(Mod)),
debug(finished_listening).
start_listening(Answer,_Po,_So,_Mo):-
debug(failed),
answer(Answer),
debug(responded(Answer)).
listen(Stream,Mod):-
read(Stream,Request),
debug(request(Request)),
process(Request,Mod,Stream),
( Request=end_of_file
-> close(Stream)
; listen(Stream,Mod)
).
process(end_of_file,_M,_S):- !.
process(0,_Mod,_Stream):- !,
fail.
process(1,_Mod,_Stream):- !,
eng_killothers,
eng_goal_id(Self),
eng_kill(Self),
abort,
halt.
process(Goal,Mod,Stream):-
( call_in_module(Mod,Goal),
Solution = Goal
; Solution = 0
),
debug(solution(Solution)),
current_output(OldOut),
set_output(Stream), % should not fail!
display_term(Solution),
flush_output,
set_output(OldOut).
call_in_module(class(Mod),Goal):- !,
catch(Mod:Goal,Error,call_in_objects(Error,Mod,Goal)).
call_in_module(Mod,Goal):-
catch(Mod:Goal,Error,call_in_multifile(Error,Mod,Goal)).
call_in_objects(error(existence_error(procedure,F/A),F/A),Mod,Goal):-
intercept(F,A,Goal), !,
debug(recalling_objects(Mod:Goal)),
catch(objects_rt:Goal,Error,call_in_multifile(Error,Mod,Goal)).
call_in_objects(Error,_M,_Goal):-
throw(Error).
call_in_multifile(error(existence_error(procedure,F/A),F/A),Mod,Goal):-
intercept(F,A,Goal), !,
debug(recalling_multifile(Mod:Goal)),
call_multifile(Goal).
call_in_multifile(Error,_M,_Goal):-
throw(Error).
:- redefining(intercept/3). %also from exceptions
intercept(F,A,Goal):-
functor(Goal,G,A),
atom_concat('strapper:',G,F).
:- multifile call_multifile/1.
| leuschel/ecce | www/CiaoDE/ciao/library/ams/strapper.pl | Perl | apache-2.0 | 2,820 |
use warnings;
use strict;
package Freelancer::Payment;
# TODO: POD
use Exception::SEH;
our $VERSION = '0.1';
use Freelancer::DBI;
use Exception::Class (
'Freelancer::Payment::Error' => {},
'Freelancer::Payment::Error::NotFound' => {
isa => 'Freelancer::Payment::Error',
fields => [qw(id)],
},
);
# all the attributes we should keep in a new object
my @OBJ_ATTRS = qw(payment_num invoice_id pay_date amount method);
# TODO: POD
sub new {
my $class = shift;
my %args = @_;
my $self = bless \%args, $class;
my $fdbi = Freelancer::DBI->new();
try {
# add them to the db
my $insert_sth = $fdbi->sql_insert_payment();
$insert_sth->execute(
$args{invoice}->id, @{$self}{qw(pay_date amount method)}
);
$self->{payment_num} = $fdbi->db_freelancer()->last_insert_id(undef,
undef, undef, undef);
$fdbi->commit();
} catch (Freelancer::Payment::Error $e) {
die $e;
} catch ($e) {
die $e;
}
return $self;
}
# TODO: POD
sub list {
my $class = shift;
my %args = @_;
my $fdbi = Freelancer::DBI->new();
my @r;
try {
my $sth;
$sth = $fdbi->sql_list_payments();
$sth->execute($args{invoice}->id);
while (my $serv_info = $sth->fetchrow_hashref('NAME_lc')) {
my $obj = $class->_load($serv_info);
push @r, $obj;
}
} catch (Freelancer::Payment::Error $e) {
die $e;
} catch ($e) {
die $e;
}
return \@r;
}
# TODO: POD
sub load {
my $class = shift;
my %args = @_;
my $fdbi = Freelancer::DBI->new();
my $serv_info;
try {
my $sth = $fdbi->sql_load_payment();
$sth->execute($args{id});
$serv_info = $sth->fetchrow_hashref('NAME_lc');
unless ($serv_info) {
Freelancer::Payment::Error::NotFound->throw(
error => 'Payment not found',
id => $args{id},
);
}
if ($sth->fetch()) {
# something else matched??
Freelancer::Payment::Error->throw("Duplicates for "
.$args{service}->id." ".$args{customer}->id." $args{date}?");
}
} catch (Freelancer::Payment::Error $e) {
die $e;
} catch ($e) {
die $e;
}
return $class->_load($serv_info);
}
sub _load {
my $class = shift;
my ($serv_info) = @_;
my %o;
$o{$_} = $serv_info->{$_} foreach (@OBJ_ATTRS);
my $self = bless \%o, $class;
return $self;
}
# TODO: POD
sub id { $_[0]{payment_num} }
# TODO: POD
foreach my $attr (@OBJ_ATTRS) {
no strict 'refs';
*$attr = sub { $_[0]{$attr} };
}
1;
| pioto/freelancer | lib/Freelancer/Payment.pm | Perl | bsd-2-clause | 2,723 |
/****************************************************************
* *
* Event Recognition *
* *
* *
* Implemented in SWI Prolog *
* *
****************************************************************/
% PROLOG-INDEPENDENT
:- multifile holdsAt/2, happensAt/2.
:- discontiguous holdsAt/2, initiates/3, terminates/3, happensAt/2, initiatedAt/4, terminatedAt/4.
%ProbLog libraries
:- ensure_loaded(library(problog)).
:- ensure_loaded(library(problog/timer)).
:- ensure_loaded(library(lists)).
% Following flags useful for probabilistic loop cycle handling
%:- set_problog_flag(use_db_trie, true).
%:- set_problog_flag(use_old_trie, false).
% BDD timeout:
:- set_problog_flag(bdd_time, 10).
% Exploit AND-clusters in DNFs:
%:- set_problog_flag(variable_elimination, true).
% Load probabilistic EC dialect:
:- ['prob_ec.pl'].
/******************************************************************
* LONG-TERM BEHAVIOURS *
* meeting(Person1, Person2) *
,* fighting(Person1, Person2) *
* moving(Person1, Person2) *
* leaving-object(Person1, Person2) * * *
* *
* SHORT-TERM BEHAVIOURS *
* walking, active, inactive, running
******************************************************************/
/******************************************************************
* STATICALLY DETERMINED FLUENTS *
* close(Person, Painting) *
******************************************************************/
% ===== COORDINATES OF PLACES OF INTEREST
place(shop1).
place(shop2).
place(shop3).
holdsAt( coord( shop1 )=(86, 205), _ ).
holdsAt( coord( shop2 )=(101, 260), _ ).
holdsAt( coord( shop3 )=(181, 51), _ ).
% ===== STATE STATICALLY DETERMINED FLUENTS
sdFluent( distance(_, _) ).
sdFluent( close(_, _, _) ).
sdFluent( coord(_) ).
sdFluent( orientation(_) ).
sdFluent( appearance(_) ).
sdFluent(person(_)).
% ===== DEFINE STATICALLY DETERMINED FLUENTS
browseDist( 24 ).
fightDist( 24 ).
moveDist( 34 ).
meetDist( 34 ).
interactDist( 25 ).
leaveDist( 30 ).
% close/3
holdsAt( close(Person1, Person2, Threshold) = true, T ) :-
holdsAt( distance(Person1, Person2) = Dist, T ),
Dist =< Threshold.
holdsAt( close(Person1, Person2, Threshold) = false, T ) :-
holdsAt( distance(Person1, Person2) = Dist, T ),
Dist > Threshold.
holdsAt( distance(Person1, Person2) = Ypot, T ) :-
holdsAt( coord(Person1) = (X1, Y1), T ),
holdsAt( coord(Person2) = (X2, Y2), T ),
%\+ Person1 = Person2,
XDiff is abs(X1-X2),
YDiff is abs(Y1-Y2),
SideA is XDiff*XDiff,
SideB is YDiff*YDiff,
Temp is SideA + SideB,
Ypot is sqrt(Temp).
initiatedAt( person(Id)=true, Tmin, T, Tmax ) :-
happens4( walking(Id), Tmin, T, Tmax),
negate(happensAt( disappear(Id), T)).
initiatedAt( person(Id)=true, Tmin, T, Tmax ) :-
happens4( running(Id), Tmin, T, Tmax),
negate(happensAt( disappear(Id), T)).
initiatedAt( person(Id)=true, Tmin, T, Tmax ) :-
happens4( active(Id), Tmin, T, Tmax),
negate(happensAt( disappear(Id), T)).
initiatedAt( person(Id)=true, Tmin, T, Tmax ) :-
happens4( abrupt(Id), Tmin, T, Tmax),
negate(happensAt( disappear(Id), T)).
initiatedAt( person(Id)=false, Tmin, T, Tmax) :-
happens4( disappear(Id), Tmin, T, Tmax).
% ==================================================
% LONG-TERM BEHAVIOUR: fighting(Person, Person2)
% ==================================================
% ----- initiate fighting
initiatedAt(fighting(Person, Person2) = true, Tmin, T, Tmax):-
happens4(abrupt(Person), Tmin, T, Tmax), % This proves that Person is a person.
holdsAt(person(Person2) = true, T),
fightDist(Dist),
holdsAt(close(Person, Person2, Dist) = true, T),
negate(happensAt( inactive(Person2), T)).
% ----- terminate fighting: split up
initiatedAt(fighting(Person, Person2) = false, Tmin, T, Tmax):-
happens4(walking(Person), Tmin, T, Tmax),
fightDist(Dist),
holdsAt(close(Person, Person2, Dist) = false, T).
initiatedAt(fighting(Person2, Person) = false, Tmin, T, Tmax):-
happens4(walking(Person), Tmin, T, Tmax),
fightDist(Dist),
holdsAt(close(Person, Person2, Dist) = false, T).
initiatedAt(fighting(Person, Person2) = false, Tmin, T, Tmax):-
happens4(running(Person), Tmin, T, Tmax),
fightDist(Dist),
holdsAt(close(Person, Person2, Dist) = false, T).
initiatedAt(fighting(Person2, Person) = false, Tmin, T, Tmax):-
happens4(running(Person), Tmin, T, Tmax),
fightDist(Dist),
holdsAt(close(Person, Person2, Dist) = false, T).
initiatedAt(fighting(Person, _) = false, Tmin, T, Tmax):-
happens4(disappear(Person), Tmin, T, Tmax).
initiatedAt(fighting(_, Person) = false, Tmin, T, Tmax):-
happens4(disappear(Person), Tmin, T, Tmax).
% ==================================================
% LONG-TERM BEHAVIOUR: meeting(Person, Person2)
% ==================================================
% allow for a long-term behaviour to be both fighting and meeting
% ie, I cannot tell the difference
% ----- initiate meeting
initiatedAt(meeting(Person, Person2) = true, Tmin, T, Tmax):-
happens4(active(Person), Tmin, T, Tmax),
interactDist(Dist),
holdsAt(close(Person, Person2, Dist) = true, T),
holdsAt(person(Person2) = true, T),
negate(happensAt(running(Person2), T)).
initiatedAt(meeting(Person, Person2) = true, Tmin, T, Tmax):-
holdsAt(person(Person) = true, T),
happens4(inactive(Person), Tmin, T, Tmax),
interactDist(Dist),
holdsAt(close(Person, Person2, Dist) = true, T),
holdsAt(person(Person2) = true, T),
negate(happensAt(running(Person2), T)),
negate(happensAt(active(Person2), T)).
% ----- terminate meeting: split up
initiatedAt(meeting(Person, Person2) = false, Tmin, T, Tmax):-
happens4(walking(Person), Tmin, T, Tmax),
meetDist(Dist),
holdsAt(close(Person, Person2, Dist) = false, T).
initiatedAt(meeting(Person2, Person) = false, Tmin, T, Tmax):-
happens4(walking(Person), Tmin, T, Tmax),
meetDist(Dist),
holdsAt(close(Person, Person2, Dist) = false, T).
initiatedAt(meeting(Person, _) = false, Tmin, T, Tmax):-
happens4(running(Person), Tmin, T, Tmax).
initiatedAt(meeting(_, Person) = false, Tmin, T, Tmax):-
happens4(running(Person), Tmin, T, Tmax).
initiatedAt(meeting(Person, _) = false, Tmin, T, Tmax):-
happens4(disappear(Person), Tmin, T, Tmax).
initiatedAt(meeting(_, Person) = false, Tmin, T, Tmax):-
happens4(disappear(Person), Tmin, T, Tmax).
% ==================================================
% LONG-TERM BEHAVIOUR: moving(Person, Person2)
% ==================================================
% two people are moving together
% ----- initiate moving
initiatedAt(moving(Person, Person2) = true, Tmin, T, Tmax):-
happens4(walking(Person), Tmin, T, Tmax),
moveDist( Dist ),
holdsAt( close(Person, Person2, Dist)=true, T ),
happensAt( walking(Person2), T ), % This will be enough to prove that Person2 is a person entity as well.
holdsAt( orientation(Person)=O, T ),
holdsAt( orientation(Person2)=O2, T ),
Diff is abs(O-O2),
Diff < 45.
% ----- terminate moving: split up
initiatedAt(moving(Person, Person2) = false, Tmin, T, Tmax):-
happens4(walking(Person), Tmin, T, Tmax),
moveDist( Dist ),
holdsAt( close(Person, Person2, Dist)=false, T ).
initiatedAt(moving(Person2, Person) = false, Tmin, T, Tmax):-
happens4(walking(Person), Tmin, T, Tmax),
moveDist( Dist ),
holdsAt( close(Person, Person2, Dist)=false, T ).
% ----- terminate moving: stop moving
initiatedAt(moving(Person, Person2) = false, Tmin, T, Tmax):-
happens4(active(Person), Tmin, T, Tmax),
happensAt( active( Person2 ), T ).
initiatedAt(moving(Person, Person2) = false, Tmin, T, Tmax):-
happens4(active(Person), Tmin, T, Tmax),
happensAt( inactive( Person2 ), T ).
initiatedAt(moving(Person2, Person) = false, Tmin, T, Tmax):-
happens4(active(Person), Tmin, T, Tmax),
happensAt( active( Person2 ), T ).
initiatedAt(moving(Person2, Person) = false, Tmin, T, Tmax):-
happens4(active(Person), Tmin, T, Tmax),
happensAt( inactive( Person2 ), T ).
% ----- terminate moving: start running
initiatedAt(moving(Person, _) = false, Tmin, T, Tmax):-
happens4(running(Person), Tmin, T, Tmax).
initiatedAt(moving(_, Person) = false, Tmin, T, Tmax):-
happens4(running(Person), Tmin, T, Tmax).
initiatedAt(moving(Person, _) = false, Tmin, T, Tmax):-
happens4(disappear(Person), Tmin, T, Tmax).
initiatedAt(moving(_, Person) = false, Tmin, T, Tmax):-
happens4(disappear(Person), Tmin, T, Tmax).
% ==================================================
% LONG-TERM BEHAVIOUR: leaving_object(Person, Object)
% ==================================================
% ----- initiate leaving_object
initiatedAt(leaving_object(Person, Object) = true, Tmin, T, Tmax):-
happens4(inactive(Object), Tmin, T, Tmax),
holdsAt(appearance(Object) = appear, T),
leaveDist( Dist ),
holdsAt( close(Person, Object, Dist)=true, T),
holdsAt(person(Person) = true, T).
%happensAt( appear(Person), T0 ),
%T0 < T.
% ----- terminate leaving_object: pick up object
% disappear(Object) means that the Object has disappeared
% which is what will happen if it has been picked up
initiatedAt(leaving_object(_, Object) = false, Tmin, T, Tmax):-
happens4(disappear(Object), Tmin, T, Tmax).
% ====================================
% DEFINITION OF DERIVED EVENTS
% ====================================
happensAt(appear(ID), T):-
holdsAt(appearance(ID) = appear, T).
happensAt(disappear(ID), T):-
holdsAt(appearance(ID) = disappear, T).
% Probabilistic negation
negate(SDE):- problog_not(SDE).
negate(SDE):- \+ SDE.
| JasonFil/Prob-EC | randomQuerying/Prob-EC/prob_event_defs_orig.pl | Perl | bsd-3-clause | 9,739 |
#!/usr/bin/perl
use strict;
use warnings;
use LWP::UserAgent;
use Archive::Extract;
my $uri = 'http://www.unece.org/trade/untdid/download/d99a.zip';
my $fn; ($fn = $uri) =~ s#.*/##;
unless(-f $fn) {
my $ua = LWP::UserAgent->new;
my $resp = $ua->get($uri, ':content_file' => $fn);
unless($resp->is_success) {
die $resp->status_line;
}
}
my $mainzip = Archive::Extract->new(archive => $fn);
print "Extracting main archive $fn\n";
$mainzip->extract or die "Can't extract $fn: $!";
foreach my $file(@{ $mainzip->files }) {
next unless $file =~ /^(.*)\.zip$/;
my $dir = lc $1;
print "Extracting archive $file into $dir\n";
mkdir $dir;
Archive::Extract->new(archive => $file)->extract(to => $dir) or die "Can't extract $file into $dir";
} continue {
unlink $file;
}
| vir/libedi | libedistruct/dl_specs.pl | Perl | bsd-3-clause | 812 |
#
# $Id: Ftp.pm,v eff9afda3723 2015/01/04 12:34:23 gomor $
#
# network::ftp Brik
#
package Metabrik::Network::Ftp;
use strict;
use warnings;
use base qw(Metabrik);
sub brik_properties {
return {
revision => '$Revision: eff9afda3723 $',
tags => [ qw(unstable network ftp) ],
attributes => {
hostname => [ qw(hostname) ],
port => [ qw(port) ],
username => [ qw(username) ],
password => [ qw(password) ],
recurse => [ qw(0|1) ],
_ftp => [ qw(INTERNAL) ],
},
attributes_default => {
port => 21,
username => 'anonymous',
password => 'nop@no.fr',
recurse => 0,
},
commands => {
open => [ ],
cwd => [ qw(directory|OPTIONAL) ],
pwd => [ ],
ls => [ qw(directory|OPTIONAL) ],
dir => [ qw(directory|OPTIONAL) ],
binary => [ ],
ascii => [ ],
rmdir => [ qw(directory) ],
mkdir => [ qw(directory) ],
get => [ qw(remote_file local_file|OPTIONAL) ],
close => [ ],
},
require_modules => {
'Net::FTP' => [ ],
},
};
}
sub open {
my $self = shift;
my $hostname = $self->hostname;
if (! defined($hostname)) {
return $self->log->error($self->brik_help_set('hostname'));
}
my $port = $self->port;
my $username = $self->username;
my $password = $self->password;
my $ftp = Net::FTP->new(
$hostname,
Port => $port,
Debug => $self->debug,
) or return $self->log->error("open: Net::FTP failed with [$@]");
$ftp->login($username, $password)
or return $self->log->error("open: Net::FTP login failed with [".$ftp->message."]");
return $self->_ftp($ftp);
}
sub cwd {
my $self = shift;
my ($directory) = @_;
$directory ||= '';
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
my $r = $ftp->cwd($directory);
return $r;
}
sub pwd {
my $self = shift;
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
my $r = $ftp->pwd;
return $r;
}
sub ls {
my $self = shift;
my ($directory) = @_;
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
$directory ||= $ftp->pwd;
my $list = $ftp->ls($directory);
return $list;
}
sub dir {
my $self = shift;
my ($directory) = @_;
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
$directory ||= $ftp->pwd;
my $list = $ftp->dir($directory);
return $list;
}
sub rmdir {
my $self = shift;
my ($directory) = @_;
if (! defined($directory)) {
return $self->log->error($self->brik_help_run('rmdir'));
}
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
my $r = $ftp->rmdir($directory, $self->recurse);
return $r;
}
sub mkdir {
my $self = shift;
my ($directory) = @_;
if (! defined($directory)) {
return $self->log->error($self->brik_help_run('mkdir'));
}
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
my $r = $ftp->mkdir($directory, $self->recurse);
return $r;
}
sub binary {
my $self = shift;
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
my $r = $ftp->binary;
return $r;
}
sub ascii {
my $self = shift;
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
my $r = $ftp->ascii;
return $r;
}
sub get {
my $self = shift;
my ($remote, $local) = @_;
my $ftp = $self->_ftp;
if (! defined($ftp)) {
return $self->log->error($self->brik_help_run('open'));
}
if (! defined($remote)) {
return $self->log->error($self->brik_help_run('get'));
}
$local ||= $self->global->output;
my $r = $ftp->get($remote, $local);
return $r;
}
sub close {
my $self = shift;
if (defined($self->_ftp)) {
$self->_ftp->quit;
$self->_ftp(undef);
}
return 1;
}
1;
__END__
=head1 NAME
Metabrik::Network::Ftp - network::ftp Brik
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2014-2015, Patrice E<lt>GomoRE<gt> Auffret
You may distribute this module under the terms of The BSD 3-Clause License.
See LICENSE file in the source distribution archive.
=head1 AUTHOR
Patrice E<lt>GomoRE<gt> Auffret
=cut
| gitpan/Metabrik-Repository | lib/Metabrik/Network/Ftp.pm | Perl | bsd-3-clause | 4,679 |
package VCP::Filter::dumpdata ;
=head1 NAME
VCP::Filter::dumpdata - developement output filter
=head1 DESCRIPTION
Dump all data structures. Requires the module BFD, which is not installed
automatically. Dumps to the log file.
Not a supported module, API and behavior may change without warning.
=cut
$VERSION = 0.1 ;
@ISA = qw( VCP::Filter );
use strict ;
#use base qw( VCP::Filter );
use VCP::Filter;
use VCP::Logger qw( lg );
use BFD qw();
sub handle_header {
my $self = shift;
lg BFD::d_to_string "for ", ref $self->dest, $_[0];
$self->dest->handle_header( @_ );
}
sub handle_rev {
my $self = shift;
lg BFD::d_to_string "for ", ref $self->dest, $_[0]->as_hash;
$self->dest->handle_rev( @_ );
}
sub handle_footer {
my $self = shift;
lg BFD::d_to_string "for ", ref $self->dest, $_[0];
$self->dest->handle_footer( @_ );
}
=back
=head1 AUTHOR
Barrie Slaymaker <barries@slaysys.com>
=head1 COPYRIGHT
Copyright (c) 2000, 2001, 2002 Perforce Software, Inc.
All rights reserved.
See L<VCP::License|VCP::License> (C<vcp help license>) for the terms of use.
=cut
1
| gitpan/VCP | lib/VCP/Filter/dumpdata.pm | Perl | bsd-3-clause | 1,112 |
package Reactive::Observable::Gtk3;
package Reactive::Observable;
use aliased 'Reactive::Observable::Gtk3::Mouse';
sub from_mouse_press {
my ($self, $widget) = @_;
return Mouse->new(widget => $widget, event => 'button_press_event');
}
sub from_mouse_release {
my ($self, $widget) = @_;
return Mouse->new(widget => $widget, event => 'button_release_event');
}
sub from_mouse_motion {
my ($self, $widget) = @_;
return Mouse->new(widget => $widget, event => 'motion_notify_event');
}
1;
| eilara/Rx.pl | lib/Reactive/Observable/Gtk3.pm | Perl | mit | 516 |
package Paws::Firehose::CreateDeliveryStreamOutput;
use Moose;
has DeliveryStreamARN => (is => 'ro', isa => 'Str');
has _request_id => (is => 'ro', isa => 'Str');
### main pod documentation begin ###
=head1 NAME
Paws::Firehose::CreateDeliveryStreamOutput
=head1 ATTRIBUTES
=head2 DeliveryStreamARN => Str
The ARN of the delivery stream.
=head2 _request_id => Str
=cut
1; | ioanrogers/aws-sdk-perl | auto-lib/Paws/Firehose/CreateDeliveryStreamOutput.pm | Perl | apache-2.0 | 390 |
package Google::Ads::AdWords::v201406::LocationExtension::Source;
use strict;
use warnings;
sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201406'};
# derivation by restriction
use base qw(
SOAP::WSDL::XSD::Typelib::Builtin::string);
1;
__END__
=pod
=head1 NAME
=head1 DESCRIPTION
Perl data type class for the XML Schema defined simpleType
LocationExtension.Source from the namespace https://adwords.google.com/api/adwords/cm/v201406.
This clase is derived from
SOAP::WSDL::XSD::Typelib::Builtin::string
. SOAP::WSDL's schema implementation does not validate data, so you can use it exactly
like it's base type.
# Description of restrictions not implemented yet.
=head1 METHODS
=head2 new
Constructor.
=head2 get_value / set_value
Getter and setter for the simpleType's value.
=head1 OVERLOADING
Depending on the simple type's base type, the following operations are overloaded
Stringification
Numerification
Boolification
Check L<SOAP::WSDL::XSD::Typelib::Builtin> for more information.
=head1 AUTHOR
Generated by SOAP::WSDL
=cut
| gitpan/GOOGLE-ADWORDS-PERL-CLIENT | lib/Google/Ads/AdWords/v201406/LocationExtension/Source.pm | Perl | apache-2.0 | 1,087 |
package #
Date::Manip::TZ::euando00;
# Copyright (c) 2008-2014 Sullivan Beck. All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
# This file was automatically generated. Any changes to this file will
# be lost the next time 'tzdata' is run.
# Generated on: Fri Nov 21 10:41:42 EST 2014
# Data version: tzdata2014j
# Code version: tzcode2014j
# This module contains data from the zoneinfo time zone database. The original
# data was obtained from the URL:
# ftp://ftp.iana.org/tz
use strict;
use warnings;
require 5.010000;
our (%Dates,%LastRule);
END {
undef %Dates;
undef %LastRule;
}
our ($VERSION);
$VERSION='6.48';
END { undef $VERSION; }
%Dates = (
1 =>
[
[ [1,1,2,0,0,0],[1,1,2,0,6,4],'+00:06:04',[0,6,4],
'LMT',0,[1900,12,31,23,53,55],[1900,12,31,23,59,59],
'0001010200:00:00','0001010200:06:04','1900123123:53:55','1900123123:59:59' ],
],
1900 =>
[
[ [1900,12,31,23,53,56],[1900,12,31,23,53,56],'+00:00:00',[0,0,0],
'WET',0,[1946,9,29,23,59,59],[1946,9,29,23,59,59],
'1900123123:53:56','1900123123:53:56','1946092923:59:59','1946092923:59:59' ],
],
1946 =>
[
[ [1946,9,30,0,0,0],[1946,9,30,1,0,0],'+01:00:00',[1,0,0],
'CET',0,[1985,3,31,0,59,59],[1985,3,31,1,59,59],
'1946093000:00:00','1946093001:00:00','1985033100:59:59','1985033101:59:59' ],
],
1985 =>
[
[ [1985,3,31,1,0,0],[1985,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1985,9,29,0,59,59],[1985,9,29,2,59,59],
'1985033101:00:00','1985033103:00:00','1985092900:59:59','1985092902:59:59' ],
[ [1985,9,29,1,0,0],[1985,9,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1986,3,30,0,59,59],[1986,3,30,1,59,59],
'1985092901:00:00','1985092902:00:00','1986033000:59:59','1986033001:59:59' ],
],
1986 =>
[
[ [1986,3,30,1,0,0],[1986,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1986,9,28,0,59,59],[1986,9,28,2,59,59],
'1986033001:00:00','1986033003:00:00','1986092800:59:59','1986092802:59:59' ],
[ [1986,9,28,1,0,0],[1986,9,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1987,3,29,0,59,59],[1987,3,29,1,59,59],
'1986092801:00:00','1986092802:00:00','1987032900:59:59','1987032901:59:59' ],
],
1987 =>
[
[ [1987,3,29,1,0,0],[1987,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1987,9,27,0,59,59],[1987,9,27,2,59,59],
'1987032901:00:00','1987032903:00:00','1987092700:59:59','1987092702:59:59' ],
[ [1987,9,27,1,0,0],[1987,9,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1988,3,27,0,59,59],[1988,3,27,1,59,59],
'1987092701:00:00','1987092702:00:00','1988032700:59:59','1988032701:59:59' ],
],
1988 =>
[
[ [1988,3,27,1,0,0],[1988,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1988,9,25,0,59,59],[1988,9,25,2,59,59],
'1988032701:00:00','1988032703:00:00','1988092500:59:59','1988092502:59:59' ],
[ [1988,9,25,1,0,0],[1988,9,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1989,3,26,0,59,59],[1989,3,26,1,59,59],
'1988092501:00:00','1988092502:00:00','1989032600:59:59','1989032601:59:59' ],
],
1989 =>
[
[ [1989,3,26,1,0,0],[1989,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1989,9,24,0,59,59],[1989,9,24,2,59,59],
'1989032601:00:00','1989032603:00:00','1989092400:59:59','1989092402:59:59' ],
[ [1989,9,24,1,0,0],[1989,9,24,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1990,3,25,0,59,59],[1990,3,25,1,59,59],
'1989092401:00:00','1989092402:00:00','1990032500:59:59','1990032501:59:59' ],
],
1990 =>
[
[ [1990,3,25,1,0,0],[1990,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1990,9,30,0,59,59],[1990,9,30,2,59,59],
'1990032501:00:00','1990032503:00:00','1990093000:59:59','1990093002:59:59' ],
[ [1990,9,30,1,0,0],[1990,9,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1991,3,31,0,59,59],[1991,3,31,1,59,59],
'1990093001:00:00','1990093002:00:00','1991033100:59:59','1991033101:59:59' ],
],
1991 =>
[
[ [1991,3,31,1,0,0],[1991,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1991,9,29,0,59,59],[1991,9,29,2,59,59],
'1991033101:00:00','1991033103:00:00','1991092900:59:59','1991092902:59:59' ],
[ [1991,9,29,1,0,0],[1991,9,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1992,3,29,0,59,59],[1992,3,29,1,59,59],
'1991092901:00:00','1991092902:00:00','1992032900:59:59','1992032901:59:59' ],
],
1992 =>
[
[ [1992,3,29,1,0,0],[1992,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1992,9,27,0,59,59],[1992,9,27,2,59,59],
'1992032901:00:00','1992032903:00:00','1992092700:59:59','1992092702:59:59' ],
[ [1992,9,27,1,0,0],[1992,9,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1993,3,28,0,59,59],[1993,3,28,1,59,59],
'1992092701:00:00','1992092702:00:00','1993032800:59:59','1993032801:59:59' ],
],
1993 =>
[
[ [1993,3,28,1,0,0],[1993,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1993,9,26,0,59,59],[1993,9,26,2,59,59],
'1993032801:00:00','1993032803:00:00','1993092600:59:59','1993092602:59:59' ],
[ [1993,9,26,1,0,0],[1993,9,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1994,3,27,0,59,59],[1994,3,27,1,59,59],
'1993092601:00:00','1993092602:00:00','1994032700:59:59','1994032701:59:59' ],
],
1994 =>
[
[ [1994,3,27,1,0,0],[1994,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1994,9,25,0,59,59],[1994,9,25,2,59,59],
'1994032701:00:00','1994032703:00:00','1994092500:59:59','1994092502:59:59' ],
[ [1994,9,25,1,0,0],[1994,9,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1995,3,26,0,59,59],[1995,3,26,1,59,59],
'1994092501:00:00','1994092502:00:00','1995032600:59:59','1995032601:59:59' ],
],
1995 =>
[
[ [1995,3,26,1,0,0],[1995,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1995,9,24,0,59,59],[1995,9,24,2,59,59],
'1995032601:00:00','1995032603:00:00','1995092400:59:59','1995092402:59:59' ],
[ [1995,9,24,1,0,0],[1995,9,24,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1996,3,31,0,59,59],[1996,3,31,1,59,59],
'1995092401:00:00','1995092402:00:00','1996033100:59:59','1996033101:59:59' ],
],
1996 =>
[
[ [1996,3,31,1,0,0],[1996,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1996,10,27,0,59,59],[1996,10,27,2,59,59],
'1996033101:00:00','1996033103:00:00','1996102700:59:59','1996102702:59:59' ],
[ [1996,10,27,1,0,0],[1996,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1997,3,30,0,59,59],[1997,3,30,1,59,59],
'1996102701:00:00','1996102702:00:00','1997033000:59:59','1997033001:59:59' ],
],
1997 =>
[
[ [1997,3,30,1,0,0],[1997,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1997,10,26,0,59,59],[1997,10,26,2,59,59],
'1997033001:00:00','1997033003:00:00','1997102600:59:59','1997102602:59:59' ],
[ [1997,10,26,1,0,0],[1997,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1998,3,29,0,59,59],[1998,3,29,1,59,59],
'1997102601:00:00','1997102602:00:00','1998032900:59:59','1998032901:59:59' ],
],
1998 =>
[
[ [1998,3,29,1,0,0],[1998,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1998,10,25,0,59,59],[1998,10,25,2,59,59],
'1998032901:00:00','1998032903:00:00','1998102500:59:59','1998102502:59:59' ],
[ [1998,10,25,1,0,0],[1998,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[1999,3,28,0,59,59],[1999,3,28,1,59,59],
'1998102501:00:00','1998102502:00:00','1999032800:59:59','1999032801:59:59' ],
],
1999 =>
[
[ [1999,3,28,1,0,0],[1999,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[1999,10,31,0,59,59],[1999,10,31,2,59,59],
'1999032801:00:00','1999032803:00:00','1999103100:59:59','1999103102:59:59' ],
[ [1999,10,31,1,0,0],[1999,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2000,3,26,0,59,59],[2000,3,26,1,59,59],
'1999103101:00:00','1999103102:00:00','2000032600:59:59','2000032601:59:59' ],
],
2000 =>
[
[ [2000,3,26,1,0,0],[2000,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2000,10,29,0,59,59],[2000,10,29,2,59,59],
'2000032601:00:00','2000032603:00:00','2000102900:59:59','2000102902:59:59' ],
[ [2000,10,29,1,0,0],[2000,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2001,3,25,0,59,59],[2001,3,25,1,59,59],
'2000102901:00:00','2000102902:00:00','2001032500:59:59','2001032501:59:59' ],
],
2001 =>
[
[ [2001,3,25,1,0,0],[2001,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2001,10,28,0,59,59],[2001,10,28,2,59,59],
'2001032501:00:00','2001032503:00:00','2001102800:59:59','2001102802:59:59' ],
[ [2001,10,28,1,0,0],[2001,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2002,3,31,0,59,59],[2002,3,31,1,59,59],
'2001102801:00:00','2001102802:00:00','2002033100:59:59','2002033101:59:59' ],
],
2002 =>
[
[ [2002,3,31,1,0,0],[2002,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2002,10,27,0,59,59],[2002,10,27,2,59,59],
'2002033101:00:00','2002033103:00:00','2002102700:59:59','2002102702:59:59' ],
[ [2002,10,27,1,0,0],[2002,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2003,3,30,0,59,59],[2003,3,30,1,59,59],
'2002102701:00:00','2002102702:00:00','2003033000:59:59','2003033001:59:59' ],
],
2003 =>
[
[ [2003,3,30,1,0,0],[2003,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2003,10,26,0,59,59],[2003,10,26,2,59,59],
'2003033001:00:00','2003033003:00:00','2003102600:59:59','2003102602:59:59' ],
[ [2003,10,26,1,0,0],[2003,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2004,3,28,0,59,59],[2004,3,28,1,59,59],
'2003102601:00:00','2003102602:00:00','2004032800:59:59','2004032801:59:59' ],
],
2004 =>
[
[ [2004,3,28,1,0,0],[2004,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2004,10,31,0,59,59],[2004,10,31,2,59,59],
'2004032801:00:00','2004032803:00:00','2004103100:59:59','2004103102:59:59' ],
[ [2004,10,31,1,0,0],[2004,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2005,3,27,0,59,59],[2005,3,27,1,59,59],
'2004103101:00:00','2004103102:00:00','2005032700:59:59','2005032701:59:59' ],
],
2005 =>
[
[ [2005,3,27,1,0,0],[2005,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2005,10,30,0,59,59],[2005,10,30,2,59,59],
'2005032701:00:00','2005032703:00:00','2005103000:59:59','2005103002:59:59' ],
[ [2005,10,30,1,0,0],[2005,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2006,3,26,0,59,59],[2006,3,26,1,59,59],
'2005103001:00:00','2005103002:00:00','2006032600:59:59','2006032601:59:59' ],
],
2006 =>
[
[ [2006,3,26,1,0,0],[2006,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2006,10,29,0,59,59],[2006,10,29,2,59,59],
'2006032601:00:00','2006032603:00:00','2006102900:59:59','2006102902:59:59' ],
[ [2006,10,29,1,0,0],[2006,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2007,3,25,0,59,59],[2007,3,25,1,59,59],
'2006102901:00:00','2006102902:00:00','2007032500:59:59','2007032501:59:59' ],
],
2007 =>
[
[ [2007,3,25,1,0,0],[2007,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2007,10,28,0,59,59],[2007,10,28,2,59,59],
'2007032501:00:00','2007032503:00:00','2007102800:59:59','2007102802:59:59' ],
[ [2007,10,28,1,0,0],[2007,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2008,3,30,0,59,59],[2008,3,30,1,59,59],
'2007102801:00:00','2007102802:00:00','2008033000:59:59','2008033001:59:59' ],
],
2008 =>
[
[ [2008,3,30,1,0,0],[2008,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2008,10,26,0,59,59],[2008,10,26,2,59,59],
'2008033001:00:00','2008033003:00:00','2008102600:59:59','2008102602:59:59' ],
[ [2008,10,26,1,0,0],[2008,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2009,3,29,0,59,59],[2009,3,29,1,59,59],
'2008102601:00:00','2008102602:00:00','2009032900:59:59','2009032901:59:59' ],
],
2009 =>
[
[ [2009,3,29,1,0,0],[2009,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2009,10,25,0,59,59],[2009,10,25,2,59,59],
'2009032901:00:00','2009032903:00:00','2009102500:59:59','2009102502:59:59' ],
[ [2009,10,25,1,0,0],[2009,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2010,3,28,0,59,59],[2010,3,28,1,59,59],
'2009102501:00:00','2009102502:00:00','2010032800:59:59','2010032801:59:59' ],
],
2010 =>
[
[ [2010,3,28,1,0,0],[2010,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2010,10,31,0,59,59],[2010,10,31,2,59,59],
'2010032801:00:00','2010032803:00:00','2010103100:59:59','2010103102:59:59' ],
[ [2010,10,31,1,0,0],[2010,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2011,3,27,0,59,59],[2011,3,27,1,59,59],
'2010103101:00:00','2010103102:00:00','2011032700:59:59','2011032701:59:59' ],
],
2011 =>
[
[ [2011,3,27,1,0,0],[2011,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2011,10,30,0,59,59],[2011,10,30,2,59,59],
'2011032701:00:00','2011032703:00:00','2011103000:59:59','2011103002:59:59' ],
[ [2011,10,30,1,0,0],[2011,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2012,3,25,0,59,59],[2012,3,25,1,59,59],
'2011103001:00:00','2011103002:00:00','2012032500:59:59','2012032501:59:59' ],
],
2012 =>
[
[ [2012,3,25,1,0,0],[2012,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2012,10,28,0,59,59],[2012,10,28,2,59,59],
'2012032501:00:00','2012032503:00:00','2012102800:59:59','2012102802:59:59' ],
[ [2012,10,28,1,0,0],[2012,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2013,3,31,0,59,59],[2013,3,31,1,59,59],
'2012102801:00:00','2012102802:00:00','2013033100:59:59','2013033101:59:59' ],
],
2013 =>
[
[ [2013,3,31,1,0,0],[2013,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2013,10,27,0,59,59],[2013,10,27,2,59,59],
'2013033101:00:00','2013033103:00:00','2013102700:59:59','2013102702:59:59' ],
[ [2013,10,27,1,0,0],[2013,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2014,3,30,0,59,59],[2014,3,30,1,59,59],
'2013102701:00:00','2013102702:00:00','2014033000:59:59','2014033001:59:59' ],
],
2014 =>
[
[ [2014,3,30,1,0,0],[2014,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2014,10,26,0,59,59],[2014,10,26,2,59,59],
'2014033001:00:00','2014033003:00:00','2014102600:59:59','2014102602:59:59' ],
[ [2014,10,26,1,0,0],[2014,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2015,3,29,0,59,59],[2015,3,29,1,59,59],
'2014102601:00:00','2014102602:00:00','2015032900:59:59','2015032901:59:59' ],
],
2015 =>
[
[ [2015,3,29,1,0,0],[2015,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2015,10,25,0,59,59],[2015,10,25,2,59,59],
'2015032901:00:00','2015032903:00:00','2015102500:59:59','2015102502:59:59' ],
[ [2015,10,25,1,0,0],[2015,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2016,3,27,0,59,59],[2016,3,27,1,59,59],
'2015102501:00:00','2015102502:00:00','2016032700:59:59','2016032701:59:59' ],
],
2016 =>
[
[ [2016,3,27,1,0,0],[2016,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2016,10,30,0,59,59],[2016,10,30,2,59,59],
'2016032701:00:00','2016032703:00:00','2016103000:59:59','2016103002:59:59' ],
[ [2016,10,30,1,0,0],[2016,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2017,3,26,0,59,59],[2017,3,26,1,59,59],
'2016103001:00:00','2016103002:00:00','2017032600:59:59','2017032601:59:59' ],
],
2017 =>
[
[ [2017,3,26,1,0,0],[2017,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2017,10,29,0,59,59],[2017,10,29,2,59,59],
'2017032601:00:00','2017032603:00:00','2017102900:59:59','2017102902:59:59' ],
[ [2017,10,29,1,0,0],[2017,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2018,3,25,0,59,59],[2018,3,25,1,59,59],
'2017102901:00:00','2017102902:00:00','2018032500:59:59','2018032501:59:59' ],
],
2018 =>
[
[ [2018,3,25,1,0,0],[2018,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2018,10,28,0,59,59],[2018,10,28,2,59,59],
'2018032501:00:00','2018032503:00:00','2018102800:59:59','2018102802:59:59' ],
[ [2018,10,28,1,0,0],[2018,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2019,3,31,0,59,59],[2019,3,31,1,59,59],
'2018102801:00:00','2018102802:00:00','2019033100:59:59','2019033101:59:59' ],
],
2019 =>
[
[ [2019,3,31,1,0,0],[2019,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2019,10,27,0,59,59],[2019,10,27,2,59,59],
'2019033101:00:00','2019033103:00:00','2019102700:59:59','2019102702:59:59' ],
[ [2019,10,27,1,0,0],[2019,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2020,3,29,0,59,59],[2020,3,29,1,59,59],
'2019102701:00:00','2019102702:00:00','2020032900:59:59','2020032901:59:59' ],
],
2020 =>
[
[ [2020,3,29,1,0,0],[2020,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2020,10,25,0,59,59],[2020,10,25,2,59,59],
'2020032901:00:00','2020032903:00:00','2020102500:59:59','2020102502:59:59' ],
[ [2020,10,25,1,0,0],[2020,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2021,3,28,0,59,59],[2021,3,28,1,59,59],
'2020102501:00:00','2020102502:00:00','2021032800:59:59','2021032801:59:59' ],
],
2021 =>
[
[ [2021,3,28,1,0,0],[2021,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2021,10,31,0,59,59],[2021,10,31,2,59,59],
'2021032801:00:00','2021032803:00:00','2021103100:59:59','2021103102:59:59' ],
[ [2021,10,31,1,0,0],[2021,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2022,3,27,0,59,59],[2022,3,27,1,59,59],
'2021103101:00:00','2021103102:00:00','2022032700:59:59','2022032701:59:59' ],
],
2022 =>
[
[ [2022,3,27,1,0,0],[2022,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2022,10,30,0,59,59],[2022,10,30,2,59,59],
'2022032701:00:00','2022032703:00:00','2022103000:59:59','2022103002:59:59' ],
[ [2022,10,30,1,0,0],[2022,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2023,3,26,0,59,59],[2023,3,26,1,59,59],
'2022103001:00:00','2022103002:00:00','2023032600:59:59','2023032601:59:59' ],
],
2023 =>
[
[ [2023,3,26,1,0,0],[2023,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2023,10,29,0,59,59],[2023,10,29,2,59,59],
'2023032601:00:00','2023032603:00:00','2023102900:59:59','2023102902:59:59' ],
[ [2023,10,29,1,0,0],[2023,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2024,3,31,0,59,59],[2024,3,31,1,59,59],
'2023102901:00:00','2023102902:00:00','2024033100:59:59','2024033101:59:59' ],
],
2024 =>
[
[ [2024,3,31,1,0,0],[2024,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2024,10,27,0,59,59],[2024,10,27,2,59,59],
'2024033101:00:00','2024033103:00:00','2024102700:59:59','2024102702:59:59' ],
[ [2024,10,27,1,0,0],[2024,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2025,3,30,0,59,59],[2025,3,30,1,59,59],
'2024102701:00:00','2024102702:00:00','2025033000:59:59','2025033001:59:59' ],
],
2025 =>
[
[ [2025,3,30,1,0,0],[2025,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2025,10,26,0,59,59],[2025,10,26,2,59,59],
'2025033001:00:00','2025033003:00:00','2025102600:59:59','2025102602:59:59' ],
[ [2025,10,26,1,0,0],[2025,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2026,3,29,0,59,59],[2026,3,29,1,59,59],
'2025102601:00:00','2025102602:00:00','2026032900:59:59','2026032901:59:59' ],
],
2026 =>
[
[ [2026,3,29,1,0,0],[2026,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2026,10,25,0,59,59],[2026,10,25,2,59,59],
'2026032901:00:00','2026032903:00:00','2026102500:59:59','2026102502:59:59' ],
[ [2026,10,25,1,0,0],[2026,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2027,3,28,0,59,59],[2027,3,28,1,59,59],
'2026102501:00:00','2026102502:00:00','2027032800:59:59','2027032801:59:59' ],
],
2027 =>
[
[ [2027,3,28,1,0,0],[2027,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2027,10,31,0,59,59],[2027,10,31,2,59,59],
'2027032801:00:00','2027032803:00:00','2027103100:59:59','2027103102:59:59' ],
[ [2027,10,31,1,0,0],[2027,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2028,3,26,0,59,59],[2028,3,26,1,59,59],
'2027103101:00:00','2027103102:00:00','2028032600:59:59','2028032601:59:59' ],
],
2028 =>
[
[ [2028,3,26,1,0,0],[2028,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2028,10,29,0,59,59],[2028,10,29,2,59,59],
'2028032601:00:00','2028032603:00:00','2028102900:59:59','2028102902:59:59' ],
[ [2028,10,29,1,0,0],[2028,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2029,3,25,0,59,59],[2029,3,25,1,59,59],
'2028102901:00:00','2028102902:00:00','2029032500:59:59','2029032501:59:59' ],
],
2029 =>
[
[ [2029,3,25,1,0,0],[2029,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2029,10,28,0,59,59],[2029,10,28,2,59,59],
'2029032501:00:00','2029032503:00:00','2029102800:59:59','2029102802:59:59' ],
[ [2029,10,28,1,0,0],[2029,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2030,3,31,0,59,59],[2030,3,31,1,59,59],
'2029102801:00:00','2029102802:00:00','2030033100:59:59','2030033101:59:59' ],
],
2030 =>
[
[ [2030,3,31,1,0,0],[2030,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2030,10,27,0,59,59],[2030,10,27,2,59,59],
'2030033101:00:00','2030033103:00:00','2030102700:59:59','2030102702:59:59' ],
[ [2030,10,27,1,0,0],[2030,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2031,3,30,0,59,59],[2031,3,30,1,59,59],
'2030102701:00:00','2030102702:00:00','2031033000:59:59','2031033001:59:59' ],
],
2031 =>
[
[ [2031,3,30,1,0,0],[2031,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2031,10,26,0,59,59],[2031,10,26,2,59,59],
'2031033001:00:00','2031033003:00:00','2031102600:59:59','2031102602:59:59' ],
[ [2031,10,26,1,0,0],[2031,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2032,3,28,0,59,59],[2032,3,28,1,59,59],
'2031102601:00:00','2031102602:00:00','2032032800:59:59','2032032801:59:59' ],
],
2032 =>
[
[ [2032,3,28,1,0,0],[2032,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2032,10,31,0,59,59],[2032,10,31,2,59,59],
'2032032801:00:00','2032032803:00:00','2032103100:59:59','2032103102:59:59' ],
[ [2032,10,31,1,0,0],[2032,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2033,3,27,0,59,59],[2033,3,27,1,59,59],
'2032103101:00:00','2032103102:00:00','2033032700:59:59','2033032701:59:59' ],
],
2033 =>
[
[ [2033,3,27,1,0,0],[2033,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2033,10,30,0,59,59],[2033,10,30,2,59,59],
'2033032701:00:00','2033032703:00:00','2033103000:59:59','2033103002:59:59' ],
[ [2033,10,30,1,0,0],[2033,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2034,3,26,0,59,59],[2034,3,26,1,59,59],
'2033103001:00:00','2033103002:00:00','2034032600:59:59','2034032601:59:59' ],
],
2034 =>
[
[ [2034,3,26,1,0,0],[2034,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2034,10,29,0,59,59],[2034,10,29,2,59,59],
'2034032601:00:00','2034032603:00:00','2034102900:59:59','2034102902:59:59' ],
[ [2034,10,29,1,0,0],[2034,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2035,3,25,0,59,59],[2035,3,25,1,59,59],
'2034102901:00:00','2034102902:00:00','2035032500:59:59','2035032501:59:59' ],
],
2035 =>
[
[ [2035,3,25,1,0,0],[2035,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2035,10,28,0,59,59],[2035,10,28,2,59,59],
'2035032501:00:00','2035032503:00:00','2035102800:59:59','2035102802:59:59' ],
[ [2035,10,28,1,0,0],[2035,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2036,3,30,0,59,59],[2036,3,30,1,59,59],
'2035102801:00:00','2035102802:00:00','2036033000:59:59','2036033001:59:59' ],
],
2036 =>
[
[ [2036,3,30,1,0,0],[2036,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2036,10,26,0,59,59],[2036,10,26,2,59,59],
'2036033001:00:00','2036033003:00:00','2036102600:59:59','2036102602:59:59' ],
[ [2036,10,26,1,0,0],[2036,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2037,3,29,0,59,59],[2037,3,29,1,59,59],
'2036102601:00:00','2036102602:00:00','2037032900:59:59','2037032901:59:59' ],
],
2037 =>
[
[ [2037,3,29,1,0,0],[2037,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2037,10,25,0,59,59],[2037,10,25,2,59,59],
'2037032901:00:00','2037032903:00:00','2037102500:59:59','2037102502:59:59' ],
[ [2037,10,25,1,0,0],[2037,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2038,3,28,0,59,59],[2038,3,28,1,59,59],
'2037102501:00:00','2037102502:00:00','2038032800:59:59','2038032801:59:59' ],
],
2038 =>
[
[ [2038,3,28,1,0,0],[2038,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2038,10,31,0,59,59],[2038,10,31,2,59,59],
'2038032801:00:00','2038032803:00:00','2038103100:59:59','2038103102:59:59' ],
[ [2038,10,31,1,0,0],[2038,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2039,3,27,0,59,59],[2039,3,27,1,59,59],
'2038103101:00:00','2038103102:00:00','2039032700:59:59','2039032701:59:59' ],
],
2039 =>
[
[ [2039,3,27,1,0,0],[2039,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2039,10,30,0,59,59],[2039,10,30,2,59,59],
'2039032701:00:00','2039032703:00:00','2039103000:59:59','2039103002:59:59' ],
[ [2039,10,30,1,0,0],[2039,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2040,3,25,0,59,59],[2040,3,25,1,59,59],
'2039103001:00:00','2039103002:00:00','2040032500:59:59','2040032501:59:59' ],
],
2040 =>
[
[ [2040,3,25,1,0,0],[2040,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2040,10,28,0,59,59],[2040,10,28,2,59,59],
'2040032501:00:00','2040032503:00:00','2040102800:59:59','2040102802:59:59' ],
[ [2040,10,28,1,0,0],[2040,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2041,3,31,0,59,59],[2041,3,31,1,59,59],
'2040102801:00:00','2040102802:00:00','2041033100:59:59','2041033101:59:59' ],
],
2041 =>
[
[ [2041,3,31,1,0,0],[2041,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2041,10,27,0,59,59],[2041,10,27,2,59,59],
'2041033101:00:00','2041033103:00:00','2041102700:59:59','2041102702:59:59' ],
[ [2041,10,27,1,0,0],[2041,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2042,3,30,0,59,59],[2042,3,30,1,59,59],
'2041102701:00:00','2041102702:00:00','2042033000:59:59','2042033001:59:59' ],
],
2042 =>
[
[ [2042,3,30,1,0,0],[2042,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2042,10,26,0,59,59],[2042,10,26,2,59,59],
'2042033001:00:00','2042033003:00:00','2042102600:59:59','2042102602:59:59' ],
[ [2042,10,26,1,0,0],[2042,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2043,3,29,0,59,59],[2043,3,29,1,59,59],
'2042102601:00:00','2042102602:00:00','2043032900:59:59','2043032901:59:59' ],
],
2043 =>
[
[ [2043,3,29,1,0,0],[2043,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2043,10,25,0,59,59],[2043,10,25,2,59,59],
'2043032901:00:00','2043032903:00:00','2043102500:59:59','2043102502:59:59' ],
[ [2043,10,25,1,0,0],[2043,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2044,3,27,0,59,59],[2044,3,27,1,59,59],
'2043102501:00:00','2043102502:00:00','2044032700:59:59','2044032701:59:59' ],
],
2044 =>
[
[ [2044,3,27,1,0,0],[2044,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2044,10,30,0,59,59],[2044,10,30,2,59,59],
'2044032701:00:00','2044032703:00:00','2044103000:59:59','2044103002:59:59' ],
[ [2044,10,30,1,0,0],[2044,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2045,3,26,0,59,59],[2045,3,26,1,59,59],
'2044103001:00:00','2044103002:00:00','2045032600:59:59','2045032601:59:59' ],
],
2045 =>
[
[ [2045,3,26,1,0,0],[2045,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2045,10,29,0,59,59],[2045,10,29,2,59,59],
'2045032601:00:00','2045032603:00:00','2045102900:59:59','2045102902:59:59' ],
[ [2045,10,29,1,0,0],[2045,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2046,3,25,0,59,59],[2046,3,25,1,59,59],
'2045102901:00:00','2045102902:00:00','2046032500:59:59','2046032501:59:59' ],
],
2046 =>
[
[ [2046,3,25,1,0,0],[2046,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2046,10,28,0,59,59],[2046,10,28,2,59,59],
'2046032501:00:00','2046032503:00:00','2046102800:59:59','2046102802:59:59' ],
[ [2046,10,28,1,0,0],[2046,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2047,3,31,0,59,59],[2047,3,31,1,59,59],
'2046102801:00:00','2046102802:00:00','2047033100:59:59','2047033101:59:59' ],
],
2047 =>
[
[ [2047,3,31,1,0,0],[2047,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2047,10,27,0,59,59],[2047,10,27,2,59,59],
'2047033101:00:00','2047033103:00:00','2047102700:59:59','2047102702:59:59' ],
[ [2047,10,27,1,0,0],[2047,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2048,3,29,0,59,59],[2048,3,29,1,59,59],
'2047102701:00:00','2047102702:00:00','2048032900:59:59','2048032901:59:59' ],
],
2048 =>
[
[ [2048,3,29,1,0,0],[2048,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2048,10,25,0,59,59],[2048,10,25,2,59,59],
'2048032901:00:00','2048032903:00:00','2048102500:59:59','2048102502:59:59' ],
[ [2048,10,25,1,0,0],[2048,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2049,3,28,0,59,59],[2049,3,28,1,59,59],
'2048102501:00:00','2048102502:00:00','2049032800:59:59','2049032801:59:59' ],
],
2049 =>
[
[ [2049,3,28,1,0,0],[2049,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2049,10,31,0,59,59],[2049,10,31,2,59,59],
'2049032801:00:00','2049032803:00:00','2049103100:59:59','2049103102:59:59' ],
[ [2049,10,31,1,0,0],[2049,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2050,3,27,0,59,59],[2050,3,27,1,59,59],
'2049103101:00:00','2049103102:00:00','2050032700:59:59','2050032701:59:59' ],
],
2050 =>
[
[ [2050,3,27,1,0,0],[2050,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2050,10,30,0,59,59],[2050,10,30,2,59,59],
'2050032701:00:00','2050032703:00:00','2050103000:59:59','2050103002:59:59' ],
[ [2050,10,30,1,0,0],[2050,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2051,3,26,0,59,59],[2051,3,26,1,59,59],
'2050103001:00:00','2050103002:00:00','2051032600:59:59','2051032601:59:59' ],
],
2051 =>
[
[ [2051,3,26,1,0,0],[2051,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2051,10,29,0,59,59],[2051,10,29,2,59,59],
'2051032601:00:00','2051032603:00:00','2051102900:59:59','2051102902:59:59' ],
[ [2051,10,29,1,0,0],[2051,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2052,3,31,0,59,59],[2052,3,31,1,59,59],
'2051102901:00:00','2051102902:00:00','2052033100:59:59','2052033101:59:59' ],
],
2052 =>
[
[ [2052,3,31,1,0,0],[2052,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2052,10,27,0,59,59],[2052,10,27,2,59,59],
'2052033101:00:00','2052033103:00:00','2052102700:59:59','2052102702:59:59' ],
[ [2052,10,27,1,0,0],[2052,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2053,3,30,0,59,59],[2053,3,30,1,59,59],
'2052102701:00:00','2052102702:00:00','2053033000:59:59','2053033001:59:59' ],
],
2053 =>
[
[ [2053,3,30,1,0,0],[2053,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2053,10,26,0,59,59],[2053,10,26,2,59,59],
'2053033001:00:00','2053033003:00:00','2053102600:59:59','2053102602:59:59' ],
[ [2053,10,26,1,0,0],[2053,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2054,3,29,0,59,59],[2054,3,29,1,59,59],
'2053102601:00:00','2053102602:00:00','2054032900:59:59','2054032901:59:59' ],
],
2054 =>
[
[ [2054,3,29,1,0,0],[2054,3,29,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2054,10,25,0,59,59],[2054,10,25,2,59,59],
'2054032901:00:00','2054032903:00:00','2054102500:59:59','2054102502:59:59' ],
[ [2054,10,25,1,0,0],[2054,10,25,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2055,3,28,0,59,59],[2055,3,28,1,59,59],
'2054102501:00:00','2054102502:00:00','2055032800:59:59','2055032801:59:59' ],
],
2055 =>
[
[ [2055,3,28,1,0,0],[2055,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2055,10,31,0,59,59],[2055,10,31,2,59,59],
'2055032801:00:00','2055032803:00:00','2055103100:59:59','2055103102:59:59' ],
[ [2055,10,31,1,0,0],[2055,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2056,3,26,0,59,59],[2056,3,26,1,59,59],
'2055103101:00:00','2055103102:00:00','2056032600:59:59','2056032601:59:59' ],
],
2056 =>
[
[ [2056,3,26,1,0,0],[2056,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2056,10,29,0,59,59],[2056,10,29,2,59,59],
'2056032601:00:00','2056032603:00:00','2056102900:59:59','2056102902:59:59' ],
[ [2056,10,29,1,0,0],[2056,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2057,3,25,0,59,59],[2057,3,25,1,59,59],
'2056102901:00:00','2056102902:00:00','2057032500:59:59','2057032501:59:59' ],
],
2057 =>
[
[ [2057,3,25,1,0,0],[2057,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2057,10,28,0,59,59],[2057,10,28,2,59,59],
'2057032501:00:00','2057032503:00:00','2057102800:59:59','2057102802:59:59' ],
[ [2057,10,28,1,0,0],[2057,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2058,3,31,0,59,59],[2058,3,31,1,59,59],
'2057102801:00:00','2057102802:00:00','2058033100:59:59','2058033101:59:59' ],
],
2058 =>
[
[ [2058,3,31,1,0,0],[2058,3,31,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2058,10,27,0,59,59],[2058,10,27,2,59,59],
'2058033101:00:00','2058033103:00:00','2058102700:59:59','2058102702:59:59' ],
[ [2058,10,27,1,0,0],[2058,10,27,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2059,3,30,0,59,59],[2059,3,30,1,59,59],
'2058102701:00:00','2058102702:00:00','2059033000:59:59','2059033001:59:59' ],
],
2059 =>
[
[ [2059,3,30,1,0,0],[2059,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2059,10,26,0,59,59],[2059,10,26,2,59,59],
'2059033001:00:00','2059033003:00:00','2059102600:59:59','2059102602:59:59' ],
[ [2059,10,26,1,0,0],[2059,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2060,3,28,0,59,59],[2060,3,28,1,59,59],
'2059102601:00:00','2059102602:00:00','2060032800:59:59','2060032801:59:59' ],
],
2060 =>
[
[ [2060,3,28,1,0,0],[2060,3,28,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2060,10,31,0,59,59],[2060,10,31,2,59,59],
'2060032801:00:00','2060032803:00:00','2060103100:59:59','2060103102:59:59' ],
[ [2060,10,31,1,0,0],[2060,10,31,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2061,3,27,0,59,59],[2061,3,27,1,59,59],
'2060103101:00:00','2060103102:00:00','2061032700:59:59','2061032701:59:59' ],
],
2061 =>
[
[ [2061,3,27,1,0,0],[2061,3,27,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2061,10,30,0,59,59],[2061,10,30,2,59,59],
'2061032701:00:00','2061032703:00:00','2061103000:59:59','2061103002:59:59' ],
[ [2061,10,30,1,0,0],[2061,10,30,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2062,3,26,0,59,59],[2062,3,26,1,59,59],
'2061103001:00:00','2061103002:00:00','2062032600:59:59','2062032601:59:59' ],
],
2062 =>
[
[ [2062,3,26,1,0,0],[2062,3,26,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2062,10,29,0,59,59],[2062,10,29,2,59,59],
'2062032601:00:00','2062032603:00:00','2062102900:59:59','2062102902:59:59' ],
[ [2062,10,29,1,0,0],[2062,10,29,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2063,3,25,0,59,59],[2063,3,25,1,59,59],
'2062102901:00:00','2062102902:00:00','2063032500:59:59','2063032501:59:59' ],
],
2063 =>
[
[ [2063,3,25,1,0,0],[2063,3,25,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2063,10,28,0,59,59],[2063,10,28,2,59,59],
'2063032501:00:00','2063032503:00:00','2063102800:59:59','2063102802:59:59' ],
[ [2063,10,28,1,0,0],[2063,10,28,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2064,3,30,0,59,59],[2064,3,30,1,59,59],
'2063102801:00:00','2063102802:00:00','2064033000:59:59','2064033001:59:59' ],
],
2064 =>
[
[ [2064,3,30,1,0,0],[2064,3,30,3,0,0],'+02:00:00',[2,0,0],
'CEST',1,[2064,10,26,0,59,59],[2064,10,26,2,59,59],
'2064033001:00:00','2064033003:00:00','2064102600:59:59','2064102602:59:59' ],
[ [2064,10,26,1,0,0],[2064,10,26,2,0,0],'+01:00:00',[1,0,0],
'CET',0,[2065,3,29,0,59,59],[2065,3,29,1,59,59],
'2064102601:00:00','2064102602:00:00','2065032900:59:59','2065032901:59:59' ],
],
);
%LastRule = (
'zone' => {
'dstoff' => '+02:00:00',
'stdoff' => '+01:00:00',
},
'rules' => {
'03' => {
'flag' => 'last',
'dow' => '7',
'num' => '0',
'type' => 'u',
'time' => '01:00:00',
'isdst' => '1',
'abb' => 'CEST',
},
'10' => {
'flag' => 'last',
'dow' => '7',
'num' => '0',
'type' => 'u',
'time' => '01:00:00',
'isdst' => '0',
'abb' => 'CET',
},
},
);
1;
| nriley/Pester | Source/Manip/TZ/euando00.pm | Perl | bsd-2-clause | 39,252 |
#!/usr/bin/perl -w
#
# $Id: WatchListFromFP1.pl,v 1.1.2.2 2003-05-16 01:09:10 dan Exp $
#
# Copyright (c) 2002-2003 DVL Software
#
use strict;
use DBI;
my @row;
my $dbh = DBI->connect('dbi:mysql:freshports_20020329', 'root', 'xyzzy');
if ($dbh) {
my $sql = " select id, name, owner_user_id from watch";
my $sth = $dbh->prepare($sql);
$sth->execute ||
die "Could not execute SQL statement ... maybe invalid?";
while (@row = $sth->fetchrow_array) {
print $row[0] . "\t" . $row[1] . "\t" . $row[2] . "\n";
}
$sth->finish();
$dbh->disconnect();
}
| lattera/freshports | configuration/tags/FreshPorts-VuXML/Upgrade/FP1-FP2/WatchListFromFP1.pl | Perl | bsd-2-clause | 560 |
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file is machine-generated by lib/unicore/mktables from the Unicode
# database, Version 6.2.0. Any changes made here will be lost!
# !!!!!!! INTERNAL PERL USE ONLY !!!!!!!
# This file is for internal use by core Perl only. The format and even the
# name or existence of this file are subject to change without notice. Don't
# use it directly.
return <<'END';
00A8
00AF
00B4 00B5
00B8
0132 0133
013F 0140
0149
017F
01C4 01CC
01F1 01F3
02D8 02DD
037A
0384
03D0 03D2
03D5 03D6
03F0 03F2
03F4 03F5
03F9
0587
0675 0678
0E33
0EB3
0EDC 0EDD
0F77
0F79
1E9A
1FBD
1FBF 1FC0
1FFE
2002 2006
2008 200A
2017
2024 2026
2033 2034
2036 2037
203C
203E
2047 2049
2057
205F
20A8
2100 2101
2103
2105 2107
2109
2116
2121
2135 2138
213B
2160 217F
222C 222D
222F 2230
2474 24B5
2A0C
2A74 2A76
2E9F
2EF3
2F00 2FD5
3036
3038 303A
309B 309C
3131 318E
3200 321E
3220 3243
32C0 32CB
3358 3370
33E0 33FE
FB00 FB06
FB13 FB17
FB4F
FE49 FE4F
1F100 1F10A
1F110 1F12A
1F240 1F248
END
| Bjay1435/capstone | rootfs/usr/share/perl/5.18.2/unicore/lib/Dt/Com.pl | Perl | mit | 1,073 |
#! /usr/bin/env perl
#
# Copyright 1999-2010 University of Chicago
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
#
# Ping a valid and invalid gatekeeper contact.
use strict;
use POSIX;
use Test;
my $test_exec = './register-status-test';
if ($ENV{CONTACT_STRING} eq "")
{
die "CONTACT_STRING not set";
}
my @tests;
my @todo;
my $valgrind = "";
if (exists $ENV{VALGRIND})
{
$valgrind = "valgrind --log-file=VALGRIND-register_status_test.log";
if (exists $ENV{VALGRIND_OPTIONS})
{
$valgrind .= ' ' . $ENV{VALGRIND_OPTIONS};
}
}
sub status_test
{
my ($errors,$rc) = ("",0);
my ($output);
my ($contact, $result) = @_;
system("$valgrind $test_exec '$contact' >/dev/null");
$rc = $?>> 8;
if($rc != $result)
{
$errors .= "Test exited with $rc. ";
}
if($errors eq "")
{
ok('success', 'success');
}
else
{
ok($errors, 'success');
}
}
push(@tests, "status_test('$ENV{CONTACT_STRING}', 0);");
# Now that the tests are defined, set up the Test to deal with them.
plan tests => scalar(@tests), todo => \@todo;
foreach (@tests)
{
eval "&$_";
}
| globus/globus-toolkit | gram/jobmanager/source/test/client/register-status-test.pl | Perl | apache-2.0 | 1,652 |
#
# Copyright 2017 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package hardware::sensors::sensorip::snmp::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_snmp);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
%{$self->{modes}} = (
'sensors' => 'hardware::sensors::sensorip::snmp::mode::sensors',
);
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check Sensor-IP sensors in SNMP.
=cut
| nichols-356/centreon-plugins | hardware/sensors/sensorip/snmp/plugin.pm | Perl | apache-2.0 | 1,296 |
=pod
=head1 NAME
SMIME_read_ASN1_ex, SMIME_read_ASN1
- parse S/MIME message
=head1 SYNOPSIS
#include <openssl/asn1.h>
ASN1_VALUE *SMIME_read_ASN1_ex(BIO *in, int flags, BIO **bcont,
const ASN1_ITEM *it, ASN1_VALUE **x,
OSSL_LIB_CTX *libctx, const char *propq);
ASN1_VALUE *SMIME_read_ASN1(BIO *in, BIO **bcont, const ASN1_ITEM *it);
=head1 DESCRIPTION
SMIME_read_ASN1_ex() parses a message in S/MIME format.
I<in> is a BIO to read the message from.
If the I<flags> argument contains B<CMS_BINARY> then the input is assumed to be
in binary format and is not translated to canonical form.
If in addition B<SMIME_ASCIICRLF> is set then the binary input is assumed
to be followed by B<CR> and B<LF> characters, else only by an B<LF> character.
I<x> can be used to optionally supply
a previously created I<it> ASN1_VALUE object (such as CMS_ContentInfo or PKCS7),
it can be set to NULL. Valid values that can be used by ASN.1 structure I<it>
are ASN1_ITEM_rptr(PKCS7) or ASN1_ITEM_rptr(CMS_ContentInfo). Any algorithm
fetches that occur during the operation will use the B<OSSL_LIB_CTX> supplied in
the I<libctx> parameter, and use the property query string I<propq> See
L<crypto(7)/ALGORITHM FETCHING> for further details about algorithm fetching.
If cleartext signing is used then the content is saved in a memory bio which is
written to I<*bcont>, otherwise I<*bcont> is set to NULL.
The parsed ASN1_VALUE structure is returned or NULL if an error occurred.
SMIME_read_ASN1() is similar to SMIME_read_ASN1_ex() but sets the value of I<x>
to NULL and the value of I<flags> to 0.
=head1 NOTES
The higher level functions L<SMIME_read_CMS_ex(3)> and
L<SMIME_read_PKCS7_ex(3)> should be used instead of SMIME_read_ASN1_ex().
To support future functionality if I<bcont> is not NULL I<*bcont> should be
initialized to NULL.
=head1 BUGS
The MIME parser used by SMIME_read_ASN1_ex() is somewhat primitive. While it will
handle most S/MIME messages more complex compound formats may not work.
The use of a memory BIO to hold the signed content limits the size of message
which can be processed due to memory restraints: a streaming single pass option
should be available.
=head1 RETURN VALUES
SMIME_read_ASN1_ex() and SMIME_read_ASN1() return a valid B<ASN1_VALUE>
structure or B<NULL> if an error occurred. The error can be obtained from
ERR_get_error(3).
=head1 SEE ALSO
L<ERR_get_error(3)>,
L<SMIME_read_CMS_ex(3)>,
L<SMIME_read_PKCS7_ex(3)>,
L<SMIME_write_ASN1(3)>,
L<SMIME_write_ASN1_ex(3)>
=head1 HISTORY
The function SMIME_read_ASN1_ex() was added in OpenSSL 3.0.
=head1 COPYRIGHT
Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.
=cut
| jens-maus/amissl | openssl/doc/man3/SMIME_read_ASN1.pod | Perl | bsd-3-clause | 2,990 |
#!/usr/bin/perl -w
# scan some C/C++ source files for their module dependencies,
# output a description in the Dot graph format
# author: smcpeak@cs.berkeley.edu
# info on Dot: http://www.research.att.com/sw/tools/graphviz/
# this scanner assumes that dependencies are expressed in one
# of three ways:
# 1. direct #inclusion, using quotes to delimit the filename
# (assuption is that angle brackets are used to refer to
# system headers, and we don't want to see those
# dependencies)
# 2. implicit link dependency of foo.h on foo.{c,cc,cpp},
# whichever exists, if any
# 3. explicit link dependency expressed as a comment of the form
# // linkdepend: <filename>
# Any line containing "(r)" is ignored by this script. The intent
# is to mark #include lines with this if the file included is
# actually pulled in by another #include (so it's redundant, hence
# the "r") but I don't want to remove the #include altogether
# (because it still provides useful documentation). By adding the
# occasional "(r)" here and there one can prune the dependency tree
# output to get a pleasing output (I wish Dot itself exposed more
# knobs to tweak...)
# The scanner does *not* run the preprocessor or otherwise use any
# smarts to decode #ifdefs, #defines, tricky #inclusion sequences,
# etc. It also does not analyze anything produced by the compiler,
# so it can easily miss link-time dependencies if your coding
# conventions differ from mine. Caveat emptor.
# The scanner also assumes that file names are unique across all
# directories under consideration. My own projects conform to this
# constraint since it helps avoid confusion, and using this assumption
# means avoiding the clutter of qualifying names with directories.
# NOTE: throughout, when file names are passed or stored, they
# are stored *without* path qualification; all files are in
# either the current directory or one of the directories
# specified with -I (and hence in @incdirs)
# -------------------- global variables ---------------------
# list of directories to search for #include files in; the user
# adds things to this list with -I
@incdirs = ();
# hashtable of files to exclude; actually, each entry is a number,
# and when that number is positive it says how many more incoming
# links we'll allow; when it is zero then no more links are allowed;
# user adds to this with -X
%excluded = ();
# table of files whose outgoing edges should not be explored;
# the data is always a 1; user adds to this with -S
%subsystem = ();
# when I print the info for a node, I put a 1 in this hashtable
%nodes = ();
# when I explore the edges from a node, I put a 1 in this table
%explored = ();
$recursive = 0;
# list of files to explore; initially it's whatever is passed on the
# command line, but as new files are discovered (when $recursive is
# true) they get added here too
@toExplore = ();
# true to print debug messages
$debug = 0;
# true to suppress warning messages
$quiet = 0;
# list of extensions to try when looking for implicit link dependencies
@extensions = (".cc", ".cpp", ".c");
# ---------------------- subroutines ----------------------
sub usage {
print(<<"EOF");
usage: $0 [options] sourcefile [sourcefile ...]
This program reads each of the source files specified on the command
line, and emits a graph of their interdependencies in the Dot graph
file format. The source files should *not* be qualified with a path,
but instead be inside some directory specified with -I.
Options:
-I<dir> Add <dir> to the list of directories to search when
looking for \#included files (files which are included
but not found are not printed as dependencies).
-X<name> Exclude module <name> from the graph. If a number is
-X<name>=n specified, at most that many incoming links will be shown.
-S<name> Do not process any outgoing edges from module <name>. This
is useful when <name> is the entry point to a subsystem
whose dependencies are charted separately.
-r Recursively follow dependencies for files encountered.
-q Suppress warnings.
-d Enable debug messages.
-h,-help Print this usage string.
EOF
exit(0);
}
# read command-line arguments, looking for options as documented above
$origArgs = join(' ', @ARGV);
sub processArguments {
while (@ARGV >= 1 &&
($ARGV[0] =~ m/^-/)) {
my $option = $ARGV[0];
shift @ARGV;
my ($arg) = ($option =~ m/^-I(.*)$/);
if (defined($arg)) {
@incdirs = (@incdirs, $arg);
next;
}
my $count;
($arg, $count) = ($option =~ m/^-X(.*)=(\d+)$/);
if (defined($arg)) {
$excluded{$arg} = $count;
next;
}
($arg) = ($option =~ m/^-X(.*)$/);
if (defined($arg)) {
$excluded{$arg} = 0; # no count implies 0 incoming links allowed
next;
}
($arg) = ($option =~ m/^-S(.*)$/);
if (defined($arg)) {
$subsystem{$arg} = 1;
next;
}
if ($option eq "-r") {
$recursive = 1;
next;
}
if ($option eq "-q") {
$quiet = 1;
next;
}
if ($option eq "-d") {
$debug = 1;
next;
}
if ($option eq "-h" ||
$option eq "-help" ||
$option eq "--help") {
usage();
}
error("unknown option: $option\n" .
"try \"$0 -help\" for usage info");
}
if (@ARGV == 0) {
usage();
}
}
# error messages
sub error {
print STDERR ("error: ", @_, "\n");
exit(2);
}
# warnings the user might be interested in
sub warning {
if (!$quiet) {
print STDERR ("warning: ", @_, "\n");
}
}
# debug messages
sub diagnostic {
if ($debug) {
print STDERR ("diagnostic: ", @_, "\n");
}
}
# return true if the argument file exists in the current directory
# or any of the directories in @incdirs; return value is the name
# under which the file was found, if it was
sub fileExists {
my ($fname) = @_;
if (-e $fname) {
return $fname;
}
foreach $dir (@incdirs) {
if (-e "$dir/$fname") {
return "$dir/$fname";
}
}
diagnostic("didn't find $fname");
return ""; # false
}
# true if the filename meets my definition of a 'header', which has
# two implications:
# - headers are printed without a circle around their name
# - headers have implicit link-time dependencies on their
# correspondingly-named .cc files
sub isHeader {
my ($filename) = @_;
return ($filename =~ m/\.h$/);
}
# print the node info for the argument filename, if it
# hasn't already been printed
sub addNode {
my ($filename) = @_;
if (!defined($nodes{$filename})) {
# print info for this node; note that the default label is the
# same as the name of the node, so I normally don't also have
# an explicit 'label' attribute
$nodes{$filename} = 1;
print(" \"$filename\" [\n");
if (defined($subsystem{$filename})) {
# indicate that this module's dependencies weren't explored, hence
# the module actually stands for a subgraph of hidden dependencies
print(" label = \"$filename\\n(subsystem)\"\n",
" shape = box\n",
" style = dashed\n");
}
elsif (defined($excluded{$filename})) {
# indicate some incoming edges were not explored
print(" label = \"$filename\\n(ubiquitous)\"\n",
" style = dashed\n");
}
elsif (isHeader($filename)) {
# I prefer headers to not have any delimiting shape; since I
# don't see a way to turn off the shape altogether, I make
# it white so it's effectively invisible
print(" color = white\n");
}
print(" ]\n");
}
}
# given a file name, strip its path if there is one (this is what
# /bin/basename does, also)
sub basename {
my ($fname) = @_;
my ($ret) = ($fname =~ m,/([^/]*)$,);
if (defined($ret)) {
# there was a slash, and we stripped it and everything before it
return $ret;
}
else {
# no slash
return $fname;
}
}
# given a file name, possibly with path, return the string of
# characters after the last slash (if any) but before the first dot
# which follows the last slash (if any)
sub prefix {
my ($fname) = @_;
$fname = basename($fname);
# no slash now; get everything up to first dot
($ret) = ($fname =~ m,^([^.]*),);
#diagnostic("prefix($fname) = $ret");
return $ret;
}
# add an edge between the two nodes; if the third argument
# is true, then this is a link-time dependency (which is
# printed with a dashed line)
sub addEdge {
my ($src, $dest, $isLinkTime) = @_;
# is the link excluded?
my $allowed = $excluded{$dest};
if (defined($allowed)) {
die if $allowed < 0;
if ($allowed == 0) {
diagnostic("skipping $dest because it is excluded");
return;
}
$allowed--;
diagnostic("$allowed more links will be allowed for $dest");
$excluded{$dest} = $allowed;
}
if ($recursive) {
# arrange to explore this later
@toExplore = (@toExplore, $dest);
}
addNode($src);
addNode($dest);
print(" \"$src\" -> \"$dest\" [\n");
if ($isLinkTime) {
print(" style = dashed\n");
}
# if src and dest have the same base name, use a large
# weight so they will be close together visually
if (prefix($src) eq prefix($dest)) {
print(" weight = 10\n");
}
print(" ]\n");
}
# explore the edges emanating from this file; expect a filename
# without path
sub exploreFile {
my ($filename) = @_;
# since we expect a filename without path, qualify it now
# so we can open the file
my $withPath = fileExists($filename);
if (!$withPath) {
warning("does not exist: $filename");
return;
}
if (defined($explored{$filename})) {
return; # already explored this node
}
$explored{$filename} = 1;
# if the file has no outgoing or incoming edges (the user must have
# explicitly specified its name on the command line), this will
# ensure the node at least shows up (floating off disconnected, of
# course)
addNode($filename);
if (defined($subsystem{$filename})) {
return; # don't explore outgoing edges
}
# if it's a header, and the corresponding .cc file exists,
# then add a link-time dependency edge
if (isHeader($filename)) {
foreach my $ext (@extensions) {
my $corresp = $filename;
$corresp =~ s/\.h$/$ext/;
$corresp = basename($corresp);
if (fileExists($corresp)) {
addEdge($filename, $corresp, 1);
last; # stop looking after first match
}
}
}
if (!open(IN, "<$withPath")) {
warning("cannot read $withPath: $!");
next; # skip it
}
# scan the file for its edges
my $line;
while (defined($line = <IN>)) {
# is this line marked with "(r)", meaning "redundant", and
# should therefore be ignored by this script?
if ($line =~ m/\(r\)/) {
next;
}
# is this an #include line?
my ($target) = ($line =~ m/^\s*\#include\s+\"([^\"]*)\"/);
if (defined($target)) {
$target = basename($target);
if (fileExists($target)) {
# add a compile-time edge
addEdge($filename, $target, 0);
}
}
# is this a comment specifying a link-time dependency?
($target) = ($line =~ m/linkdepend: (.*)$/);
if (defined($target)) {
$target = basename($target);
# add a link-time edge; do so even if the file can't
# be found, because it's clearly important if the
# programmer went to the trouble of mentioning it
addEdge($filename, $target, 1);
if (!fileExists($target)) {
warning("could not find linkdepend: $target\n");
}
}
}
close(IN) or die;
}
# ---------------------- main ------------------------
processArguments();
# graph preamble
print(<<"EOF");
// dependency graph automatically produced by
// $0 $origArgs
digraph "Dependencies" {
EOF
# process all the files, in the process adding nodes and edges to the
# graph
@toExplore = @ARGV;
while (@toExplore != 0) {
my $filename = $toExplore[0];
shift @toExplore;
if ($filename =~ m,/,) {
warning("should not use paths in arguments: $filename\n");
$filename = basename($filename);
}
exploreFile($filename);
}
# finish the graph
print("}\n");
exit(0);
| BackupTheBerlios/codemorpher-svn | trunk/elsa/smbase/scan-depends.pl | Perl | bsd-3-clause | 12,348 |
=head1 This Week on perl5-porters (21-27 October 2002)
This week was moderately busy for the Perl 5 porters. The highlights
feature various crashes and considerations about Unicode string handling;
not forgetting, as usual, about newly fixed bugs, and bugs yet to be fixed.
=head2 Crash perl by trashing symbol tables
Tassilo v. Parseval reported a way to make Perl dump core (bug #18045):
emptying the %main:: symbol table, and issuing a warning. This bug has
been already corrected in bleadperl (it's due to the standard error file
handle being freed when it's removed from %main::.) But Tassilo and
Andreas J. Koenig came up with two other ways to issue a core dump: using
require() after emptying %main::, and emptying %main:: in a BEGIN block.
Rafael Garcia-Suarez explained that this kind of bugs have a common cause:
I<emptying %:: removes the subroutine or the currently executing code,
which then tries to walk on a vanishing floor, and crashes.> (However he
didn't provide a patch, because he didn't found a way to protect perl
efficiently against all those cases once and for all.)
http://archive.develooper.com/perl5-porters@perl.org/msg88248.html
=head2 Parser crash
A bug reported last month (bug #17589) had been reduced to a small use
case by Dave Mitchell : sometimes, when the incorrect construct C<sub;>
(an empty forward declaration) is encountered, the Perl parser segfaults.
This is due to the annoying fact that the parser constructs here an
internal state that is never restored properly, and this leads to a core
dump before it has a chance to report the syntax error. To fix this, one
could prevent the parser to get the offending tokens by hard-coding the
verification directly into the lexer. Apparently, Rafael Garcia-Suarez is
working on a patch.
http://archive.develooper.com/perl5-porters@perl.org/msg87122.html
=head2 Unicode questions
That's been a long time since the last long Unicode thread. H.Merijn Brand
began to ask what was the exact behavior of perl, when printing an Unicode
character to STDOUT. Andreas Koenig pointed out that the output filter
should be set to C<:utf8> (via binmode()), since Merijn is not using an
UTF8 locale. Another way to achieve this result is to set the PERLIO
environment variable to C<utf8>, or to use the C<open> pragma, but this
sets an input and/or output filter on all handles, which is too strong in
many cases.
What Merijn is actually asking for, is a I<command line option to turn on
C<:utf8> for C<STD(IN|OUT|ERR)>> (maybe a pragma? Hugo proposed something
like C<-Mstdlayer=utf8>).
The discussion also implied some consideration over charnames aliases. As
Merijn says I<that charnames is an exception as such, and /could/
warrant promotion of strings with \N{...} to utf8, since \N{...} /needs/
charnames anyway.> Andreas disagreed.
Later in the thread, Merijn wrote that he's I<not volunteering to take
over the summaries>.
http://archive.develooper.com/perl5-porters@perl.org/msg88360.html
=head2 Nested FETCHes
Dave Mitchell reported that nested FETCHes on tied arrays and hashes don't
work, because the fetched values are temporarily stored in global
variables. After a little discussion with Hugo, Dave announced that he's
going to see what he can do about it.
http://archive.develooper.com/perl5-porters@perl.org/msg88288.html
=head2 In brief
chromatic added a test for the (previously untested) IO module. However it
doesn't test yet for the new deprecation warning on a parameterless
C<use IO;>, introduced last week.
Dan Kogai provided a patch, on the behalf of Inaba Hiroto, to make
C<tr///> work with Unicode ranges, when the C<encoding> pragma is used.
Dan Kogai was apparently the first to notice that one of the tests to the
new Net::Ping 2.23 module fails on some platforms, due to portability
problems. This test is now skipped for now in bleadperl.
Barrie Slaymaker reported that read()ing on an unopened filehandle doesn't
set $!. Slaven Rezic provided a patch, that corrects also a similar
problem for binmode(), getc() and write(). (Bug #18048).
Rafael provided a patch to ExtUtils::MakeMaker to make life easier for
those of us who keep Perl modules (or bleadperl itself) in a Subversion
repository. Not applied yet. (This Rafael guy also advertised his latest
hack, C<perlpatch2svn>, a script that imports bleadperl patches into a
Subversion repository.)
David Kernen reported that the -I command-line option split paths on
colons (on Unix), as if they were provided via the PERL5LIB environment
variable (bug #18066). Slaven Rezic pointed a way to fix this (but,
although being a prolific patcher, he didn't provide a patch.)
H.Merijn Brand found that the installation of DBD-ODBC-0.45_18 reports an
error C<DBI version 1.201 required--this is only version 1.30> with
bleadperl. This is due to the recent changes in the version handling ;
John Peacock commented that the DBI versioning scheme doesn't follow the
current mainstream model (which implicitly splits floating-point versions
at three decimal place intervals.)
Matthew O. Persico pointed out that ExtUtils::Installed only looks for
installed modules only in the standard archlib and sitearch directories,
and suggested that it could optionally search other directories (e.g.
those in @INC).
Yves Orton began to test Perl on Windows 2000, compiled with MS Visual
Studio 6. Apparently non-threaded builds don't feel well. Moreover, the
threaded builds on Windows started to show errors on the usual portability
suspects: forks and socketpairs.
Dan Kogai released Encode 1.80. Paul Marquess released DB_File 1.806 (and
also Compress::Zlib 1.17, but that's not a core module).
=head2 About this summary
This summary brought to you, schizoidly, by Rafael Garcia-Suarez. It's
also available via a mailing list, which subscription address is
F<perl5-summary-subscribe@perl.org>. Comments and corrections are, as
always, welcome.
| briandfoy/perlweb | docs/dev/perl5/list-summaries/2002/p5p-200210-4.pod | Perl | apache-2.0 | 5,932 |
############################################################################
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package TestDriverFactory;
###############################################################################
# Class: TestDriverFactory
# A factory for TestDrivers.
#
use strict;
# Export utility functions so I don't have to type TestDriverFactory:: over
# and over.
require Exporter;
our @ISA = "Exporter";
our @EXPORT_OK = qw(splitLine readLine isTag);
###############################################################################
# Sub: getTestDriver
# Returns the appropriate Test Driver.
#
# Returns:
# instance of appropriate subclass of TestDriver
#
sub getTestDriver
{
my $cfg = shift;
if (not defined $cfg->{'driver'}) {
die "$0 FATAL : I didn't see a driver key in the file, I don't know what driver "
. "to instantiate.\n";
}
my $className = "TestDriver" . $cfg->{'driver'};
require "$className.pm";
my $driver = new $className();
return $driver;
}
1;
| kaituo/sedge | trunk/test/e2e/harness/TestDriverFactory.pm | Perl | mit | 2,297 |
use strict;
use Data::Dumper;
use Carp;
#
# This is a SAS Component
#
=head1 NAME
query_entity_SSRow
=head1 SYNOPSIS
query_entity_SSRow [--is field,value] [--like field,value] [--op operator,field,value]
=head1 DESCRIPTION
Query the entity SSRow. Results are limited using one or more of the query flags:
=over 4
=item the C<--is> flag to match for exact values;
=item the C<--like> flag for SQL LIKE searches, or
=item the C<--op> flag for making other comparisons.
=back
An SSRow (that is, a row in a subsystem spreadsheet)
represents a collection of functional roles present in the
Features of a single Genome. The roles are part of a designated
subsystem, and the features associated with each role are included
in the row. That is, a row amounts to an instance of a subsystem as
it exists in a specific, designated genome.
Example:
query_entity_SSRow -is id,exact-match-value -a > records
=head2 Related entities
The SSRow entity has the following relationship links:
=over 4
=item Implements Variant
=item IsRowOf SSCell
=item IsUsedBy Genome
=back
=head1 COMMAND-LINE OPTIONS
query_entity_SSRow [arguments] > records
=over 4
=item --is field,value
Limit the results to entities where the given field has the given value.
=item --like field,value
Limit the results to entities where the given field is LIKE (in the sql sense) the given value.
=item --op operator,field,value
Limit the results to entities where the given field is related to the given value based on the given operator.
The operators supported are as follows. We provide text based alternatives to the comparison
operators so that extra quoting is not required to keep the command-line shell from
confusing them with shell I/O redirection operators.
=over 4
=item < or lt
=item > or gt
=item <= or le
=item >= or ge
=item =
=item LIKE
=back
=item --a
Return all fields.
=item --show-fields
Display a list of the fields available for use.
=item --fields field-list
Choose a set of fields to return. Field-list is a comma-separated list of
strings. The following fields are available:
=over 4
=item curated
=item region
=back
=back
=head1 AUTHORS
L<The SEED Project|http://www.theseed.org>
=cut
use Bio::KBase::CDMI::CDMIClient;
use Getopt::Long;
#Default fields
my @all_fields = ( 'curated', 'region' );
my %all_fields = map { $_ => 1 } @all_fields, 'id';
our $usage = <<'END';
query_entity_SSRow [arguments] > records
--is field,value
Limit the results to entities where the given field has the given value.
--like field,value
Limit the results to entities where the given field is LIKE (in the sql sense) the given value.
--op operator,field,value
Limit the results to entities where the given field is related to
the given value based on the given operator.
The operators supported are as follows. We provide text based
alternatives to the comparison operators so that extra quoting is
not required to keep the command-line shell from confusing them
with shell I/O redirection operators.
< or lt
> or gt
<= or le
>= or ge
=
LIKE
-a
Return all fields.
--show-fields
Display a list of the fields available for use.
--fields field-list
Choose a set of fields to return. Field-list is a comma-separated list of
strings. The following fields are available:
curated
region
END
my $a;
my $f;
my @fields;
my $help;
my $show_fields;
my @query_is;
my @query_like;
my @query_op;
my %op_map = ('>', '>',
'gt', '>',
'<', '<',
'lt', '<',
'>=', '>=',
'ge', '>=',
'<=', '<=',
'le', '<=',
'like', 'LIKE',
);
my $geO = Bio::KBase::CDMI::CDMIClient->new_get_entity_for_script("all-fields|a" => \$a,
"show-fields" => \$show_fields,
"help|h" => \$help,
"is=s" => \@query_is,
"like=s" => \@query_like,
"op=s" => \@query_op,
"fields=s" => \$f);
if ($help)
{
print $usage;
exit 0;
}
elsif ($show_fields)
{
print STDERR "Available fields:\n";
print STDERR "\t$_\n" foreach @all_fields;
exit 0;
}
if (@ARGV != 0 || ($a && $f))
{
print STDERR $usage, "\n";
exit 1;
}
if ($a)
{
@fields = @all_fields;
}
elsif ($f) {
my @err;
for my $field (split(",", $f))
{
if (!$all_fields{$field})
{
push(@err, $field);
}
else
{
push(@fields, $field);
}
}
if (@err)
{
print STDERR "all_entities_SSRow: unknown fields @err. Valid fields are: @all_fields\n";
exit 1;
}
}
my @qry;
for my $ent (@query_is)
{
my($field,$value) = split(/,/, $ent, 2);
if (!$all_fields{$field})
{
die "$field is not a valid field\n";
}
push(@qry, [$field, '=', $value]);
}
for my $ent (@query_like)
{
my($field,$value) = split(/,/, $ent, 2);
if (!$all_fields{$field})
{
die "$field is not a valid field\n";
}
push(@qry, [$field, 'LIKE', $value]);
}
for my $ent (@query_op)
{
my($op,$field,$value) = split(/,/, $ent, 3);
if (!$all_fields{$field})
{
die "$field is not a valid field\n";
}
my $mapped_op = $op_map{lc($op)};
if (!$mapped_op)
{
die "$op is not a valid operator\n";
}
push(@qry, [$field, $mapped_op, $value]);
}
my $h = $geO->query_entity_SSRow(\@qry, \@fields );
while (my($k, $v) = each %$h)
{
print join("\t", $k, map { ref($_) eq 'ARRAY' ? join(",", @$_) : $_ } @$v{@fields}), "\n";
}
| kbase/kb_seed | scripts/query_entity_SSRow.pl | Perl | mit | 5,533 |
#-------------------------------------------
# Full documentation should be available
# at the command line via perldoc. Please
# report any errors or omissions to the
# author. Thank you. And have a nice day.
#-------------------------------------------
package JF::Template;
use 5.006_001;
use strict;
use warnings;
use Carp;
our $VERSION = "1.0";
#-------------------------------------------
# The token cache is a huge performance win, and it's
# smart enough to re-read modified files. It uses a
# little extra memory, but is generally worth it.
# You can turn it off here if you don't like it.
#-------------------------------------------
our %TOKEN_CACHE;
use constant USE_TOKEN_CACHE => 1;
#-------------------------------------------
# When handling complex logic expressions, we use perl's
# eval mechanism... however this is fairly slow, so we
# cache the results. See where we use this variable
# below for an explanation of how this works.
#-------------------------------------------
our %LOGIC_CACHE;
#-------------------------------------------
# Other enclosing code may set $/ (input record separator) which would
# cause the error line numbers to break (everything is on "line 1")
# -- since the default value is platform specific, we grab it
# at compile time here and use it later in _tokenize_file()
#-------------------------------------------
our $DEFAULT_INPUT_RECORD_SEPARATOR = $/;
#-------------------------------------------
# a simple constructor makes for a simple module
#-------------------------------------------
sub new {
my $self = bless [], shift;
return $self;
}
#-------------------------------------------
# Why do we use an arrayref instead of a hashref for
# the basis of the object? Because it's slightly faster,
# slightly lighter in memory, yet just as legible:
#
# use constant VALUES => 1;
# ...
# $self->[VALUES];
#
# I did some tests. First we'll look at speed:
#
# 150 iterations, no token caching:
# HASH : 17.63/sec
# ARRAY : 18.54/sec
#
# 150 iterations, with token caching
# HASH : 138.89/sec
# ARRAY : 147.06/sec
#
# Now let's look at memory. Note there's the template object
# itself which can be a hash or an array, and then there's the
# tokens, which we've also made into arrays instead of hashes:
#
# RPRVT RSHRD RSIZE VSIZE
#
# HASH Template objects 5.02M 368K 5.32M 27.7M
# ARRAY Template objects 5.01M 368K 5.32M 27.7M
#
# HASH Tokens 6.92M 368K 7.18M 29.2M
# ARRAY Tokens 6.45M 368K 6.71M 29.2M
#
# Not a big win, but I tried it to see how big it was, and since it's a little
# better, I'll keep it. Can't think of a reason not to.
#-------------------------------------------
use constant VALUES => 0;
use constant LOOPS => 1;
use constant DIR => 2;
use constant TEMPLATE_RECORD => 3; # this is used to detect recursion
use constant TEMPLATE_FILE => 4;
#-------------------------------------------
# used to occasionally check the distribution of tags
# in a file... counts how many times each type of token is seen
#-------------------------------------------
use constant SHOW_TOKENS_SEEN => 0;
our %SEEN;
#-------------------------------------------
# set_value takes variable arguments... either a single key/value pair,
# or a hashref with one or more key/value pairs. Cryptically, I use array
# indexes to avoid giving names since I don't know what the arguments are
# yet. Much of the work is in giving helpful error messages.
# I think it's worth it.
#-------------------------------------------
sub set_value {
my $self = shift;
#-------------------------------------------
# what is now found in @_:
# 0 is either a hashref or a "key" (of a key value pair)
# 1 is the "value" (or a mistake if 1 was a hashref)
# 2 is always a mistake
#-------------------------------------------
#-------------------------------------------
# a hashref is passed in
#-------------------------------------------
if (ref $_[0] eq "HASH") {
foreach my $key (keys %{$_[0]}) {
if (not defined $key or not length $key) {
carp "Blank hashref key to set_value({}) ignored";
return;
}
$self->[VALUES]{$key} = $_[0]->{$key};
}
if (exists $_[1]) {
carp "Extra arguments to set_value() ignored after hashref";
}
#-------------------------------------------
# a single key/value pair is passed in
#-------------------------------------------
} elsif (not ref $_[0]) {
if (not defined $_[0] or not length $_[0]) {
carp "Blank hash key to set_value() ignored";
return;
}
$self->[VALUES]{$_[0]} = $_[1];
if (exists $_[2]) {
carp "Extra arguments to set_value() ignored after key/value";
}
#-------------------------------------------
# some non-hash ref was passed in
#-------------------------------------------
} else {
carp "Invalid arguments to set_value() ignored";
}
}
#-------------------------------------------
# A loop iteration is really just another Template object, and that is how
# it is implemented -- that way it can easily have loops and values of
# it's own. You pass in the loop name, an iteration is created, and it
# is pushed onto a stack and returned.
#-------------------------------------------
sub get_loop {
my ($self, $loopname) = @_;
my $class = ref $self;
#-------------------------------------------
# This used to be a regular call to new(), but when creating loops,
# you don't need the initialization stuff that might be added there
# (like we do at Zappos) because the loop takes on the environment of
# their parent anyways during rendering. If we used the existing new()
# (and if it is customized to initialize some variables) then we'd
# waste some time and memory copying all that to each loop iteration.
# Though I suppose it could be faster on rendering if the loop doesn't
# have to look up through the environment stack. And that makes clear
# the other reason not to use new() here: seemingly global values could
# not be overridden from the top template object since they would be set
# locally to each loop. Anyways, that's the thought process that
# went into this next line:
#-------------------------------------------
my $loop = bless [], $class;
push @{$self->[LOOPS]{$loopname}}, $loop;
return $loop;
}
#-------------------------------------------
# If there's no trailing slash on the dir the system should handle it
#-------------------------------------------
sub set_dir {
my ($self, $dir) = @_;
#-------------------------------------------
# Used to try to detect bad directories, but it isn't worth it
# since you can only do it for absolute paths, and it gets
# complex with relative paths, which can switch out from under us...
# So we just let the open() in _tokenize_file() do the work.
#-------------------------------------------
#-------------------------------------------
# add the trailing if there isn't already one
# ... unless it's blank!
#-------------------------------------------
$dir .= "/" if length($dir||"") and $dir !~ /\/$/;
return $self->[DIR] = $dir;
}
#-------------------------------------------
# You can set the template file with this or you can
# pass in the filename when you call parse_file(),
# whichever makes the code easier to understand.
# Also, you can ignore set_dir() and just set the
# full path here if that makes things easier.
# If you don't set_dir() and you don't use an
# absolute path with set_template, it is undefined
# where the system will look - whatever it thinks
# is the current working directory.
#-------------------------------------------
sub set_template {
my ($self, $file) = @_;
return $self->[TEMPLATE_FILE] = $file;
}
#-------------------------------------------
# Give it a filename, and it will read the file, tokenize it,
# and render it. It returns a string, suitable for printing,
# framing, bronzing, or anything else you can think of.
#-------------------------------------------
sub parse_file {
my ($self, $file) = @_;
# one might argue that there should only be one way to
# set the template file, and one might be right...
# if over the course of a few projects it seems that
# it's always better to use the new set_template() call,
# then we should deprecate the old syntax completely
# and tidy this up
if (not $file and not $self->[TEMPLATE_FILE]) {
croak "No template file provided - use parse_file(\$file) or set_template(\$file) beforehand";
} elsif ($file and $self->[TEMPLATE_FILE]) {
carp "File passed to parse_file() when already set with set_template(); using $file";
} elsif (not $file and $self->[TEMPLATE_FILE]) {
$file = $self->[TEMPLATE_FILE];
} else {
# file is set and not TEMPLATE_FILE, which is fine
# (and used to be the only way to do things)
}
#-------------------------------------------
# we create an empty string and pass it in as a reference,
# -- the internal sub will build it up without any copying, which
# gets us a modest (~4%) performance gain. Normally it would have
# to do a copy with each recursive call (there can be quite a few).
# Also should reduce memory usage, though I didn't test that.
#-------------------------------------------
my $final_output = "";
if ($file !~ /^\//) {
$file = ($self->[DIR]||"") . $file;
}
#-------------------------------------------
# recursion detection would work even if we didn't do this,
# but starting off right cuts down on needless error messages.
#-------------------------------------------
++$self->[TEMPLATE_RECORD]{ $file };
#-------------------------------------------
# This right here is where it all happens.
#-------------------------------------------
$self->_render_tokens(
$self->_tokenize_file( $file ),
[], \$final_output
);
#-------------------------------------------
# clear out the recursion stuff -- probably needless, but
# we try to keep a clean house in case the template object
# gets reused by the module user...
#-------------------------------------------
delete $self->[TEMPLATE_RECORD];
if (SHOW_TOKENS_SEEN) {
foreach my $k (sort {$SEEN{$b} <=> $SEEN{$a}} keys %SEEN) {
warn "$k\t=> $SEEN{$k}\n";
}
warn "\n";
}
return $final_output;
}
#-------------------------------------------
# convenience...
#-------------------------------------------
sub send_page {
my ($t, $tmpl) = @_;
# to try eliminating this error in the logs:
# "Apache2 IO flush: (103) Software caused connection abort"
# we eval everything and basically ignore if there was a problem
eval {
my $r = JF::ApacheRequest->new;
$r->send_http_header("text/html");
$r->print( $t->parse_file($tmpl) );
};
if ($@) {
warn "JF::Template::send_page() failed for $tmpl: $@";
}
}
#-------------------------------------------
# each token is an arrayref -- here are the indexes
# of each part of the token
#-------------------------------------------
use constant COMMAND => 0;
use constant ARGS => 1;
use constant LINE => 2;
use constant FILE => 3;
use constant SUBTOKENS => 4;
#-------------------------------------------
# each command is mapped to a numerical
# constant so comparisions can be done more
# efficiently, and without all the hardcoded strings
#-------------------------------------------
use constant ROOT => 0;
use constant IF => 1;
use constant ELSIF => 2;
use constant IF_OR_ELSIF => 2.5; # for comparision only
use constant ELSE => 3;
use constant ENDIF => 4;
use constant LOOP => 5;
use constant ENDLOOP => 6;
use constant ECHO => 7;
use constant SET => 8;
use constant INCLUDE => 9;
use constant COMMENT => 10;
use constant ENDCOMMENT => 11;
use constant UNKNOWN => 12;
our %COMMAND_MAP = (
root => ROOT,
if => IF,
elsif => ELSIF,
else => ELSE,
endif => ENDIF,
loop => LOOP,
endloop => ENDLOOP,
echo => ECHO,
set => SET,
include => INCLUDE,
comment => COMMENT,
endcomment => ENDCOMMENT,
unknown => UNKNOWN,
);
#-------------------------------------------
# Used internally -- opens a file, reads it, and turns it into
# tokens which then get passed to _render_tokens().
# We try to do as much error checking as we can at this
# stage to reduce the burden on _render_tokens() which gets
# called a lot more because it's recursive and also can't be cached.
#-------------------------------------------
sub _tokenize_file {
my ($self, $filename, $incl_token) = @_;
my $file_mod_time;
if (USE_TOKEN_CACHE) {
$file_mod_time = ((-M $filename)||0) * 86400;
if ( $TOKEN_CACHE{$filename}
and $TOKEN_CACHE{$filename}{file_mod_time} <= $file_mod_time) {
return $TOKEN_CACHE{$filename}{tokens};
}
}
if (not open TMPL, $filename) {
if ($incl_token) {
warn "Couldn't open template $filename: $! " .
"at line $incl_token->[LINE] of $incl_token->[FILE]\n";
} else {
croak "Couldn't open template $filename: $!";
}
return [];
}
my $text_token = "";
#-------------------------------------------
# the goal here is to break up the file into easy to manage
# tokens. There are two types: text tokens, which are just flat
# text scalars, and command tokens, which are arrayrefs containing:
# [ $command, $args, $line, $filename [ subtokens ] ];
#-------------------------------------------
#-------------------------------------------
# The "token" array itself is somewhat complex:
# if a token can contain subtokens (if, elsif, else, loop),
# then we collect those tokens. Since the tokens can be
# nested we use this as a stack: each element represents a
# nesting level: an arrayref who's first element is a parent
# token, as described above, and whose second element is an arrayref
# of subtokens. When all is said and done, it should be a single
# arrayref that contains all the top level tokens, with each token
# containing it's own subtokens. Furthermore, since we don't
# know whether the current token is the top level or a nested token,
# we have to give the top token the same format as if it were
# nested token - a "root" token in a sense, so we can push
# tokens onto the fifth element of the arrayref (index 4)
# like this:
#-------------------------------------------
my @tokens = [ ROOT, "", "root", $filename, []];
#-------------------------------------------
# we'll eliminate the "root" token after tokenizing.
# here's an example of what the returned token arraref
# should look like when we're done:
#
# [
# "plain text",
# [ IF , "$foo", "2", "bar.html", [subtokens] ],
# [ ELSE, "" , "3", "bar.html", [subtokens] ],
# "more plain text",
# [ LOOP, "$baz", "5", "bar.html", [subtokens] ],
# "even more plain text",
# ];
#
# where "subtokens" are just more structures just like this.
#-------------------------------------------
#-------------------------------------------
# Other enclosing code may set $/ (input record separator) which would
# cause the error line numbers to break (everything is on "line 1")
# -- since the default value is platform specific, we grab it
# at compile time (near the top of this file).
#-------------------------------------------
local $/ = $DEFAULT_INPUT_RECORD_SEPARATOR;
#-------------------------------------------
# The main reason we go by line instead of slurping the file is so
# we can indicate the line number on warnings. Testing indicates
# that this is not a performance concern.
#-------------------------------------------
while (my $line = <TMPL>) {
#-------------------------------------------
# no template tag: optimize plain text lines
# (yes, two regexes are faster than a regex "|")
#-------------------------------------------
if ($line !~ /<%/o and $line !~ /%>/o) {
$text_token .= $line;
next;
}
#-------------------------------------------
# Remove whitespace from around lines where there's
# no text or "echo" commands. Those letters capture
# everything but an "echo".
# I feel this results in cleaner, more intuitive output.
#-------------------------------------------
if ($line =~ /^(?:\s*<%\s*[ifelsndoptcum]+(?:\s+[^\%>]+)?\s*%>\s*)+$/) {
$line =~ s/^\s+//g;
$line =~ s/\s+$//g;
}
while ($line) {
#-------------------------------------------
# the /s modifier is important to keep from discarding
# trailing newlines...
#-------------------------------------------
if ($line =~ /^(.*?)<%\s*([a-z]+?)(?:\s+(.*?))?\s*%>(.*)/s) {
#-------------------------------------------
# possible optimization: eliminate this copy;
# -- or quit clobbering the line with end_text each time
#-------------------------------------------
my $start_text = $text_token . $1;
my $raw_command = $2;
my $command = ($COMMAND_MAP{$raw_command}||UNKNOWN);
my $args = $3;
my $end_text = $4;
#-------------------------------------------
# We have to clear out the backreferences like
# this so the values don't get used below by any
# failed pattern matches. I wish there was a
# better way, but we can't put the regex in its
# own block because it _is_ the block.
#-------------------------------------------
"." =~ /./o;
#-------------------------------------------
# Text::Tmpl compatibility
#-------------------------------------------
if ($raw_command eq "ifn") {
$command = IF;
$args = "! $args";
} elsif ($raw_command eq "endifn") {
$command = ENDIF;
}
#-------------------------------------------
# deal with the preceding text first
# - save away the text under the current token
# (it's faster to concat text than to leave as seperate tokens)
#-------------------------------------------
push @{$tokens[0][SUBTOKENS]}, $start_text
unless $start_text eq "";
#-------------------------------------------
# create this token in all it's glory
#-------------------------------------------
my $token = [ $command, $args, $., $filename ];
if ($command == ECHO) {
$token->[ARGS] =~ /^\$([\w\.]+)$/;
#-------------------------------------------
# We don't need to even keep it if the arg is bad
#-------------------------------------------
if (not $1) {
warn "Invalid args to <\% echo \%> " .
"at line $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# 1. replace the original arg with the clean one
# 2. put this command token in it's proper place
#-------------------------------------------
$token->[ARGS] = $1;
push @{$tokens[0][SUBTOKENS]}, $token ;
}
} elsif ($command < IF_OR_ELSIF) {
#-------------------------------------------
# this is a common error for newbie users
#-------------------------------------------
if ($token->[ARGS] =~ /\b(?:and|or|not)\b/) {
warn "Invalid args to <\% $raw_command \%> " .
"( use '&& || !' instead of 'and or not' ) " .
"at line $token->[LINE] of $token->[FILE]\n";
$token->[ARGS] = ["0"];
#-------------------------------------------
# The common case is a single arg (and optional "!"),
# which we just pass along. The advanced case is
# converted into an arrayref of punctuation and vars
#-------------------------------------------
} elsif ($token->[ARGS] !~ /^!?\s*\$[\w\.]+$/) {
#-------------------------------------------
# clean the args and break it into variables
# and punctuation: () ! && ||
#-------------------------------------------
$token->[ARGS] =~ s/[^\w\.\$\!\(\)\|\&]//g;
$token->[ARGS] = [ grep(
$_, split( /(\$[\w\.]+)/, ($token->[ARGS]||"") )
) ];
}
#-------------------------------------------
# check the template is opening an elsif or else
# in a reasonable context
#-------------------------------------------
if ($command == IF) {
#-------------------------------------------
# 1. put this command token in it's proper place
# 2. start collecting subtokens under this token
#-------------------------------------------
push @{$tokens[0][SUBTOKENS]}, $token;
unshift @tokens, $token;
} else {
if ( $tokens[0][COMMAND] != IF
and $tokens[0][COMMAND] != ELSIF) {
warn "Malformed Template: " .
"<\% elsif \%> not inside <\% if \%> " .
"at $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# 1. close the most recent subtoken stack
# 2. put this command token in it's proper place
# 3. open a new stack
#-------------------------------------------
shift @tokens;
push @{$tokens[0][SUBTOKENS]}, $token ;
unshift @tokens, $token ;
}
}
} elsif ($command == ENDIF) {
#-------------------------------------------
# check the template is closing the right tag - worth
# doing now because it would be difficult to give an
# informative error later if too many tags are closed
#-------------------------------------------
if ( $tokens[0][COMMAND] != IF
and $tokens[0][COMMAND] != ELSE
and $tokens[0][COMMAND] != ELSIF
) {
warn "Malformed Template: " .
"<\% endif \%> not inside <\% if \%> " .
"at $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# just stop collecting under the current token -- we
# don't bother storing closing tokens since the
# subtokens are in an array we just fall off the end
# when rendering
#-------------------------------------------
shift @tokens;
}
} elsif ($command == LOOP) {
$token->[ARGS] =~ /^"([\w\.]+)"$/;
#-------------------------------------------
# Even if the loop arg is bad, we need to put
# it on the stack so the later endloop will
# work... otherwise we'd get a fatal
# "Malformed Template" error
#-------------------------------------------
if (not $1) {
warn "Invalid args to <\% loop \%> " .
"at line $token->[LINE] of $token->[FILE]\n";
$token->[ARGS] = "";
} else {
#-------------------------------------------
# replace the original arg with the clean one
#-------------------------------------------
$token->[ARGS] = $1;
}
#-------------------------------------------
# 1. put this command token in it's proper place
# 2. start collecting subtokens under this token
#-------------------------------------------
push @{$tokens[0][SUBTOKENS]}, $token;
unshift @tokens, $token;
} elsif ($command == ENDLOOP) {
#-------------------------------------------
# check the template is closing the right tag - worth
# doing now because it would be difficult to give an
# informative error later if too many tags are closed
#-------------------------------------------
if ($tokens[0][COMMAND] != LOOP) {
warn "Malformed Template: " .
"<\% endloop \%> not inside <\% loop \%> " .
"at $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# we don't bother storing closing tokens - since
# the subtokens are in an array we just fall off the end
#-------------------------------------------
shift @tokens;
}
} elsif ($command == ELSE) {
#-------------------------------------------
# check the template is opening an elsif or else
# in a reasonable context
#-------------------------------------------
if ( $tokens[0][COMMAND] != IF
and $tokens[0][COMMAND] != ELSIF) {
warn "Malformed Template: " .
"<\% else \%> not inside <\% if \%> " .
"at $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# 1. close the most recent subtoken stack
# 2. put this command token in it's proper place
# 3. open a new stack
#-------------------------------------------
shift @tokens;
push @{$tokens[0][SUBTOKENS]}, $token ;
unshift @tokens, $token ;
}
} elsif ($command == SET) {
$token->[ARGS] =~ /^"([\w\.]+)"\s*,\s*"(.*)"/;
#-------------------------------------------
# we can ignore it if the args are bad
#-------------------------------------------
if (not ($1 and defined $2)) {
warn "Invalid args to <\% set \%> " .
"at line $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# 1. replace the original arg with the clean one
# 2. put this command token in it's proper place
#-------------------------------------------
$token->[ARGS] = [ $1, $2 ];
push @{$tokens[0][SUBTOKENS]}, $token ;
}
} elsif ($command == INCLUDE) {
#-------------------------------------------
# is this safe enough? This arg will be used
# in an open() command later... what damage can
# the template author do without spaces?
#-------------------------------------------
my @args = $token->[ARGS] =~ /("\S+"|\$[\w\.]+)/g;
foreach my $a (@args) {
$a =~ s/"//g;
}
#-------------------------------------------
# we can ignore it if the args are bad
#-------------------------------------------
if (not @args) {
warn "Invalid args to <\% include \%> " .
"at line $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# 1. replace the original arg with the clean one
# 2. put this command token in it's proper place
#-------------------------------------------
$token->[ARGS] = \@args;
push @{$tokens[0][SUBTOKENS]}, $token ;
}
} elsif ($command == COMMENT) {
#-------------------------------------------
# 1. put this command token in it's proper place
# 2. start collecting subtokens under this token
#-------------------------------------------
push @{$tokens[0][SUBTOKENS]}, $token;
unshift @tokens, $token;
} elsif ($command == ENDCOMMENT) {
#-------------------------------------------
# check the template is closing the right tag - worth
# doing now because it would be difficult to give an
# informative error later if too many tags are closed
#-------------------------------------------
if ($tokens[0][COMMAND] != COMMENT) {
warn "Malformed Template: " .
"<\% endcomment \%> not inside <\% comment \%> " .
"at $token->[LINE] of $token->[FILE]\n";
} else {
#-------------------------------------------
# stop collecting under this token
#-------------------------------------------
shift @tokens;
#-------------------------------------------
# throw the whole thing away (yes, it's a bit
# of a waste to tokenize stuff that's not being
# used, but the tokenizing logic is robust wheras
# a hack to deal with comments as a special case is not.
#-------------------------------------------
pop @{$tokens[0][SUBTOKENS]};
}
} else {
warn "Invalid template command <\% $raw_command \%> " .
"at line $token->[LINE] of $token->[FILE]\n";
}
$text_token = "";
$line = $end_text;
} else {
#-------------------------------------------
# this checks every line without a templating tag a second time
# for possibly malformed templating tags
# (yes, two regexes are faster than a regex "|")
#-------------------------------------------
if ($line =~ /<%/ or $line =~ /%>/) {
warn "Template Warning: possible incomplete tag " .
"at line $. of $filename\n";
}
$text_token .= $line;
$line = "";
}
}
}
#-------------------------------------------
# take care of any remaining text
#-------------------------------------------
push @{$tokens[0][SUBTOKENS]}, $text_token unless $text_token eq "";
close TMPL;
#-------------------------------------------
# check that we closed all the opening tags
#-------------------------------------------
while (@tokens > 1) {
my $token = shift @tokens;
# note this will show "if" as the command even if it was
# really "ifn"...
my %command_unmap = reverse %COMMAND_MAP;
my $command = $command_unmap{$token->[COMMAND]};
warn "Malformed Template: unclosed tag <\% $command \%> " .
"at $token->[LINE] of $token->[FILE]\n";
}
#-------------------------------------------
# check that we haven't totally buggered things up
#-------------------------------------------
if ($tokens[0][COMMAND] != ROOT) {
die "Internal templating error (1) while parsing $filename\n";
}
#-------------------------------------------
# check that we got any tokens at all
#-------------------------------------------
if (not @{$tokens[0][SUBTOKENS]}) {
warn "No tokens (file empty?) while parsing $filename\n";
return [];
}
#-------------------------------------------
# cache and return the contents of the root token
# (not the root token itself)
#-------------------------------------------
if (USE_TOKEN_CACHE) {
$TOKEN_CACHE{$filename}{tokens} = $tokens[0][SUBTOKENS];
$TOKEN_CACHE{$filename}{file_mod_time} = $file_mod_time;
}
return $tokens[0][SUBTOKENS];
}
#-------------------------------------------
# used internally -- this takes an arrayref of tokens (as
# created by _tokenize_file) and it renders them to a string
# -- you must also pass in an env_stack which is just an empty
# array on the first call, but becomes populated when the sub
# calls itself recursively in a loop. And you must pass in
# a blank scalar reference so it can build the final string up
# without having to copy it around so much.
#-------------------------------------------
sub _render_tokens {
#-------------------------------------------
# We may call ourselves recursively if we're
# going to render a loop, for example - in that
# case we'll get the environment passed in by our parent.
# We'll also get a copy of the root template object,
# which we need for looking up the set directory (we
# may do an include inside a loop and we don't want
# every loop to have to have a copy of the directory)
#-------------------------------------------
my ($self, $tokens, $env_stack, $final_output, $root_self) = @_;
#-------------------------------------------
# this lets us handle the if/elsif/else logic by
# telling us to skip sections if already handled
#-------------------------------------------
my $logic_mask = 0;
foreach my $token (@$tokens) {
if (not ref $token) {
++$SEEN{text} if SHOW_TOKENS_SEEN;
# just text
$$final_output .= $token;
next;
}
my ($command, $args) = @$token;
#-------------------------------------------
# no pretense of being extendable... this is just
# pure hardcoded goodness from years of using templates
# - you can thank me for the speed later...
#-------------------------------------------
if ($command == ECHO) {
++$SEEN{echo} if SHOW_TOKENS_SEEN;
$logic_mask = 0;
#-------------------------------------------
# this check seems to be only for debugging the templating library
#-------------------------------------------
if ($token->[SUBTOKENS]) {
die "Internal templating error (2) " .
"at line $token->[LINE] of $token->[FILE]\n";
}
# look through the stack for this variable
foreach my $env ($self, @{$env_stack||[]}) {
if (exists $env->[VALUES]{$args}) {
$$final_output .= $env->[VALUES]{$args}
unless not defined $env->[VALUES]{$args};
last;
}
}
} elsif ($command < IF_OR_ELSIF) {
#-------------------------------------------
# slightly different handling for these two, either:
# 1. consider this a new logic set
# 2. skip if we've already handled this logic set
#-------------------------------------------
my $token_type;
if ($command == IF) {
++$SEEN{if} if SHOW_TOKENS_SEEN;
$logic_mask = 0;
$token_type = "if";
} else {
++$SEEN{elsif} if SHOW_TOKENS_SEEN;
next if $logic_mask;
$token_type = "elsif";
}
#-------------------------------------------
# This determines if it's a complex expression:
# the tokenizer puts complex expressions into an array.
# We have to do quite a bit of work in that case.
#-------------------------------------------
if (ref $args) {
#-------------------------------------------
# I tried doing the whole variable interpolation thing
# using s///eg, but this turns out this is slightly faster:
# s///eg 52.03/s
# this method 53.48/s
#-------------------------------------------
my $argstring = "";
#-------------------------------------------
# now we go through the args, and replace each of the
# variables with a "0" or "1", based on it's perl-truth,
# plus we cat them together into an evalable string
#-------------------------------------------
foreach my $argchunk (@$args) {
#-------------------------------------------
# skip anything that's not a variable (i.e. punctuation)
#-------------------------------------------
if ($argchunk =~ /^\$([\w\.]+)$/) {
#-------------------------------------------
# assume false: we still want to replace it with
# something if we don't find anything in the
# environment. Then go through the evironment stack
# until we find a defined value or run out of
# environments
#-------------------------------------------
my $val = 0;
foreach my $env ($self, @{$env_stack||[]}) {
if (exists $env->[VALUES]{$1}) {
# use perl's sense of truth
$val = $env->[VALUES]{$1} ? 1 : 0;
last;
}
}
$argstring .= $val;
} else {
$argstring .= $argchunk;
}
}
#-------------------------------------------
# So now we've got a complex expression consisting of just
# ones, zeros, and punctuation. We're gonna let perl figure it
# out for us. However, we will cache the results. The
# argstring is something like "(0||1)", which we can use as a
# hash key to store the results in a hash. This lets us skip
# the eval for any pattern we've seen before. Tests indicate
# a 60% speed increase over the eval in the best case: if
# you've got a lot of complex expressions inside loops, for
# example. In the worst case it uses a miniscule amount of
# extra memory and performs about as well. Also, in addition
# to the result of expression, we have to capture any eval
# errors caused by a malformed token. Here we go:
#-------------------------------------------
if (not exists $LOGIC_CACHE{$argstring}) {
no warnings; # if they
$LOGIC_CACHE{$argstring}[0] = eval $argstring;
$LOGIC_CACHE{$argstring}[1] = $@;
}
$logic_mask = $LOGIC_CACHE{$argstring}[0];
#-------------------------------------------
# Alert them if their args caused an error during eval()
# (since we guarantee only 0 or 1 replacements,
# perhaps this check can be moved to tokenizing?)
#-------------------------------------------
if ($LOGIC_CACHE{$argstring}[1]) {
my $errmsg = $LOGIC_CACHE{$argstring}[1];
chomp($errmsg);
warn "Invalid args to <\% $token_type \%> ($errmsg) " .
"at line $token->[LINE] of $token->[FILE]\n";
}
#-------------------------------------------
# If it's not a complex expression, we can handle it
# without an eval
#-------------------------------------------
} else {
# pull out the stuff
my ($neg, $arg) = $args =~ /^(!?)\s*\$([\w\.]+)/;
$logic_mask = 0;
foreach my $env ($self, @{$env_stack||[]}) {
if (exists $env->[VALUES]{$arg}) {
# use perl's sense of truth
$logic_mask = $env->[VALUES]{$arg} ? 1 : 0;
last;
}
}
$logic_mask = not $logic_mask if $neg;
}
#-------------------------------------------
# Now we have determined the final truthfulness/falsehood
# of the arguments, taking into account all the variables
# as defined by all the environments. Now we can decide
# whether to render the subtokens or not
#-------------------------------------------
$self->_render_tokens(
$token->[SUBTOKENS], $env_stack, $final_output,
($root_self||$self)
) if $logic_mask;
} elsif ($command == ELSE) {
++$SEEN{else} if SHOW_TOKENS_SEEN;
#-------------------------------------------
# skip if this logic set has already been handled
#-------------------------------------------
next if $logic_mask;
#-------------------------------------------
# simple - just render all the tokens if
# we've not already been masked
#-------------------------------------------
$self->_render_tokens(
$token->[SUBTOKENS], $env_stack, $final_output,
($root_self||$self)
);
} elsif ($command == LOOP) {
++$SEEN{loop} if SHOW_TOKENS_SEEN;
$logic_mask = 0;
# look through the stack for this loop
foreach my $env ($self, @{$env_stack||[]}) {
if (exists $env->[LOOPS]{$args}) {
# once found we iterate through the loop
foreach my $loop (@{$env->[LOOPS]{$args}}) {
$loop->_render_tokens(
$token->[SUBTOKENS], [ $self, @$env_stack ],
$final_output, ($root_self||$self)
);
}
# we found a valid loop - no need to search further
last;
}
}
} elsif ($command == INCLUDE) {
++$SEEN{include} if SHOW_TOKENS_SEEN;
$logic_mask = 0;
my $filename = "";
foreach my $a (@$args) {
if ($a =~ /^\$([\w\.]+)$/) {
my $val = "";
foreach my $env ($self, @{$env_stack||[]}) {
if (exists $env->[VALUES]{$1}) {
$val = $env->[VALUES]{$1};
last;
}
}
$filename .= $val;
} else {
$filename .= $a;
}
}
$filename = (($root_self||$self)->[DIR]||"") . $filename;
if ($self->[TEMPLATE_RECORD]{ $filename }++) {
warn "Recursive <\% include \%>: $filename " .
"at line $token->[LINE] of $token->[FILE]\n";
} else {
$self->_render_tokens(
$self->_tokenize_file( $filename, $token ),
$env_stack, $final_output, ($root_self||$self)
);
$self->[TEMPLATE_RECORD]{ $filename } = 0;
}
} elsif ($command == SET) {
++$SEEN{set} if SHOW_TOKENS_SEEN;
$logic_mask = 0;
$self->[VALUES]{ $args->[0] } = $args->[1];
} else {
warn "Bad Token got through: $command";
}
}
# we don't return anything, we work on a reference...
# this avoids some extra copying and provides a modest performance gain
}
#-------------------------------------------
# Convenience methods
#-------------------------------------------
#-------------------------------------------
# export an arrayref of hashrefs to the template -
# in other words, the data structure that is usually
# returned from the DB
#-------------------------------------------
sub export_loop {
my ($self, $loop_name, $data) = @_;
if ( $loop_name and $data and @$data ) {
foreach my $val (@$data) {
my $loop = $self->loop_iteration($loop_name);
$loop->export_hashref($val);
}
}
}
#-------------------------------------------
# export a hashref with arbitrary contents.
# catches recursive self-references.
#-------------------------------------------
sub export_hashref {
my ($self, $data) = @_;
if ($data and ref $data eq "HASH") {
my $seen = { $data => ref $data };
foreach my $key (sort keys %$data) {
_export_helper($key, $data->{$key}, $self, $seen);
}
}
}
#-------------------------------------------
# this function will export any data structure
# you throw at it into the template
#-------------------------------------------
sub _export_helper {
my ($key, $val, $t, $seen, $whence) = @_;
$seen = {} unless $seen;
if ( ref $val eq "HASH" and not $seen->{$val} ) {
$seen->{$val} = ref $val;
my $u = ($whence) ? $t : $t->loop_iteration($key);
foreach my $sv ( sort keys %$val ) {
_export_helper($key, $val->{$key}, $u, $seen);
}
} elsif ( ref $val eq 'ARRAY' and not $seen->{$val} ) {
$seen->{$val} = ref $val;
foreach my $data (@$val) {
my $u = $t->loop_iteration($key);
_export_helper($key, $data, $u, $seen, 1);
}
} else {
$t->set_value($key, $val);
}
}
#-------------------------------------------
# Duplicated from JF::ApacheRequest, but recent
# projects convinced me this is worth having in
# here when building stuff offline
#-------------------------------------------
sub html_escape {
my $string = shift;
$string =~ s/\&/&/g;
$string =~ s/\"/"/g;
$string =~ s/\</</g;
$string =~ s/\>/>/g;
return $string;
}
#-------------------------------------------
# Text::Tmpl compatibility stubs
#-------------------------------------------
sub set_values { goto &set_value; }
sub loop_iteration { goto &get_loop; }
sub handler { }
sub destroy { }
sub set_strip { }
1;
__END__
=head1 NAME
JF::Template - High Performance Text Templating in Perl
=head1 SYNOPSIS
use JF::Template;
my $t = JF::Template->new;
$t->set_value( foo => 1 );
print $t->parse_file( "template.html" );
=head1 DESCRIPTION
JF::Template allows you to cleanly separate your text output -- in particular
HTML -- from your code. It is primarily used to generate HTML pages in a server
environment, but it works equally well for any time you want to plug data into
some type of text-based template.
The module is written entirely in perl and has no dependancies. A lot of work
went into optimization, so it is very fast. It has been used on prominent
websites that receieved hundreds of hits per second without becoming a
bottleneck.
=head2 USAGE
Here's an example of a minimal HTML5 template:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title><% echo $page_title %></title>
</head>
<body>
<h1><% echo $page_title %></h1>
<% if $show_sample_text %>
<p>This is a sample page.</p>
<% else %>
<p>This space intentionally left blank.</p>
<% endif %>
</body>
</html>
Let's say we save that file as template.html. Here is an example of perl code
that would render the template:
use JF::Template;
my $t = JF::Template->new;
$t->set_value({
page_title => "Hello World",
show_sample_text => 1,
});
print $t->parse_file( "template.html" );
And here is what would be printed:
<html lang="en">
<head>
<meta charset="utf-8">
<title>Hello World</title>
</head>
<body>
<h1>Hello World</h1>
<p>This is a sample page.</p>
</body>
</html>
There's more functionality, but that's the starting point. Read on for the
details.
=head2 THE DETAILS
There are two sides to working with JF::Template - the templating langauge, and
the perl code. We will cover each separately.
=head3 Templating Tags
Tags are defined with an opening "<%" and a closing "%>". Within the tag is the
command and the arguments. Tags are not sensitive to spaces, but a given tag
must appear on one line - newlines are not allowed between the "<%" and "%>",
and will generate a warning as well as not rendering as you expected.
=over 8
=item <% echo $var %>
This tag echos a variable that you've set. You can set variables either with
the $t->set_var("value") call (described below) or with a
<% set "var", "value" %> tag in the template itself.
=item <% if $var %> ... <% endif %>
This tag set will show its contents if $var evaluates to true (using perl's
definition of truth). You can also use logical constructs, for example:
<% if !$foo %> ... <% endif %>
<% if $foo && ($bar || $baz) %> ... <% endif %>
=item <% elsif $var %> and <% else %>
These tags can be used, as expected, within an <% if %> tag, for example:
<% if $foo %>
...
<% elsif $bar %>
...
<% else %>
...
<% endif %>
You can nest <% if %> constructs arbitrarily within any section, just like
regular perl code.
=item <% loop "loopname" %> ... <% endloop %>
This tag set will repeat its contents as dictated by the perl code, using the
$t->get_loop("loopname") function described below. You can nest loops to
arbitrary depth.
=item <% set "varname", "value" %>
This tag will set a variable for use in <% echo %> and <% if %> tags. You set
it without the leading $, but when you use it, you will use the leading $.
Normally values are set from the perl side, but sometimes it's nice to be able
to set it in the template. The value in the template will override values set
in the perl code.
=item <% include "filename.html" %>
=item <% include $filename %>
=item <% include $filename ".html" %>
This tag will include the contents of an external file directly into the
current template. The path is determined from the path of the current template.
The argument can be a variable, a literal strings, or any number of variables
and literal strings, which will be concatenated.
=item <% comment %> ... <% endcomment %>
This tag set will remove all its contents from the rendered page. Text and tags
inside will be completely ignored. You can nest comments without breaking them,
unlike with HTML.
=back
=head3 Perl Methods
=over 8
=item my $t = JF::Template->new();
Creates a new template object. Everything you do on the perl side will take
place through this object. This module does not export any functions.
=item $t->set_value( foo => 1 );
=item $t->set_value({ foo => 1, bar => 2 });
These functions will set a value for use in tags like <% echo $foo %> and
<% if $bar %> ... <% endif %> in the template.
=item my $loop = $t->get_loop("loopname");
This function instructs the template to do one iteration of a loop. You pass it
the name of the loop, matching the name in the template, and it returns a loop
iteration - which is really just a template object scoped to the loop.
This is the most complex part of the templating system, so an example is in
order. Here's a template fragment with a loop:
Here are some friends:
<ul>
<% loop "friends" %>
<li> <% echo $name %>
<% endloop %>
</ul>
Here is the perl you would use to fill it out:
foreach my $name (qw( Aki Eric Lisa Kris )) {
my $loop = $t->get_loop("friends");
$loop->set_value( name => $name );
}
And here is the resulting output:
Here are some friends:
<ul>
<li> Aki
<li> Eric
<li> Lisa
<li> Kris
</ul>
The important thing to note is that when setting values for a loop, you set it
by calling set_value() on the object returned by get_loop(), not the original
template object.
You can nest loops too, just be sure that you call get_loop() on the outer loop
object rather than the template to get at your inner loop. You can then call
set_value() on the inner loop object.
=item print $t->parse_file("template.html");
When you've finished setting values and getting loops, you call this method to
render your data into the template and return the result. It's just a string,
which you can print directly, or store for later.
This function looks for the file in the "current directory". From the command
line this is usually obvious, but from a webserver it might be something like
the root of the filesystem. See SECURITY below.
=item $t->set_dir("my/directory");
Use this to indicate the directory that contains your templates. Strictly
speaking, this isn't necessary, since you can pass in the full path name to
parse_file(), but this makes a nice separation of paths (more of a configure
thing) and filenames (more of a script thing). It's easy to set the directory
in a wrapper module (along with other site-wide values) and grab your
JF::Template object through that so individual scripts don't have to worry
about it.
You may include the trailing slash, but it's not necessary.
=back
=head3 Error Reporting
All templating errors will be reported as warnings, which will appear on stderr
or webserver error logs. Errors will include filenames and line numbers.
The only fatal error a user of this module can trigger is providing a template
file that doesn't exist or can't be opened. For all other errors, the module
will do its best to proceed after reporting the error.
=head3 Performance
JF::Template has been designed to be as efficient as possible considering its
pure-perl implementation.
When first optimizing back in 2003, I did some benchmarks on a laptop. A G4 @
1.33Mhz was able to do 150 "normal sized" templates per second:
7 secs ( 6.50 usr + 0.10 sys = 6.60 CPU) @ 151.52/s (n=1000)
It is efficient with memory and has no detectable leaks:
#MREGS RPRVT RSHRD RSIZE VSIZE
500 reps 22 1.13M 404K 1.39M 26.8M
1000 reps 22 1.13M 404K 1.39M 26.8M
2000 reps 22 1.13M 404K 1.39M 26.8M
The code uses a smart caching mechanism that retains all the template parsing
work between calls, so all calls after the first call are even faster. This is
ideal for use under mod_perl as the same templates are likely to be parsed many
times over the life of a child process. The system is smart enough to pick up
new files when they change.
=head1 EXPORT
None.
=head1 DEPENDENCIES
None.
=head1 COMPATIBILITY
This module was inspired by Text::Tmpl in CPAN. At the time I wanted to
add some features and fix some bugs, but I didn't know enough C to do so.
So I wrote this module as a somewhat compatible replacement. The main
non-compatible differences are as follows:
=over 8
=item * Tag delimiters are <% and %> instead of <!--# and -->
=item * get_loop() replaces loop_iteration(); there is no fetch_loop_iteration()
=item * The extesibility features are not present: there is no set_delimiters(),
register_simple(), register_pair(), alias_simple(), alias_pair(), remove_simple(),
or remove_pair().
=item * The following methods are also not supported: set_debug(), set_strip(),
and parse_string()
=back
This may seem like a significant amount of lost functionality, but in practice
I've found that these are not necessary with the feature set of this module,
namely more advanced logic and flow control, and more verbose error reporting.
Also, excess whitespace stripping is on by default and is smart enough to
give predictable results.
In most cases, one should be able to migrate a codebase without with
a few perl regexes and none too much pain.
=head1 SECURITY
It's worth mentioning that JF::Template will have access to display whatever
files the webserver has permission to read. This means that on some systems
a malicious coder or template writer could call parse_file() or <% include %>
on something sensitive like /etc/passwd and it would be visible via HTTP.
As always, be careful who is writing your code (and templates).
=head1 AUTHOR
Jonathan Field - E<lt>jfield@gmail.comE<gt>
Based on designs and concepts learned from Neil Mix and David Lowe.
Dave Bailey wrote the (currently not documented) export_*() functions.
=head1 COPYRIGHT AND LICENSE
The MIT LIcense
Copyright (C) 2000, 2003, 2006, 2015 by Jonathan Field
The MIT License (MIT)
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
=cut
| needlestack/JF-Template | lib/JF/Template.pm | Perl | mit | 61,209 |
class Panda::Bundler;
use Panda::Common;
use Panda::Project;
use File::Find;
sub guess-project($where, Str :$name is copy, Str :$desc is copy) {
my $source-url;
indir $where, {
if 'META.info'.IO.e {
try my $json = from-json 'META.info'.IO.slurp;
if $json {
$name = $json<name> if !$name && $json<name>;
$desc = $json<description> if !$desc && $json<description>;
$source-url = $json<source-url> if $json<source-url>;
}
}
unless $name {
$name = $where.IO.parts<basename>.subst(/:i ^'p' 'erl'? '6-'/, '').split(/<[\-_]>+/, :g)>>.tc.join('::');
}
unless $desc {
$desc = '.git/description'.IO.slurp if '.git/description'.IO.e
}
unless $source-url {
try my $git = qx{git remote show origin}.lines.first(/\.git$/);
if $git && $git ~~ /$<url>=\S+$/ {
$source-url = $<url>;
if $source-url ~~ m/'git@' $<host>=[.+] ':' $<repo>=[<-[:]>+] $/ {
$source-url = "git://$<host>/$<repo>"
}
}
}
};
Panda::Project.new( :$name, :metainfo( :description($desc), :$source-url ) )
}
method bundle($panda, :$notests, Str :$name, Str :$auth, Str :$ver, Str :$desc) {
my $dir = $*CWD.absolute;
my $bone = guess-project($dir, :$name, :$desc);
my $perl6_exe = $*EXECUTABLE;
try {
my $*EXECUTABLE = "$perl6_exe -MPanda::DepTracker";
%*ENV<PANDA_DEPTRACKER_FILE> = "$dir/deptracker-build-$*PID";
%*ENV<PANDA_PROTRACKER_FILE> = "$dir/protracker-build-$*PID";
try unlink %*ENV<PANDA_DEPTRACKER_FILE> if %*ENV<PANDA_DEPTRACKER_FILE>.IO.e;
try unlink %*ENV<PANDA_PROTRACKER_FILE> if %*ENV<PANDA_PROTRACKER_FILE>.IO.e;
$panda.announce('building', $bone);
unless $_ = $panda.builder.build($dir) {
die X::Panda.new($bone.name, 'build', $_)
}
if "$dir/blib/lib".IO ~~ :d {
find(dir => "$dir/blib/lib", type => 'file').list.grep( -> $lib is copy {
next unless $lib.basename ~~ / \.pm 6? $/;
$lib = file_to_symbol($lib);
try shell "$*EXECUTABLE -Iblib/lib -M$lib -e1 " ~ ($*DISTRO.is-win ?? ' >NIL 2>&1' !! ' >/dev/null 2>&1');
} )
}
if %*ENV<PANDA_DEPTRACKER_FILE>.IO.e {
my $test = EVAL %*ENV<PANDA_DEPTRACKER_FILE>.IO.slurp;
for $test.list -> $m {
$bone.metainfo<build-depends>.push: $m<module_name> unless $m<file> ~~ /^"$dir" [ [\/|\\] blib ]? [\/|\\] lib [\/|\\]/ # XXX :auth/:ver/:from/...
}
%*ENV<PANDA_DEPTRACKER_FILE>.IO.spurt: ''
}
if %*ENV<PANDA_PROTRACKER_FILE>.IO.e {
my $test = EVAL %*ENV<PANDA_PROTRACKER_FILE>.IO.slurp;
for $test.list -> $m {
for ($m<symbols> (-) $bone.metainfo<build-depends>).list.grep(/^<-[&]>*$/) {
if $m<file> && $m<file>.match(/^"$dir" [ [\/|\\] blib [\/|\\] ]? <?before 'lib' [\/|\\] > $<relname>=.+/) -> $match {
$bone.metainfo<build-provides>{$_ || file_to_symbol(~$match<relname>)} = ~$match<relname>
}
}
}
%*ENV<PANDA_PROTRACKER_FILE>.IO.spurt: ''
}
unless $notests {
$panda.announce('testing', $bone);
unless $_ = $panda.tester.test($dir) {
die X::Panda.new($bone.name, 'test', $_)
}
if %*ENV<PANDA_DEPTRACKER_FILE>.IO.e {
my $test = EVAL %*ENV<PANDA_DEPTRACKER_FILE>.IO.slurp;
for $test.list -> $m {
$bone.metainfo<test-depends>.push: $m<module_name> unless $m<file> ~~ /^"$dir" [ [\/|\\] blib ]? [\/|\\] lib [\/|\\]/ # XXX :auth/:ver/:from/...
}
$bone.metainfo<test-depends> = [$bone.metainfo<test-depends>.list.unique];
}
if %*ENV<PANDA_PROTRACKER_FILE>.IO.e {
my $test = EVAL %*ENV<PANDA_PROTRACKER_FILE>.IO.slurp;
for $test.list -> $m {
for ($m<symbols> (-) $bone.metainfo<build-depends>).list.grep(/^<-[&]>*$/) {
if $m<file> && $m<file>.match(/^"$dir" [ [\/|\\] blib [\/|\\] ]? <?before 'lib' [\/|\\] > $<relname>=.+/) -> $match {
$bone.metainfo<test-provides>{$_ || file_to_symbol(~$match<relname>)} = ~$match<relname>
}
}
}
}
}
unless $bone.name eq 'Panda' {
$bone.metainfo<build-depends> = [($bone.metainfo<build-depends> (-) 'Panda::DepTracker').list.flat];
$bone.metainfo<test-depends> = [($bone.metainfo<test-depends> (-) 'Panda::DepTracker').list.flat];
}
$bone.metainfo<depends> = [($bone.metainfo<test-depends> (&) $bone.metainfo<build-depends>).list.flat];
$bone.metainfo<test-depends> = [($bone.metainfo<test-depends> (-) $bone.metainfo<build-depends>).list.flat];
for $bone.metainfo<test-provides>.kv, $bone.metainfo<build-provides>.kv -> $k, $v {
$bone.metainfo<provides>{$k} = $v
}
$bone.metainfo<version> = $ver || prompt "Please enter version number (example: v0.1.0): ";
$panda.announce('Creating META.info.proposed');
'META.info.proposed'.IO.spurt: to-json({
perl => 'v6',
name => $bone.name,
description => $bone.metainfo<description>,
version => $bone.metainfo<version>,
build-depends => $bone.metainfo<build-depends>,
test-depends => $bone.metainfo<test-depends>,
depends => $bone.metainfo<depends>,
provides => $bone.metainfo<provides>,
support => {
source => ~$bone.metainfo<source-url>,
}
}) ~ "\n";
CATCH {
try unlink %*ENV<PANDA_DEPTRACKER_FILE> if %*ENV<PANDA_DEPTRACKER_FILE>.IO.e;
try unlink %*ENV<PANDA_PROTRACKER_FILE> if %*ENV<PANDA_PROTRACKER_FILE>.IO.e;
}
}
try unlink %*ENV<PANDA_DEPTRACKER_FILE> if %*ENV<PANDA_DEPTRACKER_FILE>.IO.e;
try unlink %*ENV<PANDA_PROTRACKER_FILE> if %*ENV<PANDA_PROTRACKER_FILE>.IO.e;
return True;
}
sub file_to_symbol($file) {
my @names = $file.IO.relative.subst(/ \.pm 6? $/, '').split(/<[\\\/]>/);
shift @names if @names && @names[0] eq 'blib';
shift @names if @names && @names[0] eq 'lib';
@names.join('::');
}
# vim: ft=perl6
| cygx/panda | lib/Panda/Bundler.pm | Perl | mit | 6,717 |
package Snowcat::Schema::Result::Entity;
use base qw/DBIx::Class::Core/;
__PACKAGE__->table('Entity');
__PACKAGE__->add_columns( qw/
id
name
status
/ );
__PACKAGE__->set_primary_key( 'id' );
__PACKAGE__->has_many(
val => 'Snowcat::Schema::Result::Value',
{ 'foreign.entity_id' => 'self.id' }
);
1;
=for Table Schema
desc Entity;
+--------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------+------------------+------+-----+---------+----------------+
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| name | varchar(255) | NO | UNI | NULL | |
| status | tinyint(4) | NO | MUL | 1 | |
+--------+------------------+------+-----+---------+----------------+
=cut
| alexcrc/snowcat | lib/Snowcat/Schema/Result/Entity.pm | Perl | mit | 870 |
#
# $Header: svn://svn/SWM/trunk/web/admin/ClearanceRemove.pm 8251 2013-04-08 09:00:53Z rlee $
#
package ClearanceRemove;
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(clearance_remove);
@EXPORT_OK = qw(clearance_remove);
use lib "../..","..",".";
#use lib "/u/regonew_live","/u/regonew_live/web","/u/regonew_live/web/admin";
use DBI;
use CGI qw(param unescape escape);
use Defs;
use Utils;
use strict;
use AdminCommon;
use AssocAdmin;
use LoginAdmin;
use ClubAdmin;
use FormHelpers;
sub clearance_remove {
my ($db, $target) = @_;
# Variables coming in
my $body = '';
my $action = param('action') || '';
my $cID= param('cID') || 0;
my $mID= param('mID') || 0;
my $clubID= param('clubID') || 0;
my $error='';
if (! $cID and ! $mID and ! $clubID) {
$body = clrForm($target);
}
elsif ($cID and $action eq 'UTILS_clearance_preview') {
$body = clrPreview($db, $cID, $target);
}
elsif ($mID and $clubID and $action eq 'UTILS_clearance_previewCC') {
$body = clrOutPreview($db, $mID, $clubID, $target);
}
elsif ($cID and $action eq 'UTILS_clearance_remove') {
clrRemove($db, $cID);
$body = qq[Clearance Removed ];
}
elsif ($mID and $clubID and $action eq 'UTILS_clearance_removeCC') {
clrOutRemove($db, $mID, $clubID);
$body = qq[Cleared Out Removed];
}
else {
$body = clrForm($target);
}
return $body;
}
sub clrForm {
my ($target) = @_;
my $body = qq[
<table style="margin-left:auto;margin-right:auto;">
<tr><td class="formbg"> <form action="$target" method="post">
<b>Remove a Clearance</b><br>
<b>PLEASE ENTER ID:</b> <input type="text" name="cID" value="">
<input type="hidden" name="action" value="UTILS_clearance_preview">
<input type="submit" value="F I N D">
</form><br>
<b>OR</b><br><br>
<b>Removed a Cleared out Status</b><br>
<form action="$target" method="post">
<b>PLEASE ENTER MEMBER ID: </b><input type="text" name="mID" value="">
<b>PLEASE ENTER CLUB ID: </b><input type="text" name="clubID" value="">
<input type="hidden" name="action" value="UTILS_clearance_previewCC">
<input type="submit" value="F I N D">
</form>
</td></tr></table>
];
return $body;
}
sub clrOutPreview {
my ($db, $mID, $clubID, $target)=@_;
my $st = qq[
SELECT
MCC.intMemberID,
strSurname,
strFirstname,
C.strName as ClubName,
A.strName as AssocName
FROM
tblMember_ClubsClearedOut as MCC
INNER JOIN tblClub as C ON (C.intClubID=MCC.intClubID)
INNER JOIN tblAssoc as A ON (A.intAssocID=MCC.intAssocID)
INNER JOIN tblMember as M ON (M.intMemberID=MCC.intMemberID)
WHERE
MCC.intMemberID=?
AND MCC.intClubID=?
LIMIT 1
];
my $q = $db->prepare($st);
$q->execute($mID, $clubID);
my $cref = $q->fetchrow_hashref();
my $body = qq[
<form action="$target" method="post">
<table style="margin-left:auto;margin-right:auto;">
<tr>
<td>Firstname</td>
<td>$cref->{strFirstname}</td>
</tr>
<tr>
<td>Surname</td>
<td>$cref->{strSurname}</td>
</tr>
<tr>
<td>Club</td>
<td>$cref->{ClubName}</td>
</tr>
<tr>
<td>Assoc</td>
<td>$cref->{AssocName}</td>
</tr>
];
if ($cref->{'intMemberID'}) {
$body .= qq[<tr><td colspan=2>
<input type="hidden" name="clubID" value="$clubID">
<input type="hidden" name="mID" value="$mID">
<input type="hidden" name="action" value="UTILS_clearance_removeCC">
<input type="submit" value="D E L E T E">
</td></tr>];
}
$body .= qq[
</table> </form>
];
return $body;
}
sub clrPreview {
my ($db, $cID, $target)=@_;
my $st = qq[
SELECT
strSurname,
strFirstname,
C1.strName as FROMClubName,
C2.strName as TOClubName
FROM
tblClearance as C
INNER JOIN tblClub as C1 ON (C1.intClubID=C.intSourceClubID)
INNER JOIN tblClub as C2 ON (C2.intClubID=C.intDestinationClubID)
INNER JOIN tblMember as M ON (M.intMemberID=C.intMemberID)
WHERE
intClearanceID = ?
LIMIT 1
];
my $q = $db->prepare($st);
$q->execute($cID);
my $cref = $q->fetchrow_hashref();
my $body = qq[
<form action="$target" method="post">
<table style="margin-left:auto;margin-right:auto;">
<tr>
<td>Clearance ID</td>
<td>$cID</td>
</tr>
<tr>
<td>Firstname</td>
<td>$cref->{strFirstname}</td>
</tr>
<tr>
<td>Surname</td>
<td>$cref->{strSurname}</td>
</tr>
<tr>
<td>FROM Club</td>
<td>$cref->{FROMClubName}</td>
</tr>
<tr>
<td>TO Club</td>
<td>$cref->{TOClubName}</td>
</tr>
<tr><td colspan=2>
<input type="hidden" name="cID" value="$cID">
<input type="hidden" name="action" value="UTILS_clearance_remove">
<input type="submit" value="D E L E T E">
</td></tr></table></form>
];
return $body;
}
sub clrOutRemove {
my ($db, $mID, $clubID) = @_;
my $st = qq[
DELETE FROM tblMember_ClubsClearedOut WHERE intMemberID= ? AND intClubID=? LIMIT 1
];
my $q_del= $db->prepare($st);
$q_del->execute($mID, $clubID);
}
sub clrRemove {
my ($db, $cID) = @_;
my $st = qq[
DELETE FROM tblClearance WHERE intClearanceID = ? LIMIT 1
];
my $q_del= $db->prepare($st);
$q_del->execute($cID);
$st = qq[
DELETE FROM tblClearancePath WHERE intClearanceID = ?
];
$q_del= $db->prepare($st);
$q_del->execute($cID);
$st = qq[
DELETE FROM tblMember_ClubsClearedOut WHERE intClearanceID = ? LIMIT 1
];
$q_del= $db->prepare($st);
$q_del->execute($cID);
}
1;
| facascante/slimerp | fifs/web/admin/ClearanceRemove.pm | Perl | mit | 5,370 |
#------------------------------------------------------------------------
# Copyright 2008-2009 (c) Jeff Brown <spadix@users.sourceforge.net>
#
# This file is part of the ZBar Bar Code Reader.
#
# The ZBar Bar Code Reader is free software; you can redistribute it
# and/or modify it under the terms of the GNU Lesser Public License as
# published by the Free Software Foundation; either version 2.1 of
# the License, or (at your option) any later version.
#
# The ZBar Bar Code Reader is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty
# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser Public License for more details.
#
# You should have received a copy of the GNU Lesser Public License
# along with the ZBar Bar Code Reader; if not, write to the Free
# Software Foundation, Inc., 51 Franklin St, Fifth Floor,
# Boston, MA 02110-1301 USA
#
# http://sourceforge.net/projects/zbar
#------------------------------------------------------------------------
=pod
=head1 NAME
Barcode::ZBar::Processor - self-contained bar code reader
=head1 SYNOPSIS
setup:
use Barcode::ZBar;
my $reader = Barcode::ZBar::Processor->new();
$reader->init("/dev/video1", 1);
$reader->parse_config('code39.disable');
$reader->set_data_handler(\&my_handler);
scan an image:
$reader->process_image($image);
scan from video:
$reader->set_visible();
$reader->set_active();
$reader->user_wait();
=head1 DESCRIPTION
A Barcode::ZBar::Processor may be used to quickly create stand-alone
bar code scanning applications. It has interfaces to scan images or
video and to optionally display a video/image preview to a window.
This interface is not well suited for integration with an existing
GUI, as the library manages the optional preview window and any user
interaction. Use a Barcode::ZBar::ImageScanner or Investigate the
avilable widget interfaces for GUI applications.
=head1 REFERENCE
=head2 Methods
=over 4
=item new()
Create a new bar code reader instance.
=item init([I<video_device>], [I<enable_display>])
Open a video input device and/or prepare to display output.
=item set_data_handler([I<handler>], [I<closure>])
Setup a callback to process results whenever new results are available
from the video stream or a static image. The specified callable will
be invoked with the associated Barcode::ZBar::Processor object and
I<closure> as arguments. Closure may be achieved either using
standard Perl closure or by manually passing a scalar via I<closure>.
=item is_visible()
=item set_visible([I<visible>])
Test/set visibility of the output window.
=item set_active([I<active>])
Enable/disable video streaming and scanning for bar codes.
=item user_wait([I<timeout>])
Wait for the user to press a key/button or close the window. Bar
codes will continue to be processed if video is active.
=item process_one([I<timeout>])
Enable video and scan until at least one barcode is found. Note that
multiple results may still be returned.
=item process_image([I<image>])
Scan a Barcode::ZBar::Image for bar codes.
=item parse_config(I<configstr>)
Apply a decoder configuration setting. See the documentation for
C<zbarcam>/C<zbarimg> for available configuration options.
=item request_size(I<width>, I<height>)
Request a preferred size for the video image from the device. The
request may be adjusted or completely ignored by the driver. Must be
called before C<init()>
=back
=head1 SEE ALSO
Barcode::ZBar, Barcode::ZBar::Image, Barcode::ZBar::ImageScanner
zbarimg(1), zbarcam(1)
http://zbar.sf.net
=head1 AUTHOR
Jeff Brown, E<lt>spadix@users.sourceforge.netE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright 2008-2009 (c) Jeff Brown E<lt>spadix@users.sourceforge.netE<gt>
The ZBar Bar Code Reader is free software; you can redistribute it
and/or modify it under the terms of the GNU Lesser Public License as
published by the Free Software Foundation; either version 2.1 of
the License, or (at your option) any later version.
=cut
| krunalsoni01/yocto-zbar | zbar-0.8/perl/ZBar/Processor.pod | Perl | mit | 4,098 |
#!/usr/local/bin/perl
#-------------------------------------
# Charge State Determination
# (C)1999 Harvard University
#
# W. S. Lane/D. P. Jetchev/R. E. Perez
#
# v3.1a
#
# licensed to Finnigan
#-------------------------------------
#
# This application determines the true chagre state of dta files (or multiple states if the result is ambiguous) and rewrites or deletes the dtas accordingly.
# This file contains only the code for the i/o of the application. Tests for determining charge state are coded in
# ChargeState_include.pl, and the various test results are combined by a C++ implementation of a neural net.
#
################################################
# Created: 06/12/01 by Dimitar Jetchev
# Last Modified: 08/22/01 by Edward Perez
$showIntermediateScores = 1;
$CSD_delete_count = 0;
@TABLE_LINES = ();
################################################
# find and read in standard include file
{
$0 =~ m!(.*)[\\\/]([^\\\/]*)$!;
do ("$1/development.pl");
my $path = $0;
$path =~ s!\\!/!g;
$path =~ s!^(.*)/[^/]+/.*$!$1/etc!;
unshift (@INC, "$path");
require "microchem_include.pl";
require "microchem_form_defaults.pl";
require "goodbadugly_include.pl";
require "chargestate_include.pl";
require "status_include.pl";
}
# default values for adjusting the algorithm
$default_num_ions = 200;
$default_top_above_ions = 5;
$default_tolerance = '3.0';
$default_window = '1.0';
&cgi_receive();
&MS_pages_header( "ZSA© Charge State Algorithm","#8800FF","tabvalues=<HR>" );
$dir = $FORM{"directory"};
$dtas = $FORM{"dtas"};
$num_ions = ( $FORM{"num_ions"} || $default_num_ions );
$top_above_ions = ( $FORM{"top_above_ions"} || $default_top_above_ions );
$tolerance = ( $FORM{"tolerance"} || $default_tolerance );
$window = ( $FORM{"window"} || $default_window );
$operator = $FORM{"operator"};
$copyouts = $FORM{"CopyOuts"};
$number_of_ions = ( $FORM{"num_ions"} || $default_num_ions );
$cloneddir = $FORM{"ClonedDir"};
$dirtag = ( $FORM{"DirTag"} );
$clonefirst = $FORM{"clonefirst"};
$Min_MHplus = $FORM{"Min_MHplus"} || $DEFS_DETERMINECHARGE{'Minimum MH+'};
$Max_MHplus = $FORM{"Max_MHplus"} || $DEFS_DETERMINECHARGE{'Maximum MH+'};
$TrustOnePlus = $FORM{"TrustOnePlus"};
# output form;
if (! defined $dir) {
&output_form;
}
# clone the directory;
elsif ( $clonefirst eq "yes") {
if(&clone_dir){
$cloneddir = $dir;
&watch_over_me();
&main;
}
}
# run the test engine on the new directory
else {
$cloneddir = $dir;
&watch_over_me();
&main;
}
sub main{
require "javascript_include.pl";
require "html_include.pl";
$cwd = "$seqdir/$cloneddir";
chdir $cwd or &error("Couldn't open the required directory \n");
opendir(CURRDIR, ".") or &error("Couldn't open the required directory \n");
@all_files = readdir CURRDIR;
closedir(CURRDIR);
@dtas = grep /dta$/, @all_files;
@outs = grep /out$/, @all_files;
$dtas_before = scalar @dtas;
# hashes for prefix of filename, charge state, and root
%prefix = ();
%charge = ();
%root = ();
%representatives = ();
foreach $dta (@dtas) {
open (DTAFILE, "< $seqdir/$cloneddir/$dta");
($mhplus, $z) = split / /, <DTAFILE>;
close (DTAFILE);
$dta =~ m/^(.*)\..\.dta$/;
$prefix{$dta} = $1;
$charge{$dta} = $z;
($root{$dta}) = ($dta =~ /(.*)\.\d\.dta/);
$precursor{$root{$dta}} = (($mhplus - $Mono_mass{'Hydrogen'}) / $z) + $Mono_mass{'Hydrogen'};
if( not exists $representatives{$root{$dta}}){
$representatives{$root{$dta}} = $dta;
$second_dta{$root{$dta}} = 0;
}else{
$second_dta{$root{$dta}} = $dta;
}
}
print ("<TABLE width=100%><TR><TD><span class='smallheading'>Running tests...</span><TD align=right>");
scriptClock("clocklabel", "Execution Time: ");
print ("</TD></TR></TABLE><BR>");
loadJavaScriptClock("MicrosoftClock", "NetscapeClock", 0, 1);
&make_input_table(@dtas);
#classify the dtas
print "<span class='smallheading'>Determining charge from test results...<br><br>";
`$classify`;
#pull the results out of the file
open RES, "$ChargeStateResults";
while (<RES>) {
($dta, $s1, $s2, $s3) = split / /;
$score1{$dta} = &precision($s1,2);
$score2{$dta} = &precision($s2,2);
$score3{$dta} = &precision($s3,2);
}
close RES;
my($root);
foreach $root (keys %representatives) {
$dta = $representatives{$root};
@newZ = &determine_charge_state($dta);
&set_charge($representatives{$root},$second_dta{$root},@newZ);
# keep track of delete count
$CSD_delete_count++ if($newZ[0]==0 and $newZ[1]==0);
# print results to screen and to file
&save_table_entry($root,@newZ);
}
&print_table("$seqdir/$cloneddir/$csd_html_output");
# delete files that are no longer needed
unlink "$ChargeStateResults";
unlink "$ChargeStateDataFile";
chdir $cwd or &error("Couldn't open the required directory \n");
opendir(CURRDIR, ".") or &error("Couldn't open the required directory \n");
@all_files = readdir CURRDIR;
closedir(CURRDIR);
@dtas = grep /dta$/, @all_files;
$dtas_after = scalar @dtas;
&write_csd_info_to_log();
}
sub write_csd_info_to_log{
my($entry) = "ZSA " . localtime();
$entry .= " by " . $operator if($operator);
$entry .= " $CSD_delete_count DTA-sets deleted. $dtas_before dtas corrected to $dtas_after";
&write_log($cloneddir, $entry);
}
#############################################################################################
#
#
# Code for finding charge state
#
#
#############################################################################################
# This is the subroutine that decides what charge state should be
# return value is the "true" charge state(s).
# This function always return two charge states, but in cases where only one is needed, the second return value is 0.
sub determine_charge_state{
my($dta) = $_[0];
# In some cases we just leave 1+ spectra alone
$zta = $dta;
$zta =~ s/.dta$/.zta/;
if($TrustOnePlus and (not -e $zta) and $charge{$dta} == 1 and not $second_dta{$root{$dta}}){
return((1, 0));
}
my($max,$winner,$runnerup);
my(@rv) = ();
my(@scores) = (0, $score1{$dta}, $score2{$dta}, $score3{$dta});
my(@runnerup);
#find the max of 3, fun, fun, fun
if($score1{$dta} >= $score2{$dta} and $score1{$dta} >= $score3{$dta}){
$max = $score1{$dta};
$winner = 1;
}elsif($score2{$dta} >= $score1{$dta} and $score2{$dta} >= $score3{$dta}){
$max = $score2{$dta};
$winner = 2;
}elsif($score3{$dta} >= $score2{$dta} and $score3{$dta} >= $score1{$dta}){
$max = $score3{$dta};
$winner = 3;
}else{
&error("Couldn't interpret scores");
}
push @rv, $winner;
# if the top score was weak, we assign a charge state pair.
# That means that this function returns best and 2nd best charge states
if($max < 0.75){
foreach $i ((1, 2, 3)){
next if( $i == $winner);
push @runnerup, $i;
}
push @rv, ($scores[$runnerup[0]] > $scores[$runnerup[1]]) ? $runnerup[0] : $runnerup[1] ;
}else{
push @rv, 0;
}
# now we need to make sure that the mh+ for the new z is in range. If not don't bother with assigning the new charge state
my($mh1,$mh2) = (($precursor{$root{$dta}} - $Mono_mass{'Hydrogen'}) * $rv[0] + $Mono_mass{'Hydrogen'} , ($precursor{$root{$dta}} - $Mono_mass{'Hydrogen'}) * $rv[1] + $Mono_mass{'Hydrogen'} );
if( $mh1 < $Min_MHplus or $mh1 > $Max_MHplus){
$rv[0] = 0;
}
if( $mh2 < $Min_MHplus or $mh2 > $Max_MHplus){
$rv[1] = 0;
}
if( $rv[0] == 0){
$rv[0] = $rv[1];
$rv[1] = 0;
}
return(@rv);
}
###########################################################################################
#
#
# HTML stuff
#
#
###########################################################################################
sub print_table_header{
my($fname) = pop @_;
# This seemingly needles repetition of code is actually necessary to make this function compliant with the nanny (the code in status_include.pl)
if($fname){
print FOUT "<div><span class='smallheading'>Corrections for directory $cloneddir: </span> <br><br>";
print FOUT "<table cellspacing=0 cellpadding=0>";
print FOUT "<tr><td align=left><span class='smallheading'>Scan:</span></td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>Old z:</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>New z:</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>1+</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>2+</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>3+</td>";
print FOUT "<td> </td>";
if($showIntermediateScores){
print FOUT "<td align=left><span class='smallheading'>Water</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>XCorr</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>B-Y</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'> > prec</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>%TIC > 2*prec</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>%TIC > prec</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>2*prec</td>";
print FOUT "<td> </td>";
print FOUT "<td align=left><span class='smallheading'>3+ ions</td>";
}
print FOUT "<tr>";
}else{
print "<div><span class='smallheading'>Corrections for directory $cloneddir: </span> <br><br>";
print "<table cellspacing=0 cellpadding=0>";
print "<tr><td align=left><span class='smallheading'>Scan:</span></td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>Old z:</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>New z:</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>1+</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>2+</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>3+</td>";
print "<td> </td>";
if($showIntermediateScores){
print "<td align=left><span class='smallheading'>Water</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>XCorr</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>B-Y</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'> > prec</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>%TIC > 2*prec</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>%TIC > prec</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>2*prec</td>";
print "<td> </td>";
print "<td align=left><span class='smallheading'>3+ ions</td>";
}
print "<tr>";
}
}
sub save_table_entry{
my($root,$newZ1,$newZ2,$fname) = @_;
my($newName,$ChangedOrNot,$oldZ1,$oldZ2,$dta,$zstring,$oldzstring,$dta2);
$dta = $representatives{$root};
# get scan number
$dta =~ /$dtaScanRE/;
$scan = $1;
# sort out the new charge state(s) and appropriate link(s)
$newName1 = "$root{$dta}.$newZ1.dta";
$link1 = "$displayions?dtafile=$seqdir/$cloneddir/$newName1";
$zstring = "<a href=$link1 target='_blank'>$newZ1\+</a>";
if($newZ2){
$newName2 = "$root{$dta}.$newZ2.dta";
$link2 = "$displayions?dtafile=$seqdir/$cloneddir/$newName2";
$zstring = $zstring . "/<a href=$link2 target='_blank'>$newZ2\+</a>";
}else{
$newZ2 = 0;
}
# but watch out for the case where we just plain delete it
if( (not $newZ1) and (not $newZ2)){
$zstring = "---";
}
# do the same for the old
# sort out the new charge state(s) and appropriate link(s)
$oldName1 = "$dta";
$oldZ1 = &dta_to_z($dta);
if($clonefirst){
$oldlink1 = "$displayions?dtafile=$seqdir/$originaldir/$oldName1";
$oldzstring = "<a href=$oldlink1 target='_blank'>$oldZ1\+</a>";
}else{
$oldzstring = "$oldZ1\+";
}
$dta2 = $second_dta{$root};
my($oldName2) = $dta2;
if($dta2){
$oldZ2 = &dta_to_z($dta2);
$newName2 = "$root{$dta}.$newZ2.dta";
if($clonefirst){
$oldlink2 = "$displayions?dtafile=$seqdir/$originaldir/$oldName2";
$oldzstring = $oldzstring . "/<a href=$oldlink2 target='_blank'>$oldZ2\+</a>";
}else{
$oldzstring = $oldzstring . "/$oldZ2\+";
}
}else{
$oldZ2 = 0;
}
# see if any change was made
my(@oldlst,@newlst);
my(@oldlst) = sort ($oldZ1, $oldZ2);
my(@newlst) = sort ($newZ1, $newZ2);
$zstring = "" if($oldlst[0] == $newlst[0] and $oldlst[1] == $newlst[1]);
my ($dtaAgain, $ionsAbove, $WaterLoss1, $WaterLoss2, $WaterLoss3, $corrScore, $BYtest, $TwicePrec, $TICabove,
$two_times_prec_in_range, $evidence) = &get_line_from_input_table($dta);
$WaterLoss3 = &precision($WaterLoss3, 3);
$corrScore = &precision($corrScore, 2);
$THIS_LINE = "";
$THIS_LINE .= "<tr><td align=left><span class='smalltext'>$scan</span></td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$oldzstring</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$zstring</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$score1{$dta}</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$score2{$dta}</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$score3{$dta}</td>";
$THIS_LINE .= "<td> </td>";
if($showIntermediateScores){
$THIS_LINE .= "<td align=center><span class='smalltext'>$WaterLoss3</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$corrScore</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$BYtest</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$ionsAbove</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$TwicePrec</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$TICabove</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$two_times_prec_in_range</td>";
$THIS_LINE .= "<td> </td>";
$THIS_LINE .= "<td align=center><span class='smalltext'>$evidence</td>";
}
$THIS_LINE .= "<tr>";
push @TABLE_LINES, $THIS_LINE;
$Scan_Numbers{"$THIS_LINE"} = $scan;
}
sub print_table{
my($fname) = pop @_;
open FOUT, ">$fname";
&print_table_header();
&print_table_header("$fname");
#sorted order by scan number
foreach (sort {$Scan_Numbers{"$a"} <=> $Scan_Numbers{"$b"}} @TABLE_LINES){
#print to screen
print "$_";
#print to file
print FOUT "$_";
}
print "</table></body></html>";
print FOUT "</table></body></html>";
close FOUT;
}
sub output_form {
$checked{$DEFS_DETERMINECHARGE{"Dta files to copy"}} = " CHECKED";
$checked{"copyout"} = " CHECKED" if ($DEFS_DETERMINECHARGE{"Copy Out files?"} eq "yes");
$checked{"cloneorig"} = " CHECKED" if ($DEFS_DETERMINECHARGE{"Clone Original Directory"} eq "yes");
print "<FORM ACTION=\"$ourname\" METHOD=GET NAME=\"form\">";
&get_alldirs();
print <<EOP;
<TABLE cellspacing=8>
<tr>
<td>
<span class="smallheading">Select a directory to test DTA files: </span>
</td>
<TR>
<TD><span class=dropbox><select name="directory">
EOP
foreach $dir (@ordered_names){
print qq(<option value="$dir">$fancyname{$dir}\n);
}
print <<EOF;
</tr>
<tr>
<td>
<span class="smallheading">Operator:</span> <INPUT NAME="operator" SIZE=3 MAXLENGTH=3> </span>
<input class=button type=submit value="Run Engine">
<A HREF="$webhelpdir/help_$ourshortname.html"><span class="smallheading">Help</span></A>
</td>
</TR>
</TABLE>
<table><tr><td> </td>
<td>
<table width="20%" border=0 cellspacing=0 cellpadding=0>
<tr><td bgcolor="#c0c0c0"> </td>
<td bgcolor="#e2e2e2"> </td>
<td>
<table border=0 cellspacing=0 cellpadding=0 bgcolor="#e2e2e2">
<tr>
<td colspan=2 bgcolor="#e2e2e2" valign=center align=left>
<span class="smallheading">Advanced Options:</span>
</td>
</tr>
<tr>
<td colspan=2><hr></td>
</tr>
<TR>
<TD align=left><span class="smallheading">Number of ions : </span></TD>
<TD width="100%"><input name="num_ions" size=4 value="$default_num_ions"></TD>
</TR>
<TR>
<TD align=left><span class="smallheading">Tolerance: </span></TD>
<TD><input name="tolerance" size=4 value="$tolerance"></TD>
</TR>
<TR>
<TD NOWRAP align=left><span class="smallheading">Ions above prec: </span></TD>
<TD><input name="top_above_ions" size=4 value="$default_top_above_ions"></TD>
</TR>
<TR>
<TD align=left><span class="smallheading">Ion Window: </span></TD>
<TD><input name="window" size=4 value="$window"></TD>
</TR>
<TR>
<TD align=left><span class="smallheading">Min MH+: </span></TD>
<TD><input name="Min_MHplus" size=4 value="$DEFS_DETERMINECHARGE{'Minimum MH+'}"></TD>
</TR>
<TR>
<TD align=left><span class="smallheading">Max MH+: </span></TD>
<TD><input name="Max_MHplus" size=4 value="$DEFS_DETERMINECHARGE{'Maximum MH+'}"> </TD>
</TR>
<TR>
<TD colspan=2>
<TABLE border=0 cellspacing=0 cellpadding=0 bgcolor="#e2e2e2">
<TR>
<TD align=left height=24><span class="smallheading">Leave 1+ dtas if no zooms? </span></TD>
<TD><input type=checkbox name="TrustOnePlus" value="yes" checked></TD>
</TR>
<TR>
<TD align=left height=24><span class="smallheading">Clone original directory? </span></TD>
<TD><input type=checkbox name="clonefirst" value="yes"$checked{'cloneorig'}></TD>
</TR>
<TR>
<TD align=left height=24><span class="smallheading">Copy outfiles? </span></TD>
<TD><INPUT TYPE=checkbox NAME="CopyOuts" VALUE="yes"$checked{'copyout'}><TD>
</TR>
</TABLE>
</TD>
</TR>
<TR>
<TD align=left><span class="smallheading">NewDirTag: </span>
<span class="normaltext"></span></TD>
<TD><span style="font-size:4pt"> </span>_<input type=text size=8 name="DirTag" value="precsd"> </TD>
<TD>
</TR>
</table>
</td>
</table>
</td>
</table>
</FORM>
EOF
}
############################################################################################
#
#
# Code for resetting charge state of a dta file
#
#
############################################################################################
# set_charge
# this is a modification of the set_charge function in dta_control.pl. It allows us to set to a pair of charge states.
sub set_charge {
# DTA file(s) and new charge state(s)
my ($dta1, $dta2, $newZ1, $newZ2) = @_;
my ($mhplus, $charge, $highion, $precursor, $z ,$newdta, $dtabase,$root,$dta,$dtabase,$newZ,$newmhplus,$zz,$origZ,$original,$line,@lines,$oldZ1,$oldZ2);
$oldZ1 = &dta_to_z($dta1);
$oldZ2 = &dta_to_z($dta2);
# in the case where there was no change, just return
my(@oldlst,@newlst);
my(@oldlst) = sort ($oldZ1, $oldZ2);
my(@newlst) = sort ($newZ1, $newZ2);
return if($oldlst[0] == $newlst[0] and $oldlst[1] == $newlst[1]);
# put in 3 categories, chg states that need to be created, those that need to be kept, and those that need to be deleted
my(@tokeep,@todelete,@tocreate);
foreach $zz (@oldlst) {
next unless $zz;
if($zz != $newZ1 and $zz != $newZ2){
push @todelete, $zz;
}else{
push @tokeep, $zz;
}
}
foreach $zz (@newlst) {
next unless $zz;
if($zz != $oldZ1 and $zz != $oldZ2){
push @tocreate, $zz;
}
}
#get the info pertaining to the dta
($fileroot) = ($dta1 =~ /^(.+)\.[x\d]\.dta$/);
$dtabase = $dta1; $dtabase=~s/\.\d\.dta$//;
my(@lines) = ();
open (DTAFILE, "< $seqdir/$cloneddir/$dta1");
($mhplus, $z) = split / /, <DTAFILE>;
while(<DTAFILE>){
push @lines, $_;
}
close DTAFILE;
$precursor = ( ($mhplus - $Mono_mass{'Hydrogen'}) / $z) + $Mono_mass{'Hydrogen'};
# create new dtas
foreach $newZ (@tocreate) {
# get new mh+
$newmhplus = ($precursor - $Mono_mass{'Hydrogen'}) * $newZ + $Mono_mass{'Hydrogen'};
$newmhplus = &precision ($newmhplus, 2);
# don't do it if mh+ is out of range
#next if( $newmhplus < $Min_MHplus or $newmhplus > $Max_MHplus);
#write it
open(DTA, ">$seqdir/$cloneddir/$dtabase.$newZ.dta");
print DTA "$newmhplus $newZ\n";
foreach $line (@lines) {
$line =~ s/^\s+// ; # This line of code is neccesary though I know not why. This remains one of life's larger mysteries.
print DTA "$line";
}
close DTA;
}
# now delete any old ones if necessary
foreach $badZ (@todelete) {
&delete_files("$seqdir/$cloneddir/$dtabase.$badZ.dta");
}
# take care of necessary changes in lcq profile
my(@profdata,@relevantlines,@newlines);
my($original,$ln,$found,$finished) = (0, 0, 0, 0);
open(PROF, "$seqdir/$cloneddir/lcq_profile.txt");
while ($ln=<PROF>) {
if (grep(/^$dtabase.*/, $ln)) {
$found = 1;
push @relevantlines, $ln
}else{
if($found and not $finished){
#first take care of created dtas
$original = $relevantlines[0];
foreach (@tocreate) {
substr($original, 0, length("$dtabase.$_.dta")) = "$dtabase.$_.dta";
push @newlines, $original;
}
#now pick out the ones we have to keep
foreach (@tokeep) {
substr($original, 0, length("$dtabase.$_.dta")) = "$dtabase.$_.dta";
push @newlines, $original;
}
push @profdata, @newlines;
$finished = 1;
}
push @profdata, $ln;
}
}
# one more iteration to take care of the final scan number
if($found and not $finished){
#first take care of created dtas
$original = $relevantlines[0];
foreach (@tocreate) {
substr($original, 0, length("$dtabase.$_.dta")) = "$dtabase.$_.dta";
push @newlines, $original;
}
#now pick out the ones we have to keep
foreach (@tokeep) {
substr($original, 0, length("$dtabase.$_.dta")) = "$dtabase.$_.dta";
push @newlines, $original;
}
push @profdata, @newlines;
$finished = 1;
}
close PROF;
open(PROF, "> $seqdir/$cloneddir/lcq_profile.txt");
print PROF @profdata;
close PROF;
#fix gbu file if necessary
my($chg,$line,$file,@gbulines);
if (@todelete and -e "$seqdir/$cloneddir/goodbadugly.txt") {
open(GBU, "$seqdir/$cloneddir/goodbadugly.txt");
foreach $chg (@todelete) {
$file = "$dtabase.$_.dta";
while ($line = <GBU>) {
unless (grep(/^$file/, $ln)) {
push @gbulines, $line;
}
}#while
} #foreach
close GBU;
open GBU, ">$seqdir/$cloneddir/goodbadugly.txt";
print GBU @gbulines;
close GBU;
} #if
}
#############################################################################################
#
#
# Borrowed code for cloning directories
#
#
############################################################################################
sub clone_dir {
my($success) = 0;
# this is a hack to outsmart clonedir. We want to append the tag without replacing an existing tag
$dir =~ /.+_(.*)/;
$oldtag = $1;
$dirtag = $oldtag . "_" . $dirtag;
require "clone_code.pl";
if (!defined $dirtag) {
@arr = ();
$msg = "You must specify a tag name !";
push(@arr, $msg);
my_clone_error(@arr);
}
# clone the directory
($originaldir, @retval) = &clonedir ($dir, $dirtag, $copyouts, $operator);
if ((shift @retval) == 0) { # success
$success = 1;
&my_clone_success (@retval);
} else {
&my_clone_error (@retval);
}
return($success);
}
sub my_clone_success {
@msgs = @_;
print <<EOP;
<p>
<div class="normaltext">
<image src="/images/circle_1.gif"> Directory clone was successful.
<ul>
<li><span class="smallheading">Old Directory: </span><a href="$viewinfo?directory=$directory">$dir</a><br>
<li><span class="smallheading">New Directory: </span><a href="$viewinfo?directory=$originaldir">$originaldir</a><br>
</ul>
</div>
EOP
if (@msgs) {
print ("<p>The following non-fatal errors were reported:<br>\n");
print join ("\n", @msgs);
}
print <<EOP;
<p>
<div class="normaltext">
<image src="/images/circle_2.gif"> Running the engine on directory: <span class="smallheading">$dir:</span><br><br>
EOP
}
sub my_clone_error {
$h2msg = shift @_;
print ("<h2>$h2msg</h2><div>\n");
print (join ("\n", @_), "</div>\n");
&get_alldirs;
&output_form;
exit;
}
# Error subroutine
# prints out a properly formatted error message in case the user did something wrong; also useful for debugging
sub error {
print <<EOF;
<H3>Error:</H3>
<div>
@_
</div>
</body></html>
EOF
exit(0);
}
# dta_to_z
# Given a dta name it uses a regular expression to peel out z
sub dta_to_z{
my($name) = pop @_;
if($name){
$name =~ /.*\.(\d).dta$/;
return($1);
}else{
return(0);
}
}
| wangchulab/CIMAGE | cravatt_web/cgi-bin/flicka/chargestate.pl | Perl | mit | 25,650 |
package IF::Component::_Admin::Model::EntityAttributeViewer;
use strict;
use vars qw(@ISA);
use IF::Component;
use IF::Dictionary;
@ISA = qw(IF::Component::_Admin);
sub attribute {
my $self = shift;
return $self->{attribute} || {};
}
sub setAttribute {
my $self = shift;
$self->{attribute} = shift;
}
sub value {
my $self = shift;
return $self->{value};
}
sub setValue {
my $self = shift;
$self->{value} = shift;
#IF::Log::dump($self->{value});
}
sub filter {
my $self = shift;
return $self->{filter};
}
sub setFilter {
my $self = shift;
$self->{filter} = shift;
}
sub filteredValue {
my $self = shift;
my $value = shift;
return $value unless ($self->parent() &&
$self->filter() &&
$self->parent()->can($self->filter()));
my $filterMethod = $self->filter();
return $self->parent()->$filterMethod($value);
}
# some gearing for the component
sub attributeIsTextArea {
my $self = shift;
return 1 if ($self->attribute()->{TYPE} =~ /^TEXT$/i);
return 1 if ($self->attribute()->{TYPE} =~ /^VARCHAR$/i && $self->attribute()->{SIZE} > 80);
return 1 if ($self->attribute()->{TYPE} =~ /^CHAR$/i && $self->attribute()->{SIZE} > 80);
return 0;
}
sub attributeIsDate {
my $self = shift;
return 1 if ($self->attribute()->{TYPE} =~ /^DATE$/i);
return 0;
}
sub attributeIsDateTime {
my $self = shift;
return 1 if ($self->attribute()->{TYPE} =~ /^DATETIME$/i);
return 1 if ($self->attributeIsUnixTime());
return 0;
}
sub attributeIsNumber {
my $self = shift;
return 1 if ($self->attribute()->{TYPE} =~ /int$/i &&
!$self->attributeIsUnixTime() &&
!$self->attributeIsYesNo);
return 0;
}
sub attributeIsUnixTime {
my $self = shift;
return 1 if ($self->attribute()->{TYPE} =~ /int$/i &&
$self->attribute()->{SIZE} == 11 &&
$self->attribute()->{COLUMN_NAME} =~ /_DATE$/i);
return 0;
}
sub attributeIsAreasOfFocus {
my $self = shift;
return 1 if ($self->attribute()->{COLUMN_NAME} =~ /category/i &&
$self->entityClassName() =~ /^(Job|Internship|VolunteerOpportunity|Org|Materials|Event)$/);
return 1 if ($self->attribute()->{COLUMN_NAME} =~ /^AREAS_OF_FOCUS$/i);
return 0;
}
sub attributeIsYesNo {
my $self = shift;
return 1 if ($self->attribute()->{TYPE} =~ /^tinyint$/i);
return 0;
}
sub attributeIsLanguageDesignation {
my $self = shift;
return ($self->attribute()->{COLUMN_NAME} =~ /^LANGUAGE_DESIGNATION$/i);
}
sub attributeIsLanguage {
my $self = shift;
return ($self->attribute()->{COLUMN_NAME} =~ /^LANGUAGE$/i);
}
sub attributeIsArray {
my $self = shift;
#IF::Log::dump($self->value());
return IF::Array::isArray($self->value());
}
sub attributeArrayAsString {
my $self = shift;
return join(", ", @{$self->value()});
}
sub entityClassName {
my $self = shift;
return $self->{entityClassName};
}
sub setEntityClassName {
my $self = shift;
$self->{entityClassName} = shift;
}
1;
| quile/if-framework | framework/lib/IF/Component/_Admin/Model/EntityAttributeViewer.pm | Perl | mit | 3,135 |
#show hasShape/2 .
#show noHasShape/2 .
hasShape(X,user) :- node(X),
datatype(X,name,string),
cardinality(X,name,plus),
nodeShape(X,knows,user),
cardinality(X,knows,plus) .
noHasShape(X,S) :- node(X), shape(S), not hasShape(X,S) .
not hasShape(X,user):- node(X),
not datatype(X,name,string) .
not hasShape(X,user):- node(X),
not cardinality(X,name,plus) .
not hasShape(X,user):- node(X),
not nodeShape(X,knows,user) .
not hasShape(X,user):- node(X),
not cardinality(X,knows,plus) .
hasShape(X,S) | not hasShape(X,S) :- node(X), shape(S) .
datatype(X,P,string):-
countStringProperty(X,P,CI),
countProperty(X,P,C),
C = CI .
cardinality(X,P,plus):-
countProperty(X,P,C), C >= 1 .
%show nodeShape/3 .
nodeShape(X,P,S):-
countShapeProperty(X,P,S,CI),
countProperty(X,P,C), C = CI .
countProperty(X,P,C):- node(X), property(P),
C = #count { V: arc(X,P,V) } .
countStringProperty(X,P,C):-
node(X),
property(P),
C = #count { 1: stringValue(X,P) } .
stringValue(X,P):-arc(X,P,V), string(V) .
countShapeProperty(X,P,S,C):-
node(X),
property(P),
shape(S),
C = #count { 1: shapeValue(X,P,S) } .
%show shapeValue/3 .
shapeValue(X,P,S):-shape(S),
arc(X,P,V),
hasShape(V,S) .
arc(alice,knows,alice).
arc(alice,knows,dave).
arc(alice,name,"Alice").
arc(bob,knows,carol).
arc(dave,knows,emily).
arc(dave,name,"Dave").
arc(emily,knows,dave).
arc(emily,name,"Emily").
% Domain declarations...
integer(0..100).
string("Alice";"Bob";"Robert";"Carol";"Dave";"Emily") .
node(alice;bob;carol;dave;emily).
property(name;knows).
shape(user).
% test
%:- not hasShape(alice,user).
%:- hasShape(bob,user).
%:- hasShape(carol,user).
%:- not hasShape(dave,user).
%:- not hasShape(emily,user).
| labra/asptests | ACorunnaWorkshop/userKnowsBasic.pl | Perl | mit | 1,907 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Author: Jose Santos <jcas81@gmail.com>
% Date: 2009-02-11
%
% This file contains misc. utilities to deal with files for Input/Output
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
:- module(utils_files,
[
load_term/2,
save_term/2
]
).
% type checker
%:- use_module('../type_checker/type_check').
% YAP modules
:- use_module(library(rbtrees), [list_to_rbtree/2, rb_visit/2]).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% load_term(+Filename, -Term)
%
% Given:
% Filename: a filename having the term to load
%
% Returns:
% Term: the term present in Filename
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load_term(Filename, Term):-
open(Filename, read, File), % File is an handle for Filename which is opened in read-only mode
read(File, Term),
close(File).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% save_term(+Filename, +Term)
%
% Given:
% Filename: a filename to store the term
% Term: the term to save in Filename
%
% Succeeds if it manage to create a filename with the term
%
% Notes:
% If the filename already exists it will be overwritten
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
save_term(Filename, Term):-
open(Filename, write, File), % File is an handle for Filename which is opened in write (no append) mode
format(File, "~k.", [Term]), % the '.' is needed for read/2 to work
close(File).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% rbtree_load(+Filename, -RBTree)
%
% Given:
% Filename: a filename having a red-black tree
%
% Returns:
% RBtree: the red-black tree present in Filename
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rbtree_load(Filename, RBTree):-
load_term(Filename, RBTreeAsList),
list_to_rbtree(RBTreeAsList, RBTree).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% rbtree_save(+Filename, +RBTree)
%
% Given:
% Filename: a filename to store the red-black tree
% RBtree: a red-black tree to save in Filename
%
% Succeeds if it manage to create a filename with the rbtree
%
% Notes:
% If the filename already exists it will be overwritten
% Using a list representation to write the rbtree is more compact
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
rbtree_save(Filename, RBTree):-
rb_visit(RBTree, RBTreeAsList), % converting to list saves a lot of space in the representation
save_term(Filename, RBTreeAsList).
| JoseCSantos/GILPS | source/utils/files.pl | Perl | mit | 3,079 |
#
# Copyright 2021 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package network::redback::snmp::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_snmp);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
%{$self->{modes}} = (
'cpu' => 'network::redback::snmp::mode::cpu',
'disk-usage' => 'network::redback::snmp::mode::disk',
'hardware' => 'network::redback::snmp::mode::hardware',
'interfaces' => 'snmp_standard::mode::interfaces',
'list-interfaces' => 'snmp_standard::mode::listinterfaces',
'memory' => 'network::redback::snmp::mode::memory',
);
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check Redback hardware in SNMP.
=cut
| Tpo76/centreon-plugins | network/redback/snmp/plugin.pm | Perl | apache-2.0 | 1,584 |
#
# Copyright 2021 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package apps::microsoft::exchange::local::mode::databases;
use base qw(centreon::plugins::templates::counter);
use strict;
use warnings;
use centreon::plugins::misc;
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold_ng);
use centreon::common::powershell::exchange::databases;
use apps::microsoft::exchange::local::mode::resources::types qw($copystatus_contentindexstate $mapi_result);
use JSON::XS;
sub custom_mailflow_latency_perfdata {
my ($self, %options) = @_;
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
unit => 's',
instances => [$self->{result_values}->{server}, $self->{result_values}->{database}],
value => sprintf('%.3f', $self->{result_values}->{mailflow_latency}),
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel})
);
}
sub custom_space_size_perfdata {
my ($self, %options) = @_;
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
unit => 'B',
instances => [$self->{result_values}->{server}, $self->{result_values}->{database}],
value => $self->{result_values}->{size},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel})
);
}
sub custom_space_available_perfdata {
my ($self, %options) = @_;
$self->{output}->perfdata_add(
nlabel => $self->{nlabel},
unit => 'B',
instances => [$self->{result_values}->{server}, $self->{result_values}->{database}],
value => $self->{result_values}->{asize},
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-' . $self->{thlabel}),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-' . $self->{thlabel})
);
}
sub custom_mapi_output {
my ($self, %options) = @_;
return 'mapi test connectivity is ' . $self->{result_values}->{mapi_result};
}
sub custom_mailflow_output {
my ($self, %options) = @_;
return 'mapi test result is ' . $self->{result_values}->{mailflow_result};
}
sub custom_copystatus_output {
my ($self, %options) = @_;
return sprintf(
"copystatus state is %s [error: %s]",
$self->{result_values}->{copystatus_indexstate},
$self->{result_values}->{copystatus_content_index_error_message}
);
}
sub custom_status_output {
my ($self, %options) = @_;
return sprintf(
'%s mounted',
$self->{result_values}->{mounted} == 0 ? 'not' : 'is'
);
}
sub database_long_output {
my ($self, %options) = @_;
return "checking database '" . $options{instance_value}->{database} . "' server '" . $options{instance_value}->{server} . "'";
}
sub prefix_database_output {
my ($self, %options) = @_;
return "Database '" . $options{instance_value}->{database} . "' server '" . $options{instance_value}->{server} . "'";
}
sub prefix_mailflow_output {
my ($self, %options) = @_;
return 'mailflow ';
}
sub prefix_global_output {
my ($self, %options) = @_;
return 'Databases ';
}
sub set_counters {
my ($self, %options) = @_;
$self->{maps_counters_type} = [
{ name => 'global', type => 0, cb_prefix_output => 'prefix_global_output', skipped_code => { -10 => 1 } },
{ name => 'databases', type => 3, cb_prefix_output => 'prefix_database_output', cb_long_output => 'database_long_output', indent_long_output => ' ', message_multiple => 'All databases are ok',
group => [
{ name => 'db_global', type => 0, skipped_code => { -10 => 1 } },
{ name => 'space', type => 0, skipped_code => { -10 => 1 } },
{ name => 'mapi', type => 0, skipped_code => { -10 => 1 } },
{ name => 'mailflow', type => 0, cb_prefix_output => 'prefix_mailflow_output', skipped_code => { -10 => 1 } },
{ name => 'copystatus', type => 0, skipped_code => { -10 => 1 } },
]
}
];
$self->{maps_counters}->{global} = [
{ label => 'databases-space-size', nlabel => 'databases.space.size.bytes', set => {
key_values => [ { name => 'size' } ],
output_template => 'space size: %s %s',
output_change_bytes => 1,
perfdatas => [
{ template => '%d', unit => 'B', min => 0 }
]
}
},
{ label => 'databases-space-available', nlabel => 'databases.space.available.bytes', set => {
key_values => [ { name => 'asize' } ],
output_template => 'space available: %s %s',
output_change_bytes => 1,
perfdatas => [
{ template => '%d', unit => 'B', min => 0 }
]
}
}
];
$self->{maps_counters}->{db_global} = [
{
label => 'status',
type => 2,
critical_default => '%{mounted} == 0',
set => {
key_values => [
{ name => 'mounted' }, { name => 'database' }, { name => 'server' }
],
closure_custom_output => $self->can('custom_status_output'),
closure_custom_perfdata => sub { return 0; },
closure_custom_threshold_check => \&catalog_status_threshold_ng
}
}
];
$self->{maps_counters}->{space} = [
{ label => 'database-space-size', nlabel => 'database.space.size.bytes', set => {
key_values => [ { name => 'size' }, { name => 'database' }, { name => 'server' } ],
output_template => 'space size: %s %s',
output_change_bytes => 1,
closure_custom_perfdata => $self->can('custom_space_size_perfdata')
}
},
{ label => 'database-space-available', nlabel => 'database.space.available.bytes', set => {
key_values => [ { name => 'asize' }, { name => 'database' }, { name => 'server' } ],
output_template => 'space available: %s %s',
output_change_bytes => 1,
closure_custom_perfdata => $self->can('custom_space_asize_perfdata')
}
}
];
$self->{maps_counters}->{mapi} = [
{
label => 'mapi',
type => 2,
critical_default => '%{mapi_result} !~ /Success/i',
set => {
key_values => [
{ name => 'mapi_result' }, { name => 'database' }, { name => 'server' }
],
closure_custom_output => $self->can('custom_mapi_output'),
closure_custom_perfdata => sub { return 0; },
closure_custom_threshold_check => \&catalog_status_threshold_ng
}
}
];
$self->{maps_counters}->{mailflow} = [
{
label => 'mailflow',
type => 2,
critical_default => '%{mailflow_result} !~ /Success/i',
set => {
key_values => [
{ name => 'mailflow_result' }, { name => 'database' }, { name => 'server' }
],
closure_custom_output => $self->can('custom_mailflow_output'),
closure_custom_perfdata => sub { return 0; },
closure_custom_threshold_check => \&catalog_status_threshold_ng
}
},
{ label => 'mailflow-latency', nlabel => 'database.mailflow.latency.seconds', display_ok => 0, set => {
key_values => [ { name => 'mailflow_latency' }, { name => 'database' }, { name => 'server' } ],
output_template => 'latency: %.3f %%',
closure_custom_perfdata => $self->can('custom_mailflow_latency_perfdata')
}
}
];
$self->{maps_counters}->{copystatus} = [
{
label => 'copystatus',
type => 2,
critical_default => '%{copystatus_indexstate} !~ /Healthy/i',
set => {
key_values => [
{ name => 'copystatus_indexstate' }, { name => 'copystatus_content_index_error_message' },
{ name => 'database' }, { name => 'server' }
],
closure_custom_output => $self->can('custom_copystatus_output'),
closure_custom_perfdata => sub { return 0; },
closure_custom_threshold_check => \&catalog_status_threshold_ng
}
}
];
}
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'remote-host:s' => { name => 'remote_host' },
'remote-user:s' => { name => 'remote_user' },
'remote-password:s' => { name => 'remote_password' },
'no-ps' => { name => 'no_ps' },
'no-mailflow' => { name => 'no_mailflow' },
'no-mapi' => { name => 'no_mapi' },
'no-copystatus' => { name => 'no_copystatus' },
'timeout:s' => { name => 'timeout', default => 50 },
'command:s' => { name => 'command', default => 'powershell.exe' },
'command-path:s' => { name => 'command_path' },
'command-options:s' => { name => 'command_options', default => '-InputFormat none -NoLogo -EncodedCommand' },
'ps-exec-only' => { name => 'ps_exec_only' },
'ps-display' => { name => 'ps_display' },
'ps-server-filter:s' => { name => 'ps_server_filter' },
'ps-database-filter:s' => { name => 'ps_database_filter' },
'ps-database-test-filter:s' => { name => 'ps_database_test_filter' }
});
return $self;
}
sub manage_selection {
my ($self, %options) = @_;
if (!defined($self->{option_results}->{no_ps})) {
my $ps = centreon::common::powershell::exchange::databases::get_powershell(
remote_host => $self->{option_results}->{remote_host},
remote_user => $self->{option_results}->{remote_user},
remote_password => $self->{option_results}->{remote_password},
no_mailflow => $self->{option_results}->{no_mailflow},
no_mapi => $self->{option_results}->{no_mapi},
no_copystatus => $self->{option_results}->{no_copystatus},
filter_server => $self->{option_results}->{ps_server_filter},
filter_database => $self->{option_results}->{ps_database_filter},
filter_database_test => $self->{option_results}->{ps_database_test_filter}
);
if (defined($self->{option_results}->{ps_display})) {
$self->{output}->output_add(
severity => 'OK',
short_msg => $ps
);
$self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
$self->{output}->exit();
}
$self->{option_results}->{command_options} .= " " . centreon::plugins::misc::powershell_encoded($ps);
}
my ($stdout) = centreon::plugins::misc::windows_execute(
output => $self->{output},
timeout => $self->{option_results}->{timeout},
command => $self->{option_results}->{command},
command_path => $self->{option_results}->{command_path},
command_options => $self->{option_results}->{command_options}
);
if (defined($self->{option_results}->{ps_exec_only})) {
$self->{output}->output_add(
severity => 'OK',
short_msg => $stdout
);
$self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
$self->{output}->exit();
}
my $decoded;
eval {
$decoded = JSON::XS->new->decode($stdout);
};
if ($@) {
$self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@");
$self->{output}->option_exit();
}
$self->{global} = { size => 0, asize => 0 };
$self->{databases} = {};
foreach my $db (@$decoded) {
$db->{mounted} = $db->{mounted} =~ /True|1/i ? 1 : 0;
$db->{copystatus_indexstate} = $copystatus_contentindexstate->{ $db->{copystatus_indexstate} }
if (defined($db->{copystatus_indexstate}));
$db->{mapi_result} = $mapi_result->{ $db->{mapi_result} }
if (defined($db->{mapi_result}));
$self->{databases}->{ $db->{database} . ':' . $db->{server} } = {
database => $db->{database},
server => $db->{server},
db_global => $db,
space => $db,
mapi => $db,
mailflow => $db,
copystatus => $db
};
$self->{global}->{size} += $db->{size};
$self->{global}->{asize} += $db->{asize};
}
}
1;
__END__
=head1 MODE
Check: Exchange Databases are Mounted, Mapi/Mailflow Connectivity to all databases are working and CopyStatus.
=over 8
=item B<--remote-host>
Open a session to the remote-host (fully qualified host name). --remote-user and --remote-password are optional
=item B<--remote-user>
Open a session to the remote-host with authentication. This also needs --remote-host and --remote-password.
=item B<--remote-password>
Open a session to the remote-host with authentication. This also needs --remote-user and --remote-host.
=item B<--no-mailflow>
Don't check mailflow connectivity.
=item B<--no-mapi>
Don't check mapi connectivity.
=item B<--no-copystatus>
Don't check copy status.
=item B<--timeout>
Set timeout time for command execution (Default: 50 sec)
=item B<--no-ps>
Don't encode powershell. To be used with --command and 'type' command.
=item B<--command>
Command to get information (Default: 'powershell.exe').
Can be changed if you have output in a file. To be used with --no-ps option!!!
=item B<--command-path>
Command path (Default: none).
=item B<--command-options>
Command options (Default: '-InputFormat none -NoLogo -EncodedCommand').
=item B<--ps-exec-only>
Print powershell output.
=item B<--ps-display>
Display powershell script.
=item B<--ps-server-filter>
Filter mailboxes by database server name (regexp can be used. In Powershell).
=item B<--ps-database-filter>
Filter database (only wilcard '*' can be used. In Powershell).
=item B<--ps-database-test-filter>
Skip mapi/mailflow test (regexp can be used. In Powershell).
=item B<--warning-status>
Set warning threshold.
Can used special variables like: %{mounted}, %{database}, %{server}
=item B<--critical-status>
Set critical threshold (Default: '%{mounted} == 0').
Can used special variables like: %{mounted}, %{database}, %{server}
=item B<--warning-mapi>
Set warning threshold.
Can used special variables like: %{mapi_result}, %{database}, %{server}
=item B<--critical-mapi>
Set critical threshold (Default: '%{mapi_result} !~ /Success/i').
Can used special variables like: %{mapi_result}, %{database}, %{server}
=item B<--warning-mailflow>
Set warning threshold.
Can used special variables like: %{mailflow_result}, %{database}, %{server}
=item B<--critical-mailflow>
Set critical threshold (Default: '%{mailflow_result} !~ /Success/i').
Can used special variables like: %{mailflow_result}, %{database}, %{server}
=item B<--warning-copystatus>
Set warning threshold.
Can used special variables like: %{mailflow_result}, %{database}, %{server}
=item B<--critical-copystatus>
Set critical threshold (Default: '%{contentindexstate} !~ /Healthy/i').
Can used special variables like: %{copystatus_indexstate}, %{database}, %{server}
=back
=cut
| Tpo76/centreon-plugins | apps/microsoft/exchange/local/mode/databases.pm | Perl | apache-2.0 | 16,639 |
#
# Copyright 2022 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package hardware::sensors::sensorip::snmp::mode::components::switch;
use strict;
use warnings;
my %map_sw_status = (
1 => 'noStatus',
2 => 'normal',
4 => 'highCritical',
6 => 'lowCritical',
7 => 'sensorError',
8 => 'relayOn',
9 => 'relayOff',
);
my %map_sw_online = (
1 => 'online',
2 => 'offline',
);
my $mapping = {
sensorProbeSwitchDescription => { oid => '.1.3.6.1.4.1.3854.1.2.2.1.18.1.1' },
sensorProbeSwitchStatus => { oid => '.1.3.6.1.4.1.3854.1.2.2.1.18.1.3', map => \%map_sw_status },
sensorProbeSwitchOnline => { oid => '.1.3.6.1.4.1.3854.1.2.2.1.18.1.4', map => \%map_sw_online },
};
my $oid_sensorProbeSwitchEntry = '.1.3.6.1.4.1.3854.1.2.2.1.18.1';
sub load {
my ($self) = @_;
push @{$self->{request}}, { oid => $oid_sensorProbeSwitchEntry, end => $mapping->{sensorProbeSwitchOnline}->{oid} };
}
sub check {
my ($self) = @_;
$self->{output}->output_add(long_msg => "Checking switch");
$self->{components}->{switch} = {name => 'switch', total => 0, skip => 0};
return if ($self->check_filter(section => 'switch'));
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_sensorProbeSwitchEntry}})) {
next if ($oid !~ /^$mapping->{sensorProbeSwitchStatus}->{oid}\.(.*)$/);
my $instance = $1;
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_sensorProbeSwitchEntry}, instance => $instance);
next if ($self->check_filter(section => 'switch', instance => $instance));
if ($result->{sensorProbeSwitchOnline} =~ /Offline/i) {
$self->absent_problem(section => 'switch', instance => $instance);
next;
}
$self->{components}->{switch}->{total}++;
$self->{output}->output_add(long_msg => sprintf("Switch sensor '%s' status is '%s' [instance : %s]",
$result->{sensorProbeSwitchDescription}, $result->{sensorProbeSwitchStatus}, $instance));
my $exit = $self->get_severity(section => 'switch', value => $result->{sensorProbeSwitchStatus});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Switch sensor '%s' status is '%s'", $result->{sensorProbeSwitchDescription}, $result->{sensorProbeSwitchStatus}));
}
}
}
1;
| centreon/centreon-plugins | hardware/sensors/sensorip/snmp/mode/components/switch.pm | Perl | apache-2.0 | 3,261 |
#
# Copyright 2019 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package storage::panzura::snmp::mode::memory;
use base qw(centreon::plugins::mode);
use strict;
use warnings;
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$options{options}->add_options(arguments =>
{
"warning:s" => { name => 'warning' },
"critical:s" => { name => 'critical' },
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::init(%options);
if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {
$self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'.");
$self->{output}->option_exit();
}
if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {
$self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'.");
$self->{output}->option_exit();
}
}
sub run {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
if ($self->{snmp}->is_snmpv1()) {
$self->{output}->add_option_msg(short_msg => "Need to use SNMP v2c or v3.");
$self->{output}->option_exit();
}
# It's KB. Even if the mib file says 'MB'!! The MIB description will be fixed by panzura
my $oid_memUsed = '.1.3.6.1.4.1.32853.1.3.1.2.1.0'; # KB
my $oid_memAvail = '.1.3.6.1.4.1.32853.1.3.1.2.2.0'; # KB
my $oid_memTotal = '.1.3.6.1.4.1.32853.1.3.1.2.3.0'; # KB
my $result = $self->{snmp}->get_leef(oids => [$oid_memUsed, $oid_memAvail, $oid_memTotal],
nothing_quit => 1);
my $total_size = $result->{$oid_memTotal} * 1024;
my $used = $result->{$oid_memUsed} * 1024;
my $free = $result->{$oid_memAvail} * 1024;
my $prct_used = $used * 100 / $total_size;
my $prct_free = 100 - $prct_used;
my $exit = $self->{perfdata}->threshold_check(value => $prct_used, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);
my ($total_value, $total_unit) = $self->{perfdata}->change_bytes(value => $total_size);
my ($used_value, $used_unit) = $self->{perfdata}->change_bytes(value => $used);
my ($free_value, $free_unit) = $self->{perfdata}->change_bytes(value => $free);
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Memory Total: %s Used: %s (%.2f%%) Free: %s (%.2f%%)",
$total_value . " " . $total_unit,
$used_value . " " . $used_unit, $prct_used,
$free_value . " " . $free_unit, $prct_free));
$self->{output}->perfdata_add(label => "used", unit => 'B',
value => $used,
warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning', total => $total_size),
critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical', total => $total_size),
min => 0, max => $total_size);
$self->{output}->display();
$self->{output}->exit();
}
1;
__END__
=head1 MODE
Check memory (panzura-systemext).
=over 8
=item B<--warning>
Threshold warning in percent.
=item B<--critical>
Threshold critical in percent.
=back
=cut
| Sims24/centreon-plugins | storage/panzura/snmp/mode/memory.pm | Perl | apache-2.0 | 4,543 |
package Google::Ads::AdWords::v201809::FeedItemCriterionTarget;
use strict;
use warnings;
__PACKAGE__->_set_element_form_qualified(1);
sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201809' };
our $XML_ATTRIBUTE_CLASS;
undef $XML_ATTRIBUTE_CLASS;
sub __get_attr_class {
return $XML_ATTRIBUTE_CLASS;
}
use base qw(Google::Ads::AdWords::v201809::FeedItemTarget);
# Variety: sequence
use Class::Std::Fast::Storable constructor => 'none';
use base qw(Google::Ads::SOAP::Typelib::ComplexType);
{ # BLOCK to scope variables
my %feedId_of :ATTR(:get<feedId>);
my %feedItemId_of :ATTR(:get<feedItemId>);
my %targetType_of :ATTR(:get<targetType>);
my %status_of :ATTR(:get<status>);
my %FeedItemTarget__Type_of :ATTR(:get<FeedItemTarget__Type>);
my %criterion_of :ATTR(:get<criterion>);
my %isNegative_of :ATTR(:get<isNegative>);
__PACKAGE__->_factory(
[ qw( feedId
feedItemId
targetType
status
FeedItemTarget__Type
criterion
isNegative
) ],
{
'feedId' => \%feedId_of,
'feedItemId' => \%feedItemId_of,
'targetType' => \%targetType_of,
'status' => \%status_of,
'FeedItemTarget__Type' => \%FeedItemTarget__Type_of,
'criterion' => \%criterion_of,
'isNegative' => \%isNegative_of,
},
{
'feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'feedItemId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'targetType' => 'Google::Ads::AdWords::v201809::FeedItemTargetType',
'status' => 'Google::Ads::AdWords::v201809::FeedItemTargetStatus',
'FeedItemTarget__Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'criterion' => 'Google::Ads::AdWords::v201809::Criterion',
'isNegative' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
},
{
'feedId' => 'feedId',
'feedItemId' => 'feedItemId',
'targetType' => 'targetType',
'status' => 'status',
'FeedItemTarget__Type' => 'FeedItemTarget.Type',
'criterion' => 'criterion',
'isNegative' => 'isNegative',
}
);
} # end BLOCK
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201809::FeedItemCriterionTarget
=head1 DESCRIPTION
Perl data type class for the XML Schema defined complexType
FeedItemCriterionTarget from the namespace https://adwords.google.com/api/adwords/cm/v201809.
Represents a feed item target for a criterion.
=head2 PROPERTIES
The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:
=over
=item * criterion
=item * isNegative
=back
=head1 METHODS
=head2 new
Constructor. The following data structure may be passed to new():
=head1 AUTHOR
Generated by SOAP::WSDL
=cut
| googleads/googleads-perl-lib | lib/Google/Ads/AdWords/v201809/FeedItemCriterionTarget.pm | Perl | apache-2.0 | 2,757 |
# Copyright 2020, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package Google::Ads::GoogleAds::V8::Services::AccountLinkService::MutateAccountLinkResponse;
use strict;
use warnings;
use base qw(Google::Ads::GoogleAds::BaseEntity);
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
sub new {
my ($class, $args) = @_;
my $self = {result => $args->{result}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
| googleads/google-ads-perl | lib/Google/Ads/GoogleAds/V8/Services/AccountLinkService/MutateAccountLinkResponse.pm | Perl | apache-2.0 | 1,047 |
=head1 LICENSE
Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Copyright [2016-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=cut
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <dev@ensembl.org>.
Questions may also be sent to the Ensembl help desk at
<helpdesk@ensembl.org>.
=cut
#
# Ensembl module for Bio::EnsEMBL::Variation::DBSQL::ReadCoverageAdaptor
#
#
=head1 NAME
Bio::EnsEMBL::Variation::DBSQL::ReadCoverageAdaptor
=head1 SYNOPSIS
$reg = 'Bio::EnsEMBL::Registry';
$reg->load_registry_from_db(-host => 'ensembldb.ensembl.org', -user => 'anonymous');
$rca = $reg->get_adaptor('human', 'variation', 'readcoverage');
$sa = $reg->get_adaptor('human', 'core', 'slice);
$sa = $reg->get_adaptor('human', 'variation', 'sample');
# get read coverage in a region for a certain population in in a certain level
$slice = $sa->fetch_by_region('chromosome', 'X', 1e6, 2e6);
$sample = $sa->fetch_by_name("UNKNOWN");
$level = 1;
foreach $rc (@{$vfa->fetch_all_by_Slice_Sample_depth($slice, $sample, $level)}) {
print $rc->start(), '-', $rc->end(), "\n";
}
=head1 DESCRIPTION
This adaptor provides database connectivity for ReadCoverage objects.
Coverage information for reads can be obtained from the database using this
adaptor. See the base class BaseFeatureAdaptor for more information.
=head1 METHODS
=cut
use strict;
use warnings;
package Bio::EnsEMBL::Variation::DBSQL::ReadCoverageAdaptor;
use Bio::EnsEMBL::Variation::ReadCoverage;
use Bio::EnsEMBL::Mapper::RangeRegistry;
use Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor;
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
our @ISA = ('Bio::EnsEMBL::DBSQL::BaseFeatureAdaptor');
=head2 fetch_all_by_Slice_Sample_depth
Arg[0] : Bio::EnsEMBL::Slice $slice
Arg[1] : (optional) Bio::EnsEMBL::Variation::Sample $sample
Arg[2] : (optional) int $level
Example : my $features = $rca->fetch_all_by_Slice_Sample_depth($slice, $sample, $level); or
my $features = $rca->fetch_all_by_Slice_Sample_depth($slice, $sample); or
my $features = $rca->fetch_all_by_Slice_Sample_depth($slice, $level); or
my $features = $rca->fetch_all_by_Slice_Sample_depth($slice);
Description : Gets all the read coverage features for a given sample (or strain) in a certain level
in the provided slice
ReturnType : reference to list of Bio::EnsEMBL::Variation::ReadCoverage
Exceptions : thrown on bad arguments
Caller : general
Status : Stable
=cut
sub fetch_all_by_Slice_Sample_depth {
my $self = shift;
my $slice = shift;
my @args = @_; #can contain sample and/or level
my $rcs;
if(!ref($slice) || !$slice->isa('Bio::EnsEMBL::Slice')) {
throw('Bio::EnsEMBL::Slice arg expected');
}
if (defined $args[0]) { #contains, at least, 1 parameter, either a Individual or the level
my $constraint;
my $levels = $self->get_coverage_levels();
if (defined $args[1]) { #contains both parameters, first the Individual and second the level
if(!ref($args[0]) || !$args[0]->isa('Bio::EnsEMBL::Variation::Sample')) {
throw('Bio::EnsEMBL::Variation::Sample arg expected');
}
if(!defined($args[0]->dbID())) {
throw("Sample arg must have defined dbID");
}
if ((grep {$args[1] == $_} @{$levels}) > 0) {
$constraint = "rc.sample_id = " . $args[0]->dbID . " AND rc.level = " . $args[1];
# $constraint = "rc.sample_id = ? AND rc.level = ?";
# $self->bind_param_generic_fetch($args[0]->dbID,SQL_INTEGER);
# $self->bind_param_generic_fetch($args[1],SQL_INTEGER);
}
else {
warning("Level must be a number of: " . join(",", @{$levels}));
return [];
}
}
else { #there is just 1 argument, can either be the Individual or the level
if (!ref($args[0])) {
#it should just contain the level
if ((grep {$args[0] == $_} @{$levels}) > 0) {
$constraint = "rc.level = " . $args[0];
#$constraint = "rc.level = ? ";
#$self->bind_param_generic_fetch($args[0],SQL_INTEGER);
}
else {
warning("Level must be a number of: " . join(",", @{$levels}));
return [];
}
}
else {
#it should contain the Sample
if (!$args[0]->isa('Bio::EnsEMBL::Variation::Sample')) {
throw('Bio::EnsEMBL::Variation::Sample arg expected');
}
$constraint = "rc.sample_id = " . $args[0]->dbID;
}
}
$rcs = $self->fetch_all_by_Slice_constraint($slice, $constraint);
return $rcs;
}
#call the method fetch_all_by_Slice
$rcs = $self->fetch_all_by_Slice($slice);
return $rcs;
}
#returns a list of regions that are covered by all the samples given
sub fetch_all_regions_covered {
my $self = shift;
my $slice = shift;
my $samples = shift; #listref of sample names to get the coverage from
my $sample_adaptor = $self->db->get_SampleAdaptor;
my $range_registry = [];
my $max_level = scalar(@{$samples});
_initialize_range_registry($range_registry,$max_level);
foreach my $sample_name (@{$samples}){
my $sample = shift @{$sample_adaptor->fetch_all_by_name($sample_name)};
my $coverage = $self->fetch_all_by_Slice_Sample_depth($slice, $sample); #get coverage information
foreach my $cv_feature (@{$coverage}){
my $range = [$cv_feature->seq_region_start, $cv_feature->seq_region_end]; #store toplevel coordinates
_register_range_level($range_registry, $range, 1, $max_level);
}
}
return $range_registry->[$max_level]->get_ranges(1);
}
=head2 get_coverage_levels
Args : none
Example : my @coverage_levels = @{$rca->fetch_coverage_levels()};
Description : Gets the read coverage depths calculated in the database
ReturnType : reference to list of int
Exceptions : none
Caller : general
Status : At Risk
=cut
sub get_coverage_levels {
my $self = shift;
my @levels;
my $level_coverage;
my $sth = $self->prepare(qq{SELECT meta_value from meta where meta_key = 'read_coverage.coverage_level'});
$sth->execute();
$sth->bind_columns(\$level_coverage);
while ($sth->fetch()){
push @levels, $level_coverage;
}
$sth->finish();
# HACK
@levels = (1, 2) unless scalar @levels;
return \@levels;
}
sub _initialize_range_registry {
my $range_registry = shift;
my $max_level = shift;
foreach my $level (1..$max_level){
$range_registry->[$level] = Bio::EnsEMBL::Mapper::RangeRegistry->new();
}
return;
}
sub _register_range_level {
my $range_registry = shift;
my $range = shift;
my $level = shift;
my $max_level = shift;
return if ($level > $max_level);
my $rr = $range_registry->[$level];
my $pair = $rr->check_and_register(1,$range->[0],$range->[1]);
my $pair_inverted = _invert_pair($range,$pair);
return if (!defined $pair_inverted);
foreach my $inverted_range (@{$pair_inverted}){
_register_range_level($range_registry, $inverted_range, $level+1, $max_level);
}
}
#for a given range and the one covered, returns the inverted
sub _invert_pair {
my $range = shift; #initial range of the array
my $pairs = shift; #listref with the pairs that have been added to the range
my @inverted_pairs;
my $inverted;
my $rr = Bio::EnsEMBL::Mapper::RangeRegistry->new();
foreach my $pair (@{$pairs}) {
$rr->check_and_register(1, $pair->[0], $pair->[1]);
}
return $rr->check_and_register(1, $range->[0], $range->[1]); #register again the range
}
sub _tables { return (['read_coverage','rc'] )}
sub _columns {
return qw (rc.seq_region_id rc.seq_region_start rc.seq_region_end rc.level rc.sample_id);
}
sub _objs_from_sth{
my ($self, $sth, $mapper, $dest_slice) = @_;
my $sa = $self->db()->dnadb()->get_SliceAdaptor();
#
# This code is ugly because an attempt has been made to remove as many
# function calls as possible for speed purposes. Thus many caches and
# a fair bit of gymnastics is used.
#
my ($seq_region_id, $seq_region_start, $seq_region_end, $level, $sample_id);
my $seq_region_strand = 1; #assume all reads are in the + strand
$sth->bind_columns(\$seq_region_id, \$seq_region_start, \$seq_region_end, \$level, \$sample_id);
my @features;
my %seen_samples;
my %slice_hash;
my %sr_name_hash;
my %sr_cs_hash;
my $asm_cs;
my $cmp_cs;
my $asm_cs_vers;
my $asm_cs_name;
my $cmp_cs_vers;
my $cmp_cs_name;
if($mapper) {
$asm_cs = $mapper->assembled_CoordSystem();
$cmp_cs = $mapper->component_CoordSystem();
$asm_cs_name = $asm_cs->name();
$asm_cs_vers = $asm_cs->version();
$cmp_cs_name = $cmp_cs->name();
$cmp_cs_vers = $cmp_cs->version();
}
my $dest_slice_start;
my $dest_slice_end;
my $dest_slice_strand;
my $dest_slice_length;
if($dest_slice) {
$dest_slice_start = $dest_slice->start();
$dest_slice_end = $dest_slice->end();
$dest_slice_strand = $dest_slice->strand();
$dest_slice_length = $dest_slice->length();
}
my $read_coverage;
FEATURE: while ($sth->fetch()){
#get the population_adaptor object
my $ia = $self->db()->get_SampleAdaptor();
#get the slice object
my $slice = $slice_hash{"ID:".$seq_region_id};
if(!$slice) {
$slice = $sa->fetch_by_seq_region_id($seq_region_id);
$slice_hash{"ID:".$seq_region_id} = $slice;
$sr_name_hash{$seq_region_id} = $slice->seq_region_name();
$sr_cs_hash{$seq_region_id} = $slice->coord_system();
}
#
# remap the feature coordinates to another coord system
# if a mapper was provided
#
if($mapper) {
my $sr_name = $sr_name_hash{$seq_region_id};
my $sr_cs = $sr_cs_hash{$seq_region_id};
($sr_name,$seq_region_start,$seq_region_end,$seq_region_strand) =
$mapper->fastmap($sr_name, $seq_region_start, $seq_region_end,
$seq_region_strand, $sr_cs);
#skip features that map to gaps or coord system boundaries
next FEATURE if(!defined($sr_name));
#get a slice in the coord system we just mapped to
if($asm_cs == $sr_cs || ($cmp_cs != $sr_cs && $asm_cs->equals($sr_cs))) {
$slice = $slice_hash{"NAME:$sr_name:$cmp_cs_name:$cmp_cs_vers"} ||=
$sa->fetch_by_region($cmp_cs_name, $sr_name,undef, undef, undef,
$cmp_cs_vers);
} else {
$slice = $slice_hash{"NAME:$sr_name:$asm_cs_name:$asm_cs_vers"} ||=
$sa->fetch_by_region($asm_cs_name, $sr_name, undef, undef, undef,
$asm_cs_vers);
}
}
#
# If a destination slice was provided convert the coords
# If the dest_slice starts at 1 and is foward strand, nothing needs doing
#
if($dest_slice) {
if($dest_slice_start != 1 || $dest_slice_strand != 1) {
if($dest_slice_strand == 1) {
$seq_region_start = $seq_region_start - $dest_slice_start + 1;
$seq_region_end = $seq_region_end - $dest_slice_start + 1;
} else {
my $tmp_seq_region_start = $seq_region_start;
$seq_region_start = $dest_slice_end - $seq_region_end + 1;
$seq_region_end = $dest_slice_end - $tmp_seq_region_start + 1;
$seq_region_strand *= -1;
}
#throw away features off the end of the requested slice
if($seq_region_end < 1 || $seq_region_start > $dest_slice_length) {
next FEATURE;
}
}
$slice = $dest_slice;
}
my $sample;
if($sample_id){
$sample = $seen_samples{$sample_id} ||= $ia->fetch_by_dbID($sample_id);
}
$read_coverage = Bio::EnsEMBL::Variation::ReadCoverage->new(
-start => $seq_region_start,
-end => $seq_region_end,
-slice => $slice,
-adaptor => $self,
-level => $level,
-sample => $sample,
-strand => 1,
);
push @features, $read_coverage;
}
$sth->finish();
return \@features;
}
1;
| willmclaren/ensembl-variation | modules/Bio/EnsEMBL/Variation/DBSQL/ReadCoverageAdaptor.pm | Perl | apache-2.0 | 12,637 |
=head1 LICENSE
# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
# Copyright [2016-2022] EMBL-European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.
Questions may also be sent to the Ensembl help desk at
<http://www.ensembl.org/Help/Contact>.
=cut
=head1 NAME
Bio::EnsEMBL::Analysis::Runnable::Spliced_elsewhere -
=head1 SYNOPSIS
my $runnable = Bio::EnsEMBL::Analysis::Runnable::Spliced_elsewhere ->new
(
'-genes' => \@genes_array_ref,
'-analysis' => $analysis_object,
);
$runnable->run;
$output = $runnable->output
=head1 DESCRIPTION
Runnable for Bio::EnsEMBL::Analysis::RunnableDB::Spliced_elsewhere
Does the blast analysis and returns the results to the runnable_db for
parsing.
Uses Bio::EnsEMBL::Analysis::Config::Pseudogene for config
=head1 METHODS
=cut
package Bio::EnsEMBL::Analysis::Runnable::Spliced_elsewhere;
use warnings ;
use strict;
use Bio::EnsEMBL::Analysis::Runnable::Pseudogene;
use Bio::EnsEMBL::Analysis::Config::Pseudogene;
use Bio::EnsEMBL::Analysis::Runnable::Blast;
use Bio::EnsEMBL::Analysis::Tools::BPliteWrapper;
use Bio::EnsEMBL::Analysis::Tools::FilterBPlite;
use Bio::EnsEMBL::Utils::Argument qw( rearrange );
use vars qw(@ISA);
@ISA = qw(Bio::EnsEMBL::Analysis::Runnable::Pseudogene);
=head2 new
Args : various
Description: Runnable constructor
Returntype : Bio::EnsEMBL::Analysis::Runnable::Spliced_elsewhere;
Caller : general
=cut
sub new {
my ($class,@args) = @_;
my $self = $class->SUPER::new(@args);
$self->{'_genes'} = []; #array of genescripts to test;
my($genes,$PS_MULTI_EXON_DIR) =
rearrange([qw( GENES
PS_MULTI_EXON_DIR
)], @args);
$self->genes($genes);
$self->PS_MULTI_EXON_DIR($PS_MULTI_EXON_DIR);
# Path to blast database
$self->db($self->PS_MULTI_EXON_DIR."/all_multi_exon_genes.fasta");
return $self;
}
=head2 run
Arg [none] :
Description: calls run_blast for each genescript in turn
Returntype : none
Exceptions : none
Caller : general
=cut
sub run {
my ($self)=@_;
my @genes = @{$self->genes};
GENE: foreach my $gene(@genes){
$self->run_blast($gene);
next GENE; # redundant much?
}
return 1;
}
=head2 run_blast
Arg [none] :
Description: runs the blast analysis, uses BPliteWapper as parser
Returntype : returns the blast result in a hash keyed by the transcript dbid
also returns the gene object in the hash for refence
Exceptions : none
Caller : general
=cut
sub run_blast{
my ($self,$gene)=@_;
my $bplitewrapper = Bio::EnsEMBL::Analysis::Tools::BPliteWrapper-> new
(
-query_type => 'dna',
-database_type => 'dna',
);
my %output_hash;
foreach my $trans (@{$gene->get_all_Transcripts}){
next unless ($trans->translateable_seq);
# Default expand is 1000
# But if the transcript start is too close to the start of the region, need to reduce the expand
# Also needs to be the same value on both sides
my $start_expand = 1000 ;
my $end_expand = 1000 ;
if ( $trans->start < 1000 ) {
$start_expand = $trans->start - 1 ;
$end_expand = $start_expand ;
}
my $query = $trans->feature_Slice->expand($start_expand, $end_expand)->get_repeatmasked_seq;
my $test = $trans->feature_Slice->get_repeatmasked_seq->seq;
# print "BEFORE Ns have gone " . length($test) . "\n";
$test =~ s/N//g;
# print "AFTER Ns have gone " . length($test) . "\n";
unless ( length($test) > 5 ) {
print STDOUT "ignoring " . $trans->display_id. " all Ns \n";
$output_hash{$trans->dbID}= 'REPEATS';
$self->output(\%output_hash);
return 1;
}
print $trans->stable_id if ( $trans->stable_id ) ;
# need to mask out other coding sequences here
my $blast = Bio::EnsEMBL::Analysis::Runnable::Blast->new
('-query' => $query,
'-program' => 'blastn',
'-database' => $self->db,
'-threshold' => 1e-50,
'-parser' => $bplitewrapper,
'-options' => 'V=10',
'-analysis' => $self->analysis,
);
eval {
$blast->run();
};
if ($@) {
$self->throw("Problem with Blast $@ \n ");
} else {
if ( $blast->output ) {
$output_hash{$trans->dbID}= $blast->output;
} else {
$output_hash{$trans->dbID}= 'NONE';
}
}
}
$self->output(\%output_hash);
return 1;
}
########################################################
# Containers
=head2 db
Arg [1] : scalar
Description: get/set path to blast database
Returntype : scalar
Exceptions : none
Caller : general
=cut
sub db {
my ($self, $db) = @_;
if ($db) {
$self->find_file($db);
$self->{'_db'} = $db;
}
return $self->{'_db'};
}
=head2 output
Arg [1] : hasref
Description: overrides output array
Returntype : array
Exceptions : none
Caller : general
=cut
sub output {
my ($self, $hash_ref) = @_;
if ($hash_ref) {
push @{$self->{'_output'}},$hash_ref;
}
return $self->{'_output'};
}
| Ensembl/ensembl-analysis | modules/Bio/EnsEMBL/Analysis/Runnable/Spliced_elsewhere.pm | Perl | apache-2.0 | 5,703 |
#!/usr/bin/env perl
use Time::Piece;
use Getopt::Long qw(:config gnu_getopt);
$printline = undef;
GetOptions(
"printline" => \$printline
) or die("usage: hungthreads.pl SystemOut.log+\n");
foreach my $fileName (@ARGV) {
open(my $fh, '<:encoding(UTF-8)', $fileName) or die "Could not open file '$fileName' $!";
while (my $line = <$fh>) {
chomp $line;
if ($line =~ /\[(\d+)\/(\d+)\/(\d+) (\d+:\d+:\d+):\d+ ([^\]]+)\] \S+ ThreadMonitor W WSVR0606W: Thread \"([^\"]+)\" \(([^\)]+)\) was previously reported to be hung but has completed. It was active for approximately (\d+) milliseconds. There is\/are (\d+) thread\(s\) in total in the server that still may be hung./) {
$tz = $5;
$threadname = $6;
$threadid = $7;
$end = Time::Piece->strptime("$3-$1-$2 $4", "%y-%m-%d %H:%M:%S");
if (!$first) {
$first = 1;
print "Start ($tz),End ($tz),ResponseTime (ms),ThreadName,ThreadID,File";
if ($printline) {
print ",Line";
}
print "\n";
}
$start = $end - ($8 / 1000);
print $start->strftime("%Y-%m-%d %H:%M:%S") . "," . $end->strftime("%Y-%m-%d %H:%M:%S") . ",$8,$threadname,$threadid,$fileName";
if ($printline) {
print "," . $line;
}
print "\n";
}
}
close($fh);
}
| kgibm/problemdetermination | scripts/was/hungthreads.pl | Perl | apache-2.0 | 1,308 |
#!/usr/bin/perl -w
use utf8;
use JSON qw( from_json );
use Data::Dumper;
#use open ':encoding(utf8)';
open(JSON,"strassenliste.json");
my $json =from_json(join("",<JSON>), { utf8 => 0 });
close(JSON);
my %str;
foreach my $ele (@{$json->{'elements'}}) {
# print $ele->{'tags'}->{'name'},"\n";
my $name=$ele->{'tags'}->{'name'};
if(utf8::is_utf8($name)) {
# print $name;
utf8::decode($name);
#print $name;
}
my $lname=lc($name);
$lname=~s/[^a-z]//g;
# print "@ $lname\n";
my $oneway=$ele->{'tags'}->{'oneway'};
if (!defined($oneway)) {
$oneway="no";
}
my $element= {
name=>$name,
id=>$ele->{'id'},
highway=>$ele->{'tags'}->{'highway'},
oneway=>$oneway,
lat=>$ele->{'center'}->{'lat'},
lon=>$ele->{'center'}->{'lon'},
};
if (defined($str{$lname})) {
push @{$str{$lname}},$element;
} else {
$str{$lname}=[$element];
}
# if ($lname=~/wex/) {
# print Dumper($element);
# }
# print "$name\t$id\t$highway\t$oneway\t$lat\t$lon\n";
}
#print Dumper($str{"wexstraΓe"});
open(EINBAHN,"einbahn.csv");
open(OUT,">data/einbahn-pruef.csv");
open(MAP,">data/einbahn-map.csv");
print OUT "name\tzusatz\tpolizei\tstatus\t\tlat\tlon\n";
print MAP "name\tzusatz\tpolizei\tstatus\t\tlat\tlon\n";
foreach my $line (<EINBAHN>) {
my ($name,$pk)=split(/\t/,$line);
$name=~s/^\s*//;
$name=~s/\s*$//;
if(utf8::is_utf8($name)) {
utf8::encode($name);
}
my $lname=lc($name);
$lname=~s/[^a-z]//g;
if (defined($str{$lname})) {
$lat=$str{$lname}[0]{'lat'};
$lon=$str{$lname}[0]{'lon'};
print OUT "$name\t\t$pk\tokay\t\t$lat\t$lon\n";
print MAP "$name\t\t$pk\tokay\t\t$lat\t$lon\n";
} else {
print OUT "$name\t\t$pk\tpruefen\t\t\t\n";
}
}
close(EINBAHN);
close(OUT);
close(MAP);
open(EINBAHN,"frei.csv");
open(OUT,">data/frei-pruef.csv");
open(MAP,">data/frei-map.csv");
print OUT "name\tzustatz\tpolizei\tfreigegeben\tstatus\t\tlat\tlon\n";
print MAP "name\tzustatz\tpolizei\tfreigegeben\tstatus\t\tlat\tlon\n";
foreach my $line (<EINBAHN>) {
my ($name,$pk,$frei)=split(/\t/,$line);
$name=~s/^\s*//;
$name=~s/\s*$//;
if(utf8::is_utf8($name)) {
utf8::encode($name);
}
my $lname=lc($name);
$lname=~s/[^a-z]//g;
if (defined($str{$lname})) {
$lat=$str{$lname}[0]{'lat'};
$lon=$str{$lname}[0]{'lon'};
print OUT "$name\t\t$pk\t$frei\tokay\t\t$lat\t$lon\n";
print MAP "$name\t\t$pk\t$frei\tokay\t\t$lat\t$lon\n";
} else {
print OUT "$name\t\t$pk\t$frei\tpruefen\t\t\t\n";
}
}
close(EINBAHN);
close(OUT);
close(MAP);
#print Dumper($str{'de lange tammer'});
| tabacha/ADFCHHmap | einbahnstrassen/strassenliste.pl | Perl | apache-2.0 | 2,766 |
#
# Copyright 2016 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package hardware::server::cisco::ucs::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_snmp);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
%{$self->{modes}} = (
'equipment' => 'hardware::server::cisco::ucs::mode::equipment',
'faults' => 'hardware::server::cisco::ucs::mode::faults',
'audit-logs' => 'hardware::server::cisco::ucs::mode::auditlogs',
'service-profile' => 'hardware::server::cisco::ucs::mode::serviceprofile',
);
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check Cisco UCS Manager Informations in SNMP.
=cut
| bcournaud/centreon-plugins | hardware/server/cisco/ucs/plugin.pm | Perl | apache-2.0 | 1,600 |
=head1 LICENSE
See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=cut
package Bio::EnsEMBL::Compara::Graph::GeneTreeNodePhyloXMLWriter;
=pod
=head1 NAME
Bio::EnsEMBL::Compara::Graph::GeneTreeNodePhyloXMLWriter
=head1 SYNOPSIS
Variant of GeneTreePhyloXMLWriter that accepts Bio::EnsEMBL::Compara::GeneTreeNode
in write_trees()
=head1 CONTACT
Please email comments or questions to the public Ensembl
developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.
Questions may also be sent to the Ensembl help desk at
<http://www.ensembl.org/Help/Contact>.
=cut
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Scalar qw(assert_ref);
use base qw/Bio::EnsEMBL::Compara::Graph::GeneTreePhyloXMLWriter/;
sub _write_tree {
my ($self, $tree) = @_;
assert_ref($tree, 'Bio::EnsEMBL::Compara::GeneTreeNode', 'tree');
my $w = $self->_writer();
my %attr = (rooted => 'true');
$attr{type} = $self->tree_type();
# When the tree is not the entire tree, some columns of the alignment may
# be full of gaps. Need to remove them
$self->_prune_alignment($tree) if ($tree->{_root_id} != $tree->{_node_id});
$self->_load_all($tree->adaptor->db, $tree->get_all_nodes, $tree->get_all_leaves);
$w->startTag('phylogeny', %attr);
$self->_process($tree);
$w->endTag('phylogeny');
delete $self->{_cached_seq_aligns};
return;
}
1;
| Ensembl/ensembl-compara | modules/Bio/EnsEMBL/Compara/Graph/GeneTreeNodePhyloXMLWriter.pm | Perl | apache-2.0 | 1,943 |
#!/usr/bin/perl -W
use strict;
use Carp;
use File::Basename;
use File::Copy;
use File::Spec;
use IO::File;
use XML::LibXML;
use Encode;
use Digest::SHA1;
use URI;
use Archive::Zip;
use Archive::Zip::MemberRead;
use Scalar::Util;
use BP::Model::Common;
package BP::Model::AnnotationSet;
# This is the empty constructor.
# seedAnnotationSet: an optional BP::Model::AnnotationSet used as seed
sub new(;$) {
my $class = shift;
Carp::croak((caller(0))[3].' is a class method!') if(BP::Model::DEBUG && ref($class));
my $seedAnnotationSet = shift;
my %annotationHash = ();
my @annotationOrder = ();
if(defined($seedAnnotationSet)) {
%annotationHash = %{$seedAnnotationSet->hash};
@annotationOrder = @{$seedAnnotationSet->order};
}
my @annotations = (\%annotationHash,\@annotationOrder);
return bless(\@annotations,$class);
}
# This is the constructor.
# parseAnnotations paremeters:
# container: a XML::LibXML::Element container of 'dcc:annotation' elements
# globalAnnotationSet: an optional BP::Model::AnnotationSet,
# used to fetch values from "global-key-ref" references
# seedAnnotationSet: an optional BP::Model::AnnotationSet used as seed
# It returns a BP::Model::AnnotationSet hash reference, containing the contents of all the
# 'dcc:annotation' XML elements found
sub parseAnnotations($;$$) {
my $self = shift;
my $container = shift;
my $globalAnnotationSet = shift;
my $seedAnnotationSet = shift;
# Dual instance/class method behavior
unless(ref($self)) {
my $class = $self;
$self = $class->new($seedAnnotationSet);
}
my $p_hash = $self->hash;
my $p_order = $self->order;
foreach my $annotation ($container->getChildrenByTagNameNS(BP::Model::Common::dccNamespace,'annotation')) {
my $annotationKey = $annotation->getAttribute('key');
unless(exists($p_hash->{$annotationKey})) {
push(@{$p_order},$annotationKey);
}
if($annotation->hasAttribute('global-key-ref')) {
my $globalKeyRef = $annotation->getAttribute('global-key-ref');
if(defined($globalAnnotationSet) && exists($globalAnnotationSet->hash->{$globalKeyRef})) {
$p_hash->{$annotationKey} = $globalAnnotationSet->hash->{$globalKeyRef};
} else {
Carp::croak("Global annotation '$globalKeyRef' used to fill in annotation '$annotationKey' does not exist!!!");
}
} else {
my $value = undef;
my @aChildren = $annotation->nonBlankChildNodes();
foreach my $aChild (@aChildren) {
next unless($aChild->nodeType == XML::LibXML::XML_ELEMENT_NODE);
if($aChild->namespaceURI() eq BP::Model::Common::dccNamespace) {
$value = $aChild;
} else {
$value = \@aChildren;
}
last;
}
$p_hash->{$annotationKey} = defined($value)?$value:$annotation->textContent();
}
}
return $self;
}
sub hash {
return $_[0]->[0];
}
# The order of the keys (when they are given in a description)
sub order {
return $_[0]->[1];
}
# This method adds a new annotation to the annotation set
sub addAnnotation($$) {
my $self = shift;
Carp::croak((caller(0))[3].' is an instance method!') if(BP::Model::DEBUG && !ref($self));
my $key = shift;
my $value = shift;
my $hash = $self->hash;
push(@{$self->order},$key) unless(exists($hash->{$key}));
$hash->{$key} = $value;
}
# This method adds the annotations from an existing BP::Model::AnnotationSet instance
sub addAnnotations($) {
my $self = shift;
Carp::croak((caller(0))[3].' is an instance method!') if(BP::Model::DEBUG && !ref($self));
my $annotations = shift;
my $hash = $self->hash;
my $annotationsHash = $annotations->hash;
foreach my $key (@{$annotations->order}) {
push(@{$self->order},$key) unless(exists($hash->{$key}));
$hash->{$key} = $annotationsHash->{$key};
}
}
# This method takes as input a list of strings or reference to strings,
# and it applies the substitutions to the referred annotations
sub applyAnnotations(@) {
my $self = shift;
Carp::croak((caller(0))[3].' is an instance method!') if(BP::Model::DEBUG && !ref($self));
my @input = @_;
# Processing the list
foreach my $rvar (@input) {
my $refvar = ref($rvar)?$rvar:\$rvar;
# We want the unique replacements
my %replacements = map { $_ => undef } $$refvar =~ /\{([^}]+)\}/g;
foreach my $var (keys(%replacements)) {
if(exists($self->hash->{$var})) {
my $val = $self->hash->{$var};
$$refvar =~ s/\Q{$var}\E/$val/g;
} else {
Carp::croak("ERROR: annotation $var does not exist");
}
}
}
return @input;
}
# The clone method
sub clone() {
my $self = shift;
Carp::croak((caller(0))[3].' is an instance method!') if(BP::Model::DEBUG && !ref($self));
my %hash = %{$self->hash};
my @order = @{$self->order};
my $retval = bless([\%hash,\@order],ref($self));
return $retval;
}
1;
| inab/BP-Schema-tools | lib/BP/Model/AnnotationSet.pm | Perl | apache-2.0 | 4,757 |
package Tapper::Cmd::DbDeploy;
# ABSTRACT: Tapper - Backend functions for DB deployment
use 5.010;
use strict;
use warnings;
use Moose;
use Tapper::Config;
use Tapper::Schema::TestrunDB;
extends 'Tapper::Cmd';
=head1 NAME
Tapper::Cmd::DbDeploy - Tapper - Backend functions for deploying databases
=head1 SYNOPSIS
This module provides functions to initially set up Tapper in C<$HOME/.tapper/>.
use Tapper::Cmd::DbDeploy;
my $cmd = Tapper::Cmd::DbDeploy->new;
$cmd->dbdeploy("TestrunDB");
=head1 METHODS
=cut
=head2 insert_initial_values($schema, $db)
Insert required minimal set of values.
=cut
sub insert_initial_values
{
my ($schema, $db) = @_;
if ($db eq 'TestrunDB')
{
# ---------- Topic ----------
# official topics
my %topic_description = %Tapper::Schema::TestrunDB::Result::Topic::topic_description;
foreach my $topic_name(keys %topic_description) {
my $topic = $schema->resultset('Topic')->new
({ name => $topic_name,
description => $topic_description{$topic_name},
});
$topic->insert;
}
my $queue = $schema->resultset('Queue')->new
({ name => 'AdHoc',
priority => 1000,
active => 1,
});
$queue->insert;
}
}
=head2 $self->dbdeploy($db)
Deploy a schema into DB.
$db can be "TestrunDB" or "ReportsDB";
Connection info is determined via Tapper::Config.
TODO: still an interactive tool but interactivity should be migrated back into Tapper::CLI::*.
=cut
sub dbdeploy
{
my ($self, $db) = @_;
local $| =1;
my $dsn = Tapper::Config->subconfig->{database}{$db}{dsn};
my $user = Tapper::Config->subconfig->{database}{$db}{username};
my $pw = Tapper::Config->subconfig->{database}{$db}{password};
my $answer;
# ----- really? -----
print "dsn: $dsn\n";
print " Really delete all existing content and initialize from scratch (y/N)? ";
if ( lc substr(<STDIN>, 0, 1) ne 'y') {
say "Skip.";
return;
}
# ----- delete sqlite file -----
if ($dsn =~ /dbi:SQLite:dbname/) {
my ($tmpfname) = $dsn =~ m,dbi:SQLite:dbname=([\w./]+),i;
unlink $tmpfname;
}
my $stderr = '';
{
# capture known errors to hide them from printing
local *STDERR;
open STDERR, '>', \$stderr;
my $schema;
$schema = Tapper::Schema::TestrunDB->connect ($dsn, $user, $pw);
$schema->deploy({ add_drop_table => 1 }); # may fail, does not provide correct order to drop tables
insert_initial_values($schema, $db);
}
say STDERR $stderr if $stderr && $stderr !~ /Please call upgrade on your schema/;
}
1;
| tapper/Tapper-Cmd | lib/Tapper/Cmd/DbDeploy.pm | Perl | bsd-2-clause | 3,097 |
package CoGe::Services::API::Job;
use Mojo::Base 'Mojolicious::Controller';
use Mojo::Asset::File;
use Mojo::JSON qw(decode_json);
#use IO::Compress::Gzip 'gzip';
use Data::Dumper;
use File::Spec::Functions qw( catfile );
use CoGe::Services::Auth qw( init );
use CoGe::JEX::Jex;
use CoGe::Core::Storage qw( get_workflow_paths get_workflow_results );
use CoGe::Factory::RequestFactory;
use CoGe::Factory::PipelineFactory;
sub add {
my $self = shift;
my $payload = shift; # allow special payload to be passed in from other controllers
my $json = $self->req->body; #$self->req->json; # mdb replaced 11/30/16 -- req->json hides JSON errors, doing conversion manually prints them to STDERR
warn "CoGe::Services::API::Job::add\n", Dumper $payload, Dumper $json;
unless ($payload || $json) {
$self->render(status => 400, json => {
error => { Error => "No request body specified" }
});
return;
}
$payload = decode_json($json) if !$payload;
# Authenticate user and connect to the database
my ($db, $user, $conf) = CoGe::Services::Auth::init($self);
# Create request and validate the required fields
my $jex = CoGe::JEX::Jex->new( host => $conf->{JOBSERVER}, port => $conf->{JOBPORT} );
my $request_factory = CoGe::Factory::RequestFactory->new(db => $db, user => $user, jex => $jex);
my $request_handler = $request_factory->get($payload);
unless ($request_handler and $request_handler->is_valid) {
return $self->render(status => 400, json => {
error => { Invalid => "Invalid request" }
});
}
# Check users permissions to execute the request
unless ($request_handler->has_access) {
return $self->render(status => 401, json => {
error => { Auth => "Request denied" }
});
}
# Create pipeline to execute job
my $pipeline_factory = CoGe::Factory::PipelineFactory->new(conf => $conf, user => $user, jex => $jex, db => $db);
my $pipeline = $pipeline_factory->get($payload);
unless ($pipeline && $pipeline->workflow) {
return $self->render(json => {
error => { Error => "Failed to generate pipeline" }
});
}
# Submit pipeline
my $response = $request_handler->execute($pipeline);
unless ($response->{success} && $response->{id}) {
return $self->render(json => {
error => { Error => "JEX returned error on submission" }
});
}
# Log submission
CoGe::Accessory::Web::log_history(
db => $db,
parent_id => $response->{id},
parent_type => 7, #FIXME magic number
user_id => ($user ? $user->id : 0),
page => ($pipeline->page ? $pipeline->page : 'API'), # will be 'API' for external API requests
description => $pipeline->workflow->name,
link => ($response->{site_url} ? $response->{site_url} : '')
);
print STDERR "CoGe::Services::API::Job::add submitted workflow ", $response->{id}, "\n";
# Convert 'success' to boolean
$response->{success} = Mojo::JSON->true;
return $self->render(status => 201, json => $response);
}
sub fetch {
my $self = shift;
my $id = $self->stash('id');
# Validate input
unless ($id) {
$self->render(status => 400, json => {
error => { Error => "Invalid input"}
});
return;
}
# Authenticate user and connect to the database
my ($db, $user, $conf) = CoGe::Services::Auth::init($self);
# User authentication is required -- removed 5/26/2016 because synmap3d needs public access
# unless (defined $user) {
# $self->render(status => 401, json => {
# error => { Auth => "Access denied" }
# });
# return;
# }
# Get job status from JEX
my $jex = CoGe::JEX::Jex->new( host => $conf->{JOBSERVER}, port => $conf->{JOBPORT} );
my $job_status = $jex->get_job($id);
unless ($job_status) {
$self->render(status => 404, json => {
error => { Error => "Resource not found" }
});
return;
}
# unless ($job_status->{status} =~ /completed|running/i) {
# $self->render(json => {
# id => int($id),
# status => $job_status->{status}
# });
# return;
# }
# TODO COGE-472: add read from "debug.log" in results path if JEX no longer has the log in memory
# Add tasks (if any)
my @tasks;
foreach my $task (@{$job_status->{jobs}}) {
my $t = {
started => $task->{started},
ended => $task->{ended},
elapsed => $task->{elapsed},
description => $task->{description},
status => $task->{status},
log => undef
};
if (defined $task->{output}) {
foreach (split(/\\n/, $task->{output})) {
#print STDERR $_, "\n";
next unless ($_ =~ /^'?log\: /);
$_ =~ s/^'?log\: //;
$t->{log} .= $_ . "\n";
}
}
push @tasks, $t;
}
# Add results
my $user_name = $user ? ($user->is_admin ? undef : $user->name) : 'public'; # mdb added 8/12/15 - enables admins to see all workflow results
my $results = get_workflow_results($user_name, $id);
$self->render(json => {
id => int($id),
status => $job_status->{status},
tasks => \@tasks,
results => $results
});
}
sub results { # legacy for Genome Export via HTTP
my $self = shift;
my $id = $self->stash('id');
my $name = $self->stash('name');
# Authenticate user and connect to the database
my ($db, $user, $conf) = CoGe::Services::Auth::init($self);
# User authentication is required
unless (defined $user) {
$self->render(status => 401, json => {
error => { Auth => "Access denied" }
});
return;
}
my ($staging_dir, $result_dir) = get_workflow_paths($user->name, $id);
my $result_file = catfile($result_dir, $name);
warn $result_file;
unless (-r $result_file) {
$self->render(status => 404, json => {
error => { Error => "Resource not found" }
});
return;
}
# Download the file
$self->res->headers->content_disposition("attachment; filename=$name;");
$self->res->content->asset(Mojo::Asset::File->new(path => $result_file));
$self->rendered(200);
}
1;
| asherkhb/coge | modules/Services/lib/CoGe/Services/API/Job.pm | Perl | bsd-2-clause | 6,485 |
#!/usr/bin/perl -w
#
# Copyright 2012, Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# This example gets report fields of a CRITERIA_PERFORMANCE_REPORT.
#
# Tags: ReportDefinitionService.getReportFields
# Author: David Torres <api.davidtorres@gmail.com>
use strict;
use lib "../../../lib";
use Google::Ads::AdWords::Client;
use Google::Ads::AdWords::Logging;
use Cwd qw(abs_path);
# Example main subroutine.
sub get_report_fields {
my $client = shift;
# The type of the report to get fields for.
my $report_type = "CRITERIA_PERFORMANCE_REPORT";
# Get report fields.
my $report_definition_fields =
$client->ReportDefinitionService()->getReportFields({
reportType => $report_type
});
# Display report fields.
printf "The report type \"%s\" contains the following fields:\n",
$report_type;
foreach my $report_definition_field (@{$report_definition_fields}) {
printf("- %s (%s)", $report_definition_field->get_fieldName(),
$report_definition_field->get_fieldType());
if ($report_definition_field->get_enumValues()) {
printf " := [%s]",
join(", ", @{$report_definition_field->get_enumValues()});
}
print "\n";
}
return 1;
}
# Don't run the example if the file is being included.
if (abs_path($0) ne abs_path(__FILE__)) {
return 1;
}
# Log SOAP XML request, response and API errors.
Google::Ads::AdWords::Logging::enable_all_logging();
# Get AdWords Client, credentials will be read from ~/adwords.properties.
my $client = Google::Ads::AdWords::Client->new({version => "v201409"});
# By default examples are set to die on any server returned fault.
$client->set_die_on_faults(1);
# Call the example
get_report_fields($client);
| gitpan/Google-Ads-AdWords-Client | examples/v201409/reporting/get_report_fields.pl | Perl | apache-2.0 | 2,267 |
package Google::Ads::AdWords::v201406::TypeMaps::CustomerFeedService;
use strict;
use warnings;
our $typemap_1 = {
'mutateResponse/rval/value/matchingFunction/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/reason' => 'Google::Ads::AdWords::v201406::EntityNotFound::Reason',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/status' => 'Google::Ads::AdWords::v201406::CustomerFeed::Status',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/reason' => 'Google::Ads::AdWords::v201406::NotEmptyError::Reason',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/reason' => 'Google::Ads::AdWords::v201406::RateExceededError::Reason',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction' => 'Google::Ads::AdWords::v201406::Function',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/reason' => 'Google::Ads::AdWords::v201406::AuthorizationError::Reason',
'Fault/detail/ApiExceptionFault/errors[RequestError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'getResponse/rval/entries' => 'Google::Ads::AdWords::v201406::CustomerFeed',
'mutateResponse/rval/value/status' => 'Google::Ads::AdWords::v201406::CustomerFeed::Status',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[QueryError]/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/placeholderTypes' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'ApiExceptionFault/errors/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'get/selector/paging/numberResults' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'Fault/detail/ApiExceptionFault/errors[CollectionSizeError]/reason' => 'Google::Ads::AdWords::v201406::CollectionSizeError::Reason',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]' => 'Google::Ads::AdWords::v201406::OperationAccessDenied',
'Fault/detail/ApiExceptionFault/errors[CustomerFeedError]/reason' => 'Google::Ads::AdWords::v201406::CustomerFeedError::Reason',
'Fault/detail/ApiExceptionFault/errors[StringLengthError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'Fault/detail/ApiExceptionFault/errors[QueryError]' => 'Google::Ads::AdWords::v201406::QueryError',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]' => 'Google::Ads::AdWords::v201406::RateExceededError',
'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[DistinctError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'ApiExceptionFault/errors/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[RejectedError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'get/selector/ordering/field' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutate/operations/operand/matchingFunction/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/faultstring' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/totalNumEntries' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/reason' => 'Google::Ads::AdWords::v201406::QuotaCheckError::Reason',
'Fault/detail/ApiExceptionFault/errors[DatabaseError]/reason' => 'Google::Ads::AdWords::v201406::DatabaseError::Reason',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/reason' => 'Google::Ads::AdWords::v201406::ClientTermsError::Reason',
'get/selector/ordering/sortOrder' => 'Google::Ads::AdWords::v201406::SortOrder',
'Fault/detail/ApiExceptionFault/errors[QueryError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'Fault/detail/ApiExceptionFault/errors[InternalApiError]' => 'Google::Ads::AdWords::v201406::InternalApiError',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'queryResponse/rval/Page.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'get/selector/predicates/operator' => 'Google::Ads::AdWords::v201406::Predicate::Operator',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction' => 'Google::Ads::AdWords::v201406::Function',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[RangeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse' => 'Google::Ads::AdWords::v201406::CustomerFeedService::getResponse',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'Fault/detail/ApiExceptionFault/errors[IdError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'Fault/detail/ApiExceptionFault/errors[RejectedError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval' => 'Google::Ads::AdWords::v201406::CustomerFeedPage',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'Fault/detail/ApiExceptionFault/errors[ClientTermsError]' => 'Google::Ads::AdWords::v201406::ClientTermsError',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'Fault/detail/ApiExceptionFault/errors[RejectedError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[ClientTermsError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries' => 'Google::Ads::AdWords::v201406::CustomerFeed',
'Fault/detail/ApiExceptionFault/errors[InternalApiError]/reason' => 'Google::Ads::AdWords::v201406::InternalApiError::Reason',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[RejectedError]/reason' => 'Google::Ads::AdWords::v201406::RejectedError::Reason',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'ApiExceptionFault/ApplicationException.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'getResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[DistinctError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'Fault/detail/ApiExceptionFault/errors[StringLengthError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[SelectorError]/reason' => 'Google::Ads::AdWords::v201406::SelectorError::Reason',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[DatabaseError]' => 'Google::Ads::AdWords::v201406::DatabaseError',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[AuthorizationError]' => 'Google::Ads::AdWords::v201406::AuthorizationError',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'get/selector/paging' => 'Google::Ads::AdWords::v201406::Paging',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[CollectionSizeError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operator' => 'Google::Ads::AdWords::v201406::Operator',
'Fault/detail/ApiExceptionFault/errors[RequiredError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'Fault/detail/ApiExceptionFault/errors[FunctionError]' => 'Google::Ads::AdWords::v201406::FunctionError',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[DistinctError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'ApiExceptionFault/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'query' => 'Google::Ads::AdWords::v201406::CustomerFeedService::query',
'getResponse/rval/entries/matchingFunction/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[InternalApiError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[DatabaseError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'Fault/detail/ApiExceptionFault/errors[SizeLimitError]' => 'Google::Ads::AdWords::v201406::SizeLimitError',
'Fault/detail/ApiExceptionFault/errors[RequiredError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'Fault/detail/ApiExceptionFault/errors[InternalApiError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'Fault/faultcode' => 'SOAP::WSDL::XSD::Typelib::Builtin::anyURI',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse' => 'Google::Ads::AdWords::v201406::CustomerFeedService::queryResponse',
'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[FunctionError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'queryResponse/rval/entries/matchingFunction/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[QueryError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/status' => 'Google::Ads::AdWords::v201406::CustomerFeed::Status',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[CollectionSizeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[SelectorError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[DatabaseError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail' => 'Google::Ads::AdWords::FaultDetail',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutate/operations/operand/matchingFunction/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/message' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'getResponse/rval/entries/matchingFunction/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'ApiExceptionFault' => 'Google::Ads::AdWords::v201406::ApiException',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'Fault/detail/ApiExceptionFault/errors[CollectionSizeError]' => 'Google::Ads::AdWords::v201406::CollectionSizeError',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'get/selector/dateRange' => 'Google::Ads::AdWords::v201406::DateRange',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[RangeError]/reason' => 'Google::Ads::AdWords::v201406::RangeError::Reason',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]' => 'Google::Ads::AdWords::v201406::ReadOnlyError',
'Fault/detail/ApiExceptionFault/errors[RequestError]' => 'Google::Ads::AdWords::v201406::RequestError',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'Fault/detail/ApiExceptionFault/errors[RequiredError]' => 'Google::Ads::AdWords::v201406::RequiredError',
'getResponse/rval/entries/placeholderTypes' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[NotEmptyError]' => 'Google::Ads::AdWords::v201406::NotEmptyError',
'Fault/detail/ApiExceptionFault/errors[AuthenticationError]' => 'Google::Ads::AdWords::v201406::AuthenticationError',
'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[QueryError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[SelectorError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'get/selector' => 'Google::Ads::AdWords::v201406::Selector',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/Page.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'mutateResponse/rval/value/placeholderTypes' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'Fault/detail/ApiExceptionFault/errors[EntityNotFound]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/reason' => 'Google::Ads::AdWords::v201406::AuthenticationError::Reason',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[RangeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[RequestError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/Operation.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/rateScope' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'Fault/detail/ApiExceptionFault/errors[StringLengthError]/reason' => 'Google::Ads::AdWords::v201406::StringLengthError::Reason',
'get/selector/predicates/field' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse' => 'Google::Ads::AdWords::v201406::CustomerFeedService::mutateResponse',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'get/selector/predicates' => 'Google::Ads::AdWords::v201406::Predicate',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'mutateResponse/rval/value/matchingFunction/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[IdError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'Fault/detail/ApiExceptionFault/errors[InternalApiError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[IdError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'get/selector/fields' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'get' => 'Google::Ads::AdWords::v201406::CustomerFeedService::get',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault' => 'SOAP::WSDL::SOAP::Typelib::Fault11',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'Fault/detail/ApiExceptionFault/errors[RequestError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]' => 'Google::Ads::AdWords::v201406::QuotaCheckError',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'Fault/detail/ApiExceptionFault/errors[RejectedError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'Fault/detail/ApiExceptionFault/errors[AuthenticationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'get/selector/dateRange/max' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'Fault/detail/ApiExceptionFault/errors[RangeError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[SelectorError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'get/selector/paging/startIndex' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[StringLengthError]' => 'Google::Ads::AdWords::v201406::StringLengthError',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[EntityNotFound]' => 'Google::Ads::AdWords::v201406::EntityNotFound',
'Fault/detail/ApiExceptionFault/errors[FunctionError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'Fault/detail/ApiExceptionFault/errors[CustomerFeedError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[QueryError]/reason' => 'Google::Ads::AdWords::v201406::QueryError::Reason',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/status' => 'Google::Ads::AdWords::v201406::CustomerFeed::Status',
'Fault/detail/ApiExceptionFault/errors[DistinctError]/reason' => 'Google::Ads::AdWords::v201406::DistinctError::Reason',
'Fault/detail/ApiExceptionFault/errors[StringLengthError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'get/selector/predicates/values' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'ApiExceptionFault/errors/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval' => 'Google::Ads::AdWords::v201406::CustomerFeedPage',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[FunctionError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'Fault/detail/ApiExceptionFault/errors[FunctionError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'mutateResponse/rval/value/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'Fault/detail/ApiExceptionFault/errors[CustomerFeedError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction' => 'Google::Ads::AdWords::v201406::Function',
'Fault/detail/ApiExceptionFault/errors[DistinctError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'ApiExceptionFault/errors/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'get/selector/dateRange/min' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'Fault/detail/ApiExceptionFault/errors[CollectionSizeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'Fault/detail/ApiExceptionFault/errors[RangeError]' => 'Google::Ads::AdWords::v201406::RangeError',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/retryAfterSeconds' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'Fault/detail/ApiExceptionFault/errors[InternalApiError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutate/operations/operand/matchingFunction/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'Fault/detail/ApiExceptionFault/errors[DatabaseError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'Fault/detail/ApiExceptionFault/errors[AuthorizationError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[RequiredError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'Fault/detail/ApiExceptionFault/errors[RequiredError]/reason' => 'Google::Ads::AdWords::v201406::RequiredError::Reason',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[SelectorError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/ApplicationException.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'Fault/detail/ApiExceptionFault/errors[IdError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'getResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[DatabaseError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/reason' => 'Google::Ads::AdWords::v201406::ReadOnlyError::Reason',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction' => 'Google::Ads::AdWords::v201406::Function',
'mutate/operations/operand/matchingFunction/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[IdError]/reason' => 'Google::Ads::AdWords::v201406::IdError::Reason',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/faultactor' => 'SOAP::WSDL::XSD::Typelib::Builtin::token',
'ApiExceptionFault/errors' => 'Google::Ads::AdWords::v201406::ApiError',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate' => 'Google::Ads::AdWords::v201406::CustomerFeedService::mutate',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[QueryError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'Fault/detail/ApiExceptionFault/errors' => 'Google::Ads::AdWords::v201406::ApiError',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'Fault/detail/ApiExceptionFault/errors[RequestError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'queryResponse/rval/entries/placeholderTypes' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'get/selector/ordering' => 'Google::Ads::AdWords::v201406::OrderBy',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault' => 'Google::Ads::AdWords::v201406::ApiException',
'Fault/detail/ApiExceptionFault/errors[CustomerFeedError]' => 'Google::Ads::AdWords::v201406::CustomerFeedError',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[SizeLimitError]/reason' => 'Google::Ads::AdWords::v201406::SizeLimitError::Reason',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[QuotaCheckError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'Fault/detail/ApiExceptionFault/errors[CustomerFeedError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/ListReturnValue.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[DistinctError]' => 'Google::Ads::AdWords::v201406::DistinctError',
'Fault/detail/ApiExceptionFault/errors[RequestError]/reason' => 'Google::Ads::AdWords::v201406::RequestError::Reason',
'mutate/operations/operand/matchingFunction/lhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[ReadOnlyError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'Fault/detail/ApiExceptionFault/errors[RequiredError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[IdError]' => 'Google::Ads::AdWords::v201406::IdError',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'Fault/detail/ApiExceptionFault/errors[CustomerFeedError]/fieldPath' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/unit' => 'Google::Ads::AdWords::v201406::ConstantOperand::Unit',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[RangeError]/ApiError.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[StringLengthError]/trigger' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval' => 'Google::Ads::AdWords::v201406::CustomerFeedReturnValue',
'query/query' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'Fault/detail/ApiExceptionFault/errors[OperationAccessDenied]/reason' => 'Google::Ads::AdWords::v201406::OperationAccessDenied::Reason',
'getResponse/rval/totalNumEntries' => 'SOAP::WSDL::XSD::Typelib::Builtin::int',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/type' => 'Google::Ads::AdWords::v201406::ConstantOperand::ConstantType',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[NotEmptyError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedAttributeId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value' => 'Google::Ads::AdWords::v201406::CustomerFeed',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value' => 'Google::Ads::AdWords::v201406::Function',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'Fault/detail/ApiExceptionFault/errors[RejectedError]' => 'Google::Ads::AdWords::v201406::RejectedError',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]' => 'Google::Ads::AdWords::v201406::RequestContextOperand',
'mutateResponse/rval/value/matchingFunction/rhsOperand[FunctionOperand]/value/operator' => 'Google::Ads::AdWords::v201406::Function::Operator',
'mutateResponse/rval/value/matchingFunction/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/lhsOperand[RequestContextOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'Fault/detail/ApiExceptionFault/errors[CollectionSizeError]/errorString' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/stringValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/lhsOperand[ConstantOperand]' => 'Google::Ads::AdWords::v201406::ConstantOperand',
'mutateResponse/rval/value/matchingFunction/lhsOperand' => 'Google::Ads::AdWords::v201406::FunctionArgumentOperand',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]' => 'Google::Ads::AdWords::v201406::FunctionOperand',
'getResponse/rval/entries/matchingFunction/rhsOperand[FeedAttributeOperand]' => 'Google::Ads::AdWords::v201406::FeedAttributeOperand',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[FunctionOperand]/value/rhsOperand[RequestContextOperand]/contextType' => 'Google::Ads::AdWords::v201406::RequestContextOperand::ContextType',
'queryResponse/rval/entries/matchingFunction/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations/operand' => 'Google::Ads::AdWords::v201406::CustomerFeed',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'getResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'Fault/detail/ApiExceptionFault/errors[RateExceededError]/rateName' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'mutate/operations/operand/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'queryResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[FeedAttributeOperand]/FunctionArgumentOperand.Type' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'getResponse/rval/entries/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/longValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutateResponse/rval/value/matchingFunction/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'Fault/detail/ApiExceptionFault/errors[FunctionError]/reason' => 'Google::Ads::AdWords::v201406::FunctionError::Reason',
'Fault/detail/ApiExceptionFault/errors[SelectorError]' => 'Google::Ads::AdWords::v201406::SelectorError',
'mutate/operations/operand/matchingFunction/rhsOperand[FunctionOperand]/value/lhsOperand[FunctionOperand]/value/lhsOperand[ConstantOperand]/doubleValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::double',
'queryResponse/rval/entries/matchingFunction/lhsOperand[FunctionOperand]/value/rhsOperand[ConstantOperand]/booleanValue' => 'SOAP::WSDL::XSD::Typelib::Builtin::boolean',
'getResponse/rval/entries/feedId' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'mutate/operations' => 'Google::Ads::AdWords::v201406::CustomerFeedOperation'
};
;
sub get_class {
my $name = join '/', @{ $_[1] };
return $typemap_1->{ $name };
}
sub get_typemap {
return $typemap_1;
}
1;
__END__
__END__
=pod
=head1 NAME
Google::Ads::AdWords::v201406::TypeMaps::CustomerFeedService - typemap for CustomerFeedService
=head1 DESCRIPTION
Typemap created by SOAP::WSDL for map-based SOAP message parsers.
=cut
| gitpan/GOOGLE-ADWORDS-PERL-CLIENT | lib/Google/Ads/AdWords/v201406/TypeMaps/CustomerFeedService.pm | Perl | apache-2.0 | 169,993 |
package #
Date::Manip::TZ::atfaro00;
# Copyright (c) 2008-2014 Sullivan Beck. All rights reserved.
# This program is free software; you can redistribute it and/or modify it
# under the same terms as Perl itself.
# This file was automatically generated. Any changes to this file will
# be lost the next time 'tzdata' is run.
# Generated on: Fri Nov 21 10:41:36 EST 2014
# Data version: tzdata2014j
# Code version: tzcode2014j
# This module contains data from the zoneinfo time zone database. The original
# data was obtained from the URL:
# ftp://ftp.iana.org/tz
use strict;
use warnings;
require 5.010000;
our (%Dates,%LastRule);
END {
undef %Dates;
undef %LastRule;
}
our ($VERSION);
$VERSION='6.48';
END { undef $VERSION; }
%Dates = (
1 =>
[
[ [1,1,2,0,0,0],[1,1,1,23,32,56],'-00:27:04',[0,-27,-4],
'LMT',0,[1908,1,11,0,27,3],[1908,1,10,23,59,59],
'0001010200:00:00','0001010123:32:56','1908011100:27:03','1908011023:59:59' ],
],
1908 =>
[
[ [1908,1,11,0,27,4],[1908,1,11,0,27,4],'+00:00:00',[0,0,0],
'WET',0,[1981,3,29,0,59,59],[1981,3,29,0,59,59],
'1908011100:27:04','1908011100:27:04','1981032900:59:59','1981032900:59:59' ],
],
1981 =>
[
[ [1981,3,29,1,0,0],[1981,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1981,9,27,0,59,59],[1981,9,27,1,59,59],
'1981032901:00:00','1981032902:00:00','1981092700:59:59','1981092701:59:59' ],
[ [1981,9,27,1,0,0],[1981,9,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1982,3,28,0,59,59],[1982,3,28,0,59,59],
'1981092701:00:00','1981092701:00:00','1982032800:59:59','1982032800:59:59' ],
],
1982 =>
[
[ [1982,3,28,1,0,0],[1982,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1982,9,26,0,59,59],[1982,9,26,1,59,59],
'1982032801:00:00','1982032802:00:00','1982092600:59:59','1982092601:59:59' ],
[ [1982,9,26,1,0,0],[1982,9,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1983,3,27,0,59,59],[1983,3,27,0,59,59],
'1982092601:00:00','1982092601:00:00','1983032700:59:59','1983032700:59:59' ],
],
1983 =>
[
[ [1983,3,27,1,0,0],[1983,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1983,9,25,0,59,59],[1983,9,25,1,59,59],
'1983032701:00:00','1983032702:00:00','1983092500:59:59','1983092501:59:59' ],
[ [1983,9,25,1,0,0],[1983,9,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1984,3,25,0,59,59],[1984,3,25,0,59,59],
'1983092501:00:00','1983092501:00:00','1984032500:59:59','1984032500:59:59' ],
],
1984 =>
[
[ [1984,3,25,1,0,0],[1984,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1984,9,30,0,59,59],[1984,9,30,1,59,59],
'1984032501:00:00','1984032502:00:00','1984093000:59:59','1984093001:59:59' ],
[ [1984,9,30,1,0,0],[1984,9,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1985,3,31,0,59,59],[1985,3,31,0,59,59],
'1984093001:00:00','1984093001:00:00','1985033100:59:59','1985033100:59:59' ],
],
1985 =>
[
[ [1985,3,31,1,0,0],[1985,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1985,9,29,0,59,59],[1985,9,29,1,59,59],
'1985033101:00:00','1985033102:00:00','1985092900:59:59','1985092901:59:59' ],
[ [1985,9,29,1,0,0],[1985,9,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1986,3,30,0,59,59],[1986,3,30,0,59,59],
'1985092901:00:00','1985092901:00:00','1986033000:59:59','1986033000:59:59' ],
],
1986 =>
[
[ [1986,3,30,1,0,0],[1986,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1986,9,28,0,59,59],[1986,9,28,1,59,59],
'1986033001:00:00','1986033002:00:00','1986092800:59:59','1986092801:59:59' ],
[ [1986,9,28,1,0,0],[1986,9,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1987,3,29,0,59,59],[1987,3,29,0,59,59],
'1986092801:00:00','1986092801:00:00','1987032900:59:59','1987032900:59:59' ],
],
1987 =>
[
[ [1987,3,29,1,0,0],[1987,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1987,9,27,0,59,59],[1987,9,27,1,59,59],
'1987032901:00:00','1987032902:00:00','1987092700:59:59','1987092701:59:59' ],
[ [1987,9,27,1,0,0],[1987,9,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1988,3,27,0,59,59],[1988,3,27,0,59,59],
'1987092701:00:00','1987092701:00:00','1988032700:59:59','1988032700:59:59' ],
],
1988 =>
[
[ [1988,3,27,1,0,0],[1988,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1988,9,25,0,59,59],[1988,9,25,1,59,59],
'1988032701:00:00','1988032702:00:00','1988092500:59:59','1988092501:59:59' ],
[ [1988,9,25,1,0,0],[1988,9,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1989,3,26,0,59,59],[1989,3,26,0,59,59],
'1988092501:00:00','1988092501:00:00','1989032600:59:59','1989032600:59:59' ],
],
1989 =>
[
[ [1989,3,26,1,0,0],[1989,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1989,9,24,0,59,59],[1989,9,24,1,59,59],
'1989032601:00:00','1989032602:00:00','1989092400:59:59','1989092401:59:59' ],
[ [1989,9,24,1,0,0],[1989,9,24,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1990,3,25,0,59,59],[1990,3,25,0,59,59],
'1989092401:00:00','1989092401:00:00','1990032500:59:59','1990032500:59:59' ],
],
1990 =>
[
[ [1990,3,25,1,0,0],[1990,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1990,9,30,0,59,59],[1990,9,30,1,59,59],
'1990032501:00:00','1990032502:00:00','1990093000:59:59','1990093001:59:59' ],
[ [1990,9,30,1,0,0],[1990,9,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1991,3,31,0,59,59],[1991,3,31,0,59,59],
'1990093001:00:00','1990093001:00:00','1991033100:59:59','1991033100:59:59' ],
],
1991 =>
[
[ [1991,3,31,1,0,0],[1991,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1991,9,29,0,59,59],[1991,9,29,1,59,59],
'1991033101:00:00','1991033102:00:00','1991092900:59:59','1991092901:59:59' ],
[ [1991,9,29,1,0,0],[1991,9,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1992,3,29,0,59,59],[1992,3,29,0,59,59],
'1991092901:00:00','1991092901:00:00','1992032900:59:59','1992032900:59:59' ],
],
1992 =>
[
[ [1992,3,29,1,0,0],[1992,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1992,9,27,0,59,59],[1992,9,27,1,59,59],
'1992032901:00:00','1992032902:00:00','1992092700:59:59','1992092701:59:59' ],
[ [1992,9,27,1,0,0],[1992,9,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1993,3,28,0,59,59],[1993,3,28,0,59,59],
'1992092701:00:00','1992092701:00:00','1993032800:59:59','1993032800:59:59' ],
],
1993 =>
[
[ [1993,3,28,1,0,0],[1993,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1993,9,26,0,59,59],[1993,9,26,1,59,59],
'1993032801:00:00','1993032802:00:00','1993092600:59:59','1993092601:59:59' ],
[ [1993,9,26,1,0,0],[1993,9,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1994,3,27,0,59,59],[1994,3,27,0,59,59],
'1993092601:00:00','1993092601:00:00','1994032700:59:59','1994032700:59:59' ],
],
1994 =>
[
[ [1994,3,27,1,0,0],[1994,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1994,9,25,0,59,59],[1994,9,25,1,59,59],
'1994032701:00:00','1994032702:00:00','1994092500:59:59','1994092501:59:59' ],
[ [1994,9,25,1,0,0],[1994,9,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1995,3,26,0,59,59],[1995,3,26,0,59,59],
'1994092501:00:00','1994092501:00:00','1995032600:59:59','1995032600:59:59' ],
],
1995 =>
[
[ [1995,3,26,1,0,0],[1995,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1995,9,24,0,59,59],[1995,9,24,1,59,59],
'1995032601:00:00','1995032602:00:00','1995092400:59:59','1995092401:59:59' ],
[ [1995,9,24,1,0,0],[1995,9,24,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1996,3,31,0,59,59],[1996,3,31,0,59,59],
'1995092401:00:00','1995092401:00:00','1996033100:59:59','1996033100:59:59' ],
],
1996 =>
[
[ [1996,3,31,1,0,0],[1996,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1996,10,27,0,59,59],[1996,10,27,1,59,59],
'1996033101:00:00','1996033102:00:00','1996102700:59:59','1996102701:59:59' ],
[ [1996,10,27,1,0,0],[1996,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1997,3,30,0,59,59],[1997,3,30,0,59,59],
'1996102701:00:00','1996102701:00:00','1997033000:59:59','1997033000:59:59' ],
],
1997 =>
[
[ [1997,3,30,1,0,0],[1997,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1997,10,26,0,59,59],[1997,10,26,1,59,59],
'1997033001:00:00','1997033002:00:00','1997102600:59:59','1997102601:59:59' ],
[ [1997,10,26,1,0,0],[1997,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1998,3,29,0,59,59],[1998,3,29,0,59,59],
'1997102601:00:00','1997102601:00:00','1998032900:59:59','1998032900:59:59' ],
],
1998 =>
[
[ [1998,3,29,1,0,0],[1998,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1998,10,25,0,59,59],[1998,10,25,1,59,59],
'1998032901:00:00','1998032902:00:00','1998102500:59:59','1998102501:59:59' ],
[ [1998,10,25,1,0,0],[1998,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[1999,3,28,0,59,59],[1999,3,28,0,59,59],
'1998102501:00:00','1998102501:00:00','1999032800:59:59','1999032800:59:59' ],
],
1999 =>
[
[ [1999,3,28,1,0,0],[1999,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[1999,10,31,0,59,59],[1999,10,31,1,59,59],
'1999032801:00:00','1999032802:00:00','1999103100:59:59','1999103101:59:59' ],
[ [1999,10,31,1,0,0],[1999,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2000,3,26,0,59,59],[2000,3,26,0,59,59],
'1999103101:00:00','1999103101:00:00','2000032600:59:59','2000032600:59:59' ],
],
2000 =>
[
[ [2000,3,26,1,0,0],[2000,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2000,10,29,0,59,59],[2000,10,29,1,59,59],
'2000032601:00:00','2000032602:00:00','2000102900:59:59','2000102901:59:59' ],
[ [2000,10,29,1,0,0],[2000,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2001,3,25,0,59,59],[2001,3,25,0,59,59],
'2000102901:00:00','2000102901:00:00','2001032500:59:59','2001032500:59:59' ],
],
2001 =>
[
[ [2001,3,25,1,0,0],[2001,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2001,10,28,0,59,59],[2001,10,28,1,59,59],
'2001032501:00:00','2001032502:00:00','2001102800:59:59','2001102801:59:59' ],
[ [2001,10,28,1,0,0],[2001,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2002,3,31,0,59,59],[2002,3,31,0,59,59],
'2001102801:00:00','2001102801:00:00','2002033100:59:59','2002033100:59:59' ],
],
2002 =>
[
[ [2002,3,31,1,0,0],[2002,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2002,10,27,0,59,59],[2002,10,27,1,59,59],
'2002033101:00:00','2002033102:00:00','2002102700:59:59','2002102701:59:59' ],
[ [2002,10,27,1,0,0],[2002,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2003,3,30,0,59,59],[2003,3,30,0,59,59],
'2002102701:00:00','2002102701:00:00','2003033000:59:59','2003033000:59:59' ],
],
2003 =>
[
[ [2003,3,30,1,0,0],[2003,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2003,10,26,0,59,59],[2003,10,26,1,59,59],
'2003033001:00:00','2003033002:00:00','2003102600:59:59','2003102601:59:59' ],
[ [2003,10,26,1,0,0],[2003,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2004,3,28,0,59,59],[2004,3,28,0,59,59],
'2003102601:00:00','2003102601:00:00','2004032800:59:59','2004032800:59:59' ],
],
2004 =>
[
[ [2004,3,28,1,0,0],[2004,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2004,10,31,0,59,59],[2004,10,31,1,59,59],
'2004032801:00:00','2004032802:00:00','2004103100:59:59','2004103101:59:59' ],
[ [2004,10,31,1,0,0],[2004,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2005,3,27,0,59,59],[2005,3,27,0,59,59],
'2004103101:00:00','2004103101:00:00','2005032700:59:59','2005032700:59:59' ],
],
2005 =>
[
[ [2005,3,27,1,0,0],[2005,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2005,10,30,0,59,59],[2005,10,30,1,59,59],
'2005032701:00:00','2005032702:00:00','2005103000:59:59','2005103001:59:59' ],
[ [2005,10,30,1,0,0],[2005,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2006,3,26,0,59,59],[2006,3,26,0,59,59],
'2005103001:00:00','2005103001:00:00','2006032600:59:59','2006032600:59:59' ],
],
2006 =>
[
[ [2006,3,26,1,0,0],[2006,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2006,10,29,0,59,59],[2006,10,29,1,59,59],
'2006032601:00:00','2006032602:00:00','2006102900:59:59','2006102901:59:59' ],
[ [2006,10,29,1,0,0],[2006,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2007,3,25,0,59,59],[2007,3,25,0,59,59],
'2006102901:00:00','2006102901:00:00','2007032500:59:59','2007032500:59:59' ],
],
2007 =>
[
[ [2007,3,25,1,0,0],[2007,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2007,10,28,0,59,59],[2007,10,28,1,59,59],
'2007032501:00:00','2007032502:00:00','2007102800:59:59','2007102801:59:59' ],
[ [2007,10,28,1,0,0],[2007,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2008,3,30,0,59,59],[2008,3,30,0,59,59],
'2007102801:00:00','2007102801:00:00','2008033000:59:59','2008033000:59:59' ],
],
2008 =>
[
[ [2008,3,30,1,0,0],[2008,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2008,10,26,0,59,59],[2008,10,26,1,59,59],
'2008033001:00:00','2008033002:00:00','2008102600:59:59','2008102601:59:59' ],
[ [2008,10,26,1,0,0],[2008,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2009,3,29,0,59,59],[2009,3,29,0,59,59],
'2008102601:00:00','2008102601:00:00','2009032900:59:59','2009032900:59:59' ],
],
2009 =>
[
[ [2009,3,29,1,0,0],[2009,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2009,10,25,0,59,59],[2009,10,25,1,59,59],
'2009032901:00:00','2009032902:00:00','2009102500:59:59','2009102501:59:59' ],
[ [2009,10,25,1,0,0],[2009,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2010,3,28,0,59,59],[2010,3,28,0,59,59],
'2009102501:00:00','2009102501:00:00','2010032800:59:59','2010032800:59:59' ],
],
2010 =>
[
[ [2010,3,28,1,0,0],[2010,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2010,10,31,0,59,59],[2010,10,31,1,59,59],
'2010032801:00:00','2010032802:00:00','2010103100:59:59','2010103101:59:59' ],
[ [2010,10,31,1,0,0],[2010,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2011,3,27,0,59,59],[2011,3,27,0,59,59],
'2010103101:00:00','2010103101:00:00','2011032700:59:59','2011032700:59:59' ],
],
2011 =>
[
[ [2011,3,27,1,0,0],[2011,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2011,10,30,0,59,59],[2011,10,30,1,59,59],
'2011032701:00:00','2011032702:00:00','2011103000:59:59','2011103001:59:59' ],
[ [2011,10,30,1,0,0],[2011,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2012,3,25,0,59,59],[2012,3,25,0,59,59],
'2011103001:00:00','2011103001:00:00','2012032500:59:59','2012032500:59:59' ],
],
2012 =>
[
[ [2012,3,25,1,0,0],[2012,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2012,10,28,0,59,59],[2012,10,28,1,59,59],
'2012032501:00:00','2012032502:00:00','2012102800:59:59','2012102801:59:59' ],
[ [2012,10,28,1,0,0],[2012,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2013,3,31,0,59,59],[2013,3,31,0,59,59],
'2012102801:00:00','2012102801:00:00','2013033100:59:59','2013033100:59:59' ],
],
2013 =>
[
[ [2013,3,31,1,0,0],[2013,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2013,10,27,0,59,59],[2013,10,27,1,59,59],
'2013033101:00:00','2013033102:00:00','2013102700:59:59','2013102701:59:59' ],
[ [2013,10,27,1,0,0],[2013,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2014,3,30,0,59,59],[2014,3,30,0,59,59],
'2013102701:00:00','2013102701:00:00','2014033000:59:59','2014033000:59:59' ],
],
2014 =>
[
[ [2014,3,30,1,0,0],[2014,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2014,10,26,0,59,59],[2014,10,26,1,59,59],
'2014033001:00:00','2014033002:00:00','2014102600:59:59','2014102601:59:59' ],
[ [2014,10,26,1,0,0],[2014,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2015,3,29,0,59,59],[2015,3,29,0,59,59],
'2014102601:00:00','2014102601:00:00','2015032900:59:59','2015032900:59:59' ],
],
2015 =>
[
[ [2015,3,29,1,0,0],[2015,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2015,10,25,0,59,59],[2015,10,25,1,59,59],
'2015032901:00:00','2015032902:00:00','2015102500:59:59','2015102501:59:59' ],
[ [2015,10,25,1,0,0],[2015,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2016,3,27,0,59,59],[2016,3,27,0,59,59],
'2015102501:00:00','2015102501:00:00','2016032700:59:59','2016032700:59:59' ],
],
2016 =>
[
[ [2016,3,27,1,0,0],[2016,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2016,10,30,0,59,59],[2016,10,30,1,59,59],
'2016032701:00:00','2016032702:00:00','2016103000:59:59','2016103001:59:59' ],
[ [2016,10,30,1,0,0],[2016,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2017,3,26,0,59,59],[2017,3,26,0,59,59],
'2016103001:00:00','2016103001:00:00','2017032600:59:59','2017032600:59:59' ],
],
2017 =>
[
[ [2017,3,26,1,0,0],[2017,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2017,10,29,0,59,59],[2017,10,29,1,59,59],
'2017032601:00:00','2017032602:00:00','2017102900:59:59','2017102901:59:59' ],
[ [2017,10,29,1,0,0],[2017,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2018,3,25,0,59,59],[2018,3,25,0,59,59],
'2017102901:00:00','2017102901:00:00','2018032500:59:59','2018032500:59:59' ],
],
2018 =>
[
[ [2018,3,25,1,0,0],[2018,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2018,10,28,0,59,59],[2018,10,28,1,59,59],
'2018032501:00:00','2018032502:00:00','2018102800:59:59','2018102801:59:59' ],
[ [2018,10,28,1,0,0],[2018,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2019,3,31,0,59,59],[2019,3,31,0,59,59],
'2018102801:00:00','2018102801:00:00','2019033100:59:59','2019033100:59:59' ],
],
2019 =>
[
[ [2019,3,31,1,0,0],[2019,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2019,10,27,0,59,59],[2019,10,27,1,59,59],
'2019033101:00:00','2019033102:00:00','2019102700:59:59','2019102701:59:59' ],
[ [2019,10,27,1,0,0],[2019,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2020,3,29,0,59,59],[2020,3,29,0,59,59],
'2019102701:00:00','2019102701:00:00','2020032900:59:59','2020032900:59:59' ],
],
2020 =>
[
[ [2020,3,29,1,0,0],[2020,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2020,10,25,0,59,59],[2020,10,25,1,59,59],
'2020032901:00:00','2020032902:00:00','2020102500:59:59','2020102501:59:59' ],
[ [2020,10,25,1,0,0],[2020,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2021,3,28,0,59,59],[2021,3,28,0,59,59],
'2020102501:00:00','2020102501:00:00','2021032800:59:59','2021032800:59:59' ],
],
2021 =>
[
[ [2021,3,28,1,0,0],[2021,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2021,10,31,0,59,59],[2021,10,31,1,59,59],
'2021032801:00:00','2021032802:00:00','2021103100:59:59','2021103101:59:59' ],
[ [2021,10,31,1,0,0],[2021,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2022,3,27,0,59,59],[2022,3,27,0,59,59],
'2021103101:00:00','2021103101:00:00','2022032700:59:59','2022032700:59:59' ],
],
2022 =>
[
[ [2022,3,27,1,0,0],[2022,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2022,10,30,0,59,59],[2022,10,30,1,59,59],
'2022032701:00:00','2022032702:00:00','2022103000:59:59','2022103001:59:59' ],
[ [2022,10,30,1,0,0],[2022,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2023,3,26,0,59,59],[2023,3,26,0,59,59],
'2022103001:00:00','2022103001:00:00','2023032600:59:59','2023032600:59:59' ],
],
2023 =>
[
[ [2023,3,26,1,0,0],[2023,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2023,10,29,0,59,59],[2023,10,29,1,59,59],
'2023032601:00:00','2023032602:00:00','2023102900:59:59','2023102901:59:59' ],
[ [2023,10,29,1,0,0],[2023,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2024,3,31,0,59,59],[2024,3,31,0,59,59],
'2023102901:00:00','2023102901:00:00','2024033100:59:59','2024033100:59:59' ],
],
2024 =>
[
[ [2024,3,31,1,0,0],[2024,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2024,10,27,0,59,59],[2024,10,27,1,59,59],
'2024033101:00:00','2024033102:00:00','2024102700:59:59','2024102701:59:59' ],
[ [2024,10,27,1,0,0],[2024,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2025,3,30,0,59,59],[2025,3,30,0,59,59],
'2024102701:00:00','2024102701:00:00','2025033000:59:59','2025033000:59:59' ],
],
2025 =>
[
[ [2025,3,30,1,0,0],[2025,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2025,10,26,0,59,59],[2025,10,26,1,59,59],
'2025033001:00:00','2025033002:00:00','2025102600:59:59','2025102601:59:59' ],
[ [2025,10,26,1,0,0],[2025,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2026,3,29,0,59,59],[2026,3,29,0,59,59],
'2025102601:00:00','2025102601:00:00','2026032900:59:59','2026032900:59:59' ],
],
2026 =>
[
[ [2026,3,29,1,0,0],[2026,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2026,10,25,0,59,59],[2026,10,25,1,59,59],
'2026032901:00:00','2026032902:00:00','2026102500:59:59','2026102501:59:59' ],
[ [2026,10,25,1,0,0],[2026,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2027,3,28,0,59,59],[2027,3,28,0,59,59],
'2026102501:00:00','2026102501:00:00','2027032800:59:59','2027032800:59:59' ],
],
2027 =>
[
[ [2027,3,28,1,0,0],[2027,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2027,10,31,0,59,59],[2027,10,31,1,59,59],
'2027032801:00:00','2027032802:00:00','2027103100:59:59','2027103101:59:59' ],
[ [2027,10,31,1,0,0],[2027,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2028,3,26,0,59,59],[2028,3,26,0,59,59],
'2027103101:00:00','2027103101:00:00','2028032600:59:59','2028032600:59:59' ],
],
2028 =>
[
[ [2028,3,26,1,0,0],[2028,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2028,10,29,0,59,59],[2028,10,29,1,59,59],
'2028032601:00:00','2028032602:00:00','2028102900:59:59','2028102901:59:59' ],
[ [2028,10,29,1,0,0],[2028,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2029,3,25,0,59,59],[2029,3,25,0,59,59],
'2028102901:00:00','2028102901:00:00','2029032500:59:59','2029032500:59:59' ],
],
2029 =>
[
[ [2029,3,25,1,0,0],[2029,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2029,10,28,0,59,59],[2029,10,28,1,59,59],
'2029032501:00:00','2029032502:00:00','2029102800:59:59','2029102801:59:59' ],
[ [2029,10,28,1,0,0],[2029,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2030,3,31,0,59,59],[2030,3,31,0,59,59],
'2029102801:00:00','2029102801:00:00','2030033100:59:59','2030033100:59:59' ],
],
2030 =>
[
[ [2030,3,31,1,0,0],[2030,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2030,10,27,0,59,59],[2030,10,27,1,59,59],
'2030033101:00:00','2030033102:00:00','2030102700:59:59','2030102701:59:59' ],
[ [2030,10,27,1,0,0],[2030,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2031,3,30,0,59,59],[2031,3,30,0,59,59],
'2030102701:00:00','2030102701:00:00','2031033000:59:59','2031033000:59:59' ],
],
2031 =>
[
[ [2031,3,30,1,0,0],[2031,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2031,10,26,0,59,59],[2031,10,26,1,59,59],
'2031033001:00:00','2031033002:00:00','2031102600:59:59','2031102601:59:59' ],
[ [2031,10,26,1,0,0],[2031,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2032,3,28,0,59,59],[2032,3,28,0,59,59],
'2031102601:00:00','2031102601:00:00','2032032800:59:59','2032032800:59:59' ],
],
2032 =>
[
[ [2032,3,28,1,0,0],[2032,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2032,10,31,0,59,59],[2032,10,31,1,59,59],
'2032032801:00:00','2032032802:00:00','2032103100:59:59','2032103101:59:59' ],
[ [2032,10,31,1,0,0],[2032,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2033,3,27,0,59,59],[2033,3,27,0,59,59],
'2032103101:00:00','2032103101:00:00','2033032700:59:59','2033032700:59:59' ],
],
2033 =>
[
[ [2033,3,27,1,0,0],[2033,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2033,10,30,0,59,59],[2033,10,30,1,59,59],
'2033032701:00:00','2033032702:00:00','2033103000:59:59','2033103001:59:59' ],
[ [2033,10,30,1,0,0],[2033,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2034,3,26,0,59,59],[2034,3,26,0,59,59],
'2033103001:00:00','2033103001:00:00','2034032600:59:59','2034032600:59:59' ],
],
2034 =>
[
[ [2034,3,26,1,0,0],[2034,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2034,10,29,0,59,59],[2034,10,29,1,59,59],
'2034032601:00:00','2034032602:00:00','2034102900:59:59','2034102901:59:59' ],
[ [2034,10,29,1,0,0],[2034,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2035,3,25,0,59,59],[2035,3,25,0,59,59],
'2034102901:00:00','2034102901:00:00','2035032500:59:59','2035032500:59:59' ],
],
2035 =>
[
[ [2035,3,25,1,0,0],[2035,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2035,10,28,0,59,59],[2035,10,28,1,59,59],
'2035032501:00:00','2035032502:00:00','2035102800:59:59','2035102801:59:59' ],
[ [2035,10,28,1,0,0],[2035,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2036,3,30,0,59,59],[2036,3,30,0,59,59],
'2035102801:00:00','2035102801:00:00','2036033000:59:59','2036033000:59:59' ],
],
2036 =>
[
[ [2036,3,30,1,0,0],[2036,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2036,10,26,0,59,59],[2036,10,26,1,59,59],
'2036033001:00:00','2036033002:00:00','2036102600:59:59','2036102601:59:59' ],
[ [2036,10,26,1,0,0],[2036,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2037,3,29,0,59,59],[2037,3,29,0,59,59],
'2036102601:00:00','2036102601:00:00','2037032900:59:59','2037032900:59:59' ],
],
2037 =>
[
[ [2037,3,29,1,0,0],[2037,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2037,10,25,0,59,59],[2037,10,25,1,59,59],
'2037032901:00:00','2037032902:00:00','2037102500:59:59','2037102501:59:59' ],
[ [2037,10,25,1,0,0],[2037,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2038,3,28,0,59,59],[2038,3,28,0,59,59],
'2037102501:00:00','2037102501:00:00','2038032800:59:59','2038032800:59:59' ],
],
2038 =>
[
[ [2038,3,28,1,0,0],[2038,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2038,10,31,0,59,59],[2038,10,31,1,59,59],
'2038032801:00:00','2038032802:00:00','2038103100:59:59','2038103101:59:59' ],
[ [2038,10,31,1,0,0],[2038,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2039,3,27,0,59,59],[2039,3,27,0,59,59],
'2038103101:00:00','2038103101:00:00','2039032700:59:59','2039032700:59:59' ],
],
2039 =>
[
[ [2039,3,27,1,0,0],[2039,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2039,10,30,0,59,59],[2039,10,30,1,59,59],
'2039032701:00:00','2039032702:00:00','2039103000:59:59','2039103001:59:59' ],
[ [2039,10,30,1,0,0],[2039,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2040,3,25,0,59,59],[2040,3,25,0,59,59],
'2039103001:00:00','2039103001:00:00','2040032500:59:59','2040032500:59:59' ],
],
2040 =>
[
[ [2040,3,25,1,0,0],[2040,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2040,10,28,0,59,59],[2040,10,28,1,59,59],
'2040032501:00:00','2040032502:00:00','2040102800:59:59','2040102801:59:59' ],
[ [2040,10,28,1,0,0],[2040,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2041,3,31,0,59,59],[2041,3,31,0,59,59],
'2040102801:00:00','2040102801:00:00','2041033100:59:59','2041033100:59:59' ],
],
2041 =>
[
[ [2041,3,31,1,0,0],[2041,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2041,10,27,0,59,59],[2041,10,27,1,59,59],
'2041033101:00:00','2041033102:00:00','2041102700:59:59','2041102701:59:59' ],
[ [2041,10,27,1,0,0],[2041,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2042,3,30,0,59,59],[2042,3,30,0,59,59],
'2041102701:00:00','2041102701:00:00','2042033000:59:59','2042033000:59:59' ],
],
2042 =>
[
[ [2042,3,30,1,0,0],[2042,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2042,10,26,0,59,59],[2042,10,26,1,59,59],
'2042033001:00:00','2042033002:00:00','2042102600:59:59','2042102601:59:59' ],
[ [2042,10,26,1,0,0],[2042,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2043,3,29,0,59,59],[2043,3,29,0,59,59],
'2042102601:00:00','2042102601:00:00','2043032900:59:59','2043032900:59:59' ],
],
2043 =>
[
[ [2043,3,29,1,0,0],[2043,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2043,10,25,0,59,59],[2043,10,25,1,59,59],
'2043032901:00:00','2043032902:00:00','2043102500:59:59','2043102501:59:59' ],
[ [2043,10,25,1,0,0],[2043,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2044,3,27,0,59,59],[2044,3,27,0,59,59],
'2043102501:00:00','2043102501:00:00','2044032700:59:59','2044032700:59:59' ],
],
2044 =>
[
[ [2044,3,27,1,0,0],[2044,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2044,10,30,0,59,59],[2044,10,30,1,59,59],
'2044032701:00:00','2044032702:00:00','2044103000:59:59','2044103001:59:59' ],
[ [2044,10,30,1,0,0],[2044,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2045,3,26,0,59,59],[2045,3,26,0,59,59],
'2044103001:00:00','2044103001:00:00','2045032600:59:59','2045032600:59:59' ],
],
2045 =>
[
[ [2045,3,26,1,0,0],[2045,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2045,10,29,0,59,59],[2045,10,29,1,59,59],
'2045032601:00:00','2045032602:00:00','2045102900:59:59','2045102901:59:59' ],
[ [2045,10,29,1,0,0],[2045,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2046,3,25,0,59,59],[2046,3,25,0,59,59],
'2045102901:00:00','2045102901:00:00','2046032500:59:59','2046032500:59:59' ],
],
2046 =>
[
[ [2046,3,25,1,0,0],[2046,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2046,10,28,0,59,59],[2046,10,28,1,59,59],
'2046032501:00:00','2046032502:00:00','2046102800:59:59','2046102801:59:59' ],
[ [2046,10,28,1,0,0],[2046,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2047,3,31,0,59,59],[2047,3,31,0,59,59],
'2046102801:00:00','2046102801:00:00','2047033100:59:59','2047033100:59:59' ],
],
2047 =>
[
[ [2047,3,31,1,0,0],[2047,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2047,10,27,0,59,59],[2047,10,27,1,59,59],
'2047033101:00:00','2047033102:00:00','2047102700:59:59','2047102701:59:59' ],
[ [2047,10,27,1,0,0],[2047,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2048,3,29,0,59,59],[2048,3,29,0,59,59],
'2047102701:00:00','2047102701:00:00','2048032900:59:59','2048032900:59:59' ],
],
2048 =>
[
[ [2048,3,29,1,0,0],[2048,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2048,10,25,0,59,59],[2048,10,25,1,59,59],
'2048032901:00:00','2048032902:00:00','2048102500:59:59','2048102501:59:59' ],
[ [2048,10,25,1,0,0],[2048,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2049,3,28,0,59,59],[2049,3,28,0,59,59],
'2048102501:00:00','2048102501:00:00','2049032800:59:59','2049032800:59:59' ],
],
2049 =>
[
[ [2049,3,28,1,0,0],[2049,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2049,10,31,0,59,59],[2049,10,31,1,59,59],
'2049032801:00:00','2049032802:00:00','2049103100:59:59','2049103101:59:59' ],
[ [2049,10,31,1,0,0],[2049,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2050,3,27,0,59,59],[2050,3,27,0,59,59],
'2049103101:00:00','2049103101:00:00','2050032700:59:59','2050032700:59:59' ],
],
2050 =>
[
[ [2050,3,27,1,0,0],[2050,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2050,10,30,0,59,59],[2050,10,30,1,59,59],
'2050032701:00:00','2050032702:00:00','2050103000:59:59','2050103001:59:59' ],
[ [2050,10,30,1,0,0],[2050,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2051,3,26,0,59,59],[2051,3,26,0,59,59],
'2050103001:00:00','2050103001:00:00','2051032600:59:59','2051032600:59:59' ],
],
2051 =>
[
[ [2051,3,26,1,0,0],[2051,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2051,10,29,0,59,59],[2051,10,29,1,59,59],
'2051032601:00:00','2051032602:00:00','2051102900:59:59','2051102901:59:59' ],
[ [2051,10,29,1,0,0],[2051,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2052,3,31,0,59,59],[2052,3,31,0,59,59],
'2051102901:00:00','2051102901:00:00','2052033100:59:59','2052033100:59:59' ],
],
2052 =>
[
[ [2052,3,31,1,0,0],[2052,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2052,10,27,0,59,59],[2052,10,27,1,59,59],
'2052033101:00:00','2052033102:00:00','2052102700:59:59','2052102701:59:59' ],
[ [2052,10,27,1,0,0],[2052,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2053,3,30,0,59,59],[2053,3,30,0,59,59],
'2052102701:00:00','2052102701:00:00','2053033000:59:59','2053033000:59:59' ],
],
2053 =>
[
[ [2053,3,30,1,0,0],[2053,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2053,10,26,0,59,59],[2053,10,26,1,59,59],
'2053033001:00:00','2053033002:00:00','2053102600:59:59','2053102601:59:59' ],
[ [2053,10,26,1,0,0],[2053,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2054,3,29,0,59,59],[2054,3,29,0,59,59],
'2053102601:00:00','2053102601:00:00','2054032900:59:59','2054032900:59:59' ],
],
2054 =>
[
[ [2054,3,29,1,0,0],[2054,3,29,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2054,10,25,0,59,59],[2054,10,25,1,59,59],
'2054032901:00:00','2054032902:00:00','2054102500:59:59','2054102501:59:59' ],
[ [2054,10,25,1,0,0],[2054,10,25,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2055,3,28,0,59,59],[2055,3,28,0,59,59],
'2054102501:00:00','2054102501:00:00','2055032800:59:59','2055032800:59:59' ],
],
2055 =>
[
[ [2055,3,28,1,0,0],[2055,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2055,10,31,0,59,59],[2055,10,31,1,59,59],
'2055032801:00:00','2055032802:00:00','2055103100:59:59','2055103101:59:59' ],
[ [2055,10,31,1,0,0],[2055,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2056,3,26,0,59,59],[2056,3,26,0,59,59],
'2055103101:00:00','2055103101:00:00','2056032600:59:59','2056032600:59:59' ],
],
2056 =>
[
[ [2056,3,26,1,0,0],[2056,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2056,10,29,0,59,59],[2056,10,29,1,59,59],
'2056032601:00:00','2056032602:00:00','2056102900:59:59','2056102901:59:59' ],
[ [2056,10,29,1,0,0],[2056,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2057,3,25,0,59,59],[2057,3,25,0,59,59],
'2056102901:00:00','2056102901:00:00','2057032500:59:59','2057032500:59:59' ],
],
2057 =>
[
[ [2057,3,25,1,0,0],[2057,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2057,10,28,0,59,59],[2057,10,28,1,59,59],
'2057032501:00:00','2057032502:00:00','2057102800:59:59','2057102801:59:59' ],
[ [2057,10,28,1,0,0],[2057,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2058,3,31,0,59,59],[2058,3,31,0,59,59],
'2057102801:00:00','2057102801:00:00','2058033100:59:59','2058033100:59:59' ],
],
2058 =>
[
[ [2058,3,31,1,0,0],[2058,3,31,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2058,10,27,0,59,59],[2058,10,27,1,59,59],
'2058033101:00:00','2058033102:00:00','2058102700:59:59','2058102701:59:59' ],
[ [2058,10,27,1,0,0],[2058,10,27,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2059,3,30,0,59,59],[2059,3,30,0,59,59],
'2058102701:00:00','2058102701:00:00','2059033000:59:59','2059033000:59:59' ],
],
2059 =>
[
[ [2059,3,30,1,0,0],[2059,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2059,10,26,0,59,59],[2059,10,26,1,59,59],
'2059033001:00:00','2059033002:00:00','2059102600:59:59','2059102601:59:59' ],
[ [2059,10,26,1,0,0],[2059,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2060,3,28,0,59,59],[2060,3,28,0,59,59],
'2059102601:00:00','2059102601:00:00','2060032800:59:59','2060032800:59:59' ],
],
2060 =>
[
[ [2060,3,28,1,0,0],[2060,3,28,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2060,10,31,0,59,59],[2060,10,31,1,59,59],
'2060032801:00:00','2060032802:00:00','2060103100:59:59','2060103101:59:59' ],
[ [2060,10,31,1,0,0],[2060,10,31,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2061,3,27,0,59,59],[2061,3,27,0,59,59],
'2060103101:00:00','2060103101:00:00','2061032700:59:59','2061032700:59:59' ],
],
2061 =>
[
[ [2061,3,27,1,0,0],[2061,3,27,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2061,10,30,0,59,59],[2061,10,30,1,59,59],
'2061032701:00:00','2061032702:00:00','2061103000:59:59','2061103001:59:59' ],
[ [2061,10,30,1,0,0],[2061,10,30,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2062,3,26,0,59,59],[2062,3,26,0,59,59],
'2061103001:00:00','2061103001:00:00','2062032600:59:59','2062032600:59:59' ],
],
2062 =>
[
[ [2062,3,26,1,0,0],[2062,3,26,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2062,10,29,0,59,59],[2062,10,29,1,59,59],
'2062032601:00:00','2062032602:00:00','2062102900:59:59','2062102901:59:59' ],
[ [2062,10,29,1,0,0],[2062,10,29,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2063,3,25,0,59,59],[2063,3,25,0,59,59],
'2062102901:00:00','2062102901:00:00','2063032500:59:59','2063032500:59:59' ],
],
2063 =>
[
[ [2063,3,25,1,0,0],[2063,3,25,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2063,10,28,0,59,59],[2063,10,28,1,59,59],
'2063032501:00:00','2063032502:00:00','2063102800:59:59','2063102801:59:59' ],
[ [2063,10,28,1,0,0],[2063,10,28,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2064,3,30,0,59,59],[2064,3,30,0,59,59],
'2063102801:00:00','2063102801:00:00','2064033000:59:59','2064033000:59:59' ],
],
2064 =>
[
[ [2064,3,30,1,0,0],[2064,3,30,2,0,0],'+01:00:00',[1,0,0],
'WEST',1,[2064,10,26,0,59,59],[2064,10,26,1,59,59],
'2064033001:00:00','2064033002:00:00','2064102600:59:59','2064102601:59:59' ],
[ [2064,10,26,1,0,0],[2064,10,26,1,0,0],'+00:00:00',[0,0,0],
'WET',0,[2065,3,29,0,59,59],[2065,3,29,0,59,59],
'2064102601:00:00','2064102601:00:00','2065032900:59:59','2065032900:59:59' ],
],
);
%LastRule = (
'zone' => {
'dstoff' => '+01:00:00',
'stdoff' => '+00:00:00',
},
'rules' => {
'03' => {
'flag' => 'last',
'dow' => '7',
'num' => '0',
'type' => 'u',
'time' => '01:00:00',
'isdst' => '1',
'abb' => 'WEST',
},
'10' => {
'flag' => 'last',
'dow' => '7',
'num' => '0',
'type' => 'u',
'time' => '01:00:00',
'isdst' => '0',
'abb' => 'WET',
},
},
);
1;
| nriley/Pester | Source/Manip/TZ/atfaro00.pm | Perl | bsd-2-clause | 40,833 |
#!/usr/bin/perl
# make_cds_links.pm
# the make_cds_links module. This module generates html code that calls a JavaScript function and passes it the ranges of coding sequences described in the feature table or generated by the program. It returns a string of html code.
# Written by Paul Stothard
package make_cds_links;
use strict;
use warnings;
use Sequence;
use Feature;
use CGI::Carp qw(fatalsToBrowser);
sub makeCdsLinks {
my $sequenceObject = shift();
my $htmlA = q(<li>Use the following links to view the coding segments removed and joined (requires JavaScript-enabled browser): );
my $htmlAEnd = q(. </li>);
my $htmlB = q(<li>Use the following links to view the coding segments in uppercase (requires JavaScript-enabled browser): );
my $htmlBEnd = q(. </li>);
my $featureFound = 0;
my @arrayOfRanges = ();
my @features = @{$sequenceObject->getArrayOfFeatures()};
foreach(@features) {
my $featureType = $_->getType();
my $ranges = $_->getLabelToDisplay();
if ($featureType eq "CdsDnaRanges") {
@arrayOfRanges = split(/\/\//, $ranges);
$featureFound = 1;
last;
}
}
if (!$featureFound) {
return '';
}
for (my $i = 0; $i < @arrayOfRanges; $i = $i + 1) {
if ($arrayOfRanges[$i] =~ m/^([^\/]+)\/([^\/]+)\/([^\/]+)/) {
my $geneName = $1;
my $strand = $2;
my $ranges = $3;
$ranges =~ s/\,$/\]/;
$ranges = '[' . $ranges;
$htmlA = $htmlA . '<a href="javascript: featureExtractor(\'joined\', \'' . $geneName . '\', \'' . $strand . '\', ' . $ranges . ')" onmouseover="return overlib(\'View cDNA\');" onmouseout="return nd();">' . $geneName . '</a>, ';
$htmlB = $htmlB . '<a href="javascript: featureExtractor(\'uppercase\', \'' . $geneName . '\', \'' . $strand . '\', ' . $ranges . ')" onmouseover="return overlib(\'View exons\');" onmouseout="return nd();">' . $geneName . '</a>, ';
}
}
$htmlA =~ s/\, $//;
$htmlB =~ s/\, $//;
return $htmlA . $htmlAEnd . $htmlB . $htmlBEnd;
}
return 1;
| tschalch/labdb | sequence_extractor/cgi-bin/make_cds_links.pm | Perl | bsd-3-clause | 2,071 |
##
## Generic data connection package
##
package Net::FTP::dataconn;
use 5.008001;
use strict;
use warnings;
use Carp;
use Errno;
use Net::Cmd;
our $VERSION = '3.11';
$Net::FTP::IOCLASS or die "please load Net::FTP before Net::FTP::dataconn";
our @ISA = $Net::FTP::IOCLASS;
sub reading {
my $data = shift;
${*$data}{'net_ftp_bytesread'} = 0;
}
sub abort {
my $data = shift;
my $ftp = ${*$data}{'net_ftp_cmd'};
# no need to abort if we have finished the xfer
return $data->close
if ${*$data}{'net_ftp_eof'};
# for some reason if we continuously open RETR connections and not
# read a single byte, then abort them after a while the server will
# close our connection, this prevents the unexpected EOF on the
# command channel -- GMB
if (exists ${*$data}{'net_ftp_bytesread'}
&& (${*$data}{'net_ftp_bytesread'} == 0))
{
my $buf = "";
my $timeout = $data->timeout;
$data->can_read($timeout) && sysread($data, $buf, 1);
}
${*$data}{'net_ftp_eof'} = 1; # fake
$ftp->abort; # this will close me
}
sub _close {
my $data = shift;
my $ftp = ${*$data}{'net_ftp_cmd'};
$data->SUPER::close();
delete ${*$ftp}{'net_ftp_dataconn'}
if defined $ftp
&& exists ${*$ftp}{'net_ftp_dataconn'}
&& $data == ${*$ftp}{'net_ftp_dataconn'};
}
sub close {
my $data = shift;
my $ftp = ${*$data}{'net_ftp_cmd'};
if (exists ${*$data}{'net_ftp_bytesread'} && !${*$data}{'net_ftp_eof'}) {
my $junk;
eval { local($SIG{__DIE__}); $data->read($junk, 1, 0) };
return $data->abort unless ${*$data}{'net_ftp_eof'};
}
$data->_close;
return unless defined $ftp;
$ftp->response() == CMD_OK
&& $ftp->message =~ /unique file name:\s*(\S*)\s*\)/
&& (${*$ftp}{'net_ftp_unique'} = $1);
$ftp->status == CMD_OK;
}
sub _select {
my ($data, $timeout, $do_read) = @_;
my ($rin, $rout, $win, $wout, $tout, $nfound);
vec($rin = '', fileno($data), 1) = 1;
($win, $rin) = ($rin, $win) unless $do_read;
while (1) {
$nfound = select($rout = $rin, $wout = $win, undef, $tout = $timeout);
last if $nfound >= 0;
croak "select: $!"
unless $!{EINTR};
}
$nfound;
}
sub can_read {
_select(@_[0, 1], 1);
}
sub can_write {
_select(@_[0, 1], 0);
}
sub cmd {
my $ftp = shift;
${*$ftp}{'net_ftp_cmd'};
}
sub bytes_read {
my $ftp = shift;
${*$ftp}{'net_ftp_bytesread'} || 0;
}
1;
__END__
=head1 NAME
Net::FTP::dataconn - FTP Client data connection class
=head1 DESCRIPTION
Some of the methods defined in C<Net::FTP> return an object which will
be derived from this class. The dataconn class itself is derived from
the C<IO::Socket::INET> class, so any normal IO operations can be performed.
However the following methods are defined in the dataconn class and IO should
be performed using these.
=over 4
=item read ( BUFFER, SIZE [, TIMEOUT ] )
Read C<SIZE> bytes of data from the server and place it into C<BUFFER>, also
performing any <CRLF> translation necessary. C<TIMEOUT> is optional, if not
given, the timeout value from the command connection will be used.
Returns the number of bytes read before any <CRLF> translation.
=item write ( BUFFER, SIZE [, TIMEOUT ] )
Write C<SIZE> bytes of data from C<BUFFER> to the server, also
performing any <CRLF> translation necessary. C<TIMEOUT> is optional, if not
given, the timeout value from the command connection will be used.
Returns the number of bytes written before any <CRLF> translation.
=item bytes_read ()
Returns the number of bytes read so far.
=item abort ()
Abort the current data transfer.
=item close ()
Close the data connection and get a response from the FTP server. Returns
I<true> if the connection was closed successfully and the first digit of
the response from the server was a '2'.
=back
=cut
| operepo/ope | client_tools/svc/rc/usr/share/perl5/core_perl/Net/FTP/dataconn.pm | Perl | mit | 3,836 |
#
# Copyright 2017 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package centreon::common::powershell::exchange::2010::listdatabases;
use strict;
use warnings;
use centreon::plugins::misc;
use centreon::common::powershell::exchange::2010::powershell;
sub get_powershell {
my (%options) = @_;
# options: no_ps, no_mailflow, no_mapi
my $no_ps = (defined($options{no_ps})) ? 1 : 0;
return '' if ($no_ps == 1);
my $ps = centreon::common::powershell::exchange::2010::powershell::powershell_init(%options);
$ps .= '
# Check to make sure all databases are mounted
try {
$ErrorActionPreference = "Stop"
';
if (defined($options{filter_database})) {
$ps .= '
$MountedDB = Get-MailboxDatabase -Identity "' . $options{filter_database} . '" -Status
';
} else {
$ps .= '
$MountedDB = Get-MailboxDatabase -Status
';
}
$ps .= '
} catch {
Write-Host $Error[0].Exception
exit 1
}
Foreach ($DB in $MountedDB) {
Write-Host "[name=" $DB.Name "][server=" $DB.Server "][mounted=" $DB.Mounted "][size=" $DB.DatabaseSize "][asize=" $DB.AvailableNewMailboxSpace "]" -NoNewline
';
$ps .= '
}
exit 0
';
return centreon::plugins::misc::powershell_encoded($ps);
}
sub list {
my ($self, %options) = @_;
# Following output:
#[name= Mailbox Database 0975194476 ][server= SRVI-WIN-TEST ][mounted= True ][size= 136.1 MB (142,671,872 bytes) ][asize= 124.4 MB (130,482,176 bytes) ][mapi= Success ][mailflow= Success ][latency= 50,00 ]
#...
foreach my $line (split /\n/, $options{stdout}) {
next if ($line !~ /^\[name=(.*?)\]\[server=(.*?)\]\[mounted=(.*?)\]\[size=(.*?)\]\[asize=(.*?)\]/);
my ($database, $server, $mounted, $size, $asize) = (centreon::plugins::misc::trim($1), centreon::plugins::misc::trim($2),
centreon::plugins::misc::trim($3), centreon::plugins::misc::trim($4), centreon::plugins::misc::trim($5));
$self->{output}->output_add(long_msg => "'" . $database . "' [server = $server, mounted = " . $mounted . ']');
}
}
sub disco_show {
my ($self, %options) = @_;
# Following output:
#[name= Mailbox Database 0975194476 ][server= SRVI-WIN-TEST ][mounted= True ][size= 136.1 MB (142,671,872 bytes) ][asize= 124.4 MB (130,482,176 bytes) ][mapi= Success ][mailflow= Success ][latency= 50,00 ]
#...
foreach my $line (split /\n/, $options{stdout}) {
next if ($line !~ /^\[name=(.*?)\]\[server=(.*?)\]\[mounted=(.*?)\]\[size=(.*?)\]\[asize=(.*?)\]/);
my ($database, $server, $mounted, $size, $asize) = (centreon::plugins::misc::trim($1), centreon::plugins::misc::trim($2),
centreon::plugins::misc::trim($3), centreon::plugins::misc::trim($4), centreon::plugins::misc::trim($5));
$self->{output}->add_disco_entry(name => $database,
server => $server,
mounted => $mounted);
}
}
1;
__END__
=head1 DESCRIPTION
Method to list Exchange 2010 databases.
=cut | nichols-356/centreon-plugins | centreon/common/powershell/exchange/2010/listdatabases.pm | Perl | apache-2.0 | 3,830 |
# This file is auto-generated by the Perl DateTime Suite time zone
# code generator (0.07) This code generator comes with the
# DateTime::TimeZone module distribution in the tools/ directory
#
# Generated from /tmp/ympzZnp0Uq/africa. Olson data version 2012c
#
# Do not edit this file directly.
#
package DateTime::TimeZone::Africa::Tripoli;
{
$DateTime::TimeZone::Africa::Tripoli::VERSION = '1.46';
}
use strict;
use Class::Singleton 1.03;
use DateTime::TimeZone;
use DateTime::TimeZone::OlsonDB;
@DateTime::TimeZone::Africa::Tripoli::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' );
my $spans =
[
[
DateTime::TimeZone::NEG_INFINITY,
60557756836,
DateTime::TimeZone::NEG_INFINITY,
60557760000,
3164,
0,
'LMT'
],
[
60557756836,
61560781200,
60557760436,
61560784800,
3600,
0,
'CET'
],
[
61560781200,
61567596000,
61560788400,
61567603200,
7200,
1,
'CEST'
],
[
61567596000,
61623507600,
61567599600,
61623511200,
3600,
0,
'CET'
],
[
61623507600,
61630754400,
61623514800,
61630761600,
7200,
1,
'CEST'
],
[
61630754400,
61685794800,
61630758000,
61685798400,
3600,
0,
'CET'
],
[
61685794800,
61693826400,
61685802000,
61693833600,
7200,
1,
'CEST'
],
[
61693826400,
61788524400,
61693830000,
61788528000,
3600,
0,
'CET'
],
[
61788524400,
62514367200,
61788531600,
62514374400,
7200,
0,
'EET'
],
[
62514367200,
62522146800,
62514370800,
62522150400,
3600,
0,
'CET'
],
[
62522146800,
62537954400,
62522154000,
62537961600,
7200,
1,
'CEST'
],
[
62537954400,
62553682800,
62537958000,
62553686400,
3600,
0,
'CET'
],
[
62553682800,
62569490400,
62553690000,
62569497600,
7200,
1,
'CEST'
],
[
62569490400,
62585305200,
62569494000,
62585308800,
3600,
0,
'CET'
],
[
62585305200,
62601112800,
62585312400,
62601120000,
7200,
1,
'CEST'
],
[
62601112800,
62617273200,
62601116400,
62617276800,
3600,
0,
'CET'
],
[
62617273200,
62632648800,
62617280400,
62632656000,
7200,
1,
'CEST'
],
[
62632648800,
62648636400,
62632652400,
62648640000,
3600,
0,
'CET'
],
[
62648636400,
62664357600,
62648643600,
62664364800,
7200,
1,
'CEST'
],
[
62664357600,
62679913200,
62664361200,
62679916800,
3600,
0,
'CET'
],
[
62679913200,
62695720800,
62679920400,
62695728000,
7200,
1,
'CEST'
],
[
62695720800,
62711535600,
62695724400,
62711539200,
3600,
0,
'CET'
],
[
62711535600,
62727343200,
62711542800,
62727350400,
7200,
1,
'CEST'
],
[
62727343200,
62743071600,
62727346800,
62743075200,
3600,
0,
'CET'
],
[
62743071600,
62758879200,
62743078800,
62758886400,
7200,
1,
'CEST'
],
[
62758879200,
62777458800,
62758882800,
62777462400,
3600,
0,
'CET'
],
[
62777458800,
62979717600,
62777466000,
62979724800,
7200,
0,
'EET'
],
[
62979717600,
62995791600,
62979721200,
62995795200,
3600,
0,
'CET'
],
[
62995791600,
63011599200,
62995798800,
63011606400,
7200,
1,
'CEST'
],
[
63011599200,
DateTime::TimeZone::INFINITY,
63011606400,
DateTime::TimeZone::INFINITY,
7200,
0,
'EET'
],
];
sub olson_version { '2012c' }
sub has_dst_changes { 12 }
sub _max_year { 2022 }
sub _new_instance
{
return shift->_init( @_, spans => $spans );
}
1;
| leighpauls/k2cro4 | third_party/perl/perl/vendor/lib/DateTime/TimeZone/Africa/Tripoli.pm | Perl | bsd-3-clause | 3,262 |
#!/usr/bin/env perl
use strict;
my @ORIG_ARGV=@ARGV;
use Cwd qw(getcwd);
my $SCRIPT_DIR; BEGIN { use Cwd qw/ abs_path /; use File::Basename; $SCRIPT_DIR = dirname(abs_path($0)); push @INC, $SCRIPT_DIR, "$SCRIPT_DIR/../../environment", "$SCRIPT_DIR/../utils"; }
# Skip local config (used for distributing jobs) if we're running in local-only mode
use LocalConfig;
use Getopt::Long;
use File::Basename qw(basename);
require "libcall.pl";
my $QSUB_CMD = qsub_args(mert_memory());
# Default settings
my $srcFile; # deprecated
my $refFiles; # deprecated
my $default_jobs = env_default_jobs();
my $bin_dir = $SCRIPT_DIR;
my $util_dir = "$SCRIPT_DIR/../utils";
die "Bin directory $bin_dir missing/inaccessible" unless -d $bin_dir;
my $FAST_SCORE="$bin_dir/../../mteval/fast_score";
die "Can't execute $FAST_SCORE" unless -x $FAST_SCORE;
my $MAPINPUT = "$bin_dir/mr_dpmert_generate_mapper_input";
my $MAPPER = "$bin_dir/mr_dpmert_map";
my $REDUCER = "$bin_dir/mr_dpmert_reduce";
my $parallelize = "$util_dir/parallelize.pl";
my $libcall = "$util_dir/libcall.pl";
my $sentserver = "$util_dir/sentserver";
my $sentclient = "$util_dir/sentclient";
my $LocalConfig = "$SCRIPT_DIR/../../environment/LocalConfig.pm";
my $SCORER = $FAST_SCORE;
die "Can't find $MAPPER" unless -x $MAPPER;
my $cdec = "$bin_dir/../../decoder/cdec";
die "Can't find decoder in $cdec" unless -x $cdec;
die "Can't find $parallelize" unless -x $parallelize;
die "Can't find $libcall" unless -e $libcall;
my $decoder = $cdec;
my $lines_per_mapper = 200;
my $rand_directions = 15;
my $iteration = 1;
my $best_weights;
my $max_iterations = 15;
my $optimization_iters = 6;
my $jobs = $default_jobs; # number of decode nodes
my $pmem = "9g";
my $disable_clean = 0;
my %seen_weights;
my $help = 0;
my $epsilon = 0.0001;
my $last_score = -10000000;
my $metric = "ibm_bleu";
my $dir;
my $iniFile;
my $weights;
my $initialWeights;
my $bleu_weight=1;
my $use_make = 1; # use make to parallelize line search
my $useqsub;
my $pass_suffix = '';
my $devset;
# Process command-line options
if (GetOptions(
"config=s" => \$iniFile,
"weights=s" => \$initialWeights,
"devset=s" => \$devset,
"jobs=i" => \$jobs,
"pass-suffix=s" => \$pass_suffix,
"help" => \$help,
"qsub" => \$useqsub,
"iterations=i" => \$max_iterations,
"pmem=s" => \$pmem,
"random-directions=i" => \$rand_directions,
"metric=s" => \$metric,
"source-file=s" => \$srcFile,
"output-dir=s" => \$dir,
) == 0 || @ARGV!=0 || $help) {
print_help();
exit;
}
if ($useqsub) {
$use_make = 0;
die "LocalEnvironment.pm does not have qsub configuration for this host. Cannot run with --qsub!\n" unless has_qsub();
}
my @missing_args = ();
if (defined $srcFile || defined $refFiles) {
die <<EOT;
The options --ref-files and --source-file are no longer supported.
Please specify the input file and its reference translations with
--devset FILE
EOT
}
if (!defined $iniFile) { push @missing_args, "--config"; }
if (!defined $devset) { push @missing_args, "--devset"; }
if (!defined $initialWeights) { push @missing_args, "--weights"; }
die "Please specify missing arguments: " . join (', ', @missing_args) . "\nUse --help for more information.\n" if (@missing_args);
if ($metric =~ /^(combi|ter)$/i) {
$lines_per_mapper = 40;
} elsif ($metric =~ /^meteor$/i) {
$lines_per_mapper = 2000; # start up time is really high for METEOR
}
my $nodelist;
my $host =check_output("hostname"); chomp $host;
my $bleu;
my $interval_count = 0;
my $logfile;
my $projected_score;
# used in sorting scores
my $DIR_FLAG = '-r';
if ($metric =~ /^ter$|^aer$/i) {
$DIR_FLAG = '';
}
unless ($dir){
$dir = "dpmert";
}
unless ($dir =~ /^\//){ # convert relative path to absolute path
my $basedir = check_output("pwd");
chomp $basedir;
$dir = "$basedir/$dir";
}
# Initializations and helper functions
srand;
my @childpids = ();
my @cleanupcmds = ();
sub cleanup {
print STDERR "Cleanup...\n";
for my $pid (@childpids){ unchecked_call("kill $pid"); }
for my $cmd (@cleanupcmds){ unchecked_call("$cmd"); }
exit 1;
};
# Always call cleanup, no matter how we exit
*CORE::GLOBAL::exit = sub{ cleanup(); };
$SIG{INT} = "cleanup";
$SIG{TERM} = "cleanup";
$SIG{HUP} = "cleanup";
my $decoderBase = basename($decoder); chomp $decoderBase;
my $newIniFile = "$dir/$decoderBase.ini";
my $inputFileName = "$dir/input";
my $user = $ENV{"USER"};
# process ini file
-e $iniFile || die "Error: could not open $iniFile for reading\n";
sub dirsize {
opendir ISEMPTY,$_[0];
return scalar(readdir(ISEMPTY))-1;
}
if (-e $dir) {
# allow preexisting logfile, binaries, but not dist-dpmert.pl outputs
die "ERROR: output directory $dir already exists (remove or use --output-dir dir)\n\n";
} else {
mkdir "$dir" or die "Can't mkdir $dir: $!";
mkdir "$dir/hgs" or die;
mkdir "$dir/scripts" or die;
print STDERR <<EOT;
DECODER: $decoder
INI FILE: $iniFile
WORKING DIR: $dir
DEVSET: $devset
EVAL METRIC: $metric
MAX ITERATIONS: $max_iterations
PARALLEL JOBS: $jobs
HEAD NODE: $host
PMEM (DECODING): $pmem
INITIAL WEIGHTS: $initialWeights
EOT
}
# Generate initial files and values
check_call("cp $iniFile $newIniFile");
check_call("cp $initialWeights $dir/weights.0");
$iniFile = $newIniFile;
split_devset($devset, "$dir/dev.input.raw", "$dir/dev.refs");
my $refs = "-r $dir/dev.refs";
my $newsrc = "$dir/dev.input";
enseg("$dir/dev.input.raw", $newsrc);
$srcFile = $newsrc;
my $devSize = 0;
open F, "<$srcFile" or die "Can't read $srcFile: $!";
while(<F>) { $devSize++; }
close F;
unless($best_weights){ $best_weights = $weights; }
unless($projected_score){ $projected_score = 0.0; }
$seen_weights{$weights} = 1;
my $random_seed = int(time / 1000);
my $lastWeightsFile;
my $lastPScore = 0;
# main optimization loop
while (1){
print STDERR "\n\nITERATION $iteration\n==========\n";
if ($iteration > $max_iterations){
print STDERR "\nREACHED STOPPING CRITERION: Maximum iterations\n";
last;
}
# iteration-specific files
my $runFile="$dir/run.raw.$iteration";
my $onebestFile="$dir/1best.$iteration";
my $logdir="$dir/logs.$iteration";
my $decoderLog="$logdir/decoder.sentserver.log.$iteration";
my $scorerLog="$logdir/scorer.log.$iteration";
check_call("mkdir -p $logdir");
#decode
print STDERR "RUNNING DECODER AT ";
print STDERR unchecked_output("date");
my $im1 = $iteration - 1;
my $weightsFile="$dir/weights.$im1";
my $decoder_cmd = "$decoder -c $iniFile --weights$pass_suffix $weightsFile -O $dir/hgs";
my $pcmd;
if ($use_make) {
$pcmd = "cat $srcFile | $parallelize --workdir $dir --use-fork -p $pmem -e $logdir -j $jobs --";
} else {
$pcmd = "cat $srcFile | $parallelize --workdir $dir -p $pmem -e $logdir -j $jobs --";
}
my $cmd = "$pcmd $decoder_cmd 2> $decoderLog 1> $runFile";
print STDERR "COMMAND:\n$cmd\n";
check_bash_call($cmd);
my $num_hgs;
my $num_topbest;
my $retries = 0;
while($retries < 5) {
$num_hgs = check_output("ls $dir/hgs/*.gz | wc -l");
$num_topbest = check_output("wc -l < $runFile");
print STDERR "NUMBER OF HGs: $num_hgs\n";
print STDERR "NUMBER OF TOP-BEST HYPs: $num_topbest\n";
if($devSize == $num_hgs && $devSize == $num_topbest) {
last;
} else {
print STDERR "Incorrect number of hypergraphs or topbest. Waiting for distributed filesystem and retrying...\n";
sleep(3);
}
$retries++;
}
die "Dev set contains $devSize sentences, but we don't have topbest and hypergraphs for all these! Decoder failure? Check $decoderLog\n" if ($devSize != $num_hgs || $devSize != $num_topbest);
my $dec_score = check_output("cat $runFile | $SCORER $refs -m $metric");
chomp $dec_score;
print STDERR "DECODER SCORE: $dec_score\n";
# save space
check_call("gzip -f $runFile");
check_call("gzip -f $decoderLog");
# run optimizer
print STDERR "RUNNING OPTIMIZER AT ";
print STDERR unchecked_output("date");
my $mergeLog="$logdir/prune-merge.log.$iteration";
my $score = 0;
my $icc = 0;
my $inweights="$dir/weights.$im1";
for (my $opt_iter=1; $opt_iter<$optimization_iters; $opt_iter++) {
print STDERR "\nGENERATE OPTIMIZATION STRATEGY (OPT-ITERATION $opt_iter/$optimization_iters)\n";
print STDERR unchecked_output("date");
$icc++;
$cmd="$MAPINPUT -w $inweights -r $dir/hgs -s $devSize -d $rand_directions > $dir/agenda.$im1-$opt_iter";
print STDERR "COMMAND:\n$cmd\n";
check_call($cmd);
check_call("mkdir -p $dir/splag.$im1");
$cmd="split -a 3 -l $lines_per_mapper $dir/agenda.$im1-$opt_iter $dir/splag.$im1/mapinput.";
print STDERR "COMMAND:\n$cmd\n";
check_call($cmd);
opendir(DIR, "$dir/splag.$im1") or die "Can't open directory: $!";
my @shards = grep { /^mapinput\./ } readdir(DIR);
closedir DIR;
die "No shards!" unless scalar @shards > 0;
my $joblist = "";
my $nmappers = 0;
my @mapoutputs = ();
@cleanupcmds = ();
my %o2i = ();
my $first_shard = 1;
my $mkfile; # only used with makefiles
my $mkfilename;
if ($use_make) {
$mkfilename = "$dir/splag.$im1/domap.mk";
open $mkfile, ">$mkfilename" or die "Couldn't write $mkfilename: $!";
print $mkfile "all: $dir/splag.$im1/map.done\n\n";
}
my @mkouts = (); # only used with makefiles
for my $shard (@shards) {
my $mapoutput = $shard;
my $client_name = $shard;
$client_name =~ s/mapinput.//;
$client_name = "dpmert.$client_name";
$mapoutput =~ s/mapinput/mapoutput/;
push @mapoutputs, "$dir/splag.$im1/$mapoutput";
$o2i{"$dir/splag.$im1/$mapoutput"} = "$dir/splag.$im1/$shard";
my $script = "$MAPPER -s $srcFile -m $metric $refs < $dir/splag.$im1/$shard | sort -t \$'\\t' -k 1 > $dir/splag.$im1/$mapoutput";
if ($use_make) {
my $script_file = "$dir/scripts/map.$shard";
open F, ">$script_file" or die "Can't write $script_file: $!";
print F "#!/bin/bash\n";
print F "$script\n";
close F;
my $output = "$dir/splag.$im1/$mapoutput";
push @mkouts, $output;
chmod(0755, $script_file) or die "Can't chmod $script_file: $!";
if ($first_shard) { print STDERR "$script\n"; $first_shard=0; }
print $mkfile "$output: $dir/splag.$im1/$shard\n\t$script_file\n\n";
} else {
my $script_file = "$dir/scripts/map.$shard";
open F, ">$script_file" or die "Can't write $script_file: $!";
print F "$script\n";
close F;
if ($first_shard) { print STDERR "$script\n"; $first_shard=0; }
$nmappers++;
my $qcmd = "$QSUB_CMD -N $client_name -o /dev/null -e $logdir/$client_name.ER $script_file";
my $jobid = check_output("$qcmd");
chomp $jobid;
$jobid =~ s/^(\d+)(.*?)$/\1/g;
$jobid =~ s/^Your job (\d+) .*$/\1/;
push(@cleanupcmds, "qdel $jobid 2> /dev/null");
print STDERR " $jobid";
if ($joblist == "") { $joblist = $jobid; }
else {$joblist = $joblist . "\|" . $jobid; }
}
}
if ($use_make) {
print $mkfile "$dir/splag.$im1/map.done: @mkouts\n\ttouch $dir/splag.$im1/map.done\n\n";
close $mkfile;
my $mcmd = "make -j $jobs -f $mkfilename";
print STDERR "\nExecuting: $mcmd\n";
check_call($mcmd);
} else {
print STDERR "\nLaunched $nmappers mappers.\n";
sleep 8;
print STDERR "Waiting for mappers to complete...\n";
while ($nmappers > 0) {
sleep 5;
my @livejobs = grep(/$joblist/, split(/\n/, unchecked_output("qstat | grep -v ' C '")));
$nmappers = scalar @livejobs;
}
print STDERR "All mappers complete.\n";
}
my $tol = 0;
my $til = 0;
for my $mo (@mapoutputs) {
my $olines = get_lines($mo);
my $ilines = get_lines($o2i{$mo});
$tol += $olines;
$til += $ilines;
die "$mo: output lines ($olines) doesn't match input lines ($ilines)" unless $olines==$ilines;
}
print STDERR "Results for $tol/$til lines\n";
print STDERR "\nSORTING AND RUNNING VEST REDUCER\n";
print STDERR unchecked_output("date");
$cmd="sort -t \$'\\t' -k 1 @mapoutputs | $REDUCER -m $metric > $dir/redoutput.$im1";
print STDERR "COMMAND:\n$cmd\n";
check_bash_call($cmd);
$cmd="sort -nk3 $DIR_FLAG '-t|' $dir/redoutput.$im1 | head -1";
# sort returns failure even when it doesn't fail for some reason
my $best=unchecked_output("$cmd"); chomp $best;
print STDERR "$best\n";
my ($oa, $x, $xscore) = split /\|/, $best;
$score = $xscore;
print STDERR "PROJECTED SCORE: $score\n";
if (abs($x) < $epsilon) {
print STDERR "\nOPTIMIZER: no score improvement: abs($x) < $epsilon\n";
last;
}
my $psd = $score - $last_score;
$last_score = $score;
if (abs($psd) < $epsilon) {
print STDERR "\nOPTIMIZER: no score improvement: abs($psd) < $epsilon\n";
last;
}
my ($origin, $axis) = split /\s+/, $oa;
my %ori = convert($origin);
my %axi = convert($axis);
my $finalFile="$dir/weights.$im1-$opt_iter";
open W, ">$finalFile" or die "Can't write: $finalFile: $!";
my $norm = 0;
for my $k (sort keys %ori) {
my $dd = $ori{$k} + $axi{$k} * $x;
$norm += $dd * $dd;
}
$norm = sqrt($norm);
$norm = 1;
for my $k (sort keys %ori) {
my $v = ($ori{$k} + $axi{$k} * $x) / $norm;
print W "$k $v\n";
}
check_call("rm $dir/splag.$im1/*");
$inweights = $finalFile;
}
$lastWeightsFile = "$dir/weights.$iteration";
check_call("cp $inweights $lastWeightsFile");
if ($icc < 2) {
print STDERR "\nREACHED STOPPING CRITERION: score change too little\n";
last;
}
$lastPScore = $score;
$iteration++;
print STDERR "\n==========\n";
}
check_call("cp $lastWeightsFile $dir/weights.final");
print STDERR "\nFINAL WEIGHTS: $dir/weights.final\n(Use -w <this file> with the decoder)\n\n";
print STDOUT "$dir/weights.final\n";
exit 0;
sub get_lines {
my $fn = shift @_;
open FL, "<$fn" or die "Couldn't read $fn: $!";
my $lc = 0;
while(<FL>) { $lc++; }
return $lc;
}
sub read_weights_file {
my ($file) = @_;
open F, "<$file" or die "Couldn't read $file: $!";
my @r = ();
my $pm = -1;
while(<F>) {
next if /^#/;
next if /^\s*$/;
chomp;
if (/^(.+)\s+(.+)$/) {
my $m = $1;
my $w = $2;
die "Weights out of order: $m <= $pm" unless $m > $pm;
push @r, $w;
} else {
warn "Unexpected feature name in weight file: $_";
}
}
close F;
return join ' ', @r;
}
sub update_weights_file {
my ($neww, $rfn, $rpts) = @_;
my @feats = @$rfn;
my @pts = @$rpts;
my $num_feats = scalar @feats;
my $num_pts = scalar @pts;
die "$num_feats (num_feats) != $num_pts (num_pts)" unless $num_feats == $num_pts;
open G, ">$neww" or die;
for (my $i = 0; $i < $num_feats; $i++) {
my $f = $feats[$i];
my $lambda = $pts[$i];
print G "$f $lambda\n";
}
close G;
}
sub enseg {
my $src = shift;
my $newsrc = shift;
open(SRC, $src);
open(NEWSRC, ">$newsrc");
my $i=0;
while (my $line=<SRC>){
chomp $line;
if ($line =~ /^\s*<seg/i) {
if($line =~ /id="[0-9]+"/) {
print NEWSRC "$line\n";
} else {
die "When using segments with pre-generated <seg> tags, you must include a zero-based id attribute";
}
} else {
print NEWSRC "<seg id=\"$i\">$line</seg>\n";
}
$i++;
}
close SRC;
close NEWSRC;
}
sub print_help {
my $executable = basename($0); chomp $executable;
print << "Help";
Usage: $executable [options] <ini file>
$executable [options]
Runs a complete MERT optimization. Required options are --weights,
--devset, and --config.
Options:
--config <file> [-c <file>]
The decoder configuration file.
--devset <file> [-d <file>]
The source *and* references for the development set.
--weights <file> [-w <file>]
A file specifying initial feature weights. The format is
FeatureName_1 value1
FeatureName_2 value2
**All and only the weights listed in <file> will be optimized!**
--metric <name>
Metric to optimize.
Example values: IBM_BLEU, NIST_BLEU, Koehn_BLEU, TER, Combi
--iterations <M>
Maximum number of iterations to run. If not specified, defaults
to 10.
--pass-suffix <S>
If the decoder is doing multi-pass decoding, the pass suffix "2",
"3", etc., is used to control what iteration of weights is set.
--rand-directions <num>
MERT will attempt to optimize along all of the principle directions,
set this parameter to explore other directions. Defaults to 5.
--output-dir <dir>
Directory for intermediate and output files.
--help
Print this message and exit.
Job control options:
--jobs <I>
Number of decoder processes to run in parallel. [default=$default_jobs]
--qsub
Use qsub to run jobs in parallel (qsub must be configured in
environment/LocalEnvironment.pm)
--pmem <N>
Amount of physical memory requested for parallel decoding jobs
(used with qsub requests only)
Help
}
sub convert {
my ($str) = @_;
my @ps = split /;/, $str;
my %dict = ();
for my $p (@ps) {
my ($k, $v) = split /=/, $p;
$dict{$k} = $v;
}
return %dict;
}
sub cmdline {
return join ' ',($0,@ORIG_ARGV);
}
#buggy: last arg gets quoted sometimes?
my $is_shell_special=qr{[ \t\n\\><|&;"'`~*?{}$!()]};
my $shell_escape_in_quote=qr{[\\"\$`!]};
sub escape_shell {
my ($arg)=@_;
return undef unless defined $arg;
if ($arg =~ /$is_shell_special/) {
$arg =~ s/($shell_escape_in_quote)/\\$1/g;
return "\"$arg\"";
}
return $arg;
}
sub escaped_shell_args {
return map {local $_=$_;chomp;escape_shell($_)} @_;
}
sub escaped_shell_args_str {
return join ' ',&escaped_shell_args(@_);
}
sub escaped_cmdline {
return "$0 ".&escaped_shell_args_str(@ORIG_ARGV);
}
sub split_devset {
my ($infile, $outsrc, $outref) = @_;
open F, "<$infile" or die "Can't read $infile: $!";
open S, ">$outsrc" or die "Can't write $outsrc: $!";
open R, ">$outref" or die "Can't write $outref: $!";
while(<F>) {
chomp;
my ($src, @refs) = split /\s*\|\|\|\s*/;
die "Malformed devset line: $_\n" unless scalar @refs > 0;
print S "$src\n";
print R join(' ||| ', @refs) . "\n";
}
close R;
close S;
close F;
}
| pks/cdec-dtrain-legacy | training/dpmert/dpmert.pl | Perl | apache-2.0 | 18,007 |
#------------------------------------------------------------------------------
# File: CanonCustom.pm
#
# Description: Read and write Canon Custom functions
#
# Revisions: 11/25/2003 - P. Harvey Created
#
# References: 1) http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
# 2) Christian Koller private communication (20D)
# 3) Rainer Honle private communication (5D)
# 4) David Pitcher private communication (1DmkIII firmware upgrade)
#------------------------------------------------------------------------------
package Image::ExifTool::CanonCustom;
use strict;
use vars qw($VERSION);
use Image::ExifTool qw(:DataAccess);
use Image::ExifTool::Canon;
use Image::ExifTool::Exif;
$VERSION = '1.50';
sub ProcessCanonCustom($$$);
sub ProcessCanonCustom2($$$);
sub WriteCanonCustom($$$);
sub WriteCanonCustom2($$$);
sub CheckCanonCustom($$$);
sub ConvertPFn($);
sub ConvertPFnInv($);
my %onOff = ( 0 => 'On', 1 => 'Off' );
my %offOn = ( 0 => 'Off', 1 => 'On' );
my %disableEnable = ( 0 => 'Disable', 1 => 'Enable' );
my %enableDisable = ( 0 => 'Enable', 1 => 'Disable' );
my %convPFn = ( PrintConv => \&ConvertPfn, PrintConvInv => \&ConvertPfnInv );
#------------------------------------------------------------------------------
# Custom functions for the 1D
# CanonCustom (keys are custom function number)
%Image::ExifTool::CanonCustom::Functions1D = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
WRITABLE => 'int8u',
NOTES => q{
These custom functions are used by all 1D models up to but not including the
Mark III.
},
0 => {
Name => 'FocusingScreen',
PrintConv => {
0 => 'Ec-N, R',
1 => 'Ec-A,B,C,CII,CIII,D,H,I,L',
},
},
1 => {
Name => 'FinderDisplayDuringExposure',
PrintConv => \%offOn,
},
2 => {
Name => 'ShutterReleaseNoCFCard',
Description => 'Shutter Release W/O CF Card',
PrintConv => {
0 => 'Yes',
1 => 'No',
},
},
3 => {
Name => 'ISOSpeedExpansion',
Description => 'ISO Speed Expansion',
PrintConv => {
0 => 'No',
1 => 'Yes',
},
},
4 => {
Name => 'ShutterAELButton',
Description => 'Shutter Button/AEL Button',
PrintConv => {
0 => 'AF/AE lock stop',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
5 => {
Name => 'ManualTv',
Description => 'Manual Tv/Av For M',
PrintConv => {
0 => 'Tv=Main/Av=Control',
1 => 'Tv=Control/Av=Main',
2 => 'Tv=Main/Av=Main w/o lens',
3 => 'Tv=Control/Av=Main w/o lens',
},
},
6 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/3-stop set, 1/3-stop comp.',
1 => '1-stop set, 1/3-stop comp.',
2 => '1/2-stop set, 1/2-stop comp.',
},
},
7 => {
Name => 'USMLensElectronicMF',
PrintConv => {
0 => 'Turns on after one-shot AF',
1 => 'Turns off after one-shot AF',
2 => 'Always turned off',
},
},
8 => {
Name => 'LCDPanels',
Description => 'Top/Back LCD Panels',
PrintConv => {
0 => 'Remain. shots/File no.',
1 => 'ISO/Remain. shots',
2 => 'ISO/File no.',
3 => 'Shots in folder/Remain. shots',
},
},
9 => {
Name => 'AEBSequenceAutoCancel',
Description => 'AEB Sequence/Auto Cancel',
PrintConv => {
0 => '0,-,+/Enabled',
1 => '0,-,+/Disabled',
2 => '-,0,+/Enabled',
3 => '-,0,+/Disabled',
},
},
10 => {
Name => 'AFPointIllumination',
PrintConv => {
0 => 'On',
1 => 'Off',
2 => 'On without dimming',
3 => 'Brighter',
},
},
11 => {
Name => 'AFPointSelection',
PrintConv => {
0 => 'H=AF+Main/V=AF+Command',
1 => 'H=Comp+Main/V=Comp+Command',
2 => 'H=Command only/V=Assist+Main',
3 => 'H=FEL+Main/V=FEL+Command',
},
},
12 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
13 => {
Name => 'AFPointSpotMetering',
Description => 'No. AF Points/Spot Metering',
PrintConv => {
0 => '45/Center AF point',
1 => '11/Active AF point',
2 => '11/Center AF point',
3 => '9/Active AF point',
},
},
14 => {
Name => 'FillFlashAutoReduction',
PrintConv => \%enableDisable,
},
15 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
16 => {
Name => 'SafetyShiftInAvOrTv',
PrintConv => \%disableEnable,
},
17 => {
Name => 'AFPointActivationArea',
PrintConv => {
0 => 'Single AF point',
1 => 'Expanded (TTL. of 7 AF points)',
2 => 'Automatic expanded (max. 13)',
},
},
18 => {
Name => 'SwitchToRegisteredAFPoint',
PrintConv => {
0 => 'Assist + AF',
1 => 'Assist',
2 => 'Only while pressing assist',
},
},
19 => {
Name => 'LensAFStopButton',
PrintConv => {
0 => 'AF stop',
1 => 'AF start',
2 => 'AE lock while metering',
3 => 'AF point: M -> Auto / Auto -> Ctr.',
4 => 'AF mode: ONE SHOT <-> AI SERVO',
5 => 'IS start',
},
},
20 => {
Name => 'AIServoTrackingSensitivity',
PrintConv => {
0 => 'Standard',
1 => 'Slow',
2 => 'Moderately slow',
3 => 'Moderately fast',
4 => 'Fast',
},
},
21 => {
Name => 'AIServoContinuousShooting',
PrintConv => {
0 => 'Shooting not possible without focus',
1 => 'Shooting possible without focus',
},
},
);
# Custom functions for the 5D (ref 3)
%Image::ExifTool::CanonCustom::Functions5D = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
WRITABLE => 'int8u',
0 => {
Name => 'FocusingScreen',
PrintConv => {
0 => 'Ee-A',
1 => 'Ee-D',
2 => 'Ee-S',
},
},
1 => {
Name => 'SetFunctionWhenShooting',
PrintConv => {
0 => 'Default (no function)',
1 => 'Change quality',
2 => 'Change Parameters',
3 => 'Menu display',
4 => 'Image replay',
},
},
2 => {
Name => 'LongExposureNoiseReduction',
PrintConv => {
0 => 'Off',
1 => 'Auto',
2 => 'On',
},
},
3 => {
Name => 'FlashSyncSpeedAv',
PrintConv => {
0 => 'Auto',
1 => '1/200 Fixed',
},
},
4 => {
Name => 'Shutter-AELock',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
5 => {
Name => 'AFAssistBeam',
PrintConv => {
0 => 'Emits',
1 => 'Does not emit',
},
},
6 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/3 Stop',
1 => '1/2 Stop',
},
},
7 => {
Name => 'FlashFiring',
PrintConv => {
0 => 'Fires',
1 => 'Does not fire',
},
},
8 => {
Name => 'ISOExpansion',
PrintConv => \%offOn,
},
9 => {
Name => 'AEBSequenceAutoCancel',
Description => 'AEB Sequence/Auto Cancel',
PrintConv => {
0 => '0,-,+/Enabled',
1 => '0,-,+/Disabled',
2 => '-,0,+/Enabled',
3 => '-,0,+/Disabled',
},
},
10 => {
Name => 'SuperimposedDisplay',
PrintConv => \%onOff,
},
11 => {
Name => 'MenuButtonDisplayPosition',
PrintConv => {
0 => 'Previous (top if power off)',
1 => 'Previous',
2 => 'Top',
},
},
12 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
13 => {
Name => 'AFPointSelectionMethod',
PrintConv => {
0 => 'Normal',
1 => 'Multi-controller direct',
2 => 'Quick Control Dial direct',
},
},
14 => {
Name => 'ETTLII',
Description => 'E-TTL II',
PrintConv => {
0 => 'Evaluative',
1 => 'Average',
},
},
15 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
16 => {
Name => 'SafetyShiftInAvOrTv',
PrintConv => \%disableEnable,
},
17 => {
Name => 'AFPointActivationArea',
PrintConv => {
0 => 'Standard',
1 => 'Expanded',
},
},
18 => {
Name => 'LCDDisplayReturnToShoot',
PrintConv => {
0 => 'With Shutter Button only',
1 => 'Also with * etc.',
},
},
19 => {
Name => 'LensAFStopButton',
PrintConv => {
0 => 'AF stop',
1 => 'AF start',
2 => 'AE lock while metering',
3 => 'AF point: M -> Auto / Auto -> Ctr.',
4 => 'ONE SHOT <-> AI SERVO',
5 => 'IS start',
},
},
20 => {
Name => 'AddOriginalDecisionData',
PrintConv => \%offOn,
},
);
# Custom functions for 10D
%Image::ExifTool::CanonCustom::Functions10D = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
WRITABLE => 'int8u',
1 => {
Name => 'SetButtonWhenShooting',
PrintConv => {
0 => 'Normal (disabled)',
1 => 'Image quality',
2 => 'Change parameters',
3 => 'Menu display',
4 => 'Image playback',
},
},
2 => {
Name => 'ShutterReleaseNoCFCard',
Description => 'Shutter Release W/O CF Card',
PrintConv => {
0 => 'Yes',
1 => 'No',
},
},
3 => {
Name => 'FlashSyncSpeedAv',
PrintConv => {
0 => 'Auto',
1 => '1/200 Fixed',
},
},
4 => {
Name => 'Shutter-AELock',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
5 => {
Name => 'AFAssist',
Description => 'AF Assist/Flash Firing',
PrintConv => {
0 => 'Emits/Fires',
1 => 'Does not emit/Fires',
2 => 'Only ext. flash emits/Fires',
3 => 'Emits/Does not fire',
},
},
6 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/2 Stop',
1 => '1/3 Stop',
},
},
7 => {
Name => 'AFPointRegistration',
PrintConv => {
0 => 'Center',
1 => 'Bottom',
2 => 'Right',
3 => 'Extreme Right',
4 => 'Automatic',
5 => 'Extreme Left',
6 => 'Left',
7 => 'Top',
},
},
8 => {
Name => 'RawAndJpgRecording',
PrintConv => {
0 => 'RAW+Small/Normal',
1 => 'RAW+Small/Fine',
2 => 'RAW+Medium/Normal',
3 => 'RAW+Medium/Fine',
4 => 'RAW+Large/Normal',
5 => 'RAW+Large/Fine',
},
},
9 => {
Name => 'AEBSequenceAutoCancel',
Description => 'AEB Sequence/Auto Cancel',
PrintConv => {
0 => '0,-,+/Enabled',
1 => '0,-,+/Disabled',
2 => '-,0,+/Enabled',
3 => '-,0,+/Disabled',
},
},
10 => {
Name => 'SuperimposedDisplay',
PrintConv => \%onOff,
},
11 => {
Name => 'MenuButtonDisplayPosition',
PrintConv => {
0 => 'Previous (top if power off)',
1 => 'Previous',
2 => 'Top',
},
},
12 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
13 => {
Name => 'AssistButtonFunction',
PrintConv => {
0 => 'Normal',
1 => 'Select Home Position',
2 => 'Select HP (while pressing)',
3 => 'Av+/- (AF point by QCD)',
4 => 'FE lock',
},
},
14 => {
Name => 'FillFlashAutoReduction',
PrintConv => \%enableDisable,
},
15 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
16 => {
Name => 'SafetyShiftInAvOrTv',
PrintConv => \%disableEnable,
},
17 => {
Name => 'LensAFStopButton',
PrintConv => {
0 => 'AF stop',
1 => 'AF start',
2 => 'AE lock while metering',
3 => 'AF point: M->Auto/Auto->ctr',
4 => 'One Shot <-> AI servo',
5 => 'IS start',
},
},
);
# Custom functions for the 20D (ref 2)
%Image::ExifTool::CanonCustom::Functions20D = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
WRITABLE => 'int8u',
0 => {
Name => 'SetFunctionWhenShooting',
PrintConv => {
0 => 'Default (no function)',
1 => 'Change quality',
2 => 'Change Parameters',
3 => 'Menu display',
4 => 'Image replay',
},
},
1 => {
Name => 'LongExposureNoiseReduction',
PrintConv => \%offOn,
},
2 => {
Name => 'FlashSyncSpeedAv',
PrintConv => {
0 => 'Auto',
1 => '1/250 Fixed',
},
},
3 => {
Name => 'Shutter-AELock',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
4 => {
Name => 'AFAssistBeam',
PrintConv => {
0 => 'Emits',
1 => 'Does not emit',
2 => 'Only ext. flash emits',
},
},
5 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/3 Stop',
1 => '1/2 Stop',
},
},
6 => {
Name => 'FlashFiring',
PrintConv => {
0 => 'Fires',
1 => 'Does not fire',
},
},
7 => {
Name => 'ISOExpansion',
PrintConv => \%offOn,
},
8 => {
Name => 'AEBSequenceAutoCancel',
Description => 'AEB Sequence/Auto Cancel',
PrintConv => {
0 => '0,-,+/Enabled',
1 => '0,-,+/Disabled',
2 => '-,0,+/Enabled',
3 => '-,0,+/Disabled',
},
},
9 => {
Name => 'SuperimposedDisplay',
PrintConv => \%onOff,
},
10 => {
Name => 'MenuButtonDisplayPosition',
PrintConv => {
0 => 'Previous (top if power off)',
1 => 'Previous',
2 => 'Top',
},
},
11 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
12 => {
Name => 'AFPointSelectionMethod',
PrintConv => {
0 => 'Normal',
1 => 'Multi-controller direct',
2 => 'Quick Control Dial direct',
},
},
13 => {
Name => 'ETTLII',
Description => 'E-TTL II',
PrintConv => {
0 => 'Evaluative',
1 => 'Average',
},
},
14 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
15 => {
Name => 'SafetyShiftInAvOrTv',
PrintConv => \%disableEnable,
},
16 => {
Name => 'LensAFStopButton',
PrintConv => {
0 => 'AF stop',
1 => 'AF start',
2 => 'AE lock while metering',
3 => 'AF point: M -> Auto / Auto -> Ctr.',
4 => 'ONE SHOT <-> AI SERVO',
5 => 'IS start',
},
},
17 => {
Name => 'AddOriginalDecisionData',
PrintConv => \%offOn,
},
);
# Custom functions for the 30D (PH)
%Image::ExifTool::CanonCustom::Functions30D = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
WRITABLE => 'int8u',
1 => {
Name => 'SetFunctionWhenShooting',
PrintConv => {
0 => 'Default (no function)',
1 => 'Change quality',
2 => 'Change Picture Style',
3 => 'Menu display',
4 => 'Image replay',
},
},
2 => {
Name => 'LongExposureNoiseReduction',
PrintConv => {
0 => 'Off',
1 => 'Auto',
2 => 'On',
},
},
3 => {
Name => 'FlashSyncSpeedAv',
PrintConv => {
0 => 'Auto',
1 => '1/250 Fixed',
},
},
4 => {
Name => 'Shutter-AELock',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
5 => {
Name => 'AFAssistBeam',
PrintConv => {
0 => 'Emits',
1 => 'Does not emit',
2 => 'Only ext. flash emits',
},
},
6 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/3 Stop',
1 => '1/2 Stop',
},
},
7 => {
Name => 'FlashFiring',
PrintConv => {
0 => 'Fires',
1 => 'Does not fire',
},
},
8 => {
Name => 'ISOExpansion',
PrintConv => \%offOn,
},
9 => {
Name => 'AEBSequenceAutoCancel',
Description => 'AEB Sequence/Auto Cancel',
PrintConv => {
0 => '0,-,+/Enabled',
1 => '0,-,+/Disabled',
2 => '-,0,+/Enabled',
3 => '-,0,+/Disabled',
},
},
10 => {
Name => 'SuperimposedDisplay',
PrintConv => \%onOff,
},
11 => {
Name => 'MenuButtonDisplayPosition',
PrintConv => {
0 => 'Previous (top if power off)',
1 => 'Previous',
2 => 'Top',
},
},
12 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
13 => {
Name => 'AFPointSelectionMethod',
PrintConv => {
0 => 'Normal',
1 => 'Multi-controller direct',
2 => 'Quick Control Dial direct',
},
},
14 => {
Name => 'ETTLII',
Description => 'E-TTL II',
PrintConv => {
0 => 'Evaluative',
1 => 'Average',
},
},
15 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
16 => {
Name => 'SafetyShiftInAvOrTv',
PrintConv => \%disableEnable,
},
17 => {
Name => 'MagnifiedView',
PrintConv => {
0 => 'Image playback only',
1 => 'Image review and playback',
},
},
18 => {
Name => 'LensAFStopButton',
PrintConv => {
0 => 'AF stop',
1 => 'AF start',
2 => 'AE lock while metering',
3 => 'AF point: M -> Auto / Auto -> Ctr.',
4 => 'ONE SHOT <-> AI SERVO',
5 => 'IS start',
},
},
19 => {
Name => 'AddOriginalDecisionData',
PrintConv => \%offOn,
},
);
# Custom functions for the 350D (PH)
%Image::ExifTool::CanonCustom::Functions350D = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
WRITABLE => 'int8u',
0 => {
Name => 'SetButtonCrossKeysFunc',
PrintConv => {
0 => 'Normal',
1 => 'Set: Quality',
2 => 'Set: Parameter',
3 => 'Set: Playback',
4 => 'Cross keys: AF point select',
},
},
1 => {
Name => 'LongExposureNoiseReduction',
PrintConv => \%offOn,
},
2 => {
Name => 'FlashSyncSpeedAv',
PrintConv => {
0 => 'Auto',
1 => '1/200 Fixed',
},
},
3 => {
Name => 'Shutter-AELock',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
4 => {
Name => 'AFAssistBeam',
PrintConv => {
0 => 'Emits',
1 => 'Does not emit',
2 => 'Only ext. flash emits',
},
},
5 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/3 Stop',
1 => '1/2 Stop',
},
},
6 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
7 => {
Name => 'ETTLII',
Description => 'E-TTL II',
PrintConv => {
0 => 'Evaluative',
1 => 'Average',
},
},
8 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
);
# Custom functions for the 400D (PH)
%Image::ExifTool::CanonCustom::Functions400D = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
WRITABLE => 'int8u',
0 => {
Name => 'SetButtonCrossKeysFunc',
PrintConv => {
0 => 'Set: Picture Style',
1 => 'Set: Quality',
2 => 'Set: Flash Exposure Comp',
3 => 'Set: Playback',
4 => 'Cross keys: AF point select',
},
},
1 => {
Name => 'LongExposureNoiseReduction',
PrintConv => {
0 => 'Off',
1 => 'Auto',
2 => 'On',
},
},
2 => {
Name => 'FlashSyncSpeedAv',
PrintConv => {
0 => 'Auto',
1 => '1/200 Fixed',
},
},
3 => {
Name => 'Shutter-AELock',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
4 => {
Name => 'AFAssistBeam',
PrintConv => {
0 => 'Emits',
1 => 'Does not emit',
2 => 'Only ext. flash emits',
},
},
5 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/3 Stop',
1 => '1/2 Stop',
},
},
6 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
7 => {
Name => 'ETTLII',
Description => 'E-TTL II',
PrintConv => {
0 => 'Evaluative',
1 => 'Average',
},
},
8 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
9 => {
Name => 'MagnifiedView',
PrintConv => {
0 => 'Image playback only',
1 => 'Image review and playback',
},
},
10 => {
Name => 'LCDDisplayAtPowerOn',
PrintConv => {
0 => 'Display',
1 => 'Retain power off status',
},
},
);
# Custom functions for the D30/D60
%Image::ExifTool::CanonCustom::FunctionsD30 = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
WRITE_PROC => \&WriteCanonCustom,
CHECK_PROC => \&CheckCanonCustom,
NOTES => 'Custom functions for the EOS D30 and D60.',
WRITABLE => 'int8u',
1 => {
Name => 'LongExposureNoiseReduction',
PrintConv => \%offOn,
},
2 => {
Name => 'Shutter-AELock',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock',
3 => 'AE+release/AE+AF',
},
},
3 => {
Name => 'MirrorLockup',
PrintConv => \%disableEnable,
},
4 => {
Name => 'ExposureLevelIncrements',
PrintConv => {
0 => '1/2 Stop',
1 => '1/3 Stop',
},
},
5 => {
Name => 'AFAssist',
PrintConv => {
0 => 'Emits/Fires',
1 => 'Does not emit/Fires',
2 => 'Only ext. flash emits/Fires',
3 => 'Emits/Does not fire',
},
},
6 => {
Name => 'FlashSyncSpeedAv',
PrintConv => {
0 => 'Auto',
1 => '1/200 Fixed',
},
},
7 => {
Name => 'AEBSequenceAutoCancel',
Description => 'AEB Sequence/Auto Cancel',
PrintConv => {
0 => '0,-,+/Enabled',
1 => '0,-,+/Disabled',
2 => '-,0,+/Enabled',
3 => '-,0,+/Disabled',
},
},
8 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
9 => {
Name => 'LensAFStopButton',
PrintConv => {
0 => 'AF Stop',
1 => 'Operate AF',
2 => 'Lock AE and start timer',
},
},
10 => {
Name => 'FillFlashAutoReduction',
PrintConv => \%enableDisable,
},
11 => {
Name => 'MenuButtonReturn',
PrintConv => {
0 => 'Top',
1 => 'Previous (volatile)',
2 => 'Previous',
},
},
12 => {
Name => 'SetButtonWhenShooting',
PrintConv => {
0 => 'Default (no function)',
1 => 'Image quality',
2 => 'Change ISO speed',
3 => 'Change parameters',
},
},
13 => {
Name => 'SensorCleaning',
PrintConv => \%disableEnable,
},
14 => {
Name => 'SuperimposedDisplay',
PrintConv => \%onOff,
},
15 => {
Name => 'ShutterReleaseNoCFCard',
Description => 'Shutter Release W/O CF Card',
PrintConv => {
0 => 'Yes',
1 => 'No',
},
},
);
# Custom functions for unknown cameras
%Image::ExifTool::CanonCustom::FuncsUnknown = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom,
);
# 1D personal function settings (ref PH)
%Image::ExifTool::CanonCustom::PersonalFuncs = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
WRITABLE => 1,
NOTES => 'Personal function settings for the EOS-1D.',
FORMAT => 'int16u',
FIRST_ENTRY => 1,
1 => { Name => 'PF0CustomFuncRegistration', %convPFn },
2 => { Name => 'PF1DisableShootingModes', %convPFn },
3 => { Name => 'PF2DisableMeteringModes', %convPFn },
4 => { Name => 'PF3ManualExposureMetering', %convPFn },
5 => { Name => 'PF4ExposureTimeLimits', %convPFn },
6 => { Name => 'PF5ApertureLimits', %convPFn },
7 => { Name => 'PF6PresetShootingModes', %convPFn },
8 => { Name => 'PF7BracketContinuousShoot', %convPFn },
9 => { Name => 'PF8SetBracketShots', %convPFn },
10 => { Name => 'PF9ChangeBracketSequence', %convPFn },
11 => { Name => 'PF10RetainProgramShift', %convPFn },
#12 => { Name => 'PF11Unused', %convPFn },
#13 => { Name => 'PF12Unused', %convPFn },
14 => { Name => 'PF13DrivePriority', %convPFn },
15 => { Name => 'PF14DisableFocusSearch', %convPFn },
16 => { Name => 'PF15DisableAFAssistBeam', %convPFn },
17 => { Name => 'PF16AutoFocusPointShoot', %convPFn },
18 => { Name => 'PF17DisableAFPointSel', %convPFn },
19 => { Name => 'PF18EnableAutoAFPointSel', %convPFn },
20 => { Name => 'PF19ContinuousShootSpeed', %convPFn },
21 => { Name => 'PF20LimitContinousShots', %convPFn },
22 => { Name => 'PF21EnableQuietOperation', %convPFn },
#23 => { Name => 'PF22Unused', %convPFn },
24 => { Name => 'PF23SetTimerLengths', %convPFn },
25 => { Name => 'PF24LightLCDDuringBulb', %convPFn },
26 => { Name => 'PF25DefaultClearSettings', %convPFn },
27 => { Name => 'PF26ShortenReleaseLag', %convPFn },
28 => { Name => 'PF27ReverseDialRotation', %convPFn },
29 => { Name => 'PF28NoQuickDialExpComp', %convPFn },
30 => { Name => 'PF29QuickDialSwitchOff', %convPFn },
31 => { Name => 'PF30EnlargementMode', %convPFn },
32 => { Name => 'PF31OriginalDecisionData', %convPFn },
);
# 1D personal function values (ref PH)
%Image::ExifTool::CanonCustom::PersonalFuncValues = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&Image::ExifTool::ProcessBinaryData,
WRITE_PROC => \&Image::ExifTool::WriteBinaryData,
CHECK_PROC => \&Image::ExifTool::CheckBinaryData,
WRITABLE => 1,
FORMAT => 'int16u',
FIRST_ENTRY => 1,
1 => 'PF1Value',
2 => 'PF2Value',
3 => 'PF3Value',
4 => {
Name => 'PF4ExposureTimeMin',
RawConv => '$val > 0 ? $val : 0',
ValueConv => 'exp(-Image::ExifTool::Canon::CanonEv($val*4)*log(2))*1000/8',
ValueConvInv => 'Image::ExifTool::Canon::CanonEvInv(-log($val*8/1000)/log(2))/4',
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
5 => {
Name => 'PF4ExposureTimeMax',
RawConv => '$val > 0 ? $val : 0',
ValueConv => 'exp(-Image::ExifTool::Canon::CanonEv($val*4)*log(2))*1000/8',
ValueConvInv => 'Image::ExifTool::Canon::CanonEvInv(-log($val*8/1000)/log(2))/4',
PrintConv => 'Image::ExifTool::Exif::PrintExposureTime($val)',
PrintConvInv => 'Image::ExifTool::Exif::ConvertFraction($val)',
},
6 => {
Name => 'PF5ApertureMin',
RawConv => '$val > 0 ? $val : 0',
ValueConv => 'exp(Image::ExifTool::Canon::CanonEv($val*4-32)*log(2)/2)',
ValueConvInv => '(Image::ExifTool::Canon::CanonEvInv(log($val)*2/log(2))+32)/4',
PrintConv => 'sprintf("%.2g",$val)',
PrintConvInv => '$val',
},
7 => {
Name => 'PF5ApertureMax',
RawConv => '$val > 0 ? $val : 0',
ValueConv => 'exp(Image::ExifTool::Canon::CanonEv($val*4-32)*log(2)/2)',
ValueConvInv => '(Image::ExifTool::Canon::CanonEvInv(log($val)*2/log(2))+32)/4',
PrintConv => 'sprintf("%.2g",$val)',
PrintConvInv => '$val',
},
8 => 'PF8BracketShots',
9 => 'PF19ShootingSpeedLow',
10 => 'PF19ShootingSpeedHigh',
11 => 'PF20MaxContinousShots',
12 => 'PF23ShutterButtonTime',
13 => 'PF23FELockTime',
14 => 'PF23PostReleaseTime',
15 => 'PF25AEMode',
16 => 'PF25MeteringMode',
17 => 'PF25DriveMode',
18 => 'PF25AFMode',
19 => 'PF25AFPointSel',
20 => 'PF25ImageSize',
21 => 'PF25WBMode',
22 => 'PF25Parameters',
23 => 'PF25ColorMatrix',
24 => 'PF27Value',
);
# Custom functions used by the 1D Mark III and later models (ref PH)
%Image::ExifTool::CanonCustom::Functions2 = (
GROUPS => { 0 => 'MakerNotes', 2 => 'Camera' },
PROCESS_PROC => \&ProcessCanonCustom2,
CHECK_PROC => \&Image::ExifTool::Exif::CheckExif,
WRITE_PROC => \&WriteCanonCustom2,
WRITABLE => 'int32s',
NOTES => q{
Beginning with the EOS 1D Mark III, Canon finally created a set of custom
function tags which are (reasonably) consistent across models. The EOS 1D
Mark III has 57 custom function tags divided into four main groups: 1.
Exposure (0x0101-0x010f), 2. Image (0x0201-0x0203), Flash Exposure
(0x0304-0x0306) and Display (0x0407-0x0409), 3. Auto Focus (0x0501-0x050e)
and Drive (0x060f-0x0611), and 4. Operation (0x0701-0x070a) and Others
(0x080b-0x0810). The table below lists tags used by the EOS 1D Mark III, as
well as newer tags and values added by later models.
},
# grouped in 4 groups:
# 1) Exposure
0x0101 => [
{
Name => 'ExposureLevelIncrements',
Condition => '$$self{Model} =~ /\b1Ds?\b/',
Notes => '1DmkIII and 1DmkIV',
PrintConv => {
0 => '1/3-stop set, 1/3-stop comp.',
1 => '1-stop set, 1/3-stop comp.',
2 => '1/2-stop set, 1/2-stop comp.',
},
},
{
Name => 'ExposureLevelIncrements',
Notes => 'other models',
PrintConv => {
0 => '1/3 Stop',
1 => '1/2 Stop',
},
},
],
0x0102 => {
Name => 'ISOSpeedIncrements',
PrintConv => {
0 => '1/3 Stop',
1 => '1 Stop',
},
},
0x0103 => [
{
Name => 'ISOSpeedRange',
Condition => '$$self{Model} =~ /\b1D/',
Notes => '1DmkIII and 1DmkIV',
Count => 3,
# (this decoding may not be valid for CR2 images?)
ValueConv => [
undef,
# this may also be set to "H" (Hi6400) -- is this the -1 value I see? - PH
'$val < 2 ? $val : ($val < 1000 ? exp(($val/8-9)*log(2))*100 : 0)', # (educated guess)
# this may also be set to "L" (Lo50) -- is this the 1 value I see? - PH
'$val < 2 ? $val : ($val < 1000 ? exp(($val/8-9)*log(2))*100 : 0)', # (educated guess)
],
ValueConvInv => [
undef,
'$val < 2 ? $val : int(8*(log($val/100)/log(2)+9) + 0.5)',
'$val < 2 ? $val : int(8*(log($val/100)/log(2)+9) + 0.5)',
],
PrintConv => [
\%disableEnable,
'sprintf("Max %.0f",$val)',
'sprintf("Min %.0f",$val)',
],
PrintConvInv => [
undef,
'$val=~/(-?[\d.]+)/ ? $1 : 0',
'$val=~/(-?[\d.]+)/ ? $1 : 0',
],
},
{
Name => 'ISOExpansion',
Notes => 'other models',
PrintConv => \%offOn,
},
],
0x0104 => {
Name => 'AEBAutoCancel',
PrintConv => \%onOff,
},
0x0105 => {
Name => 'AEBSequence',
Notes => 'value of 2 not used by 40D, 50D, 60D, 5DmkII and 7D',
PrintConv => {
0 => '0,-,+',
1 => '-,0,+',
2 => '+,0,-',
},
},
0x0106 => [{
Name => 'AEBShotCount',
Condition => '$count == 1',
Notes => 'one value for some models...',
PrintConv => {
0 => '3 shots',
1 => '2 shots',
2 => '5 shots',
3 => '7 shots',
},
},{
Name => 'AEBShotCount',
Count => 2,
Notes => 'two values for others',
PrintConv => {
'3 0' => '3 shots',
'2 1' => '2 shots',
'5 2' => '5 shots',
'7 3' => '7 shots',
},
}],
0x0107 => {
Name => 'SpotMeterLinkToAFPoint',
PrintConv => {
0 => 'Disable (use center AF point)',
1 => 'Enable (use active AF point)',
},
},
0x0108 => {
Name => 'SafetyShift',
Notes => 'value of 2 not used by 40D, 50D, 60D, 5DmkII and 7D',
PrintConv => {
0 => 'Disable',
1 => 'Enable (Tv/Av)',
2 => 'Enable (ISO speed)',
},
},
0x0109 => {
Name => 'UsableShootingModes',
Count => 2,
PrintConv => [
\%disableEnable,
'sprintf("Flags 0x%x",$val)', # (M, Tv, Av, P, Bulb)
],
PrintConvInv => [
undef,
'$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
],
},
0x010a => {
Name => 'UsableMeteringModes',
Count => 2,
PrintConv => [
\%disableEnable,
'sprintf("Flags 0x%x",$val)', # (evaluative,partial,spot,center-weighted average)
],
PrintConvInv => [
undef,
'$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
],
},
0x010b => {
Name => 'ExposureModeInManual',
PrintConv => {
0 => 'Specified metering mode',
1 => 'Evaluative metering',
2 => 'Partial metering',
3 => 'Spot metering',
4 => 'Center-weighted average',
},
},
0x010c => {
Name => 'ShutterSpeedRange',
Count => 3,
ValueConv => [
undef,
'exp(-($val/8-7)*log(2))',
'exp(-($val/8-7)*log(2))',
],
ValueConvInv => [
undef,
'int(-8*(log($val)/log(2)-7) + 0.5)',
'int(-8*(log($val)/log(2)-7) + 0.5)',
],
PrintConv => [
\%disableEnable,
'"Hi " . Image::ExifTool::Exif::PrintExposureTime($val)',
'"Lo " . Image::ExifTool::Exif::PrintExposureTime($val)',
],
PrintConvInv => [
undef,
'$val=~m{([\d./]+)} ? eval $1 : 0',
'$val=~m{([\d./]+)} ? eval $1 : 0',
],
},
0x010d => {
Name => 'ApertureRange',
Count => 3,
ValueConv => [
undef,
'exp(($val/8-1)*log(2)/2)',
'exp(($val/8-1)*log(2)/2)',
],
ValueConvInv => [
undef,
'int(8*(log($val)*2/log(2)+1) + 0.5)',
'int(8*(log($val)*2/log(2)+1) + 0.5)',
],
PrintConv => [
\%disableEnable,
'sprintf("Closed %.2g",$val)',
'sprintf("Open %.2g",$val)',
],
PrintConvInv => [
undef,
'$val=~/([\d.]+)/ ? $1 : 0',
'$val=~/([\d.]+)/ ? $1 : 0',
],
},
0x010e => {
Name => 'ApplyShootingMeteringMode',
Count => 8,
PrintConv => [ \%disableEnable ],
},
0x010f => [
{
Name => 'FlashSyncSpeedAv',
Condition => '$$self{Model} =~ /\b40D\b/',
Notes => '40D',
PrintConv => {
0 => 'Auto',
1 => '1/250 Fixed',
},
},
{
Name => 'FlashSyncSpeedAv',
Condition => '$$self{Model} =~ /\b(50D|60D|7D)\b/',
Notes => '50D, 60D and 7D',
PrintConv => {
0 => 'Auto',
1 => '1/250-1/60 Auto',
2 => '1/250 Fixed',
},
},
{
Name => 'FlashSyncSpeedAv',
Condition => '$$self{Model} =~ /\b(450D|XSi|Kiss X2|1000D|XS|Kiss F)\b/',
Notes => '450D and 1000D',
PrintConv => {
0 => 'Auto',
1 => '1/200 Fixed',
},
},
{
Name => 'FlashSyncSpeedAv',
Condition => '$$self{Model} =~ /\bEOS-1Ds? Mark III\b/',
Notes => '1D Mark III and 1Ds Mark III',
PrintConv => {
0 => 'Auto',
1 => '1/300 Fixed',
},
},
{
Name => 'FlashSyncSpeedAv',
Condition => '$$self{Model} =~ /\bEOS-1D Mark IV\b/',
Notes => '1D Mark IV',
PrintConv => {
0 => 'Auto',
1 => '1/300-1/60 Auto',
2 => '1/300 Fixed',
},
},
{
Name => 'FlashSyncSpeedAv',
Notes => '5D Mark II, 5D Mark III, 500D, 550D, 600D and 1100D',
PrintConv => {
0 => 'Auto',
1 => '1/200-1/60 Auto',
2 => '1/200 Fixed',
},
},
],
0x0110 => { # new for 1DmkIV
Name => 'AEMicroadjustment',
Count => 3,
PrintConv => [ \%disableEnable ],
},
0x0111 => { # new for 1DmkIV
Name => 'FEMicroadjustment',
Count => 3,
PrintConv => [ \%disableEnable ],
},
#### 2a) Image
0x0201 => {
Name => 'LongExposureNoiseReduction',
PrintConv => {
0 => 'Off',
1 => 'Auto',
2 => 'On',
},
},
0x0202 => [
{
Name => 'HighISONoiseReduction',
Condition => q{
$$self{Model} =~ /\b(50D|60D|5D Mark II|7D|500D|T1i|Kiss X3|550D|T2i|Kiss X4)\b/ or
$$self{Model} =~ /\b(600D|T3i|Kiss X5|1100D|T3|Kiss X50)\b/
},
Notes => '50D, 60D, 500D, 550D, 600D, 1100D, 5DmkII and 7D',
PrintConv => {
0 => 'Standard',
1 => 'Low',
2 => 'Strong',
3 => 'Off',
},
},
{
Name => 'HighISONoiseReduction',
Notes => 'other models',
PrintConv => \%offOn,
},
],
0x0203 => {
Name => 'HighlightTonePriority',
PrintConv => \%disableEnable
},
0x0204 => [
{
Name => 'AutoLightingOptimizer',
Condition => '$$self{Model} =~ /\b(50D|5D Mark II|500D|T1i|Kiss X3|1D Mark IV)\b/',
Notes => '50D, 500D, 5DmkII and 1DmkIV',
PrintConv => {
0 => 'Standard',
1 => 'Low',
2 => 'Strong',
3 => 'Disable',
},
},
{
Name => 'AutoLightingOptimizer',
Notes => 'other models',
PrintConv => \%enableDisable,
},
],
# 0x0205 - Added in 5DmkII firmware update
#### 2b) Flash exposure
0x0304 => {
Name => 'ETTLII',
Description => 'E-TTL II',
PrintConv => {
0 => 'Evaluative',
1 => 'Average',
},
},
0x0305 => {
Name => 'ShutterCurtainSync',
PrintConv => {
0 => '1st-curtain sync',
1 => '2nd-curtain sync',
},
},
0x0306 => {
Name => 'FlashFiring',
PrintConv => {
0 => 'Fires',
1 => 'Does not fire',
},
},
#### 2c) Display
0x0407 => {
Name => 'ViewInfoDuringExposure',
PrintConv => \%disableEnable,
},
0x0408 => {
Name => 'LCDIlluminationDuringBulb',
PrintConv => \%offOn,
},
0x0409 => [
{
Name => 'InfoButtonWhenShooting',
Condition => '$$self{Model} =~ /\b1Ds? Mark III\b/',
Notes => '1D Mark III',
PrintConv => {
0 => 'Displays camera settings',
1 => 'Displays shooting functions',
},
},
{
Name => 'InfoButtonWhenShooting',
Notes => '1D Mark IV',
PrintConv => {
# reversed from earlier models. grr...
0 => 'Displays shooting functions',
1 => 'Displays camera settings',
},
},
],
0x040a => { # new for 5DmkIII
Name => 'ViewfinderWarnings',
PrintConv => { BITMASK => { # (NC)
0 => 'Monochrome', # (have seen for: 5DmkII, 6D)
1 => 'WB corrected', # (have seen for: 5DmkII, 6D)
2 => 'One-touch image quality', # (have seen for: 5DmkII; doesn't exist for 6D)
3 => 'ISO expansion', # (have seen for: 5DmkII)
4 => 'Spot metering', # (have seen for: 5DmkII, 6D)
}},
},
0x040b => { # new for 5DmkIII
Name => 'LVShootingAreaDisplay',
PrintConv => {
0 => 'Masked',
1 => 'Outlined',
},
},
#### 3a) Auto focus
0x0501 => {
Name => 'USMLensElectronicMF',
PrintConv => {
0 => 'Enable after one-shot AF',
1 => 'Disable after one-shot AF',
2 => 'Disable in AF mode',
},
},
0x0502 => {
Name => 'AIServoTrackingSensitivity',
PrintConv => {
-2 => 'Slow', # (Locked on -2 for 6D)
-1 => 'Medium Slow', # (Locked on -1 for 6D)
0 => 'Standard',
1 => 'Medium Fast', # (Responsive +1 for 6D)
2 => 'Fast', # (Responsive +2 for 6D)
},
},
0x0503 => {
Name => 'AIServoImagePriority',
PrintConv => {
0 => '1: AF, 2: Tracking',
1 => '1: AF, 2: Drive speed',
2 => '1: Release, 2: Drive speed',
3 => '1: Release, 2: Tracking', # 7D/1DmkIV
},
},
0x0504 => {
Name => 'AIServoTrackingMethod',
PrintConv => {
0 => 'Main focus point priority',
1 => 'Continuous AF track priority',
},
},
0x0505 => {
Name => 'LensDriveNoAF',
PrintConv => {
0 => 'Focus search on',
1 => 'Focus search off',
},
},
0x0506 => {
Name => 'LensAFStopButton',
Notes => 'value of 6 not used by 40D, 50D and 5DmkII',
PrintConv => {
0 => 'AF stop',
1 => 'AF start',
2 => 'AE lock',
3 => 'AF point: M->Auto/Auto->ctr',
4 => 'One Shot <-> AI servo',
5 => 'IS start',
6 => 'Switch to registered AF point',
7 => 'Spot AF', # 1DmkIV
},
},
0x0507 => {
Name => 'AFMicroadjustment',
Count => 5,
PrintConv => [
{
0 => 'Disable',
1 => 'Adjust all by same amount',
2 => 'Adjust by lens',
},
# DECODE OTHER VALUES
],
},
0x0508 => [
{
Name => 'AFPointAreaExpansion',
Condition => '$$self{Model} =~ /\b5D Mark II\b/',
Notes => '5D Mark II',
PrintConv => {
0 => 'Disable',
1 => 'Enable',
},
},
{
Name => 'AFPointAreaExpansion',
PrintConv => {
0 => 'Disable',
1 => 'Left/right AF points',
2 => 'Surrounding AF points',
3 => 'All 45 points area', # 1DmkIV
},
},
],
0x0509 => [
{
Name => 'SelectableAFPoint',
Condition => '$$self{Model} =~ /\b1D Mark IV\b/',
Notes => '1D Mark IV',
PrintConv => {
0 => '45 points',
1 => '19 points',
2 => '11 points',
3 => 'Inner 9 points',
4 => 'Outer 9 points',
},
},
{
Name => 'SelectableAFPoint',
Notes => 'other models',
PrintConv => {
0 => '19 points',
1 => 'Inner 9 points',
2 => 'Outer 9 points',
3 => '19 Points, Multi-controller selectable', #4
4 => 'Inner 9 Points, Multi-controller selectable', #4
5 => 'Outer 9 Points, Multi-controller selectable', #4
},
},
],
0x050a => [
{
Name => 'SwitchToRegisteredAFPoint',
Condition => '$$self{Model} =~ /\b1D Mark IV\b/',
Notes => '1D Mark IV',
PrintConv => {
0 => 'Disable',
1 => 'Switch with multi-controller',
2 => 'Only while AEL is pressed',
},
},
{
Name => 'SwitchToRegisteredAFPoint',
Notes => 'other models',
PrintConv => \%disableEnable,
},
],
0x050b => {
Name => 'AFPointAutoSelection',
PrintConv => {
0 => 'Control-direct:disable/Main:enable',
1 => 'Control-direct:disable/Main:disable',
2 => 'Control-direct:enable/Main:enable',
},
},
0x050c => {
Name => 'AFPointDisplayDuringFocus',
PrintConv => {
0 => 'On',
1 => 'Off',
2 => 'On (when focus achieved)',
},
},
0x050d => {
Name => 'AFPointBrightness',
PrintConv => {
0 => 'Normal',
1 => 'Brighter',
},
},
0x050e => [
{
Name => 'AFAssistBeam',
Condition => '$$self{Model} =~ /\b(1D Mark IV|6D)\b/',
Notes => '1D Mark IV and 6D',
PrintConv => {
0 => 'Emits',
1 => 'Does not emit',
2 => 'IR AF assist beam only',
},
},
{
Name => 'AFAssistBeam',
Notes => 'other models; values 2-3 not used by 1DmkIII or 5DmkII, value 3 new for 7D',
PrintConv => {
0 => 'Emits',
1 => 'Does not emit',
2 => 'Only ext. flash emits',
3 => 'IR AF assist beam only', # new for 7D
},
},
],
0x050f => [ # new for 40D
{
Name => 'AFPointSelectionMethod',
Condition => '$$self{Model} !~ /\b60D\b/',
Notes => '40D, 50D and 5DmkII',
PrintConv => {
0 => 'Normal',
1 => 'Multi-controller direct',
2 => 'Quick Control Dial direct',
},
},
{
Name => 'AFPointSelectionMethod',
Notes => '60D',
PrintConv => {
0 => 'AF point button: Activate AF Sel; Rear dial: Select AF points',
1 => 'AF point button: Auto selection; Rear dial: Manual selection',
},
},
],
0x0510 => [ # new for 40D
{
Name => 'VFDisplayIllumination',
Condition => '$$self{Model} =~ /\b7D\b/',
Notes => '7D',
PrintConv => {
0 => 'Auto',
1 => 'Enable',
2 => 'Disable',
},
},
{
Name => 'SuperimposedDisplay',
Notes => 'other models',
PrintConv => \%onOff,
},
],
0x0511 => [ # new for 40D
{
Name => 'AFDuringLiveView',
Condition => '$$self{Model} =~ /\b40D\b/',
Notes => '40D',
PrintConv => \%disableEnable,
},
{
Name => 'AFDuringLiveView',
Notes => '450D and 1000D',
PrintConv => {
0 => 'Disable',
1 => 'Quick mode',
2 => 'Live mode',
},
},
],
0x0512 => { # new for 7D
Name => 'SelectAFAreaSelectMode',
PrintConv => [
{
0 => 'Disable',
1 => 'Enable',
2 => 'Register',
3 => 'Select AF-modes',
},
'sprintf("Flags 0x%x",$val)', # (70D=Manual 1pt,Manual zone,Auto 19pt)
],
PrintConvInv => [
undef,
'$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
],
},
0x0513 => { # new for 7D
Name => 'ManualAFPointSelectPattern',
PrintConv => {
0 => 'Stops at AF area edges',
1 => 'Continuous',
},
},
0x0514 => { # new for 7D
Name => 'DisplayAllAFPoints',
PrintConv => \%enableDisable,
},
0x0515 => { # new for 7D
Name => 'FocusDisplayAIServoAndMF',
PrintConv => \%enableDisable,
},
0x0516 => { # new for 7D and 1DmkIV
Name => 'OrientationLinkedAFPoint',
PrintConv => {
0 => 'Same for vertical and horizontal',
1 => 'Select different AF points',
},
},
0x0517 => { # new for 1DmkIV
Name => 'MultiControllerWhileMetering',
PrintConv => {
0 => 'Off',
1 => 'AF point selection',
},
},
0x0518 => { # new for 6D
Name => 'AccelerationTracking',
},
0x0519 => { # new for 6D
Name => 'AIServoFirstImagePriority',
PrintConv => { # (NC)
-1 => 'Release priority',
0 => 'Equal priority',
1 => 'Focus priority',
},
},
0x051a => { # new for 6D
Name => 'AIServoSecondImagePriority',
PrintConv => { # (NC)
-1 => 'Shooting speed priority',
0 => 'Equal priority',
1 => 'Focus priority',
},
},
0x051b => { # (70D)
Name => 'AFAreaSelectMethod',
PrintConv => {
0 => 'AF area selection button',
1 => 'Main dial',
},
},
#### 3b) Drive
0x060f => {
Name => 'MirrorLockup',
Notes => 'value of 2 not used by some models',
PrintConv => {
0 => 'Disable',
1 => 'Enable',
2 => 'Enable: Down with Set',
},
},
0x0610 => {
Name => 'ContinuousShootingSpeed',
Count => 3,
PrintConv => [
\%disableEnable,
'"Hi $val"',
'"Lo $val"',
],
PrintConvInv => [
undef,
'$val=~/(\d+)/ ? $1 : 0',
'$val=~/(\d+)/ ? $1 : 0',
],
},
0x0611 => {
Name => 'ContinuousShotLimit',
Count => 2,
PrintConv => [
\%disableEnable,
'"$val shots"',
],
PrintConvInv => [
undef,
'$val=~/(\d+)/ ? $1 : 0',
],
},
0x0612 => { # (1DX)
Name => 'RestrictDriveModes',
Count => 2,
PrintConv => [
\%disableEnable,
'sprintf("Flags 0x%x",$val)', # (Single,Cont Hi,Cont Lo,Timer 10,Timer 2,Silent,Super Hi)
],
PrintConvInv => [
undef,
'$val=~/0x([\dA-F]+)/i ? hex($1) : undef',
],
},
#### 4a) Operation
0x0701 => [
{
Name => 'Shutter-AELock',
Condition => q{
$$self{Model} =~ /\b(1000D|XS|Kiss F|500D|T1i|Kiss X3|550D|T2i|Kiss X4)\b/ or
$$self{Model} =~ /\b(600D|T3i|Kiss X5|1100D|T3|Kiss X50)\b/
},
Notes => '500D, 550D, 600D, 1000D and 1100D',
PrintConv => {
0 => 'AF/AE lock',
1 => 'AE lock/AF',
2 => 'AF/AF lock, No AE lock',
3 => 'AE/AF, No AE lock',
},
},
{
Name => 'AFAndMeteringButtons',
Condition => '$$self{Model} =~ /\b60D\b/',
Notes => '60D',
PrintConv => {
0 => 'Metering start',
1 => 'Metering + AF start',
2 => 'AE lock',
3 => 'AF stop',
4 => 'No function',
},
},
{
Name => 'ShutterButtonAFOnButton',
Notes => 'other models',
PrintConv => {
0 => 'Metering + AF start',
1 => 'Metering + AF start/AF stop',
2 => 'Metering start/Meter + AF start',
3 => 'AE lock/Metering + AF start',
4 => 'Metering + AF start/disable',
},
},
],
0x0702 => {
Name => 'AFOnAELockButtonSwitch',
PrintConv => \%disableEnable,
},
0x0703 => {
Name => 'QuickControlDialInMeter',
PrintConv => {
0 => 'Exposure comp/Aperture',
1 => 'AF point selection',
2 => 'ISO speed',
3 => 'AF point selection swapped with Exposure comp', #4
4 => 'ISO speed swapped with Exposure comp', #4
},
},
0x0704 => [
{
Name => 'SetButtonWhenShooting',
Condition => '$$self{Model} =~ /\b(40D|50D|5D Mark II)\b/',
Notes => '40D, 50D and 5DmkII; value of 5 is new for 50D, and 6 is new for 5DmkII',
PrintConv => {
0 => 'Normal (disabled)',
1 => 'Image quality',
2 => 'Picture style',
3 => 'Menu display',
4 => 'Image playback',
5 => 'Quick control screen', #50D
6 => 'Record movie (Live View)', #5DmkII
},
},
{
Name => 'SetButtonWhenShooting',
Condition => '$$self{Model} =~ /\b60D\b/',
Notes => '60D',
PrintConv => {
0 => 'Normal (disabled)',
1 => 'Image quality',
2 => 'Picture style',
3 => 'White balance',
4 => 'Flash exposure compensation',
5 => 'Viewfinder leveling gauge',
},
},
{
Name => 'SetButtonWhenShooting',
Condition => '$$self{Model} =~ /\b(450D|XSi|Kiss X2|550D|T2i|Kiss X4|600D|T3i|Kiss X5)\b/',
Notes => '450D, 550D and 600D; value of 5 is new for 550D',
PrintConv => {
0 => 'Normal (disabled)',
1 => 'Image quality',
2 => 'Flash exposure compensation',
3 => 'LCD monitor On/Off',
4 => 'Menu display',
5 => 'ISO speed',
},
},
{
Name => 'SetButtonWhenShooting',
Condition => '$$self{Model} =~ /\b(1100D|T3|Kiss X50)\b/',
Notes => '1100D',
PrintConv => {
0 => 'Normal (disabled)',
1 => 'Image quality',
2 => 'Flash exposure compensation',
3 => 'LCD monitor On/Off',
4 => 'Menu display',
5 => 'Depth-of-field preview',
},
},
{
Name => 'SetButtonWhenShooting',
Condition => '$$self{Model} =~ /\b(1000D|XS|Kiss F)\b/',
Notes => '1000D',
PrintConv => {
0 => 'LCD monitor On/Off',
1 => 'Image quality',
2 => 'Flash exposure compensation',
3 => 'Menu display',
4 => 'Disabled',
},
},
{
Name => 'SetButtonWhenShooting',
Condition => '$$self{Model} =~ /\b(500D|T1i|Kiss X3)\b/',
Notes => '500D',
PrintConv => {
0 => 'Quick control screen',
1 => 'Image quality',
2 => 'Flash exposure compensation',
3 => 'LCD monitor On/Off',
4 => 'Menu display',
5 => 'Disabled',
},
},
{
Name => 'SetButtonWhenShooting',
Notes => '1DmkIII and 1DmkIV',
PrintConv => {
0 => 'Normal (disabled)',
1 => 'White balance',
2 => 'Image size',
3 => 'ISO speed',
4 => 'Picture style',
5 => 'Record func. + media/folder',
6 => 'Menu display',
7 => 'Image playback',
},
},
],
0x0705 => {
Name => 'ManualTv',
Description => 'Manual Tv/Av For M',
PrintConv => {
0 => 'Tv=Main/Av=Control',
1 => 'Tv=Control/Av=Main',
},
},
0x0706 => {
Name => 'DialDirectionTvAv',
PrintConv => {
0 => 'Normal',
1 => 'Reversed',
},
},
0x0707 => {
Name => 'AvSettingWithoutLens',
PrintConv => \%disableEnable,
},
0x0708 => {
Name => 'WBMediaImageSizeSetting',
PrintConv => {
0 => 'Rear LCD panel',
1 => 'LCD monitor',
2 => 'Off (disable button)', # (1DX)
},
},
0x0709 => {
Name => 'LockMicrophoneButton',
PrintConv => [{
# called "sound" in 1DmkIII manual, and "memo" in 1DmkIV manual
0 => 'Protect (hold:record memo)',
1 => 'Record memo (protect:disable)',
2 => 'Play memo (hold:record memo)', # new with 1DmkIV
3 => 'Rating (protect/memo:disable)', # new with 1DX
}],
# (not sure what the 2nd number is -- new for 1DX. Seen a value of 31.
# Memo quality may be set to 48kHz or 8kHz through another option that
# doesn't seem to be stored separately -- is this it?)
},
0x070a => {
Name => 'ButtonFunctionControlOff',
PrintConv => {
0 => 'Normal (enable)',
1 => 'Disable main, Control, Multi-control',
},
},
0x070b => { # 50D (also, 5DmkII writes this but it isn't in user guide)
Name => 'AssignFuncButton',
PrintConv => {
0 => 'LCD brightness',
1 => 'Image quality',
2 => 'Exposure comp./AEB setting',
3 => 'Image jump with main dial',
4 => 'Live view function settings',
},
},
0x070c => { # new for 7D
Name => 'CustomControls',
# (too much stuff to decode)
},
0x070d => { # new for 1DmkIV
Name => 'StartMovieShooting',
PrintConv => {
0 => 'Default (from LV)',
1 => 'Quick start (FEL button)',
},
},
0x070e => { # new for 1100D
Name => 'FlashButtonFunction',
PrintConv => {
0 => 'Raise built-in flash',
1 => 'ISO speed',
},
},
0x070f => { # new for 5DmkIII
Name => 'MultiFunctionLock',
PrintConv => [
\%offOn, # (NC)
{ BITMASK => { # (NC)
0 => 'Main dial',
1 => 'Quick control dial',
2 => 'Multi-controller',
}},
],
},
0x710 => { # (M)
Name => 'TrashButtonFunction',
PrintConv => {
0 => 'Normal (set center AF point)',
1 => 'Depth-of-field preview',
},
},
0x711 => { # (M)
Name => 'ShutterReleaseWithoutLens',
PrintConv => \%disableEnable,
},
#### 4b) Others
0x080b => [
{
Name => 'FocusingScreen',
Condition => '$$self{Model} =~ /\b(40D|50D|60D)\b/',
Notes => '40D, 50D and 60D',
PrintConv => {
0 => 'Ef-A',
1 => 'Ef-D',
2 => 'Ef-S',
},
},
{
Name => 'FocusingScreen',
Condition => '$$self{Model} =~ /\b5D Mark II\b/',
Notes => '5D Mark II',
PrintConv => {
0 => 'Eg-A',
1 => 'Eg-D',
2 => 'Eg-S',
},
},
{
Name => 'FocusingScreen',
Condition => '$$self{Model} =~ /\b6D\b/',
Notes => '6D',
PrintConv => {
0 => 'Eg-A II',
1 => 'Eg-D',
2 => 'Eg-S',
},
},
{
Name => 'FocusingScreen',
Condition => '$$self{Model} =~ /\b1D X\b/',
Notes => '1DX',
PrintConv => {
0 => 'Ec-CV',
1 => 'Ec-A,B,D,H,I,L',
},
},
{
Name => 'FocusingScreen',
Notes => '1DmkIII and 1DmkIV',
PrintConv => {
0 => 'Ec-CIV',
1 => 'Ec-A,B,C,CII,CIII,D,H,I,L',
2 => 'Ec-S',
3 => 'Ec-N,R',
},
},
],
0x080c => {
Name => 'TimerLength',
Count => 4,
PrintConv => [
\%disableEnable,
'"6 s: $val"',
'"16 s: $val"',
'"After release: $val"',
],
PrintConvInv => [
undef,
'$val=~/(\d+)$/ ? $1 : 0',
'$val=~/(\d+)$/ ? $1 : 0',
'$val=~/(\d+)$/ ? $1 : 0',
],
},
0x080d => {
Name => 'ShortReleaseTimeLag',
PrintConv => \%disableEnable,
},
0x080e => {
Name => 'AddAspectRatioInfo',
PrintConv => {
0 => 'Off',
1 => '6:6',
2 => '3:4',
3 => '4:5',
4 => '6:7',
5 => '10:12',
6 => '5:7',
},
},
0x080f => {
Name => 'AddOriginalDecisionData', # called ("image verification" in 1DmkIV manual)
PrintConv => \%offOn,
},
0x0810 => {
Name => 'LiveViewExposureSimulation',
PrintConv => {
0 => 'Disable (LCD auto adjust)',
1 => 'Enable (simulates exposure)',
},
},
0x0811 => {
Name => 'LCDDisplayAtPowerOn',
PrintConv => {
0 => 'Display',
1 => 'Retain power off status',
},
},
0x0812 => { # (1DX)
Name => 'MemoAudioQuality',
PrintConv => {
0 => 'High (48 kHz)',
1 => 'Low (8 kHz)',
},
},
0x0813 => { # new for 5DmkIII
Name => 'DefaultEraseOption',
PrintConv => {
0 => 'Cancel selected',
1 => 'Erase selected',
},
},
);
#------------------------------------------------------------------------------
# Conversion routines
# Inputs: 0) value to convert
sub ConvertPfn($)
{
my $val = shift;
return $val ? ($val==1 ? 'On' : "On ($val)") : "Off";
}
sub ConvertPfnInv($)
{
my $val = shift;
return $1 if $val =~ /(\d+)/;
return 1 if $val =~ /on/i;
return 0 if $val =~ /off/i;
return undef;
}
#------------------------------------------------------------------------------
# Read/Write Canon custom 2 directory (new for 1D Mark III)
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1 on success
sub ProcessCanonCustom2($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
my $dataPt = $$dirInfo{DataPt};
my $offset = $$dirInfo{DirStart};
my $size = $$dirInfo{DirLen};
my $write = $$dirInfo{Write};
my $verbose = $et->Options('Verbose');
my $newTags;
return 0 if $size < 2;
# first entry in array must be the size
my $len = Get16u($dataPt, $offset);
unless ($len == $size and $len >= 8) {
$et->Warn('Invalid CanonCustom2 data');
return 0;
}
# get group count
my $count = Get32u($dataPt, $offset + 4);
if ($write) {
$newTags = $et->GetNewTagInfoHash($tagTablePtr);
$et->VPrint(0, " Rewriting CanonCustom2\n");
} elsif ($verbose) {
$et->VerboseDir('CanonCustom2', $count);
}
my $pos = $offset + 8;
my $end = $offset + $size;
# loop through group records
for (; $pos<$end; ) {
last if $pos + 12 > $end;
my $recNum = Get32u($dataPt, $pos);
my $recLen = Get32u($dataPt, $pos + 4);
my $recCount = Get32u($dataPt, $pos + 8);
last if $recLen < 8; # must be at least 8 bytes for recNum and recLen
$pos += 12;
my $recPos = $pos;
my $recEnd = $pos + $recLen - 8;
if ($recEnd > $end) {
$et->Warn('Corrupted CanonCustom2 group');
return 0;
}
if ($verbose and not $write) {
$et->VerboseDir("CanonCustom2 group $recNum", $recCount);
}
my ($i, $num, $tag);
for ($i=0; $recPos + 8 < $recEnd; ++$i, $recPos+=4*$num) {
$tag = Get32u($dataPt, $recPos);
$num = Get32u($dataPt, $recPos + 4);
$recPos += 8;
last if $recPos + $num * 4 > $recEnd;
my $val = ReadValue($dataPt, $recPos, 'int32s', $num, $num * 4);
if ($write) {
# write new value
my $tagInfo = $$newTags{$tag};
next unless $$newTags{$tag};
$tagInfo = $et->GetTagInfo($tagTablePtr, $tag, \$val, undef, $num) or next;
my $nvHash = $et->GetNewValueHash($tagInfo) or next;
next unless $et->IsOverwriting($nvHash, $val);
my $newVal = $et->GetNewValues($nvHash);
next unless defined $newVal; # can't delete from a custom table
WriteValue($newVal, 'int32s', $num, $dataPt, $recPos);
$et->VerboseValue("- CanonCustom:$$tagInfo{Name}", $val);
$et->VerboseValue("+ CanonCustom:$$tagInfo{Name}", $newVal);
++$$et{CHANGED};
} else {
# save extracted tag
my $oldInfo = $$tagTablePtr{$tag};
$et->HandleTag($tagTablePtr, $tag, $val,
Index => $i,
Format => 'int32u',
Count => $num,
Size => $num * 4,
);
my $tagInfo = $$tagTablePtr{$tag};
# generate properly formatted description if we just added the tag
if ($tagInfo and not $oldInfo) {
($$tagInfo{Description} = $$tagInfo{Name}) =~ tr/_/ /;
$$tagInfo{Description} =~ s/CanonCustom Functions/Canon Custom Functions /;
}
}
}
$pos = $recEnd;
}
if ($pos != $end) {
$et->Warn('Possibly corrupted CanonCustom2 data');
return 0;
}
return 1;
}
#------------------------------------------------------------------------------
# Write Canon custom 2 data
# Inputs: 0) ExifTool object reference, 1) dirInfo hash ref, 2) tag table ref
# Returns: New custom data block or undefined on error
sub WriteCanonCustom2($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
$et or return 1; # allow dummy access to autoload this package
my $dataPt = $$dirInfo{DataPt};
# edit a copy of the custom function 2 data
my $buff = substr($$dataPt, $$dirInfo{DirStart}, $$dirInfo{DirLen});
my %dirInfo = (
DataPt => \$buff,
DirStart => 0,
DirLen => $$dirInfo{DirLen},
Write => 1,
);
ProcessCanonCustom2($et, \%dirInfo, $tagTablePtr) or return undef;
return $buff;
}
#------------------------------------------------------------------------------
# Process Canon custom directory
# Inputs: 0) ExifTool object ref, 1) dirInfo ref, 2) tag table ref
# Returns: 1 on success
sub ProcessCanonCustom($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
my $dataPt = $$dirInfo{DataPt};
my $offset = $$dirInfo{DirStart};
my $size = $$dirInfo{DirLen};
my $verbose = $et->Options('Verbose');
# first entry in array must be the size
my $len = Get16u($dataPt,$offset);
unless ($len == $size or ($$et{Model}=~/\bD60\b/ and $len+2 == $size)) {
$et->Warn("Invalid CanonCustom data");
return 0;
}
$verbose and $et->VerboseDir('CanonCustom', $size/2-1);
my $pos;
for ($pos=2; $pos<$size; $pos+=2) {
# ($pos is position within custom directory)
my $val = Get16u($dataPt,$offset+$pos);
my $tag = ($val >> 8);
$val = ($val & 0xff);
$et->HandleTag($tagTablePtr, $tag, $val,
Index => $pos/2-1,
Format => 'int8u',
Count => 1,
Size => 1,
);
}
return 1;
}
#------------------------------------------------------------------------------
# Check new value for Canon custom data block
# Inputs: 0) ExifTool object reference, 1) tagInfo hash ref, 2) raw value ref
# Returns: error string or undef (and may modify value) on success
sub CheckCanonCustom($$$)
{
my ($et, $tagInfo, $valPtr) = @_;
return Image::ExifTool::CheckValue($valPtr, 'int8u');
}
#------------------------------------------------------------------------------
# Write Canon custom data
# Inputs: 0) ExifTool object reference, 1) dirInfo hash ref, 2) tag table ref
# Returns: New custom data block or undefined on error
sub WriteCanonCustom($$$)
{
my ($et, $dirInfo, $tagTablePtr) = @_;
$et or return 1; # allow dummy access to autoload this package
my $dataPt = $$dirInfo{DataPt};
my $dirStart = $$dirInfo{DirStart} || 0;
my $dirLen = $$dirInfo{DirLen} || length($$dataPt) - $dirStart;
my $dirName = $$dirInfo{DirName};
my $newData = substr($$dataPt, $dirStart, $dirLen) or return undef;
$dataPt = \$newData;
# first entry in array must be the size
my $len = Get16u($dataPt, 0);
unless ($len == $dirLen or ($$et{Model}=~/\bD60\b/ and $len+2 == $dirLen)) {
$et->Warn("Invalid CanonCustom data");
return undef;
}
my $newTags = $et->GetNewTagInfoHash($tagTablePtr);
my $pos;
for ($pos=2; $pos<$dirLen; $pos+=2) {
my $val = Get16u($dataPt, $pos);
my $tag = ($val >> 8);
my $tagInfo = $$newTags{$tag};
next unless $tagInfo;
my $nvHash = $et->GetNewValueHash($tagInfo);
$val = ($val & 0xff);
next unless $et->IsOverwriting($nvHash, $val);
my $newVal = $et->GetNewValues($nvHash);
next unless defined $newVal; # can't delete from a custom table
Set16u(($newVal & 0xff) + ($tag << 8), $dataPt, $pos);
$et->VerboseValue("- $dirName:$$tagInfo{Name}", $val);
$et->VerboseValue("+ $dirName:$$tagInfo{Name}", $newVal);
++$$et{CHANGED};
}
return $newData;
}
1; # end
__END__
=head1 NAME
Image::ExifTool::CanonCustom - Read and Write Canon custom functions
=head1 SYNOPSIS
This module is loaded automatically by Image::ExifTool when required.
=head1 DESCRIPTION
The Canon custom functions meta information is very specific to the
camera model, and is found in both the EXIF maker notes and in the
Canon RAW files. This module contains the definitions necessary for
Image::ExifTool to read this information.
=head1 AUTHOR
Copyright 2003-2015, Phil Harvey (phil at owl.phy.queensu.ca)
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 REFERENCES
=over 4
=item L<http://park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html>
=back
=head1 ACKNOWLEDGEMENTS
Thanks to Christian Koller for his work in decoding the 20D custom
functions, Rainer Honle for decoding the 5D custom functions and David
Pitcher for adding a few undocumented 1DmkIII settings.
=head1 SEE ALSO
L<Image::ExifTool::TagNames/Canon Tags>,
L<Image::ExifTool(3pm)|Image::ExifTool>
=cut
| mudasobwa/exifice | vendor/Image-ExifTool-10.02/lib/Image/ExifTool/CanonCustom.pm | Perl | mit | 75,836 |
package Moose::Cookbook::Legacy::Debugging_BaseClassReplacement;
BEGIN {
$Moose::Cookbook::Legacy::Debugging_BaseClassReplacement::AUTHORITY = 'cpan:STEVAN';
}
{
$Moose::Cookbook::Legacy::Debugging_BaseClassReplacement::VERSION = '2.0604';
}
# ABSTRACT: Providing an alternate base object class
=pod
=head1 NAME
Moose::Cookbook::Legacy::Debugging_BaseClassReplacement - Providing an alternate base object class
=head1 VERSION
version 2.0604
=head1 SYNOPSIS
package MyApp::Base;
use Moose;
extends 'Moose::Object';
before 'new' => sub { warn "Making a new " . $_[0] };
no Moose;
package MyApp::UseMyBase;
use Moose ();
use Moose::Exporter;
Moose::Exporter->setup_import_methods( also => 'Moose' );
sub init_meta {
shift;
return Moose->init_meta( @_, base_class => 'MyApp::Base' );
}
=head1 DESCRIPTION
B<WARNING: Replacing the base class entirely, as opposed to applying roles to
the base class, is strongly discouraged. This recipe is provided solely for
reference when encountering older code that does this.>
A common extension is to provide an alternate base class. One way to
do that is to make a C<MyApp::Base> and add C<S<extends
'MyApp::Base'>> to every class in your application. That's pretty
tedious. Instead, you can create a Moose-alike module that sets the
base object class to C<MyApp::Base> for you.
Then, instead of writing C<S<use Moose>> you can write C<S<use
MyApp::UseMyBase>>.
In this particular example, our base class issues some debugging
output every time a new object is created, but you can think of some
more interesting things to do with your own base class.
This uses the magic of L<Moose::Exporter>. When we call C<<
Moose::Exporter->setup_import_methods( also => 'Moose' ) >> it builds
C<import> and C<unimport> methods for you. The C<< also => 'Moose' >>
bit says that we want to export everything that Moose does.
The C<import> method that gets created will call our C<init_meta>
method, passing it C<< for_caller => $caller >> as its
arguments. The C<$caller> is set to the class that actually imported
us in the first place.
See the L<Moose::Exporter> docs for more details on its API.
=head1 NAME
Moose::Cookbook::Extending::Recipe3 - Providing an alternate base object class
=head1 VERSION
version 2.0402
=for testing-SETUP use Test::Requires {
'Test::Output' => '0',
};
=head1 USING MyApp::UseMyBase
To actually use our new base class, we simply use C<MyApp::UseMyBase>
I<instead> of C<Moose>. We get all the Moose sugar plus our new base
class.
package Foo;
use MyApp::UseMyBase;
has 'size' => ( is => 'rw' );
no MyApp::UseMyBase;
=head1 CONCLUSION
This is an awful lot of magic for a simple base class. You will often
want to combine a metaclass trait with a base class extension, and
that's when this technique is useful.
=begin testing
{
package Foo;
MyApp::UseMyBase->import;
has( 'size' => ( is => 'rw' ) );
}
ok( Foo->isa('MyApp::Base'), 'Foo isa MyApp::Base' );
ok( Foo->can('size'), 'Foo has a size method' );
my $foo;
stderr_like(
sub { $foo = Foo->new( size => 2 ) },
qr/^Making a new Foo/,
'got expected warning when calling Foo->new'
);
is( $foo->size(), 2, '$foo->size is 2' );
=end testing
=head1 AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=head1 AUTHOR
Moose is maintained by the Moose Cabal, along with the help of many contributors. See L<Moose/CABAL> and L<Moose/CONTRIBUTORS> for details.
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
__END__
| Dokaponteam/ITF_Project | xampp/perl/vendor/lib/Moose/Cookbook/Legacy/Debugging_BaseClassReplacement.pm | Perl | mit | 4,065 |
# $Id: SQLite.pm 35 2011-06-17 01:34:42Z stro $
package CPAN::SQLite;
use strict;
use warnings;
use File::HomeDir;
require File::Spec;
use Cwd;
require CPAN::SQLite::META;
our $VERSION = '0.202';
# an array ref of distributions to ignore indexing
my $ignore = [qw(SpreadSheet-WriteExcel-WebPivot)];
our $db_name = 'cpandb.sql';
use constant WIN32 => $^O eq 'MSWin32';
sub new {
my $class = shift;
my %args = @_;
my ($CPAN, $update_indices);
my $db_dir = $args{db_dir};
my $urllist = [];
my $keep_source_where;
# for testing undr Darwin, must load CPAN::MyConfig contained
# in PERL5LIB, as File::HomeDir doesn't use this
if ($ENV{CPAN_SQLITE_TESTING}) {
eval {require CPAN::MyConfig;};
}
eval {require CPAN; CPAN::HandleConfig->load;};
if ( not $@ and not defined $args{CPAN} ) {
$CPAN = $CPAN::Config->{cpan_home};
$db_dir = $CPAN;
$keep_source_where = $CPAN::Config->{keep_source_where};
$urllist = $CPAN::Config->{urllist};
# Sometimes this directory dosn't exist (like on new installations)
unless (-d $CPAN) {
eval { File::Path::mkpath($CPAN); }; # copied from CPAN.pm
}
die qq{The '$CPAN' directory doesn't exist} unless -d $CPAN;
$update_indices = 0;
}
else {
$CPAN = $args{CPAN} || '';
die qq{Please specify the CPAN location} unless defined $CPAN;
die qq{The '$CPAN' directory doesn't exist} unless (-d $CPAN);
$update_indices = (-f File::Spec->catfile($CPAN, 'MIRRORING.FROM')) ?
0 : 1;
}
push @$urllist, q{http://www.cpan.org/};
$db_dir ||= cwd;
my $self = {%args, CPAN => $CPAN, update_indices => $update_indices,
db_name => $db_name, urllist => $urllist,
keep_source_where => $keep_source_where, db_dir => $db_dir};
return bless $self, $class;
}
sub index {
my ($self, %args) = @_;
require CPAN::SQLite::Index;
my %wanted = map {$_ => $self->{$_}}
qw(CPAN ignore update_indices db_name db_dir
keep_source_where setup reindex urllist);
my $log_dir = $self->{CPAN} || $self->{db_dir};
die qq{Please create the directory '$log_dir' first} unless -d $log_dir;
my $index = CPAN::SQLite::Index->new(%wanted, %args, log_dir => $log_dir);
$index->index() or do {
warn qq{Indexing failed!};
return;
};
return 1;
}
sub query {
my ($self, %args) = @_;
require CPAN::SQLite::Search;
my %wanted = map {$_ => $self->{$_}}
qw(max_results CPAN db_name db_dir meta_obj);
my $query = CPAN::SQLite::Search->new(%wanted, %args);
%wanted = map {$_ => $self->{$_}} qw(mode query id name);
$query->query(%wanted, %args) or do {
warn qq{Query failed!};
return;
};
my $results = $query->{results};
return unless defined $results;
$self->{results} = $query->{results};
return 1;
}
1;
__END__
=head1 NAME
CPAN::SQLite - maintain and search a minimal CPAN database
=head1 SYNOPSIS
my $obj = CPAN::SQLite->new(CPAN => '/path/to/CPAN');
$obj->index(setup => 1);
$obj->query(mode => 'dist', name => 'CPAN');
my $results = $obj->{results};
=head1 DESCRIPTION
This package is used for setting up, maintaining, and
searching a CPAN database consisting of the information
stored in the three main CPAN indices:
F<$CPAN/modules/03modlist.data.gz>,
F<$CPAN/modules/02packages.details.txt.gz>, and
F<$CPAN/authors/01mailrc.txt.gz>. It should be
considered at an alpha stage of development.
One begins by creating the object as
my $obj = CPAN::SQLite->new(%args);
which accepts the following arguments:
=over 3
=item * C<CPAN =E<gt> '/path/to/CPAN'>
This specifies the path to where the index files are
to be stored. This could be a local CPAN mirror,
defined here by the presence of a F<MIRRORED.BY> file beneath
this directory, or a local directory in which to store
these files from a remote CPAN mirror. In the latter case,
the index files are fetched from a remote CPAN mirror,
using the same list that C<CPAN.pm> uses, if this is
configured, and are updated if they are more than one
day old.
If the C<CPAN> option is not given, it will default
to C<cpan_home> of L<CPAN::>, if this is configured,
with the index files found under C<keep_source_where>.
A fatal error results if such a directory isn't found.
Updates to these index files are assumed here to be
handled by C<CPAN.pm>.
=item * C<db_dir =E<gt> '/path/to/db/dir'>
This specifies the path to where the database file is
found. If not given, it defaults to the
C<cpan_home> directory of C<CPAN.pm>, if present, or to
the directory in which the script was invoked. The name
of the database file is C<cpandb.sql>.
=back
There are two main methods available.
=head2 C<$obj-E<gt>index(%args);>
This is used to set up and maintain the database. The
following arguments are accepted:
=over 3
=item * setup =E<gt> 1
This specifies that the database is to be created and
populated from the CPAN indices; any exisiting database
will be overwritten. Not specifying this option will
assume that an existing database is to be updated.
=item * reindex =E<gt> 'dist_name'
This specifies that the CPAN distribution C<dist_name>
is to be reindexed.
=back
=head2 C<$obj-E<gt>query(%args);>
This is used for querying the database by distribution
name, module name, or CPAN author name. There are
two arguments needed to specify such queries.
=over 3
=item * C<mode =E<gt> some_value>
This specifies what type of query to perform,
with C<mode> being one of C<dist>, C<module>,
or C<author>, for searching through, respectively,
CPAN distribution names, module names, or author names and
CPAN ids.
=item * C<type =E<gt> query_term>
This specifies the query term for the search, with
C<type> being one of C<name>, to search for an
exact match, or C<search>, for searching for partial
matches. Perl regular expressions are supported in
the C<query_term> for the C<search> option.
=back
As well, an option of C<max_results =E<gt> some_number> will
limit the number of results returned; if not specified,
this defaults to 200.
=head1 CPAN.pm support
As of CPAN.pm version 1.88_65, there is experimental support
within CPAN.pm for using CPAN::SQLite to obtain
information on packages, modules, and authors. One goal
of this is to reduce the memory footprint of the CPAN.pm
shell, as this information is no longer all preloaded into
memory. This can be enabled through
perl -MCPAN -e shell
cpan> o conf use_sqlite 1
Use
cpan> o conf commit
to save this setting for future sessions.
Using CPAN::SQLite, what happens is that a request for information
through CPAN.pm, such as
cpan> a ANDK
will cause a query to the SQLite database to be made.
If successful, this will place the relevant data for this
request into the data structure CPAN.pm uses to store and
retrieve such information. Thus, at any given time, the
only information CPAN.pm stores in memory is that for
packages, modules, and authors for which previous queries
have been made. There are certain requests, such as
cpan> r
to make a list of recommended packages for which upgrades
on CPAN are available, which will result in loading
information on all available packages into memory; if such
a query is made, the subsequent memory footprint of CPAN.pm
with and without CPAN::SQLite will be essentially the same.
The database itself, called F<cpandb.sql>, will be stored
in the location specified by C<$CPAN::Config-E<gt>{cpan_home}>.
When first started, this database will be created, and afterwards,
it will be updated if the database is older than one day since
the last update. A log file of the creation or update process, called
F<cpan_search_log.dddddddddd>, will be created in the same
directory as the database file.
=head1 SEE ALSO
L<CPAN::SQLite::Index>, for setting up and maintaining
the database, and L<CPAN::SQLite::Search> for an
interface to querying the database. Some details
of the interaction with L<CPAN::> is available from
L<CPAN::SQLite::META>. See also the L<cpandb> script for a
command-line interface to the
indexing and querying of the database.
Development takes place on the CPAN-Search-Lite project
at L<http://cpan-search.svn.sourceforge.net/viewvc/cpan-search/CPAN-SQLite/>.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc CPAN::SQLite
You can also look for information at:
=over 4
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/CPAN-SQLite>
=item * CPAN::Forum: Discussion forum
L<http:///www.cpanforum.com/dist/CPAN-SQLite>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/CPAN-SQLite>
=item * RT: CPAN's request tracker
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-SQLite>
=item * Search CPAN
L<http://search.cpan.org/dist/CPAN-SQLite>
=back
=head1 BUGS
At this time, CPAN::SQLite keeps information contained only
in the latest version of a CPAN distribution. This means that
modules that are provided only in older versions of a CPAN
distribution will not be present in the database; for example,
at this time, the latest version of the I<libwww-perl> distribution
on CPAN is 5.805, but there are modules such as I<URI::URL::finger>
contained in version 5.10 of libwww-perl that are not present in 5.805.
This behaviour differs from that of L<CPAN::> without CPAN::SQLite.
This may change in the future.
Please report bugs and feature requests via
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=CPAN-SQLite>.
=head1 ENVIRONMENT VARIABLES
Information messages from the indexing procedures are printed
out to STDOUT if the environment variable CPAN_SQLITE_DEBUG
is set. This is automatically set within L<CPAN::SQLite::Index>.
If CPAN_SQLITE_NO_LOG_FILES is set, no log files will be created
during the indexing procedures.
=head1 AUTHORS
Randy Kobes (passed away on September 18, 2010)
Serguei Trouchelle E<lt>stro@cpan.orgE<gt>
=head1 COPYRIGHT
Copyright 2006,2008 by Randy Kobes E<lt>r.kobes@uwinnipeg.caE<gt>.
Copyright 2011 by Serguei Trouchelle E<lt>stro@cpan.orgE<gt>.
Use and redistribution are under the same terms as Perl itself.
=cut
| Dokaponteam/ITF_Project | xampp/perl/vendor/lib/CPAN/SQLite.pm | Perl | mit | 10,129 |
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file is machine-generated by mktables from the Unicode
# database, Version 6.1.0. Any changes made here will be lost!
# !!!!!!! INTERNAL PERL USE ONLY !!!!!!!
# This file is for internal use by core Perl only. The format and even the
# name or existence of this file are subject to change without notice. Don't
# use it directly.
return <<'END';
0958 095F
09DC 09DD
09DF
0A33
0A36
0A59 0A5B
0A5E
0B5C 0B5D
0F43
0F4D
0F52
0F57
0F5C
0F69
0F76
0F78
0F93
0F9D
0FA2
0FA7
0FAC
0FB9
2ADC
FB1D
FB1F
FB2A FB36
FB38 FB3C
FB3E
FB40 FB41
FB43 FB44
FB46 FB4E
1D15E 1D164
1D1BB 1D1C0
END
| Dokaponteam/ITF_Project | xampp/perl/lib/unicore/lib/CE/Y.pl | Perl | mit | 679 |
package Time::HiRes;
use strict;
use vars qw($VERSION $XS_VERSION @ISA @EXPORT @EXPORT_OK $AUTOLOAD);
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
@EXPORT = qw( );
@EXPORT_OK = qw (usleep sleep ualarm alarm gettimeofday time tv_interval
getitimer setitimer nanosleep clock_gettime clock_getres
clock clock_nanosleep
CLOCK_HIGHRES CLOCK_MONOTONIC CLOCK_PROCESS_CPUTIME_ID
CLOCK_REALTIME CLOCK_SOFTTIME CLOCK_THREAD_CPUTIME_ID
CLOCK_TIMEOFDAY CLOCKS_PER_SEC
ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF
TIMER_ABSTIME
d_usleep d_ualarm d_gettimeofday d_getitimer d_setitimer
d_nanosleep d_clock_gettime d_clock_getres
d_clock d_clock_nanosleep
stat
);
$VERSION = '1.9715';
$XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
sub AUTOLOAD {
my $constname;
($constname = $AUTOLOAD) =~ s/.*:://;
# print "AUTOLOAD: constname = $constname ($AUTOLOAD)\n";
die "&Time::HiRes::constant not defined" if $constname eq 'constant';
my ($error, $val) = constant($constname);
# print "AUTOLOAD: error = $error, val = $val\n";
if ($error) {
my (undef,$file,$line) = caller;
die "$error at $file line $line.\n";
}
{
no strict 'refs';
*$AUTOLOAD = sub { $val };
}
goto &$AUTOLOAD;
}
sub import {
my $this = shift;
for my $i (@_) {
if (($i eq 'clock_getres' && !&d_clock_getres) ||
($i eq 'clock_gettime' && !&d_clock_gettime) ||
($i eq 'clock_nanosleep' && !&d_clock_nanosleep) ||
($i eq 'clock' && !&d_clock) ||
($i eq 'nanosleep' && !&d_nanosleep) ||
($i eq 'usleep' && !&d_usleep) ||
($i eq 'ualarm' && !&d_ualarm)) {
require Carp;
Carp::croak("Time::HiRes::$i(): unimplemented in this platform");
}
}
Time::HiRes->export_to_level(1, $this, @_);
}
bootstrap Time::HiRes;
# Preloaded methods go here.
sub tv_interval {
# probably could have been done in C
my ($a, $b) = @_;
$b = [gettimeofday()] unless defined($b);
(${$b}[0] - ${$a}[0]) + ((${$b}[1] - ${$a}[1]) / 1_000_000);
}
# Autoload methods go after =cut, and are processed by the autosplit program.
1;
__END__
=head1 NAME
Time::HiRes - High resolution alarm, sleep, gettimeofday, interval timers
=head1 SYNOPSIS
use Time::HiRes qw( usleep ualarm gettimeofday tv_interval nanosleep
clock_gettime clock_getres clock_nanosleep clock
stat );
usleep ($microseconds);
nanosleep ($nanoseconds);
ualarm ($microseconds);
ualarm ($microseconds, $interval_microseconds);
$t0 = [gettimeofday];
($seconds, $microseconds) = gettimeofday;
$elapsed = tv_interval ( $t0, [$seconds, $microseconds]);
$elapsed = tv_interval ( $t0, [gettimeofday]);
$elapsed = tv_interval ( $t0 );
use Time::HiRes qw ( time alarm sleep );
$now_fractions = time;
sleep ($floating_seconds);
alarm ($floating_seconds);
alarm ($floating_seconds, $floating_interval);
use Time::HiRes qw( setitimer getitimer );
setitimer ($which, $floating_seconds, $floating_interval );
getitimer ($which);
use Time::HiRes qw( clock_gettime clock_getres clock_nanosleep
ITIMER_REAL ITIMER_VIRTUAL ITIMER_PROF ITIMER_REALPROF );
$realtime = clock_gettime(CLOCK_REALTIME);
$resolution = clock_getres(CLOCK_REALTIME);
clock_nanosleep(CLOCK_REALTIME, 1.5e9);
clock_nanosleep(CLOCK_REALTIME, time()*1e9 + 10e9, TIMER_ABSTIME);
my $ticktock = clock();
use Time::HiRes qw( stat );
my @stat = stat("file");
my @stat = stat(FH);
=head1 DESCRIPTION
The C<Time::HiRes> module implements a Perl interface to the
C<usleep>, C<nanosleep>, C<ualarm>, C<gettimeofday>, and
C<setitimer>/C<getitimer> system calls, in other words, high
resolution time and timers. See the L</EXAMPLES> section below and the
test scripts for usage; see your system documentation for the
description of the underlying C<nanosleep> or C<usleep>, C<ualarm>,
C<gettimeofday>, and C<setitimer>/C<getitimer> calls.
If your system lacks C<gettimeofday()> or an emulation of it you don't
get C<gettimeofday()> or the one-argument form of C<tv_interval()>.
If your system lacks all of C<nanosleep()>, C<usleep()>,
C<select()>, and C<poll>, you don't get C<Time::HiRes::usleep()>,
C<Time::HiRes::nanosleep()>, or C<Time::HiRes::sleep()>.
If your system lacks both C<ualarm()> and C<setitimer()> you don't get
C<Time::HiRes::ualarm()> or C<Time::HiRes::alarm()>.
If you try to import an unimplemented function in the C<use> statement
it will fail at compile time.
If your subsecond sleeping is implemented with C<nanosleep()> instead
of C<usleep()>, you can mix subsecond sleeping with signals since
C<nanosleep()> does not use signals. This, however, is not portable,
and you should first check for the truth value of
C<&Time::HiRes::d_nanosleep> to see whether you have nanosleep, and
then carefully read your C<nanosleep()> C API documentation for any
peculiarities.
If you are using C<nanosleep> for something else than mixing sleeping
with signals, give some thought to whether Perl is the tool you should
be using for work requiring nanosecond accuracies.
Remember that unless you are working on a I<hard realtime> system,
any clocks and timers will be imprecise, especially so if you are working
in a pre-emptive multiuser system. Understand the difference between
I<wallclock time> and process time (in UNIX-like systems the sum of
I<user> and I<system> times). Any attempt to sleep for X seconds will
most probably end up sleeping B<more> than that, but don't be surpised
if you end up sleeping slightly B<less>.
The following functions can be imported from this module.
No functions are exported by default.
=over 4
=item gettimeofday ()
In array context returns a two-element array with the seconds and
microseconds since the epoch. In scalar context returns floating
seconds like C<Time::HiRes::time()> (see below).
=item usleep ( $useconds )
Sleeps for the number of microseconds (millionths of a second)
specified. Returns the number of microseconds actually slept.
Can sleep for more than one second, unlike the C<usleep> system call.
Can also sleep for zero seconds, which often works like a I<thread yield>.
See also C<Time::HiRes::usleep()>, C<Time::HiRes::sleep()>, and
C<Time::HiRes::clock_nanosleep()>.
Do not expect usleep() to be exact down to one microsecond.
=item nanosleep ( $nanoseconds )
Sleeps for the number of nanoseconds (1e9ths of a second) specified.
Returns the number of nanoseconds actually slept (accurate only to
microseconds, the nearest thousand of them). Can sleep for more than
one second. Can also sleep for zero seconds, which often works like
a I<thread yield>. See also C<Time::HiRes::sleep()>,
C<Time::HiRes::usleep()>, and C<Time::HiRes::clock_nanosleep()>.
Do not expect nanosleep() to be exact down to one nanosecond.
Getting even accuracy of one thousand nanoseconds is good.
=item ualarm ( $useconds [, $interval_useconds ] )
Issues a C<ualarm> call; the C<$interval_useconds> is optional and
will be zero if unspecified, resulting in C<alarm>-like behaviour.
Returns the remaining time in the alarm in microseconds, or C<undef>
if an error occurred.
ualarm(0) will cancel an outstanding ualarm().
Note that the interaction between alarms and sleeps is unspecified.
=item tv_interval
tv_interval ( $ref_to_gettimeofday [, $ref_to_later_gettimeofday] )
Returns the floating seconds between the two times, which should have
been returned by C<gettimeofday()>. If the second argument is omitted,
then the current time is used.
=item time ()
Returns a floating seconds since the epoch. This function can be
imported, resulting in a nice drop-in replacement for the C<time>
provided with core Perl; see the L</EXAMPLES> below.
B<NOTE 1>: This higher resolution timer can return values either less
or more than the core C<time()>, depending on whether your platform
rounds the higher resolution timer values up, down, or to the nearest second
to get the core C<time()>, but naturally the difference should be never
more than half a second. See also L</clock_getres>, if available
in your system.
B<NOTE 2>: Since Sunday, September 9th, 2001 at 01:46:40 AM GMT, when
the C<time()> seconds since epoch rolled over to 1_000_000_000, the
default floating point format of Perl and the seconds since epoch have
conspired to produce an apparent bug: if you print the value of
C<Time::HiRes::time()> you seem to be getting only five decimals, not
six as promised (microseconds). Not to worry, the microseconds are
there (assuming your platform supports such granularity in the first
place). What is going on is that the default floating point format of
Perl only outputs 15 digits. In this case that means ten digits
before the decimal separator and five after. To see the microseconds
you can use either C<printf>/C<sprintf> with C<"%.6f">, or the
C<gettimeofday()> function in list context, which will give you the
seconds and microseconds as two separate values.
=item sleep ( $floating_seconds )
Sleeps for the specified amount of seconds. Returns the number of
seconds actually slept (a floating point value). This function can
be imported, resulting in a nice drop-in replacement for the C<sleep>
provided with perl, see the L</EXAMPLES> below.
Note that the interaction between alarms and sleeps is unspecified.
=item alarm ( $floating_seconds [, $interval_floating_seconds ] )
The C<SIGALRM> signal is sent after the specified number of seconds.
Implemented using C<setitimer()> if available, C<ualarm()> if not.
The C<$interval_floating_seconds> argument is optional and will be
zero if unspecified, resulting in C<alarm()>-like behaviour. This
function can be imported, resulting in a nice drop-in replacement for
the C<alarm> provided with perl, see the L</EXAMPLES> below.
Returns the remaining time in the alarm in seconds, or C<undef>
if an error occurred.
B<NOTE 1>: With some combinations of operating systems and Perl
releases C<SIGALRM> restarts C<select()>, instead of interrupting it.
This means that an C<alarm()> followed by a C<select()> may together
take the sum of the times specified for the the C<alarm()> and the
C<select()>, not just the time of the C<alarm()>.
Note that the interaction between alarms and sleeps is unspecified.
=item setitimer ( $which, $floating_seconds [, $interval_floating_seconds ] )
Start up an interval timer: after a certain time, a signal ($which) arrives,
and more signals may keep arriving at certain intervals. To disable
an "itimer", use C<$floating_seconds> of zero. If the
C<$interval_floating_seconds> is set to zero (or unspecified), the
timer is disabled B<after> the next delivered signal.
Use of interval timers may interfere with C<alarm()>, C<sleep()>,
and C<usleep()>. In standard-speak the "interaction is unspecified",
which means that I<anything> may happen: it may work, it may not.
In scalar context, the remaining time in the timer is returned.
In list context, both the remaining time and the interval are returned.
There are usually three or four interval timers (signals) available: the
C<$which> can be C<ITIMER_REAL>, C<ITIMER_VIRTUAL>, C<ITIMER_PROF>, or
C<ITIMER_REALPROF>. Note that which ones are available depends: true
UNIX platforms usually have the first three, but (for example) Win32
and Cygwin have only C<ITIMER_REAL>, and only Solaris seems to have
C<ITIMER_REALPROF> (which is used to profile multithreaded programs).
C<ITIMER_REAL> results in C<alarm()>-like behaviour. Time is counted in
I<real time>; that is, wallclock time. C<SIGALRM> is delivered when
the timer expires.
C<ITIMER_VIRTUAL> counts time in (process) I<virtual time>; that is,
only when the process is running. In multiprocessor/user/CPU systems
this may be more or less than real or wallclock time. (This time is
also known as the I<user time>.) C<SIGVTALRM> is delivered when the
timer expires.
C<ITIMER_PROF> counts time when either the process virtual time or when
the operating system is running on behalf of the process (such as I/O).
(This time is also known as the I<system time>.) (The sum of user
time and system time is known as the I<CPU time>.) C<SIGPROF> is
delivered when the timer expires. C<SIGPROF> can interrupt system calls.
The semantics of interval timers for multithreaded programs are
system-specific, and some systems may support additional interval
timers. For example, it is unspecified which thread gets the signals.
See your C<setitimer()> documentation.
=item getitimer ( $which )
Return the remaining time in the interval timer specified by C<$which>.
In scalar context, the remaining time is returned.
In list context, both the remaining time and the interval are returned.
The interval is always what you put in using C<setitimer()>.
=item clock_gettime ( $which )
Return as seconds the current value of the POSIX high resolution timer
specified by C<$which>. All implementations that support POSIX high
resolution timers are supposed to support at least the C<$which> value
of C<CLOCK_REALTIME>, which is supposed to return results close to the
results of C<gettimeofday>, or the number of seconds since 00:00:00:00
January 1, 1970 Greenwich Mean Time (GMT). Do not assume that
CLOCK_REALTIME is zero, it might be one, or something else.
Another potentially useful (but not available everywhere) value is
C<CLOCK_MONOTONIC>, which guarantees a monotonically increasing time
value (unlike time(), which can be adjusted). See your system
documentation for other possibly supported values.
=item clock_getres ( $which )
Return as seconds the resolution of the POSIX high resolution timer
specified by C<$which>. All implementations that support POSIX high
resolution timers are supposed to support at least the C<$which> value
of C<CLOCK_REALTIME>, see L</clock_gettime>.
=item clock_nanosleep ( $which, $nanoseconds, $flags = 0)
Sleeps for the number of nanoseconds (1e9ths of a second) specified.
Returns the number of nanoseconds actually slept. The $which is the
"clock id", as with clock_gettime() and clock_getres(). The flags
default to zero but C<TIMER_ABSTIME> can specified (must be exported
explicitly) which means that C<$nanoseconds> is not a time interval
(as is the default) but instead an absolute time. Can sleep for more
than one second. Can also sleep for zero seconds, which often works
like a I<thread yield>. See also C<Time::HiRes::sleep()>,
C<Time::HiRes::usleep()>, and C<Time::HiRes::nanosleep()>.
Do not expect clock_nanosleep() to be exact down to one nanosecond.
Getting even accuracy of one thousand nanoseconds is good.
=item clock()
Return as seconds the I<process time> (user + system time) spent by
the process since the first call to clock() (the definition is B<not>
"since the start of the process", though if you are lucky these times
may be quite close to each other, depending on the system). What this
means is that you probably need to store the result of your first call
to clock(), and subtract that value from the following results of clock().
The time returned also includes the process times of the terminated
child processes for which wait() has been executed. This value is
somewhat like the second value returned by the times() of core Perl,
but not necessarily identical. Note that due to backward
compatibility limitations the returned value may wrap around at about
2147 seconds or at about 36 minutes.
=item stat
=item stat FH
=item stat EXPR
As L<perlfunc/stat> but with the access/modify/change file timestamps
in subsecond resolution, if the operating system and the filesystem
both support such timestamps. To override the standard stat():
use Time::HiRes qw(stat);
Test for the value of &Time::HiRes::d_hires_stat to find out whether
the operating system supports subsecond file timestamps: a value
larger than zero means yes. There are unfortunately no easy
ways to find out whether the filesystem supports such timestamps.
UNIX filesystems often do; NTFS does; FAT doesn't (FAT timestamp
granularity is B<two> seconds).
A zero return value of &Time::HiRes::d_hires_stat means that
Time::HiRes::stat is a no-op passthrough for CORE::stat(),
and therefore the timestamps will stay integers. The same
thing will happen if the filesystem does not do subsecond timestamps,
even if the &Time::HiRes::d_hires_stat is non-zero.
In any case do not expect nanosecond resolution, or even a microsecond
resolution. Also note that the modify/access timestamps might have
different resolutions, and that they need not be synchronized, e.g.
if the operations are
write
stat # t1
read
stat # t2
the access time stamp from t2 need not be greater-than the modify
time stamp from t1: it may be equal or I<less>.
=back
=head1 EXAMPLES
use Time::HiRes qw(usleep ualarm gettimeofday tv_interval);
$microseconds = 750_000;
usleep($microseconds);
# signal alarm in 2.5s & every .1s thereafter
ualarm(2_500_000, 100_000);
# cancel that ualarm
ualarm(0);
# get seconds and microseconds since the epoch
($s, $usec) = gettimeofday();
# measure elapsed time
# (could also do by subtracting 2 gettimeofday return values)
$t0 = [gettimeofday];
# do bunch of stuff here
$t1 = [gettimeofday];
# do more stuff here
$t0_t1 = tv_interval $t0, $t1;
$elapsed = tv_interval ($t0, [gettimeofday]);
$elapsed = tv_interval ($t0); # equivalent code
#
# replacements for time, alarm and sleep that know about
# floating seconds
#
use Time::HiRes;
$now_fractions = Time::HiRes::time;
Time::HiRes::sleep (2.5);
Time::HiRes::alarm (10.6666666);
use Time::HiRes qw ( time alarm sleep );
$now_fractions = time;
sleep (2.5);
alarm (10.6666666);
# Arm an interval timer to go off first at 10 seconds and
# after that every 2.5 seconds, in process virtual time
use Time::HiRes qw ( setitimer ITIMER_VIRTUAL time );
$SIG{VTALRM} = sub { print time, "\n" };
setitimer(ITIMER_VIRTUAL, 10, 2.5);
use Time::HiRes qw( clock_gettime clock_getres CLOCK_REALTIME );
# Read the POSIX high resolution timer.
my $high = clock_getres(CLOCK_REALTIME);
# But how accurate we can be, really?
my $reso = clock_getres(CLOCK_REALTIME);
use Time::HiRes qw( clock_nanosleep TIMER_ABSTIME );
clock_nanosleep(CLOCK_REALTIME, 1e6);
clock_nanosleep(CLOCK_REALTIME, 2e9, TIMER_ABSTIME);
use Time::HiRes qw( clock );
my $clock0 = clock();
... # Do something.
my $clock1 = clock();
my $clockd = $clock1 - $clock0;
use Time::HiRes qw( stat );
my ($atime, $mtime, $ctime) = (stat("istics"))[8, 9, 10];
=head1 C API
In addition to the perl API described above, a C API is available for
extension writers. The following C functions are available in the
modglobal hash:
name C prototype
--------------- ----------------------
Time::NVtime double (*)()
Time::U2time void (*)(pTHX_ UV ret[2])
Both functions return equivalent information (like C<gettimeofday>)
but with different representations. The names C<NVtime> and C<U2time>
were selected mainly because they are operating system independent.
(C<gettimeofday> is Unix-centric, though some platforms like Win32 and
VMS have emulations for it.)
Here is an example of using C<NVtime> from C:
double (*myNVtime)(); /* Returns -1 on failure. */
SV **svp = hv_fetch(PL_modglobal, "Time::NVtime", 12, 0);
if (!svp) croak("Time::HiRes is required");
if (!SvIOK(*svp)) croak("Time::NVtime isn't a function pointer");
myNVtime = INT2PTR(double(*)(), SvIV(*svp));
printf("The current time is: %f\n", (*myNVtime)());
=head1 DIAGNOSTICS
=head2 useconds or interval more than ...
In ualarm() you tried to use number of microseconds or interval (also
in microseconds) more than 1_000_000 and setitimer() is not available
in your system to emulate that case.
=head2 negative time not invented yet
You tried to use a negative time argument.
=head2 internal error: useconds < 0 (unsigned ... signed ...)
Something went horribly wrong-- the number of microseconds that cannot
become negative just became negative. Maybe your compiler is broken?
=head2 useconds or uinterval equal to or more than 1000000
In some platforms it is not possible to get an alarm with subsecond
resolution and later than one second.
=head2 unimplemented in this platform
Some calls simply aren't available, real or emulated, on every platform.
=head1 CAVEATS
Notice that the core C<time()> maybe rounding rather than truncating.
What this means is that the core C<time()> may be reporting the time
as one second later than C<gettimeofday()> and C<Time::HiRes::time()>.
Adjusting the system clock (either manually or by services like ntp)
may cause problems, especially for long running programs that assume
a monotonously increasing time (note that all platforms do not adjust
time as gracefully as UNIX ntp does). For example in Win32 (and derived
platforms like Cygwin and MinGW) the Time::HiRes::time() may temporarily
drift off from the system clock (and the original time()) by up to 0.5
seconds. Time::HiRes will notice this eventually and recalibrate.
Note that since Time::HiRes 1.77 the clock_gettime(CLOCK_MONOTONIC)
might help in this (in case your system supports CLOCK_MONOTONIC).
=head1 SEE ALSO
Perl modules L<BSD::Resource>, L<Time::TAI64>.
Your system documentation for C<clock>, C<clock_gettime>,
C<clock_getres>, C<clock_nanosleep>, C<clock_settime>, C<getitimer>,
C<gettimeofday>, C<setitimer>, C<sleep>, C<stat>, C<ualarm>.
=head1 AUTHORS
D. Wegscheid <wegscd@whirlpool.com>
R. Schertler <roderick@argon.org>
J. Hietaniemi <jhi@iki.fi>
G. Aas <gisle@aas.no>
=head1 COPYRIGHT AND LICENSE
Copyright (c) 1996-2002 Douglas E. Wegscheid. All rights reserved.
Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Jarkko Hietaniemi.
All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
| leighpauls/k2cro4 | third_party/cygwin/lib/perl5/5.10/i686-cygwin/Time/HiRes.pm | Perl | bsd-3-clause | 22,080 |
use lib 't';
use strict;
use warnings;
use bytes;
use Test::More ;
use CompTestUtils;
BEGIN {
# use Test::NoWarnings, if available
my $extra = 0 ;
$extra = 1
if eval { require Test::NoWarnings ; import Test::NoWarnings; 1 };
plan tests => 1324 + $extra ;
use_ok('IO::Uncompress::AnyUncompress', qw($AnyUncompressError)) ;
}
sub run
{
my $CompressClass = identify();
my $UncompressClass = getInverse($CompressClass);
my $Error = getErrorRef($CompressClass);
my $UnError = getErrorRef($UncompressClass);
my @buffers ;
push @buffers, <<EOM ;
hello world
this is a test
some more stuff on this line
ad finally...
EOM
push @buffers, <<EOM ;
some more stuff
line 2
EOM
push @buffers, <<EOM ;
even more stuff
EOM
my $b0length = length $buffers[0];
my $bufcount = @buffers;
{
my $cc ;
my $gz ;
my $hsize ;
my %headers = () ;
foreach my $fb ( qw( file filehandle buffer ) )
{
foreach my $i (1 .. @buffers) {
title "Testing $CompressClass with $i streams to $fb";
my @buffs = @buffers[0..$i -1] ;
if ($CompressClass eq 'IO::Compress::Gzip') {
%headers = (
Strict => 1,
Comment => "this is a comment",
ExtraField => ["so" => "me extra"],
HeaderCRC => 1);
}
my $lex = new LexFile my $name ;
my $output ;
if ($fb eq 'buffer')
{
my $compressed = '';
$output = \$compressed;
}
elsif ($fb eq 'filehandle')
{
$output = new IO::File ">$name" ;
}
else
{
$output = $name ;
}
my $x = new $CompressClass($output, AutoClose => 1, %headers);
isa_ok $x, $CompressClass, ' $x' ;
foreach my $buffer (@buffs) {
ok $x->write($buffer), " Write OK" ;
# this will add an extra "empty" stream
ok $x->newStream(), " newStream OK" ;
}
ok $x->close, " Close ok" ;
#hexDump($compressed) ;
foreach my $unc ($UncompressClass, 'IO::Uncompress::AnyUncompress') {
title " Testing $CompressClass with $unc and $i streams, from $fb";
$cc = $output ;
if ($fb eq 'filehandle')
{
$cc = new IO::File "<$name" ;
}
my @opts = $unc ne $UncompressClass
? (RawInflate => 1)
: ();
my $gz = new $unc($cc,
@opts,
Strict => 1,
AutoClose => 1,
Append => 1,
MultiStream => 1,
Transparent => 0)
or diag $$UnError;
isa_ok $gz, $UncompressClass, ' $gz' ;
my $un = '';
1 while $gz->read($un) > 0 ;
#print "[[$un]]\n" while $gz->read($un) > 0 ;
ok ! $gz->error(), " ! error()"
or diag "Error is " . $gz->error() ;
ok $gz->eof(), " eof()";
ok $gz->close(), " close() ok"
or diag "errno $!\n" ;
is $gz->streamCount(), $i +1, " streamCount ok " . ($i +1)
or diag "Stream count is " . $gz->streamCount();
ok $un eq join('', @buffs), " expected output" ;
}
foreach my $unc ($UncompressClass, 'IO::Uncompress::AnyUncompress') {
foreach my $blk (1, 20, $b0length - 1, $b0length, $b0length +1) {
title " Testing $CompressClass with $unc, BlockSize $blk and $i streams, from $fb";
$cc = $output ;
if ($fb eq 'filehandle')
{
$cc = new IO::File "<$name" ;
}
my @opts = $unc ne $UncompressClass
? (RawInflate => 1)
: ();
my $gz = new $unc($cc,
@opts,
Strict => 1,
AutoClose => 1,
Append => 1,
MultiStream => 1,
Transparent => 0)
or diag $$UnError;
isa_ok $gz, $UncompressClass, ' $gz' ;
my $un = '';
my $b = $blk;
# Want the first read to be in the middle of a stream
# and the second to cross a stream boundary
$b = 1000 while $gz->read($un, $b) > 0 ;
#print "[[$un]]\n" while $gz->read($un) > 0 ;
ok ! $gz->error(), " ! error()"
or diag "Error is " . $gz->error() ;
ok $gz->eof(), " eof()";
ok $gz->close(), " close() ok"
or diag "errno $!\n" ;
is $gz->streamCount(), $i +1, " streamCount ok " . ($i +1)
or diag "Stream count is " . $gz->streamCount();
ok $un eq join('', @buffs), " expected output" ;
}
}
foreach my $unc ($UncompressClass, 'IO::Uncompress::AnyUncompress') {
title " Testing $CompressClass with $unc nextStream and $i streams, from $fb";
$cc = $output ;
if ($fb eq 'filehandle')
{
$cc = new IO::File "<$name" ;
}
my @opts = $unc ne $UncompressClass
? (RawInflate => 1)
: ();
my $gz = new $unc($cc,
@opts,
Strict => 1,
AutoClose => 1,
Append => 1,
MultiStream => 0,
Transparent => 0)
or diag $$UnError;
isa_ok $gz, $UncompressClass, ' $gz' ;
for my $stream (1 .. $i)
{
my $buff = $buffs[$stream-1];
my @lines = split("\n", $buff);
my $lines = @lines;
my $un = '';
#while (<$gz>) {
while ($_ = $gz->getline()) {
$un .= $_;
}
is $., $lines, " \$. is $lines";
ok ! $gz->error(), " ! error()"
or diag "Error is " . $gz->error() ;
ok $gz->eof(), " eof()";
is $gz->streamCount(), $stream, " streamCount is $stream"
or diag "Stream count is " . $gz->streamCount();
ok $un eq $buff, " expected output" ;
#is $gz->tell(), length $buff, " tell is ok";
is $gz->nextStream(), 1, " nextStream ok";
is $gz->tell(), 0, " tell is 0";
is $., 0, ' $. is 0';
}
{
my $un = '';
#1 while $gz->read($un) > 0 ;
is $., 0, " \$. is 0";
$gz->read($un) ;
#print "[[$un]]\n" while $gz->read($un) > 0 ;
ok ! $gz->error(), " ! error()"
or diag "Error is " . $gz->error() ;
ok $gz->eof(), " eof()";
is $gz->streamCount(), $i+1, " streamCount is ok"
or diag "Stream count is " . $gz->streamCount();
ok $un eq "", " expected output" ;
is $gz->tell(), 0, " tell is 0";
}
is $gz->nextStream(), 0, " nextStream ok"
or diag $gz->error() ;
ok $gz->eof(), " eof()";
ok $gz->close(), " close() ok"
or diag "errno $!\n" ;
is $gz->streamCount(), $i +1, " streamCount ok"
or diag "Stream count is " . $gz->streamCount();
}
}
}
}
}
# corrupt one of the streams - all previous should be ok
# trailing stuff
# check that "tell" works ok
1;
| Lh4cKg/sl4a | perl/src/t/lib/compress/multi.pl | Perl | apache-2.0 | 9,541 |
package DDG::Spice::Stocks;
# ABSTRACT: Stock quote ticker
use strict;
use DDG::Spice;
primary_example_queries "stock quote AAPL";
description "Shows stock quote for a ticker";
name "Stocks";
code_url "https://github.com/duckduckgo/zeroclickinfo-spice/blob/master/lib/DDG/Spice/Stocks.pm";
topics "economy_and_finance";
category "finance";
# trigger is intentionally very specific, should trigger from internal view/deep triggers.
# It's only here because I couldn't get the /js/stocks/ location to end up in generated nginx conf
# unless I had at least some kind of trigger defined.
triggers start => 'stock quote for', 'stock quote', 'stock price of', 'stock price';
spice to => 'http://globalquotes.xignite.com/v3/xGlobalQuotes.json/GetGlobalDelayedQuote?_Token={{ENV{DDG_SPICE_XIGNITE_APIKEY}}}&IdentifierType=Symbol&Identifier=$1';
spice wrap_jsonp_callback => 1;
spice proxy_cache_valid => "418 1d";
handle remainder => sub {
# needs to be uppercase when it goes to charts api:
return uc $_ if $_;
return;
};
1;
| ppant/zeroclickinfo-spice | lib/DDG/Spice/Stocks.pm | Perl | apache-2.0 | 1,037 |
#!/usr/bin/perl -l
# depends on availability of status and extended status info from your
# Apache webserver -- your httpd.conf needs to include something like the
# following: (uncommented)
#<Location /server-status>
# SetHandler server-status
# Order allow,deny
# Allow from localhost
#</Location>
#ExtendedStatus On
# can return hits or bytes (counters)
@res = `lynx -dump http://127.0.0.1:80/server-status`;
foreach $res (@res) {
if ($res =~ /Server uptime: (.*)$/) { $up = $1; last } else { next }
if ($res =~ /Server at/) { $server = $res; last } else { next }
}
@res = `lynx -dump http://localhost:80/server-status?auto`;
foreach $res (@res) {
if ($res =~ /Total Accesses: (\d+)/) { $d1 = $1; next }
if ($res =~ /Total kBytes: (\d+)/) { $d2 = $1; next }
}
$d1 = int($d1);
$d2 = int($d2);
if ($ARGV[0] eq "hits") {
print "$d1";
print "$d1";
} elsif ($ARGV[0] eq "bytes") {
print "$d2";
print "$d2";
}
#print "$up\n";
#print "$server";
| rvdhoek/Raspberry-MRTG | webstats.pl | Perl | mit | 992 |
#!/usr/bin/perl
use strict;
use warnings;
# Initialize light
my $lights = [];
for my $i (0 .. 999) {
$lights->[$i] = [];
for my $j (0 .. 999) {
$lights->[$i]->[$j] = 0;
}
}
# Read directions
while (<>) {
chomp;
if ($_ =~ /turn on (\d{1,3}),(\d{1,3}) through (\d{1,3}),(\d{1,3})/) {
for my $i ($1 .. $3) {
for my $j ($2 .. $4) {
$lights->[$i]->[$j] = 1;
}
}
}
elsif ($_ =~ /toggle (\d{1,3}),(\d{1,3}) through (\d{1,3}),(\d{1,3})/) {
for my $i ($1 .. $3) {
for my $j ($2 .. $4) {
if ($lights->[$i]->[$j] == 1) {
$lights->[$i]->[$j] = 0;
}
else {
$lights->[$i]->[$j] = 1;
}
}
}
}
if ($_ =~ /turn off (\d{1,3}),(\d{1,3}) through (\d{1,3}),(\d{1,3})/) {
for my $i ($1 .. $3) {
for my $j ($2 .. $4) {
$lights->[$i]->[$j] = 0;
}
}
}
}
# Count lights
my $light_count = 0;
for my $i (0 .. 999) {
for my $j (0 .. 999) {
$light_count++ if $lights->[$i]->[$j];
}
}
print "Lights turned on: $light_count\n";
| KenMGJ/advent-of-code | 2015/06/day6-1.pl | Perl | mit | 1,219 |
package OAuth::Lite2::Client::Error;
use strict;
use warnings;
use overload
q{""} => sub { shift->message },
fallback => 1;
sub default_message { "error" }
sub new {
my ($class, %args) = @_;
bless {
message => $args{message} || $class->default_message,
}, $class;
}
sub throw {
my ($class, %args) = @_;
die $class->new(%args);
}
sub message {
my $self = shift;
return $self->{message};
}
package OAuth::Lite2::Client::Error::InvalidResponse;
our @ISA = qw(OAuth::Lite2::Client::Error);
sub default_message { "invalid response" }
package OAuth::Lite2::Client::Error::InsecureRequest;
our @ISA = qw(OAuth::Lite2::Client::Error);
sub default_message { "insecure request" }
package OAuth::Lite2::Client::Error::InsecureResponse;
our @ISA = qw(OAuth::Lite2::Client::Error);
sub default_message { "insecure response" }
package OAuth::Lite2::Client::Error;
=head1 NAME
OAuth::Lite2::Client::Error - OAuth 2.0 client error
=head1 SYNOPSIS
OAuth::Lite2::Client::Error::InvalidResponse->throw(
message => q{invalid format},
);
=head1 DESCRIPTION
OAuth 2.0 client error
=head1 ERRORS
=over 4
=item OAuth::Lite2::Client::Error::InvalidResponse
=item OAuth::Lite2::Client::Error::InsecureRequest
=item OAuth::Lite2::Client::Error::InsecureResponse
=back
=head1 AUTHOR
Lyo Kato, E<lt>lyo.kato@gmail.comE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2010 by Lyo Kato
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.8.8 or,
at your option, any later version of Perl 5 you may have available.
=cut
1;
| movabletype/mt-plugin-google-openid-connect | plugins/GoogleOpenIDConnect/extlib/OAuth/Lite2/Client/Error.pm | Perl | mit | 1,661 |
/*
% ===================================================================
% File 'mpred_type_constraints.pl'
% Purpose: For Emulation of OpenCyc for SWI-Prolog
% Maintainer: Douglas Miles
% Contact: $Author: dmiles $@users.sourceforge.net ;
% Version: 'interface' 1.0.0
% Revision: $Revision: 1.9 $
% Revised At: $Date: 2002/06/27 14:13:20 $
% ===================================================================
% File used as storage place for all predicates which change as
% the world is run.
%
%
% Dec 13, 2035
% Douglas Miles
*/
% File: /opt/PrologMUD/pack/logicmmtc_base/prolog/logicmoo/mpred/mpred_type_constraints.pl
%:- if(( ( \+ ((current_prolog_flag(logicmmtc_include,Call),Call))) )).
:- module(mpred_type_constraints,
[ add_cond/2,
arg_to_var/3,
attempt_attribute_args/3,
attempt_attribute_args/5,
attempt_attribute_one_arg/4,
attribs_to_atoms/2,
attribs_to_atoms0/2,
cmp_memberchk_0/2,
cmp_memberchk_00/2,
comp_type/3,
iz/2,
extend_iz/2,
extend_iz_member/2,
init_iz/2,
inst_cond/2,
isa_pred_l/3,
isa_pred_l/4,
chk_cond/2,
call_cond/2,
condz_to_isa/2,
map_subterms/3,
max_cond/3,
max_cond_l/2,
dif_objs/2,
min_cond/3,
min_cond_l/2,
promp_yn/2,
same/2,
same_arg/3,
samef/2,
to_functor/2,
type_size/2,
extract_conditions/2,
unrelax/1, iz_member/1,
lazy/1,lazy/2,
constrain/1,enforce/1,
relax/1,relax_goal/2,thaw/1,
mpred_type_constraints_file/0
]).
%:- set_prolog_flag(generate_debug_info, true).
:- user:use_module(library(logicmoo_common)).
:- user:use_module(library(gvar_globals_api)).
% :- use_module(library(logicmoo/common_logic/common_logic_snark)).
:- meta_predicate my_when(+,0).
:- meta_predicate nrlc(0).
:- meta_predicate prolog_current_choice(1,*).
:- meta_predicate prolog_current_choice(1,*,*).
:- meta_predicate xnr(0).
:- meta_predicate xnr(*,0).
%:- include('mpred_header.pi').
%:- rtrace.
:- kb_shared(baseKB:admittedArgument/3).
:- kb_shared(baseKB:argIsa/3).
:- kb_shared(baseKB:genls/2).
:- kb_global(baseKB:nesc/1).
:- kb_global(baseKB:proven_tru/1).
:- export_everywhere(mpred_hooks,holds_t,2).
:- kb_global(mpred_hooks:holds_t/3).
:- kb_global(mpred_storage:equals_call/2).
:- kb_global(baseKB:call_e_tru/2).
:- kb_global(baseKB:is_fort/1).
:- kb_global(common_logic_snark:kif_option_value/2).
:- kb_global(baseKB:member_eqz/2).
:- op(300,fx,('~')).
% :- endif.
:- module_transparent((
add_cond/2,
arg_to_var/3,
attempt_attribute_args/3,
attempt_attribute_args/5,
attempt_attribute_one_arg/4,
attribs_to_atoms/2,
attribs_to_atoms0/2,
cmp_memberchk_0/2,
cmp_memberchk_00/2,
comp_type/3,
iz/2,
extend_iz/2,
extend_iz_member/2,
init_iz/2,
inst_cond/2,
isa_pred_l/3,
isa_pred_l/4,
chk_cond/2,
call_cond/2,
condz_to_isa/2,
map_subterms/3,
max_cond/3,
max_cond_l/2,
dif_objs/2,
min_cond/3,
min_cond_l/2,
promp_yn/2,
same/2,
same_arg/3,
samef/2,
to_functor/2,
type_size/2,
extract_conditions/2,
unrelax/1, iz_member/1,
lazy/1,lazy/2,
constrain/1,enforce/1,
relax/1,relax_goal/2,thaw/1,
mpred_type_constraints_file/0)).
:- if(exists_source(library(multivar))).
:- use_module(library(multivar)).
:- endif.
%:- rtrace.
:- if(exists_source(library(vhar))).
%:- use_module(library(vhar)).
:- endif.
:- if(exists_source(library(vprox))).
%:- use_module(library(vprox)).
:- endif.
:- meta_predicate
isa_pred_l(+,*,*),
isa_pred_l(+,*,*,*),
map_subterms(+,?,?),
iz_member(*),
constrain(*),
map_lits(1,+),
boxlog_goal_expansion(*,*),
map_each_argnum(?,4,?,?,*),
map_argnums(?,4,*),
thaw(?),
lazy(*),
unrelax(*),
relax_goal(*,+),
lazy(+,*).
:- meta_predicate relax(*),relaxing(*).
:- kb_local(baseKB:admittedArgument/3).
:- thread_local(t_l:no_kif_var_coroutines/1).
:- meta_predicate relaxed_call(*).
% ?- G=(loves(X,Y),~knows(Y,tHuman(X))),relax_goal(G,Out),writeq(Out).
:- meta_predicate map_plits(1,*).
map_lits(P1,Lit):-
locally($('$outer_stack')=[],once(map_plits(P1,Lit))),!.
map_plits(P1,Lit):- \+ compound(Lit),!,call(P1,Lit).
map_plits(P1,[Lit1 | Lit2]):- !,map_plits(P1,Lit1),map_plits(P1,Lit2).
map_plits(P1,(Lit1 , Lit2)):- !,map_plits(P1,Lit1),map_plits(P1,Lit2).
map_plits(P1,(Lit1 ; Lit2)):- !,map_plits(P1,Lit1),map_plits(P1,Lit2).
map_plits(P1,(Lit1 :- Lit2)):- !,map_lits(P1,Lit1),with_outer(Lit1,0,map_plits(P1,Lit2)).
map_plits(P1, Expr) :- demodalfy_outermost(+,Expr,MExpr,_Outer),!,
with_outer(Expr,1,map_plits(P1, MExpr)).
map_plits(P1, Expr) :- Expr=..[C,I], tCol(C),!,map_plits(P1, isa(I,C)).
map_plits(P1, Expr) :- functor(Expr,F,A),mappable_sentence_functor(F,A), !, Expr =.. [F|Args],
map_meta_lit(F,1,P1,Args).
map_plits(P1,Lit):- call(P1,Lit).
map_meta_lit(F,N,P1,[Arg|Args]):- !,
with_outer(F,N,map_plits(P1, Arg)),
N2 is N + 1,
map_meta_lit(F,N2,P1,Args).
map_meta_lit(_,_,_,[]):-!.
:- nb_setval('$outer_stack',[]).
with_outer(ExprF,N,Goal):- nb_current('$outer_stack',Was),
locally($('$outer_stack')=[ExprF-N|Was],Goal).
closure_push(Closure,Data):- var(Closure),!,add_cond(Closure,Data).
closure_push(Closure,Data):- Closure=[true|_Rest],!,setarg(1,Closure,Data).
closure_push(Closure,Data):- Closure=[_First|Rest],!,setarg(2,Closure,[Data|Rest]).
constrain_arg_var(Closure,Arg,FA):- closure_push(Closure,add_cond(Arg,FA)).
%push_modal(neg(_)):- nb_current('$modal_stack',[neg(_)|Was]),!, b_setval('$modal_stack',Was).
%push_modal(Modal):- nb_current('$modal_stack',Was)->b_setval('$modal_stack',[Modal|Was]);b_setval('$modal_stack',[Modal,call]).
%last_modal(Modal):- nb_current('$modal_stack',[Modal|_])-> true; Modal=call.
map_argnums(_,_,Lit):- \+ compound(Lit), !.
map_argnums(Modal,P4,[Lit1 | Lit2]):- !,map_argnums(Modal,P4,Lit1),map_argnums(Modal,P4,Lit2).
map_argnums(Modal,P4,isa(I,C)):- !,call(P4,Modal,C,0,I).
map_argnums(Modal,P4,Expr) :- demodalfy_outermost(Modal,Expr,MExpr,ModalValue),!,map_argnums(ModalValue,P4, MExpr).
map_argnums(Modal,P4,Expr) :- Expr=..[C,I], \+ (clause_b(argIsa(C,1,CC)),CC==C), clause_b(tCol(C)), !,map_argnums(Modal,P4,isa(I,C)).
map_argnums(Modal,P4,Expr) :- compound_name_arguments(Expr,F,Args),functor(Expr,F,A),
(mappable_sentence_functor(F,A) -> map_argnums(Modal,P4,Args); map_each_argnum(Modal,P4,F,1,Args)).
map_each_argnum(Modal,P4,F,N,[Arg|Args]):- !,
call(P4,Modal,F,N,Arg),
N2 is N + 1,
map_each_argnum(Modal,P4,F,N2,Args).
map_each_argnum(_Modal,_,_,_,_).
% non-backtracking attribute updates
demodalfy_outermost(ModalIn,MExpr, Expr, ModalValue):- MExpr=..[Modal,Expr], modal_value(ModalIn,Modal,ModalValue).
modal_value(neg(_), Neg , true):- arg(_,v( ( \+ ),'~','-','not'),Neg).
modal_value(_, Neg , neg(Neg)):- arg(_,v( ( \+ ),'~','-','not'),Neg).
mappable_sentence_functor(call,1).
mappable_sentence_functor(=,2):-!,fail.
mappable_sentence_functor(call_u,1).
mappable_sentence_functor(F,_):- downcase_atom(F,DC),upcase_atom(F,DC).
%mappable_sentence_functor(F,1):- \+ tCol(F).
%mappable_sentence_functor(F,A):- \+ argIsa(F,A,_).
%mtc_put_iza(X,Z):- Z=[id(ID)|_],nonvar(ID),!,put_attr(X,iza,Z).
%mtc_put_iza(X,Z):- get_attr(X,iza,[id(ID)|_]),put_attr(X,iza,[id(ID)|Z]).
%mtc_put_iza(X,Z):- gensym(id_,ID),!,put_attr(X,iza,[id(ID)|Z]).
mtc_put_iza(X,Z):- put_attr(X,iza,Z).
mtc_put_attr(X,iza,Z):- mtc_get_attr(X,iza,_Prev),!, mtc_put_iza(X,Z).
mtc_put_attr(X,iza,Z):- !, mtc_put_iza(X,[iza_id(X)|Z]).
mtc_put_attr(X,Y,Z):- var(X),!,oo_put_attr(X,Y,Z).
mtc_put_attr(X,Y,Z):- oo_put_attr(X,Y,Z),nop(dmsg(warn(need_to_error(oo_put_attr(X,Y,Z))))).
mtc_get_attr(X,Y,Z):- var(X),!,oo_get_attr(X,Y,Z).
mtc_get_attr(X,Y,Z):- oo_get_attr(X,Y,Z),nop(dmsg(warn(need_to_fail(oo_get_attr(X,Y,Z))))),!,fail.
mtc_get_attvar(Dom1,X):-memberchk(iza_id(X),Dom1).
compound_lit(Arg):- compound(Arg).
% ========================================================================
% enforce_bound(G) = check constraints
% ========================================================================
:- export(enforce_bound/1).
enforce_bound(G):-args_enforce_bound(G,Closure),maplist(call,Closure).
:- during_boot(add_history((
G=(loves(X,Y),~(knows(Y,tHuman(X)))),must(args_enforce_bound(G,Out)),writeq(Out)
))).
:- export(args_enforce_bound/2).
args_enforce_bound(G,Closure):- ignore(Closure=[true]),map_argnums(pos(_),args_enforce_bound3(Closure),G).
args_enforce_bound3(Closure,Modal,C,0,I):- !, ignore(( nonvar(I),
(Modal\=pos(_) -> closure_push(Closure,modal_isa(I,C)) ; closure_push(Closure,isa(I,C))))).
args_enforce_bound3(Closure,Modal,_F,_A,Arg):- compound_lit(Arg),!,map_argnums(Modal,args_enforce_bound3(Closure),Arg).
args_enforce_bound3(_Closure,_Modal,_F,_A,Arg):- var(Arg),!.
args_enforce_bound3(Closure,Modal,F,A,Arg):-args_enforce_nonvar(Closure,Modal,F,A,Arg).
% ========================================================================
% constrain(G) = add constraints to free args
% ========================================================================
:- export(constrain/1).
constrain(G):-ground(G),!.
constrain(G):-args_constrain(G,Closure),maplist(call,Closure).
:- export(args_constrain/2).
:- during_boot(add_history((
G=(loves(X,Y),~knows(Y,tHuman(X))),must(args_constrain(G,Out)),writeq(Out)
))).
args_constrain(G,Closure):- ignore(Closure=[true]),map_argnums(pos(_),args_constrains3(Closure),G).
args_constrains3(Closure,Modal,C,0,I):- !,
(Modal\=pos(_) -> constrain_arg_var(Closure,I,does_exist(I)) ; constrain_arg_var(Closure,I,isa(I,C))).
args_constrains3(Closure,Modal,_F,_A,Arg):- compound_lit(Arg),!,map_argnums(Modal,args_constrains3(Closure),Arg).
args_constrains3(_Closure,_Modal,_F,_A,Arg):- nonvar(Arg),!.
args_constrains3(Closure,Modal,F,A,Arg):-args_constrain_var(Closure,Modal,F,A,Arg).
:- export(does_exist/1).
does_exist(_).
modal_admittedArgument(F,1,V):-!,admittedArgument(F,1,V).
modal_admittedArgument(_,_,_).
% ========================================================================
% enforce(G) = enforce_bound/1 + constrain/1
% ========================================================================
:- export(enforce/1).
enforce(G):-args_enforce(G,Closure),maplist(call,Closure).
:- during_boot(add_history((
G=(loves(X,Y),~knows(Y,tHuman(X))),must(args_enforce(G,Out)),writeq(Out)
))).
:- export(args_enforce/2).
args_enforce(G,Closure):- ignore(Closure=[true]),map_argnums(pos(_),args_enforces3(Closure),G).
args_enforces3(Closure,Modal,C,0,I):- !,
(Modal\=pos(_) -> constrain_arg_var(Closure,I,does_exist(I)) ; constrain_arg_var(Closure,I,isa(I,C))).
args_enforces3(Closure,Modal,_F,_A,Arg):- compound_lit(Arg),!,map_argnums(Modal,args_enforces3(Closure),Arg).
args_enforces3(Closure,Modal,F,A,Arg):- var(Arg),!, args_constrain_var(Closure,Modal,F,A,Arg).
args_enforces3(Closure,Modal,F,A,Arg):- args_enforce_nonvar(Closure,Modal,F,A,Arg).
% ========================================================================
% remove_constraints(G) = remove constraints
% ========================================================================
remove_constraints(G):-args_remove_constraints(G,Closures),maplist(ignore,Closures).
:- export(args_remove_constraints/2).
:- during_boot(add_history((
G=(loves(X,Y),~knows(Y,tHuman(X))),args_enforce(G,Out),writeq(Out),
args_remove_constraints(G,Out2),writeq(Out2)
))).
args_remove_constraints(G,Closure):- ignore(Closure=[true]),map_argnums(pos(_),args_remove_constraints3(Closure),G).
args_remove_constraints3(Closure,_Modal,C,0,I):- !, transfer_constraints(Closure,I),transfer_constraints(Closure,C).
args_remove_constraints3(Closure,Modal,_F,_A,Arg):- compound_lit(Arg),!,map_argnums(Modal,args_remove_constraints3(Closure),Arg).
args_remove_constraints3(Closure,_Modal,_F,_A,Arg):- transfer_constraints(Arg,Closure).
transfer_constraints(Arg,Closure):- ignore((var(Arg),mtc_get_attr(Arg,iza,ToDo),del_attr(Arg,iza),
maplist(constrain_arg_var(Closure,Arg),ToDo))).
%:- module_transparent(apply:maplist/2).
%:- module_transparent(apply:maplist/3).
%% args_constrain_var(?Closure, +Modal, +F, +A, +Arg) is det.
%
% Datalog Preconditional Expansion.
%
args_constrain_var(Closure,Modal,F,A,Arg):- (A==1 ; Modal=pos(_)),
argIsa(F,A,Type),!,constrain_arg_var(Closure,Arg,isa(Arg,Type)).
args_constrain_var(Closure,Modal,F,A,Arg):-
(Modal\=pos(_) ->
constrain_arg_var(Closure,Arg,modal_admittedArgument(F,A,Arg)) ;
constrain_arg_var(Closure,Arg, admittedArgument(F,A,Arg))).
%% args_enforce_nonvar(?Closure, +Modal, +F, +A, +Arg) is det.
%
% Datalog Preconditional Expansion.
%
args_enforce_nonvar(Closure,Modal,F,A,Arg):-
(Modal\=pos(_) ->
closure_push(Closure,modal_admittedArgument(F,A,Arg)) ;
closure_push(Closure, admittedArgument(F,A,Arg))).
%% extract_conditions( +PFCSentence, -Conds) is semidet.
%
% Datalog Preconditional Expansion.
%
extract_conditions(Sentence,Conds):-
copy_term(Sentence,Sentence,Goals),
list_to_set(Goals,GoalSet),
(Goals\==GoalSet-> dmsg(cons_odd) ; true),
list_to_conjuncts(GoalSet,Conds),!.
%% boxlog_goal_expansion( ?G, ?GG) is semidet.
%
% Datalog Goal Expansion.
%
boxlog_goal_expansion(relax(G),GG):-!,relax_goal(G,GG).
%boxlog_goal_expansion(G,GG):-!,relax_goal(G,GG).
/*
boxlog_goal_expansion(G,_):- % \+ source_location(_,_),
wdmsg(g_s(G)),fail.
*/
is_iz_or_iza(Var):- zotrace((mtc_get_attr(Var,iz,_);mtc_get_attr(Var,iza,_))).
%% relax( :GoalG) is det.
%
% Relaxen.
%
relax(G):- map_lits(relax_lit,G).
relaxing(G):- term_attvars(G,Gs),quietly(relax(G)),term_attvars(G,Gs0),!,Gs0\==Gs.
relax_lit(G):- var(G),!.
relax_lit(_:G):-!,relax_lit(G).
relax_lit(G):- G=..[_|ARGS],relax_args(G,1,ARGS).
%% relaxed_call( :GoalG) is nondet.
%
%
relaxed_call(G):- relax(G), (G *-> unrelax(G) ; (unrelax(G),!,fail)).
%% relax_goal( :GoalG ) is det.
%
% Relaxen Goal.
%
relax_goal(G,GG):- copy_term(G,GG),relax(GG).
relax_goal_alt_old(G,GGG):-
copy_term(G,GG,Gs),G=GG,G=..[_|ARGS],relax_args(GG,1,ARGS),
GGG=(GG,maplist(iz_member,Gs)).
% ?- G=loves(a,b),relax_lit(G).
%% relax_N( ?G, ?N, ?A) is semidet.
%
% Relaxen Argument.
%
% % relax_N(G,N,Val):- var(Val),!,setarg(N,G,Val).
% % relax_N(G,N,Val):- iz(AA,[Val]),!,nb_setarg(N,G,AA).
relax_N(_,_,Val):- var(Val),!, ((mtc_get_attr(Val,iz,_);mtc_get_attr(Val,iza,_))->true;mtc_put_attr(Val,iz,[_])).
relax_N(G,N,Val):- dont_relax(Val)->true;(nb_setarg(N,G,NewVar),put_value(NewVar,Val)).
:- if(exists_source(library(multivar))).
% put_value(Var,Value):- multivar(Var),iz(Var,[Value]),mv_set1(Var,Value).
% put_value(Var,Value):- Var==Value,!.
put_value(Var,Value):- is_dict(Value,Tag),!,
(Tag==Var->true;put_value(Var,Tag)),
dict_pairs(Value,_Tag2,Pairs),
maplist(put_value_attr(Var),Pairs).
put_value(Var,Value):- iz(Var,[Value]).
put_value_attr(Var,N-V):- put_attr_value(Var,N,V).
put_attr_value(Var,iza,V):- !, add_cond(Var,V).
put_attr_value(Var,iz,V):- !, iz(Var,V).
put_attr_value(Arg,Name,FA):- as_constraint_for(Arg,FA,Constraint),!,put_attr_value0(Arg,Name,Constraint).
put_attr_value0(Var,Name,HintE):-
(mtc_get_attr(Var,Name,HintL) -> min_cond(HintE,HintL,Hint); Hint=[HintE]), !,
mtc_put_attr(Var,Name,Hint).
:- else.
put_value(Var,Value):- iz(Var,[Value]).
:- endif.
dont_relax(A):- var(A),!,is_iz_or_iza(A).
dont_relax(A):- \+ compound(A), \+ atom(A), \+ string(A).
%% relax_args( ?G, ?N, :TermA) is semidet.
%
% Relaxen Arguments.
%
relax_args(G,N,[A|RGS]):-relax_N(G,N,A),!,N2 is N + 1,relax_args(G,N2,RGS).
relax_args(_,_,[]).
%:- set_prolog_flag(verbose_file_search,true).
% @TODO DMILES RE-ADD :- use_module(library(clpfd),except([ins/2,sum/3,op(_,_,_)])). % Make predicates defined
%:- absolute_file_name(library('clp/clpr.pl'),File),writeln(File).
%:- use_module(user:library(clpr)). % Make predicates defined
% @TODO DMILES RE-ADD :- use_module(library(clpr),except(['{}'/1])). % Make predicates defined
:- use_module(user:library(simplex)). % Make predicates defined
%:- set_prolog_flag(verbose_file_search,false).
:- meta_predicate lazy_pfa(*,+,*). % arg1 was 0
:- meta_predicate #(*). % was 0
'#'(G):- map_lits(lazy,G).
my_when(If,Goal):- when(If,Goal).
%% lazy( :GoalG) is semidet.
%
% Lazy.
%
lazy(G):- var(G),!,freeze(G,lazy(G)).
lazy(G):- ground(G),!,call(G).
lazy((G1,G2)):- !, lazy(G1),lazy(G2).
lazy(is(X,G)):- !,clpr:{X =:= G}.
lazy(G):- functor(G,F,2),clp_r_arithmetic(F),!,clpr:{G}.
lazy(G):- term_variables(G,Vs),maplist(freeze_rev(lazy_1(G)),Vs).
lazy_1(G):- var(G),!,freeze(G,lazy_1(G)).
lazy_1(G):- ground(G),!,call(G).
lazy_1((G1,G2)):- !, lazy_1(G1),lazy_1(G2).
lazy_1(is(X,G)):- !,clpr:{X =:= G}.
lazy_1(G):- functor(G,F,2),clp_r_arithmetic(F),!,clpr:{G}.
lazy_1(G):- term_variables(G,[_]),!,call(G).
lazy_1(G):- term_variables(G,Vs),maplist(freeze_rev(lazy_1(G)),Vs).
freeze_rev(G,V):- freeze(V,G).
% lazy(is(X,G)):-!,term_variables(G,Vs),lazy(Vs,is(X,G)).
clp_r_arithmetic(=<).
clp_r_arithmetic(=:=).
clp_r_arithmetic( := ).
clp_r_arithmetic(<).
clp_r_arithmetic(>=).
clp_r_arithmetic(>).
lazy_pfa(G,F,2):- clp_r_arithmetic(F),!,clpr:{G}.
/*
lazy_pfa(G,_,1):- term_variables(G,[V1|Vs1]),!,
(Vs1 = [V2|Vs0] -> lazy([V1,V2|Vs0],G)
; freeze(V1,G)).
lazy_pfa(G,_,_):- term_variables(G,[V1|Vs1]),
(Vs1 = [V2|Vs0] -> lazy([V1,V2|Vs0],G)
; freeze(V1,G)).
*/
%% lazy( ?V, :GoalG) is semidet.
%
% Lazy.
%
lazy([V],G):- !, freeze(V,G).
%lazy([V|Vs],G):- or_any_var([V|Vs],C)->when(C,lazy(G)).
lazy([V|Vs],G):- !, lazy(Vs,freeze(V,G)).
lazy(_,G):- call(G).
or_any_var([V],nonvar(V)).
or_any_var([V|Vs],(nonvar(V);C)):-or_any_var(Vs,C).
% test lazy(isa(X,Y)),!,X=tCol,melt(Y).
%% thaw( ?Var) is semidet.
%
% Thaw.
%
thaw(Var):- var(Var),!,thaw_var(Var).
thaw(G):- term_attvars(G,Vs),maplist(thaw,Vs).
thaw_var(Var):- term_attvars_deep(Var,Vs),Vs\==[Var],!,maplist(melt,Vs).
thaw_var(Var):- frozen(Var,G),call(G).
term_attvars_deep(Term,VsO):- term_attvars_deep([],Term,VsO).
term_attvars_deep(Sofar,Term,Vs):- notrace(ground(Term)),!,Vs=Sofar.
term_attvars_deep(Sofar,Term,Vs):- \+ var(Term),!, term_attvars(Term,AVs),
maplist(term_attvars_deep(Sofar),AVs,VVs),ord_union([Sofar|VVs],Vs),!.
term_attvars_deep(Sofar,Var,VsO):- ord_memberchk(Var,Sofar),!,VsO=Sofar.
term_attvars_deep(Sofar,Var,VsO):- get_attrs(Var,Term),term_attvars(Term,AVs),
ord_del_element(AVs,Var,Rest),ord_subtract(Rest,Sofar,NewVars),ord_add_element(Sofar,Var,WithNewVar),!,
(NewVars==[] -> VsO=WithNewVar; maplist(term_attvars_deep(WithNewVar),NewVars,VVs),ord_union([WithNewVar|VVs],VsO)),!.
term_attvars_deep(Sofar,_,Sofar).
%% melt( ?G) is semidet.
%
% melt.
%
melt(V):-frozen(V,G),call(G).
/*
call_grounded_constraints,disable_callable_constraints,call_universals,call_each_with_ignore,
call newly grounded_constraints
enable_callable_constraints
call_unground_constraints
*/
nonground(G):- \+ ground(G).
enable_reactions(V):- put_attr(V,enable_reactions,true).
disable_reactions(V):- put_attr(V,enable_reactions,false).
:- meta_predicate(mpred_label(:)).
:- module_transparent(mpred_label/1).
:- meta_predicate(mpred_label(+,:)).
:- module_transparent(mpred_label/2).
mpred_label(M:G):- term_attvars(G,Vars),maplist(mpred_label_var(M,pre),Vars),maplist(mpred_label_var(M,post),Vars).
mpred_label(How,M:G):- term_attvars(G,Vars),maplist(mpred_label_var(M,How),Vars).
:- module_transparent(mpred_label_var/3).
mpred_label_var(M,pre,V):-
obtain_conds(V,List),!,
put_attr(V,iza,[]),
maplist(call_when_and_save(M,V,ground),List,MidList),
maplist(call_when_and_save(M,V,nonground),MidList,NewMidList),
maplist(call_when_and_save(M,V,nonground),NewMidList,NewList),
put_attr(V,iza,NewList).
mpred_label_var(M,while,V):-
obtain_conds(V,List),!,
maplist(call_when_and_save(M,V,ground),List,MidList),
maplist(call_when_and_save(M,V,nonground),MidList,NewMidList),
maplist(call_when_and_save(M,V,nonground),NewMidList,NewList),
put_attr(V,iza,NewList).
mpred_label_var(M,post,V):-
obtain_conds(V,List),
put_attr(V,iza,[]),!,
maplist(call_when_and_save(M,V,ground),List,MidList),
maplist(call_when_and_save(M,V,nonground),MidList,NewMidList),
maplist(call_when_and_save(M,V,nonground),NewMidList,NewList),
put_attr(V,iza,NewList).
mpred_label_var(M,Stage,V):-
obtain_conds(V,List),
maplist(call_when_and_save(M,V,Stage),List,NewList),
put_attr(V,iza,NewList).
call_when_and_save(M,V,When,Cond,Cond):- M:call(When,Cond)-> call_and_save_as_proof(M,V,Cond,Cond) ; true.
call_and_save_as_proof(_,_,call(proved,_),_CCond):- !.
call_and_save_as_proof(M,_,call(call,_),CCond):- !, M:call(CCond),setarg(1,CCond,proved).
call_and_save_as_proof(M,_V,call(ignore,_),CCond):- (M:call(CCond)->setarg(1,CCond,proved);true).
call_and_save_as_proof(_,_V,aoc(_SK,_What),_CCond):-!.
call_and_save_as_proof(M,_V,dif_objs(X,Y),_CCond):- !, M:dif_objs(X,Y).
call_and_save_as_proof(M,_,CCond,CCond):- M:call(CCond),!.
%% inst_cond( ?X, ?List) is semidet.
%
% An attributed variable with attribute value DVar has been
%
% assigned the value Y
%
% Inst Isac.
%
inst_cond(X, List):- predsort(comp_type,List,SList),call_cond(X,SList).
iza_id(_).
:- module_transparent unify_attr_iza/2.
:- module_transparent unify_attr_iza/3.
:- module_transparent unify_attr_iza_1/3.
:- module_transparent iza:attr_unify_hook/2.
iza:attr_unify_hook(DVar, Y):- unify_attr_iza(DVar, Y).
unify_attr_iza(Dom1, Y):- show_failure(mtc_get_attvar(Dom1,Self)),!,unify_attr_iza_self(Self,Dom1, Y).
unify_attr_iza(Dom1, Y):-
dumpST,
dmsg(lhs=(Dom1)),
dmsg(rhs=(Y)),
must(show_failure(attvar(Y))),!,
mtc_put_attr(Y, iza, Dom1 ).
unify_attr_iza_self(Self,Dom1, Y):- atom(Y),as_existential(Y,YY),% isNamed(YY,What),!,
mtc_get_attr(YY, iza, Dom2),!,
unify_conds(Dom1,Dom2,Result1),!,
unify_conds(Dom2,Dom1,Result2),!,
mtc_put_attr(YY, iza, Result2),
mtc_put_attr(Self, iza, Result1).
unify_attr_iza_self(Self,Dom1, Y):- is_existential(Y),=(Y,YY),!,
mtc_get_attr(YY, iza, Dom2),!,
unify_conds(Dom1,Dom2,Result1),!,
unify_conds(Dom2,Dom1,Result2),!,
mtc_put_attr(YY, iza, Result2),
mtc_put_attr(Self, iza, Result1).
unify_attr_iza_self(Self,Dom1, Y):- nonvar(Y),isNamed(Y,What),!,
(attvar(Self)-> \+ \+ (((attv_bind(Self,Y),chk_cond(Y,Dom1)))) ; chk_cond(Y,Dom1)),!,
add_cond(Self,aoc(isName,What)).
unify_attr_iza_self(Self,Dom1, Y):-
must(show_failure(var(Self))),
(show_failure(attvar(Y))),!,
mtc_put_attr(Y, iza, Dom1 ).
unify_attr_iza_self(_Self,Dom1, Y):- chk_cond(Y,Dom1).
local_memberchk_variant(H,Dom1):- memberchk_variant(H,Dom1).
:- module_transparent unify_conds/3.
unify_conds(Dom1,Dom2,Dom1):- Dom1=@=Dom2,!.
unify_conds(Dom1,[],Dom1):-!.
unify_conds(Dom1,[H|Dom2],NewDomain):- local_memberchk_variant(H,Dom1),!,unify_conds(Dom1,Dom2,NewDomain).
unify_conds(Dom1,[H|Dom2],NewDomain):- \+ rejects_cond(H,Dom1),!,
unify_conds(Dom1,Dom2,NewDomain1),
(private_cond(H) -> NewDomain1=NewDomain ;
\+ local_cond(H) -> ord_union(NewDomain1,[H],NewDomain) ;
\+ memberchk_variant(H,Dom1) -> ord_union(NewDomain1,[H],NewDomain) ;
NewDomain1=NewDomain).
hide_unify_conds(Dom1,Dom2,NewDomain):- show_failure(( \+ disjoint_conds(Dom1,Dom2))),
% sanity(must(\+ disjoint_conds(Dom2,Dom1))), % ensure the checks got both ways
ord_union(Dom1, Dom2, NewDomain).
get_typeinfos(Var,List):- obtain_conds(Var,Pre),include(is_typeinfo,Pre,List).
get_post_labeling(Var,List):- obtain_conds(Var,Pre),exclude(is_typeinfo,Pre,List).
is_typeinfo(Pre):- compound(Pre),!,functor(Pre,_,1).
is_typeinfo(Pre):- atom(Pre),!.
% add_all_differnt(QuantsList):- bagof(differentFromAll(I,O),QuantsList,O),L),maplist(call,L).
add_all_differnt(QuantsList):-
maplist(add_all_differnt2(QuantsList),QuantsList),!.
add_all_differnt2(QuantsList,Ex):-
delete_eq(QuantsList,Ex,DisjExs),
differentFromAll(Ex,DisjExs).
add_cond_differentFromAll(Ex,DisjExs):- add_cond(Ex,differentFromAll(Ex,DisjExs)).
differentFromAll(One,List):- maplist(dif_objs(One),List).
%% dif_objs( ?A, ?B) is semidet.
%
% Mdif.
%
% dif_objs(A,B):- tlbugger:attributedVars,!,dif(A,B).
dif_objs(A,B):- A==B,!,fail.
dif_objs(A,B):- obtain_object_conds(A,B,Dom1,Dom2),!,
dif_objs_doms(Dom1,Dom2).
dif_objs(A,B):- dif(A,B),add_cond(A,dif_objs(A,B)),add_cond(B,dif_objs(B,A)).
dif_objs_doms(Dom1,Dom2):- ((member(aoc(SK,N1),Dom1),memberchk(aoc(SK,N2),Dom2),N1=@=N2)),!,fail.
dif_objs_doms(Dom1,Dom2):-
\+ non_disjoint_conds(Dom1,Dom2),
disjoint_conds(Dom1,Dom2).
disjoint_object_conds(Var1,Var2):-
obtain_object_conds(Var1,Var2,Dom1,Dom2),
disjoint_conds(Dom1,Dom2).
obtain_object_conds(Var1,Var2,Dom1,Dom2):-
obtain_conds(Var1,Dom1),obtain_conds(Var2,Dom2).
obtain_conds(Var,Doms):- mtc_get_attr(Var,iza,Doms),!.
obtain_conds(Var,DomsO):- compound(Var),\+ is_fort(Var),functor(Var,_,A),arg(A,Var,Doms),
(is_list(Doms)->DomsO=Doms; obtain_conds(Doms,DomsO)).
obtain_conds(Var,DomsO):- as_existential(Var,X),obtain_conds(X,DomsO).
% obtain_conds(_,[]).
% conds may not be merged
disjoint_conds(Dom1,Dom2):-
member(Prop,Dom1),
rejects_cond(Prop,Dom2).
% disjoint skolems
rejects_cond(aoc(SK,W1),Dom2):- !, memberchk(aoc(SK,W2),Dom2),'#\\='(W1,W2),!.
rejects_cond(male,Dom2):- !, memberchk(female,Dom2).
rejects_cond(_,_):- fail.
% conds may not be merged
non_disjoint_conds(Dom1,Dom2):-
member(Prop,Dom1),
not_rejected_cond(Prop,Dom2).
aoc(_,_).
% already same skolems
not_rejected_cond(aoc(SK,W1),Dom2):- !, memberchk(aoc(SK,W2),Dom2),'#='(W1 , W2),!.
not_rejected_cond(male,Dom2):- memberchk(female,Dom2).
as_existential(In,Out):- is_existential(In),!,must(In=Out).
as_existential(In,Out):- var(In),!,decl_existential(In),must(In=Out).
% as_existential(In,Out):- strip_module(In,M,X), oo_deref(M,X,Out)->(X\==Out,is_existential(Out)),!.
as_existential(In,Out):- \+ is_fort(In),!,trace_or_throw(as_existential(In,Out)).
as_existential(In,Out):- nb_current_value(?('$fort2exist$'),In,Out),!.
as_existential(In,Out):- decl_existential(Out0),!,add_cond(Out0,aoc(isNamed,In)),!,
must(nb_set_value(?('$fort2exist$'),In,Out0)),!,
must(nb_current_value(?('$fort2exist$'),In,Out)),
must(add_var_to_env(In,Out)).
% :- ensure_loaded(library(multivar)).
l_xvarx(Var):- xvarx(Var).
decl_existential(Var):- is_existential(Var),!.
decl_existential(Var):- var(Var),!,l_xvarx(Var),put_attr(Var,x,Var),mtc_put_iza(Var,[iza_id(Var)]).
decl_existential(Atomic):- trace_or_throw(\+ decl_existential(Atomic)).
is_existential(Var):- var(Var),!,get_attr(Var,x,V),var(V).
is_existential(the(_)):-!.
:- if(\+ current_predicate(attv_bind/2)).
attv_bind(Var,Value):- Var=Value -> true; put_value(Var,Value).
:- endif.
x:attr_unify_hook(_Was,_Becoming):-!.
x:attr_unify_hook(Was,Becoming):- (attvar(Was),attvar(Becoming)) -> attv_bind(Was,Becoming) ; true.
x:attribute_goals(Var) -->
({is_existential(Var)} -> [decl_existential(Var)] ; []).
x:attr_portray_hook(Attr,Var):- one_portray_hook(Var,x(Var,Attr)).
one_portray_hook(Var,Attr):-
locally(set_prolog_flag(write_attributes,ignore),
((setup_call_cleanup(set_prolog_flag(write_attributes,ignore),
((subst(Attr,Var,SName,Disp),!,
get_var_name(Var,Name),
(atomic(Name)->SName=Name;SName=self),
format('~p',[Disp]))),
set_prolog_flag(write_attributes,portray))))).
:- module_transparent(user:portray_var_hook/1).
:- multifile(user:portray_var_hook/1).
:- dynamic(user:portray_var_hook/1).
user:portray_var_hook(Var) :-
current_prolog_flag(write_attributes,portray),
attvar(Var),
get_attr(Var,x,Val),
current_prolog_flag(write_attributes,Was),
setup_call_cleanup(set_prolog_flag(write_attributes,ignore),
writeq({exists(Var,Val)}),
set_prolog_flag(write_attributes,Was)),!.
show_frame_and_goal(Prefix,Frame):-
prolog_frame_attribute(Frame,has_alternatives,Alt),
prolog_frame_attribute(Frame,goal,Goal),
prolog_frame_attribute(Frame,parent,Parent),
prolog_frame_attribute(Parent,goal,PGoal),
dmsg(frame(Prefix,Frame,Alt,Goal,PGoal)),!.
clause_or_top(clause).
clause_or_top(top).
% non-repeating var
xnr_var(Var):-
nonvar(Var) ->true; (get_attr(Var,xnr,_)->true;
((gensym(xnr_,Id),
((prolog_current_choice(clause_or_top,CP),prolog_choice_attribute(CP,frame,Frame))->true;prolog_current_frame(Frame)),
% show_frame_and_goal(xnr_var,Frame),
put_attr(Var,xnr,old_vals(Var,xnr_dif,Id,[],Frame,State)),
l_xvarx(Var),
nop(setup_call_cleanup(true,(true;(State=state(redoing))),setarg(1,State,exited)))))).
xnr_var(Cmp,Var):- nonvar(Var) ->true; (get_attr(Var,xnr,_)->true;(gensym(xnr_,Id),put_attr(Var,xnr,old_vals(Var,Cmp,Id,[])))).
xnr:attr_unify_hook(AttValue,VarValue):-
((prolog_current_choice(clause_or_top,CP),prolog_choice_attribute(CP,frame,Frame))->true;prolog_current_frame(Frame)),
AttValue=old_vals(Var,_Cmp,_Id,WazU,OldFrame,State),
nb_setarg(4,AttValue,[VarValue|WazU]),
once(has_redos(Frame,OldFrame,N)->true;N=0),
(var(State)->(nb_setarg(6,AttValue,N));true),
((N==0) ->
((arg(4,AttValue,List),show_frame_and_goal(has_redos(N),Frame),merge_compatibles(List,Set),!,
(member(X,Set),attv_bind(Var,X))));(show_frame_and_goal(has_redos(N),Frame),fail)).
% :- ain(((((deduce_neg(P):- _), \+ (deduce_tru(P):-_))) ==> ((deduce_tru(P):- on_bind(P, \+ deduce_neg(P)))))).
xnr(Goal):-term_variables(Goal,Vars),xnr(Vars,Goal).
xnr([A],Goal):- xnr_var(A),!,Goal.
xnr([A|AA],Goal):- xnr_var(xnr_dif_l,[A|AA]),!,Goal.
xnr(_,Goal):-Goal,!.
has_redos(CPFrame,OldCPFrame,0):- OldCPFrame==CPFrame,!.
has_redos(CPFrame,OldCPFrame,N):-
(prolog_frame_attribute(CPFrame,parent,Parent),has_redos(Parent,OldCPFrame,Nm1)),
(prolog_frame_attribute(CPFrame,has_alternatives,true)-> ( N is Nm1 + 1) ; N is Nm1).
prolog_current_choice(Type,CPO):-prolog_current_choice(CP),prolog_current_choice(Type,CP,CPO).
prolog_current_choice(Type,CP,CPO):-prolog_choice_attribute(CP,type,WasType),(call(Type,WasType) -> CP=CPO ;
(prolog_choice_attribute(CP,parent,CPP)->prolog_current_choice(Type,CPP,CPO);CPO=null)).
/*
xnr:attr_unify_hook(AttValue,VarValue):-
AttValue=old_vals(_Var,_Cmp,_Id,WazU,_Frame,_CP),
(WazU = [Old|Waz] ->
xnr_attr_unify_hook(AttValue,Old,Waz,VarValue)
; nb_setarg(4,AttValue,[VarValue])).
*/
xnr_attr_unify_hook(_,Old,Waz,VarValue):- member_eqz(VarValue,[Old|Waz]),!,fail.
xnr_attr_unify_hook(AttValue,Old,Waz,VarValue):- (is_existential(Old);is_existential(VarValue)),xnr_attr_unify_hook_ex(AttValue,Old,Waz,VarValue).
xnr_attr_unify_hook(AttValue,Old,Waz,VarValue):- (var(Old);var(VarValue)),!,nb_setarg(4,AttValue,[VarValue,Old|Waz]).
xnr_attr_unify_hook(AttValue,Old,Waz,VarValue):- Old\=@=VarValue,!,nb_setarg(4,AttValue,[VarValue,Old|Waz]).
xnr_attr_unify_hook_ex(AttValue,Old,Waz,VarValue):- ( \+ \+ (Old=VarValue) ),!,
nb_setarg(4,AttValue,[VarValue,Old|Waz]),member(VarValue,[Old|Waz]).
xnr_attr_unify_hook_ex(AttValue,Old,Waz,VarValue):- nb_setarg(4,AttValue,[VarValue,Old|Waz]).
xnr:attribute_goals(_Var) --> !.
xnr:attribute_goals(Var) --> {fail},
({is_existential(Var)} -> [] ; [xnr_var(Var)]).
xnr_dif(Old,VarValue):- Old\==VarValue,!,fail.
xnr_dif(Old,VarValue):- (is_existential(Old);is_existential(VarValue)),!,=(Old,VarValue),!,get_attrs(Old,Attrs),nb_put_attrs(Old,Attrs),!,fail.
xnr_dif(Old,VarValue):- (is_fort(Old);is_fort(VarValue)),!,\=(Old,VarValue).
xnr_dif(Old,VarValue):- (var(Old);var(VarValue)),!.
xnr_dif(Old,VarValue):- is_list(Old),!,xnr_dif_l(Old,VarValue).
xnr_dif(Old,VarValue):- nonvar(VarValue),Old\=@=VarValue.
xnr_dif_l([A|Old],[B|VarValue]):- !,(xnr_dif(A,B);xnr_dif_l(Old,VarValue)).
xnr_dif_l(_,_).
merge_compatibles([],[]):-!.
merge_compatibles([N],[N]):-!.
merge_compatibles([N|List],ListOut):-
member(N,List) *-> merge_compatibles(List,ListOut);
(merge_compatibles(List,ListMid),ListOut=[N|ListMid]).
existential_var(Var,_):- nonvar(Var),!.
existential_var(Var,_):- attvar(Var),!.
existential_var(Var,P):- put_attr(Var,x,P),!.
:- meta_predicate add_constraint_ex(*,*,*).
% add_constraint_ex(_Call,_P,_V):-!,fail.
add_constraint_ex(_,P,V):- \+ contains_var(V,P),!.
add_constraint_ex(_,P,V):- add_cond(V,P),!.
add_constraint_ex(Call,P,V):-freeze(V,call(Call,V,P)).
unify_two(AN,AttrX,V):- nonvar(V),!, (V='$VAR'(_)->true;throw(unify_two(AN,AttrX,V))).
unify_two(AN,AttrX,V):- get_attr(V,AN,OAttr),!,OAttr=@=AttrX,!. % ,show_call(OAttr=@=AttrX).
unify_two(AN,AttrX,V):- put_attr(V,AN,AttrX).
add_cond_list_val(_,_,_,[]):- !.
add_cond_list_val(Pred1,_,X,[Y]):- atom(Pred1), X==Y -> true;P=..[Pred1,X,Y],add_cond(X,P).
add_cond_list_val(Pred1,Pred,X,FreeVars):- list_to_set(FreeVars,FreeVarSet),FreeVars\==FreeVarSet,!,
add_cond_list_val(Pred1,Pred,X,FreeVarSet).
add_cond_list_val(_Pred,Pred,X,FreeVars):- P=..[Pred,X,FreeVars],add_cond(X,P).
:- meta_predicate never_cond(?,*).
never_cond(Var,nesc(b_d(_,nesc,poss), ~ P )):- !, ensure_cond(Var,poss(P)).
never_cond(Var,nesc(~ P )):- !, ensure_cond(Var,poss(P)).
never_cond(Var,(~ P )):- !, ensure_cond(Var,poss(P)).
never_cond(NonVar,Closure):- nonvar(NonVar),!, \+ call_e_tru(NonVar,Closure).
never_cond(_Var,Closure):- ground(Closure),!, call_u(~Closure).
never_cond(Var,Closure):- attvar(Var),!,add_cond(Var,~Closure).
%never_cond(Var,Closure):- add_cond(Var,Closure).
private_cond(iza_id(_)).
local_cond(iza_id(_)).
not_nameOf(Ex,V):- \+ nesc(isNamed(Ex,V)).
var_plain(Var):-var(Var), \+ attvar(Var).
:- module_transparent(isNamed_impl/2).
:- module_transparent(isNamed_const_var/2).
:- module_transparent(isNamed_var/2).
isNamed_impl(Var,Str):- Var=@=Str,!.
isNamed_impl(Var,Str):- atom(Str),!,as_existential(Str,SVar),!,SVar=Var.
isNamed_impl(Var,Str):- var(Var),!,isNamed_var(Var,Str).
isNamed_impl(Var,Str):- atom(Var),!,as_existential(Var,X),!,isNamed_var(X,Str).
isNamed_impl(Var,Str):- !, Var=Str.
isNamed_impl(Var,Str):- isNamed_const_var(Var,Str).
isNamed_const_var(Var,Str):- compound(Str),!,proven_tru(isNamed(Var,Str)).
isNamed_const_var(Var,Str):- number(Var),!,number_string(Var,Str).
isNamed_const_var(Var,Str):- atomic(Var),!,text_to_string(Var,Str).
isNamed_const_var(Var,Str):- term_string(Var,Str).
isNamed_var(Var,Str):- var_plain(Var),var_plain(Str),!,strip_module(_,M,_),
my_when((nonvar(Str);nonvar(Var);?=(Var,Str)),M:isNamed(Var,Str)).
isNamed_var(Var,Str):- nonvar(Str),(has_cond(Var,isNamed(Var,V0));has_cond(Var,aoc(isNamed,V0))),!,text_to_string(V0,Str).
isNamed_var(Var,Str):- nrlc(proven_tru(isNamed(Var,Str))).
isNamed_var(Var,Str):- nonvar(Str),!,add_cond(Var,isNamed(Var,Str)),add_cond(Var,aoc(isNamed,Str)),!,add_var_to_env(Str,Var).
isNamed_var(Var,Str):- var(Str),(has_cond(Var,isNamed(Var,Str));has_cond(Var,aoc(isNamed,Str))),!,
(nonvar(Str)->add_var_to_env(Str,Var);true).
% isNamed_impl(Var,Str):- proven_tru(isNamed(Var,Str)).
% isNamed_impl(Var,Str):- var(Str),!,add_cond(Var,isNamed(Var,Str)),!.
:- export(isNamed_impl/2).
:- baseKB:import(isNamed_impl/2).
:- module_transparent(baseKB:isNamed/2).
baseKB:isNamed(X,Y):- strip_module(_,M,_),M:isNamed_impl(X,Y).
%:- ain((mtHybrid(Mt)==> {kb_local(Mt:isNamed/2)})).
nrlc(G):- no_repeats(loop_check(G,(((dmsg(warn(looped(G)))),fail)))).
% Translate attributes from this module to residual goals
iza:attribute_goals(X) -->
{ mtc_get_attr(X, iza, List) },!,
[add_cond(X, List)].
%% add_cond( ?Var, ?HintE) is semidet.
%
% Add Iza.
%
as_constraint_for(Arg,isa(AArg,FA),FA):- \+ kif_option_value(iza_atoms,false), atom(FA),AArg==Arg,!.
as_constraint_for(Arg,ISA,FA):- \+ kif_option_value(iza_atoms,false), compound(ISA), ISA=..[FA,AArg],AArg==Arg,!.
as_constraint_for(Arg,props(AArg,FA),props(FA)):- \+ kif_option_value(iza_atoms,false), atom(FA),AArg==Arg,!.
as_constraint_for(Arg,PROP,props(ASPROP)):- \+ kif_option_value(iza_atoms,false), compound(PROP), PROP=..[FA,AArg|Rest],AArg==Arg,ASPROP=..[FA|Rest].
as_constraint_for(_,FA,FA).
add_cond_rev(Prop,Var):- add_cond(Var,Prop).
:- meta_predicate ensure_cond(?,*).
:- module_transparent(ensure_cond/1).
ensure_cond(Var,Closure):-!, add_cond(Var,Closure).
ensure_cond(NonVar,Closure):- nonvar(NonVar),!,call_e_tru(NonVar,Closure).
ensure_cond(Var,Closure):- is_existential(Var),!,show_failure(add_cond(Var,Closure)).
ensure_cond(Var,Closure):- attvar(Var),!,show_failure(add_cond(Var,Closure)).
ensure_cond(Var,Closure):- as_existential(Var,VarX),must(add_cond(VarX,Closure)),!.
add_cond(Var,Prop):- is_list(Prop),!,as_existential(Var,VarX),obtain_conds(VarX,Dom1),!,maplist(add_cond3(VarX,Dom1),Prop).
add_cond(Var,Prop):- as_existential(Var,VarX),obtain_conds(VarX,Dom1),add_cond3(VarX,Dom1,Prop).
add_cond1(Var,Prop):- obtain_conds(Var,Dom1),add_cond3(Var,Dom1,Prop).
add_cond3(Var,Dom1,Prop):- as_constraint_for(Var,Prop,Constraint),
show_failure(( \+ rejects_cond(Constraint,Dom1))),
ord_union(Dom1, [Constraint], NewDomain),
mtc_put_attr(Var,iza,NewDomain).
:- meta_predicate map_one_or_list(1,?).
map_one_or_list(Call2,ArgOrL):- is_list(ArgOrL)->maplist(Call2,ArgOrL);call(Call2,ArgOrL).
has_cond(Var,Prop):- obtain_conds(Var,Doms),map_one_or_list(has_cond(Doms,Var),Prop).
has_cond(Doms,Var,Prop):- as_constraint_for(Var,Prop,C),member(C,Doms).
rem_cond(Var,Prop):- obtain_conds(Var,Doms),map_one_or_list(rem_cond(Doms,Var),Prop).
rem_cond(Doms,Var,Prop):- as_constraint_for(Var,Prop,C),select(C,Doms,NewDoms),mtc_put_attr(Var,iza,NewDoms).
not_has_cond(Var,Prop):- obtain_conds(Var,Doms),map_one_or_list(not_has_cond(Doms,Var),Prop).
not_has_cond(Doms,Var,Prop):- \+ has_cond(Doms,Var,Prop).
%% chk_cond( ?E, ?Cs) is semidet.
%
% Isac Checking.
%
:- module_transparent(chk_cond/2).
chk_cond(_,_):- local_override(no_kif_var_coroutines,G),!,call(G).
chk_cond(E,Cs):- once(call_cond(E,Cs)).
:- module_transparent(call_cond/2).
:- module_transparent(call_cond_x/2).
%% call_cond( ?VALUE1, :TermARG2) is semidet.
%
% Isac Gen.
%
call_cond(Var):- as_existential(Var,X),obtain_conds(X,Conds),call_cond_x(X,Conds).
call_cond(Var,Conds):- is_fort(Var),!,as_existential(Var,X),call_cond_x(X,Conds).
call_cond(Var,Conds):- call_cond_x(Var,Conds).
call_cond_x(Y, [H|List]):- ground(Y),!,cond_call0(Y,H),!,cond_call00(Y, List).
call_cond_x(Y, [H|List]):- !,maplist(cond_call0(Y),[H|List]).
call_cond_x(_, _).
cond_call00(Y, [H|List]):-!,cond_call0(Y,H),!,cond_call00(Y, List).
cond_call00(_, _).
cond_call0(Y,H):- atom(H),!,nesc(isa(Y,H)).
cond_call0(_,dif_objs(X,Y)):-!,X\==Y.
cond_call0(Y,props(H)):- ereq(props(Y,H)).
cond_call0(Y,H):- arg(_,H,E),Y==E,!,call_u(H).
cond_call0(_,H):- call_u(H).
/*
enforce_fa_unify_hook([Goal|ArgIsas],Value):- !,
enforce_fa_call(Goal,Value),
enforce_fa_unify_hook(ArgIsas,Value).
enforce_fa_unify_hook(_,_).
enforce_fa_call(Goal,Value):- atom(Goal),!,call(Goal,Value).
enforce_fa_call(Goal,Value):- arg(_,Goal,Var),Var==Value,!,call(Goal).
enforce_fa_call(Goal,Value):- prepend_arg(Goal,Value,GVoal),!,call(GVoal).
prepend_arg(M:Goal,Value,M:GVoal):- !, prepend_arg(Goal,Value,GVoal).
prepend_arg(Goal,Value,GVoal):- Goal=..[F|ARGS],GVoal=..[F,Value|ARGS].
*/
/*
G=(loves(X,Y),~knows(Y,tHuman(X))),args_enforce(G,Out),maplist(call,Out).
*/
%% attribs_to_atoms( ?ListA, ?List) is semidet.
%
% Attribs Converted To Atoms.
%
attribs_to_atoms(ListA,List):-map_subterms(attribs_to_atoms0,ListA,List).
%% map_subterms( :PRED2Pred, ?I, ?O) is semidet.
%
% Map Subterms.
%
map_subterms(Pred,I,O):-is_list(I),!,maplist(map_subterms(Pred),I,O).
map_subterms(Pred,I,O):-call(Pred,I,O),!.
map_subterms(Pred,I,O):-compound(I),!,I=..IL,maplist(map_subterms(Pred),IL,OL),O=..OL.
map_subterms(_Pred,IO,IO).
%% condz_to_isa( :TermAA, :TermAB) is semidet.
%
% iza Converted To (iprops/2).
%
condz_to_isa(Iza,ftTerm):-var(Iza),!.
condz_to_isa((A,B),isAnd(ListO)):-!,conjuncts_to_list((A,B),List),list_to_set(List,Set),min_cond_l(Set,ListO).
condz_to_isa((A;B),isOr(Set)):-!,conjuncts_to_list((A,B),List),list_to_set(List,Set).
condz_to_isa(AA,AB):-must(AA=AB).
%% attribs_to_atoms0( ?Var, ?Isa) is semidet.
%
% Attribs Converted To Atoms Primary Helper.
%
attribs_to_atoms0(Var,Isa):-mtc_get_attr(Var,iza,Iza),!,must(condz_to_isa(Iza,Isa)).
attribs_to_atoms0(O,O):- \+ (compound(O)).
%% min_cond_l( ?List, ?ListO) is semidet.
%
% min (sub_super/2) (List version).
%
min_cond_l(List,ListO):-isa_pred_l(lambda(Y,X,sub_super(X,Y)),List,ListO).
%% max_cond_l( ?List, ?ListO) is semidet.
%
% max (sub_super/2) (List version).
%
max_cond_l(List,ListO):-isa_pred_l(sub_super,List,ListO).
%% isa_pred_l( :PRED2Pred, ?List, ?ListO) is semidet.
%
% (iprops/2) Predicate (List version).
%
isa_pred_l(Pred,List,ListO):-isa_pred_l(Pred,List,List,ListO).
%% isa_pred_l( :PRED2Pred, ?UPARAM2, ?List, ?UPARAM4) is semidet.
%
% (iprops/2) Predicate (List version).
%
isa_pred_l(_Pred,[],_List,[]).
isa_pred_l(Pred,[X|L],List,O):-member(Y,List),X\=Y,call_u(call(Pred,X,Y)),!,isa_pred_l(Pred,L,List,O).
isa_pred_l(Pred,[X|L],List,[X|O]):-isa_pred_l(Pred,L,List,O).
%% min_cond( :TermHintA, ?HintE, ?HintE) is semidet.
%
% min (sub_super/2).
%
min_cond([H],In,Out):- !, min_cond0(H,In,Out).
min_cond([H|T],In,Out):- !, min_cond0(H,In,Mid),min_cond(T,Mid,Out).
min_cond(E,In,Out):- min_cond0(E,In,Out).
min_cond0(HintA,[],[HintA]).
min_cond0(HintA,[HintB|HintL],[HintB|HintL]):- HintA==HintB,!.
min_cond0(HintA,[HintB|HintL],[HintA,HintB|HintL]):- functor(HintA,_,A),functor(HintB,_,B),B>A,!.
min_cond0(HintA,[HintB|HintL],[HintA|HintL]):- sub_super(HintA,HintB),!.
min_cond0(HintA,[HintB|HintL],[HintB|HintL]):- sub_super(HintB,HintA),!.
min_cond0(HintA,[HintB|HintL],[HintB|HintS]):- !,min_cond0(HintA,HintL,HintS).
sub_super(Col1,Col2):- tCol(Col1),!,genls(Col1,Col2).
%% max_cond( :TermHintA, ?HintE, ?HintE) is semidet.
%
% max (sub_super/2).
%
max_cond([H],In,Out):- !, max_cond0(H,In,Out).
max_cond([H|T],In,Out):- !, max_cond0(H,In,Mid),max_cond(T,Mid,Out).
max_cond(E,In,Out):- max_cond0(E,In,Out).
max_cond0(HintA,[],[HintA]).
max_cond0(HintA,[HintB|HintL],[HintB|HintL]):- HintA==HintB,!.
max_cond0(HintA,[HintB|HintL],[HintA,HintB|HintL]):- functor(HintA,_,A),functor(HintB,_,B),B>A,!.
max_cond0(HintA,[HintB|HintL],[HintA|HintL]):- sub_super(HintB,HintA),!.
max_cond0(HintA,[HintB|HintL],[HintB|HintL]):- sub_super(HintA,HintB),!.
max_cond0(HintA,[HintB|HintL],[HintB|HintS]):- !,max_cond0(HintA,HintL,HintS).
:- style_check(-singleton).
%% unrelax( ?X) is semidet.
%
% Domain Labeling (residuals).
%
unrelax(X):-copy_term(X,X,Gs),maplist(iz_member,Gs).
%% iz_member( :GoalG) is semidet.
%
% Domain Member.
%
iz_member(iz(X,List)):-!,member(X,List).
iz_member(G):-G.
:- style_check(-singleton).
%% attempt_attribute_args( ?AndOr, ?Hint, :TermVar) is semidet.
%
% Attempt Attribute Arguments.
%
attempt_attribute_args(_AndOr,Hint,Var):- var(Var),add_cond(Var,Hint),!.
attempt_attribute_args(_AndOr,_Hint,Grnd):-ground(Grnd),!.
attempt_attribute_args(_AndOr,_Hint,Term):- \+ (compound(Term)),!.
attempt_attribute_args(AndOr,Hint,+(A)):-!,attempt_attribute_args(AndOr,Hint,A).
attempt_attribute_args(AndOr,Hint,-(A)):-!,attempt_attribute_args(AndOr,Hint,A).
attempt_attribute_args(AndOr,Hint,?(A)):-!,attempt_attribute_args(AndOr,Hint,A).
attempt_attribute_args(AndOr,Hint,(A,B)):-!,attempt_attribute_args(AndOr,Hint,A),attempt_attribute_args(AndOr,Hint,B).
attempt_attribute_args(AndOr,Hint,[A|B]):-!,attempt_attribute_args(AndOr,Hint,A),attempt_attribute_args(AndOr,Hint,B).
attempt_attribute_args(AndOr,Hint,(A;B)):-!,attempt_attribute_args(';'(AndOr),Hint,A),attempt_attribute_args(';'(AndOr),Hint,B).
attempt_attribute_args(_AndOr,_Hint,Term):- use_was_isa(Term,I,C), add_cond(I,C).
attempt_attribute_args(AndOr,_Hint,Term):- Term=..[F,A],tCol(F),!,attempt_attribute_args(AndOr,F,A).
attempt_attribute_args(AndOr,Hint,Term):- Term=..[F|ARGS],!,attempt_attribute_args(AndOr,Hint,F,1,ARGS).
%% attempt_attribute_args( ?AndOr, ?Hint, ?F, ?N, :TermARG5) is semidet.
%
% Attempt Attribute Arguments.
%
attempt_attribute_args(_AndOr,_Hint,_F,_N,[]):-!.
attempt_attribute_args(AndOr,_Hint,t,1,[A]):-attempt_attribute_args(AndOr,callable,A).
attempt_attribute_args(AndOr,Hint,t,N,[A|ARGS]):-atom(A),!,attempt_attribute_args(AndOr,Hint,A,N,ARGS).
attempt_attribute_args(_AndOr,_Hint,t,_N,[A|_ARGS]):- \+ (atom(A)),!.
attempt_attribute_args(AndOr,Hint,F,N,[A|ARGS]):-attempt_attribute_one_arg(Hint,F,N,A),N2 is N+1,attempt_attribute_args(AndOr,Hint,F,N2,ARGS).
%% attempt_attribute_one_arg( ?Hint, ?F, ?N, ?A) is semidet.
%
% Attempt Attribute One Argument.
%
attempt_attribute_one_arg(_Hint,F,N,A):-call_u(argIsa(F,N,Type)),Type\=ftTerm, \+ (compound(Type)),!,attempt_attribute_args(and,Type,A).
attempt_attribute_one_arg(_Hint,F,N,A):-call_u(argQuotedIsa(F,N,Type)),Type\=ftTerm, \+ (compound(Type)),!,attempt_attribute_args(and,Type,A).
attempt_attribute_one_arg(_Hint,F,N,A):-call_u(argIsa(F,N,Type)),Type\=ftTerm,!,attempt_attribute_args(and,Type,A).
attempt_attribute_one_arg(_Hint,F,N,A):-attempt_attribute_args(and,argi(F,N),A).
:- was_export((samef/2,same/2)).
%% same( ?X, ?Y) is semidet.
%
% Same.
%
same(X,Y):- samef(X,Y),!.
same(X,Y):- compound(X),arg(1,X,XX)->same(XX,Y),!.
same(Y,X):- compound(X),arg(1,X,XX),!,same(XX,Y).
%% samef( ?X, ?Y) is semidet.
%
% Samef.
%
samef(X,Y):- quietly(((to_functor(X,XF),to_functor(Y,YF),(XF=YF->true;string_equal_ci(XF,YF))))).
%% to_functor( ?A, ?O) is semidet.
%
% Converted To Functor.
%
to_functor(A,O):-is_ftVar(A),!,A=O.
to_functor(A,O):-compound(A),get_functor(A,O),!. % ,to_functor(F,O).
to_functor(A,A).
:- was_export(arg_to_var/3).
%% arg_to_var( ?Type, ?String, ?Var) is semidet.
%
% Argument Converted To Variable.
%
arg_to_var(_Type,_String,_Var).
:- was_export(same_arg/3).
%% same_arg( ?How, ?X, ?Y) is semidet.
%
% Same Argument.
%
same_arg(_How,X,Y):-var(X),var(Y),!,X=Y.
same_arg(equals,X,Y):-!,equals_call(X,Y).
same_arg(tCol(_Type),X,Y):-!, unify_with_occurs_check(X,Y).
same_arg(ftText,X,Y):-(var(X);var(Y)),!,X=Y.
same_arg(ftText,X,Y):-!, string_equal_ci(X,Y).
same_arg(same_or(equals),X,Y):- same_arg(equals,X,Y).
same_arg(same_or(sub_super),X,Y):- same_arg(equals,X,Y).
same_arg(same_or(sub_super),Sub,Sup):- holds_t(sub_super,Sub,Sup),!.
same_arg(same_or(isa),X,Y):- same_arg(equals,X,Y).
same_arg(same_or(isa),I,Sup):- !, holds_t(Sup,I),!.
same_arg(same_or(_Pred),X,Y):- same_arg(equals,X,Y).
same_arg(same_or(Pred),I,Sup):- holds_t(Pred,I,Sup),!.
% same_arg(I,X):- promp_yn('~nSame Objects: ~q== ~q ?',[I,X]).
%% promp_yn( ?Fmt, ?A) is semidet.
%
% Promp Yn.
%
promp_yn(Fmt,A):- format(Fmt,A),get_single_char(C),C=121.
% :-swi_module(iz, [ iz/2 ]). % Var, ?Domain
:- use_module(library(ordsets)).
%% iz( ?X, ?Dom) is semidet.
%
% Domain.
%
:- was_export(iz/2).
iz(X, Dom) :- var(Dom), !, mtc_get_attr(X, iz, Dom).
% iz(X, Dom) :- var(Dom), !, (mtc_get_attr(X, iz, Dom)->true;mtc_put_attr(X, iz, [iziz(Dom)])).
iz(X, List) :-
listify(List,List0),
list_to_ord_set(List0, Domain),
mtc_put_attr(Y, iz, Domain),
X = Y.
:- was_export(extend_iz_member/2).
%% extend_iz_member( ?X, ?DomL) is semidet.
%
% Extend Domain.
%
extend_iz_member(X, DomL):- init_iz(X, Dom2), ord_union(Dom2, DomL, NewDomain),mtc_put_attr( X, iz, NewDomain ).
:- was_export(extend_iz/2).
%% extend_iz( ?X, ?DomE) is semidet.
%
% Extend Domain.
%
extend_iz(X, DomE):- init_iz(X, Dom2),ord_add_element(Dom2, DomE, NewDomain),mtc_put_attr( X, iz, NewDomain ).
:- was_export(init_iz/2).
%% init_iz( ?X, ?Dom) is semidet.
%
% Init Domain.
%
init_iz(X,Dom):-mtc_get_attr(X, iz, Dom),!.
init_iz(X,Dom):-Dom =[_], mtc_put_attr(X, iz, Dom),!.
% An attributed variable with attribute value Domain has been
% assigned the value Y
iz:attr_unify_hook([Y], Value) :- same(Y , Value),!.
iz:attr_unify_hook(Domain, Y) :-
( mtc_get_attr(Y, iz, Dom2)
-> ord_intersection(Domain, Dom2, NewDomain),
( NewDomain == []
-> fail
; NewDomain = [Value]
-> same(Y , Value)
; mtc_put_attr(Y, iz, NewDomain)
)
; var(Y)
-> mtc_put_attr( Y, iz, Domain )
; (\+ \+ (cmp_memberchk_0(Y, Domain)))
).
% Translate attributes from this module to residual goals
iz:attribute_goals(X) --> { mtc_get_attr(X, iz, List) },!,[iz(X, List)].
%iz:attr_portray_hook(Val, _) :- write('iz:'), write(Val),!.
%iza:attr_portray_hook(Val, _) :- write('iza:'), write(Val),!.
%% cmp_memberchk_0( ?X, ?Y) is semidet.
%
% Cmp Memberchk.
%
cmp_memberchk_0(X,Y):-numbervars(X,0,_,[attvars(skip)]),member(X,Y),!.
%% cmp_memberchk_00( ?Item, :TermX1) is semidet.
%
% Cmp Memberchk Primary Helper.
%
cmp_memberchk_00(Item, [X1,X2,X3,X4|Xs]) :- !,
compare(R4, Item, X4),
( R4 = (>) -> cmp_memberchk_00(Item, Xs)
; R4 = (<) ->
compare(R2, Item, X2),
( R2 = (>) -> Item = X3
; R2 = (<) -> Item = X1
;/* R2 = (=), Item = X2 */ true
)
;/* R4 = (=) */ true
).
cmp_memberchk_00(Item, [X1,X2|Xs]) :- !,
compare(R2, Item, X2),
( R2 = (>) -> cmp_memberchk_00(Item, Xs)
; R2 = (<) -> Item = X1
;/* R2 = (=) */ true
).
cmp_memberchk_00(Item, [X1]) :-
Item = X1.
:- meta_predicate(call_engine_m(?,0,-,-)).
call_engine_m(Templ,Goal,Engine,Det):-
call_engine_start_m(Templ,Goal,Engine),
call_engine_next_m(Engine,Templ,Det).
:- meta_predicate(call_engine_start_m(?,0,-)).
call_engine_start_m(Templ,Goal,Engine):-
engine_create(Templ-TF0,(Goal,deterministic(TF0)),Engine).
call_engine_next_m(Engine,Templ,Det):-
repeat,
engine_next(Engine,Templ-Det),
(Det==true->!;true).
metapred_plus(_,_):-!.
metapred_plus(Cmp,Plus):-
(\+ compound(Cmp) -> S=0 ; compound_name_arity(Cmp,F,S)),
A is S + Plus,
current_predicate(F/A),!.
metapred_plus(_,_).
not_dif_objs(A,B):- \+ dif_objs(A,B).
:- meta_predicate(pred1_to_unique_pairs(1,-,-)).
pred1_to_unique_pairs(Pred1,Obj1,Obj2):-
sanity(assertion(metapred_plus(Pred1,1))),
lazy_findall(Elem,call(Pred1,Elem),List),
list_to_unique_pairs(List,Obj1,Obj2).
:- meta_predicate(pred1_to_unique_pairs_confirmed(1,-,-)).
pred1_to_unique_pairs_confirmed(Pred1,Obj1,Obj2):-
Tracker = '$t'([]),
Same2 = not_dif_objs,
pred1_to_unique_pairs(Pred1,ObjA,ObjB),
different_pairs(Same2,Tracker,ObjA,ObjB,Obj1,Obj2).
list_to_unique_pairs(List,Obj1,Obj2):-
append(_Left,[Obj1|Rest],List),member(Obj2,Rest).
:- meta_predicate different_pairs(2,+,?,?,?,?).
different_pairs(Same2,Tracker,ObjA,ObjB,Obj1,Obj2):-
Test = p(TObj1,TObj2),
zotrace(sanity((must_be(compound,Tracker),
assertion(metapred_plus(Pred2InstsDiff,2))))),
zotrace((\+ call(Same2, ObjA, ObjA))),
zotrace((( ObjA @> ObjB -> (ObjA = Obj1, ObjB = Obj2) ; (ObjA = Obj2, ObjB = Obj1)))),
must(arg(1,Tracker,PrevPairs)),
(((member(Test,PrevPairs),call(Same2,Obj1,TObj1),call(Same2,Obj2,TObj2)))-> fail ; true),
must(nb_setarg(1,Tracker,[p(Obj1,Obj2)|PrevPairs])).
/** <module> The difv/2 constraint
*/
%! difv(+Term1, +Term2) is semidet.
%
% Constraint that expresses that Term1 and Term2 never become
% variant (=@@=/2). Fails if `Term1 =@@= Term2`. Succeeds if Term1
% can never become identical to Term2. In other cases the
% predicate succeeds after attaching constraints to the relevant
% parts of Term1 and Term2 that prevent the two terms to become
% identical.
=@@=(X,Y):-!, ==(X,Y).
% =@@=(X,Y):- (attvar(X);attvar(Y))-> X==Y ;((var(X);var(Y))-> X==Y ; X=@=Y).
:- op(700,xfx,user:('=@@=')).
% difv(_X,_Y):-!.
difv(X,Y) :-
\+ (X =@@= Y),
difv_c_c(X,Y,_).
difv_unifiable(X, Y, Us) :-
( current_prolog_flag(occurs_check, error) ->
catch(unifiable(X,Y,Us), error(occurs_check(_,_),_), false)
; unifiable(X, Y, Us)
).
difv_c_c(X,Y,OrNode) :-
( difv_unifiable(X, Y, Unifier) ->
( Unifier == [] ->
or_one_failv(OrNode)
;
difv_c_c_l(Unifier,OrNode)
)
;
or_succeedv(OrNode)
).
difv_c_c_l(Unifier,OrNode) :-
length(Unifier,N),
extend_ornodevv(OrNode,N,List,Tail),
difv_c_c_l_aux(Unifier,OrNode,List,Tail).
extend_ornodevv(OrNode,N,List,Vars) :-
( get_attr(OrNode,difv,Attr) ->
Attr = nodev(M,Vars),
O is N + M - 1
;
O = N,
Vars = []
),
put_attr(OrNode,difv,nodev(O,List)).
difv_c_c_l_aux([],_,List,List).
difv_c_c_l_aux([X=Y|Unifier],OrNode,List,Tail) :-
List = [X=Y|Rest],
add_ornodevv(X,Y,OrNode),
difv_c_c_l_aux(Unifier,OrNode,Rest,Tail).
add_ornodevv(X,Y,OrNode) :-
add_ornodev_var1(X,Y,OrNode),
( var(Y) ->
add_ornodev_var2(X,Y,OrNode)
;
true
).
add_ornodev_var1(X,Y,OrNode) :-
( get_attr(X,difv,Attr) ->
Attr = vardifv(V1,V2),
put_attr(X,difv,vardifv([OrNode-Y|V1],V2))
;
put_attr(X,difv,vardifv([OrNode-Y],[]))
).
add_ornodev_var2(X,Y,OrNode) :-
( get_attr(Y,difv,Attr) ->
Attr = vardifv(V1,V2),
put_attr(Y,difv,vardifv(V1,[OrNode-X|V2]))
;
put_attr(Y,difv,vardifv([],[OrNode-X]))
).
difv:attr_unify_hook(vardifv(V1,V2),Other) :-
( var(Other) ->
reverse_lookupsv(V1,Other,OrNodes1,NV1),
or_one_failvsv(OrNodes1),
get_attr(Other,difv,OAttr),
OAttr = vardifv(OV1,OV2),
reverse_lookupsv(OV1,Other,OrNodes2,NOV1),
or_one_failvsv(OrNodes2),
remove_obsoletev(V2,Other,NV2),
remove_obsoletev(OV2,Other,NOV2),
append(NV1,NOV1,CV1),
append(NV2,NOV2,CV2),
( CV1 == [], CV2 == [] ->
del_attr(Other,difv)
;
put_attr(Other,difv,vardifv(CV1,CV2))
)
;
verify_compoundsv(V1,Other),
verify_compoundsv(V2,Other)
).
remove_obsoletev([], _, []).
remove_obsoletev([N-Y|T], X, L) :-
( Y=@@=X ->
remove_obsoletev(T, X, L)
; L=[N-Y|RT],
remove_obsoletev(T, X, RT)
).
reverse_lookupsv([],_,[],[]).
reverse_lookupsv([N-X|NXs],Value,Nodes,Rest) :-
( X =@@= Value ->
Nodes = [N|RNodes],
Rest = RRest
;
Nodes = RNodes,
Rest = [N-X|RRest]
),
reverse_lookupsv(NXs,Value,RNodes,RRest).
verify_compoundsv([],_).
verify_compoundsv([OrNode-Y|Rest],X) :-
( var(Y) ->
true
; OrNode == (-) ->
true
;
difv_c_c(X,Y,OrNode)
),
verify_compoundsv(Rest,X).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
or_succeedv(OrNode) :-
( attvar(OrNode) ->
get_attr(OrNode,difv,Attr),
Attr = nodev(_Counter,Pairs),
del_attr(OrNode,difv),
OrNode = (-),
del_or_difv(Pairs)
;
true
).
or_one_failvsv([]).
or_one_failvsv([N|Ns]) :-
or_one_failv(N),
or_one_failvsv(Ns).
or_one_failv(OrNode) :-
( attvar(OrNode) ->
get_attr(OrNode,difv,Attr),
Attr = nodev(Counter,Pairs),
NCounter is Counter - 1,
( NCounter == 0 ->
fail
;
put_attr(OrNode,difv,nodev(NCounter,Pairs))
)
;
fail
).
del_or_difv([]).
del_or_difv([X=Y|Xs]) :-
cleanup_dead_nodesv(X),
cleanup_dead_nodesv(Y),
del_or_difv(Xs).
cleanup_dead_nodesv(X) :-
( attvar(X) ->
get_attr(X,difv,Attr),
Attr = vardifv(V1,V2),
filter_dead_orsv(V1,NV1),
filter_dead_orsv(V2,NV2),
( NV1 == [], NV2 == [] ->
del_attr(X,difv)
;
put_attr(X,difv,vardifv(NV1,NV2))
)
;
true
).
filter_dead_orsv([],[]).
filter_dead_orsv([Or-Y|Rest],List) :-
( var(Or) ->
List = [Or-Y|NRest]
;
List = NRest
),
filter_dead_orsv(Rest,NRest).
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
The attribute of a variable X is vardifv/2. The first argument is a
list of pairs. The first component of each pair is an OrNode. The
attribute of each OrNode is node/2. The second argument of node/2
is a list of equations A = B. If the LHS of the first equation is
X, then return a goal, otherwise don''t because someone else will.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
difv:attribute_goals(Var) --> !.
difv:attribute_goals(Var) -->
( { get_attr(Var, difv, vardifv(Ors,_)) } ->
or_nodesv(Ors, Var)
; or_nodev(Var)
).
or_nodev(O) -->
( { get_attr(O, difv, nodev(_, Pairs)) } ->
{ eqs_lefts_rightsv(Pairs, As, Bs) },
mydifv(As, Bs),
{ del_attr(O, difv) }
; []
).
or_nodesv([], _) --> [].
or_nodesv([O-_|Os], X) -->
( { get_attr(O, difv, nodev(_, Eqs)) } ->
( { Eqs = [LHS=_|_], LHS =@@= X } ->
{ eqs_lefts_rightsv(Eqs, As, Bs) },
mydifv(As, Bs),
{ del_attr(O, difv) }
; []
)
; [] % or-node already removed
),
or_nodesv(Os, X).
mydifv([X], [Y]) --> !, difv_if_necessary(X, Y).
mydifv(Xs0, Ys0) -->
{ reverse(Xs0, Xs), reverse(Ys0, Ys), % follow original order
X =.. [f|Xs], Y =.. [f|Ys] },
difv_if_necessary(X, Y).
difv_if_necessary(X, Y) -->
( { difv_unifiable(X, Y, _) } ->
[difv(X,Y)]
; []
).
eqs_lefts_rightsv([], [], []).
eqs_lefts_rightsv([A=B|ABs], [A|As], [B|Bs]) :-
eqs_lefts_rightsv(ABs, As, Bs).
%% type_size( ?VALUE1, :PRED1000VALUE2) is semidet.
%
% Type Size.
%
type_size(C,S):-a(completeExtentEnumerable,C),!,setof(E,call_u(t(C,E)),L),length(L,S).
type_size(C,1000000):-a(ttExpressionType,C),!.
type_size(_,1000).
/*
?- Z #=:= 2 + X, Z #< 2 .
succ(succ(0)).
S2I
I2E
2
2
2
E2S
S = succ/1.
I = integer
E = 2
a:p(1).
a:p(X):-b:p(X).
b:p(X):-c:p(X).
b:p(2).
*/
%% comp_type( ?Comp, ?Col1, ?Col2) is semidet.
%
% Comp Type.
%
comp_type(Comp,Col1,Col2):-type_size(Col1,S1),type_size(Col2,S2),compare(Comp,S1,S2).
:- fixup_exports.
mpred_type_constraints_file.
%% goal_expansion( ?LC, ?LCOO) is semidet.
%
% Hook To [system:goal_expansion/2] For Module Mpred_type_constraints.
% Goal Expansion.
%
% system:goal_expansion(G,O):- \+ current_prolog_flag(xref,true),\+ pldoc_loading, nonvar(G),boxlog_goal_expansion(G,O).
| TeamSPoon/logicmoo_workspace | packs_sys/logicmoo_base/prolog/logicmoo/typesystem/mpred_type_constraints.pl | Perl | mit | 59,266 |
=pod
=head1 NAME
EC_POINT_new, EC_POINT_free, EC_POINT_clear_free, EC_POINT_copy, EC_POINT_dup, EC_POINT_method_of, EC_POINT_set_to_infinity, EC_POINT_set_Jprojective_coordinates, EC_POINT_get_Jprojective_coordinates_GFp, EC_POINT_set_affine_coordinates_GFp, EC_POINT_get_affine_coordinates_GFp, EC_POINT_set_compressed_coordinates_GFp, EC_POINT_set_affine_coordinates_GF2m, EC_POINT_get_affine_coordinates_GF2m, EC_POINT_set_compressed_coordinates_GF2m, EC_POINT_point2oct, EC_POINT_oct2point, EC_POINT_point2bn, EC_POINT_bn2point, EC_POINT_point2hex, EC_POINT_hex2point - Functions for creating, destroying and manipulating B<EC_POINT> objects.
=head1 SYNOPSIS
#include <openssl/ec.h>
#include <openssl/bn.h>
EC_POINT *EC_POINT_new(const EC_GROUP *group);
void EC_POINT_free(EC_POINT *point);
void EC_POINT_clear_free(EC_POINT *point);
int EC_POINT_copy(EC_POINT *dst, const EC_POINT *src);
EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, BN_CTX *ctx);
int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group,
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx);
int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, int y_bit, BN_CTX *ctx);
int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx);
int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, EC_POINT *p,
const BIGNUM *x, int y_bit, BN_CTX *ctx);
size_t EC_POINT_point2oct(const EC_GROUP *group, const EC_POINT *p,
point_conversion_form_t form,
unsigned char *buf, size_t len, BN_CTX *ctx);
int EC_POINT_oct2point(const EC_GROUP *group, EC_POINT *p,
const unsigned char *buf, size_t len, BN_CTX *ctx);
BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *,
point_conversion_form_t form, BIGNUM *, BN_CTX *);
EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *,
EC_POINT *, BN_CTX *);
char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
point_conversion_form_t form, BN_CTX *);
EC_POINT *EC_POINT_hex2point(const EC_GROUP *, const char *,
EC_POINT *, BN_CTX *);
=head1 DESCRIPTION
An EC_POINT represents a point on a curve. A new point is constructed by calling the function EC_POINT_new and providing the B<group>
object that the point relates to.
EC_POINT_free frees the memory associated with the EC_POINT.
if B<point> is NULL nothing is done.
EC_POINT_clear_free destroys any sensitive data held within the EC_POINT and then frees its memory.
if B<point> is NULL nothing is done.
EC_POINT_copy copies the point B<src> into B<dst>. Both B<src> and B<dst> must use the same EC_METHOD.
EC_POINT_dup creates a new EC_POINT object and copies the content from B<src> to the newly created
EC_POINT object.
EC_POINT_method_of obtains the EC_METHOD associated with B<point>.
A valid point on a curve is the special point at infinity. A point is set to be at infinity by calling EC_POINT_set_to_infinity.
The affine co-ordinates for a point describe a point in terms of its x and y position. The functions
EC_POINT_set_affine_coordinates_GFp and EC_POINT_set_affine_coordinates_GF2m set the B<x> and B<y> co-ordinates for the point
B<p> defined over the curve given in B<group>.
As well as the affine co-ordinates, a point can alternatively be described in terms of its Jacobian
projective co-ordinates (for Fp curves only). Jacobian projective co-ordinates are expressed as three values x, y and z. Working in
this co-ordinate system provides more efficient point multiplication operations.
A mapping exists between Jacobian projective co-ordinates and affine co-ordinates. A Jacobian projective co-ordinate (x, y, z) can be written as an affine co-ordinate as (x/(z^2), y/(z^3)). Conversion to Jacobian projective to affine co-ordinates is simple. The co-ordinate (x, y) is
mapped to (x, y, 1). To set or get the projective co-ordinates use EC_POINT_set_Jprojective_coordinates_GFp and
EC_POINT_get_Jprojective_coordinates_GFp respectively.
Points can also be described in terms of their compressed co-ordinates. For a point (x, y), for any given value for x such that the point is
on the curve there will only ever be two possible values for y. Therefore a point can be set using the EC_POINT_set_compressed_coordinates_GFp
and EC_POINT_set_compressed_coordinates_GF2m functions where B<x> is the x co-ordinate and B<y_bit> is a value 0 or 1 to identify which of
the two possible values for y should be used.
In addition EC_POINTs can be converted to and from various external
representations. Supported representations are octet strings, BIGNUMs and
hexadecimal. Octet strings are stored in a buffer along with an associated
buffer length. A point held in a BIGNUM is calculated by converting the point to
an octet string and then converting that octet string into a BIGNUM integer.
Points in hexadecimal format are stored in a NULL terminated character string
where each character is one of the printable values 0-9 or A-F (or a-f).
The functions EC_POINT_point2oct, EC_POINT_oct2point, EC_POINT_point2bn, EC_POINT_bn2point, EC_POINT_point2hex and EC_POINT_hex2point convert
from and to EC_POINTs for the formats: octet string, BIGNUM and hexadecimal respectively.
The function EC_POINT_point2oct must be supplied with a buffer long enough to store the octet string. The return value provides the number of
octets stored. Calling the function with a NULL buffer will not perform the conversion but will still return the required buffer length.
The function EC_POINT_point2hex will allocate sufficient memory to store the hexadecimal string. It is the caller's responsibility to free
this memory with a subsequent call to OPENSSL_free().
=head1 RETURN VALUES
EC_POINT_new and EC_POINT_dup return the newly allocated EC_POINT or NULL on error.
The following functions return 1 on success or 0 on error: EC_POINT_copy, EC_POINT_set_to_infinity, EC_POINT_set_Jprojective_coordinates_GFp,
EC_POINT_get_Jprojective_coordinates_GFp, EC_POINT_set_affine_coordinates_GFp, EC_POINT_get_affine_coordinates_GFp,
EC_POINT_set_compressed_coordinates_GFp, EC_POINT_set_affine_coordinates_GF2m, EC_POINT_get_affine_coordinates_GF2m,
EC_POINT_set_compressed_coordinates_GF2m and EC_POINT_oct2point.
EC_POINT_method_of returns the EC_METHOD associated with the supplied EC_POINT.
EC_POINT_point2oct returns the length of the required buffer, or 0 on error.
EC_POINT_point2bn returns the pointer to the BIGNUM supplied, or NULL on error.
EC_POINT_bn2point returns the pointer to the EC_POINT supplied, or NULL on error.
EC_POINT_point2hex returns a pointer to the hex string, or NULL on error.
EC_POINT_hex2point returns the pointer to the EC_POINT supplied, or NULL on error.
=head1 SEE ALSO
L<crypto(3)>, L<ec(3)>, L<EC_GROUP_new(3)>, L<EC_GROUP_copy(3)>,
L<EC_POINT_add(3)>, L<EC_KEY_new(3)>,
L<EC_GFp_simple_method(3)>, L<d2i_ECPKParameters(3)>
=cut
| vbloodv/blood | extern/openssl.orig/doc/crypto/EC_POINT_new.pod | Perl | mit | 7,599 |
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file is machine-generated by lib/unicore/mktables from the Unicode
# database, Version 12.1.0. Any changes made here will be lost!
# !!!!!!! INTERNAL PERL USE ONLY !!!!!!!
# This file is for internal use by core Perl only. The format and even the
# name or existence of this file are subject to change without notice. Don't
# use it directly. Use Unicode::UCD to access the Unicode character data
# base.
# The name this swash is to be known by, with the format of the mappings in
# the main body of the table, and what all code points missing from this file
# map to.
$utf8::SwashInfo{'ToAge'}{'format'} = 'f'; # floating point number
$utf8::SwashInfo{'ToAge'}{'missing'} = 'Unassigned';
return <<'END';
0 1F5 1.1
1F6 1F9 3.0
1FA 217 1.1
218 21F 3.0
220 3.2
221 4.0
222 233 3.0
234 236 4.0
237 241 4.1
242 24F 5.0
250 2A8 1.1
2A9 2AD 3.0
2AE 2AF 4.0
2B0 2DE 1.1
2DF 3.0
2E0 2E9 1.1
2EA 2EE 3.0
2EF 2FF 4.0
300 345 1.1
346 34E 3.0
34F 3.2
350 357 4.0
358 35C 4.1
35D 35F 4.0
360 361 1.1
362 3.0
363 36F 3.2
370 373 5.1
374 375 1.1
376 377 5.1
37A 1.1
37B 37D 5.0
37E 1.1
37F 7.0
384 38A 1.1
38C 1.1
38E 3A1 1.1
3A3 3CE 1.1
3CF 5.1
3D0 3D6 1.1
3D7 3.0
3D8 3D9 3.2
3DA 1.1
3DB 3.0
3DC 1.1
3DD 3.0
3DE 1.1
3DF 3.0
3E0 1.1
3E1 3.0
3E2 3F3 1.1
3F4 3F5 3.1
3F6 3.2
3F7 3FB 4.0
3FC 3FF 4.1
400 3.0
401 40C 1.1
40D 3.0
40E 44F 1.1
450 3.0
451 45C 1.1
45D 3.0
45E 486 1.1
487 5.1
488 489 3.0
48A 48B 3.2
48C 48F 3.0
490 4C4 1.1
4C5 4C6 3.2
4C7 4C8 1.1
4C9 4CA 3.2
4CB 4CC 1.1
4CD 4CE 3.2
4CF 5.0
4D0 4EB 1.1
4EC 4ED 3.0
4EE 4F5 1.1
4F6 4F7 4.1
4F8 4F9 1.1
4FA 4FF 5.0
500 50F 3.2
510 513 5.0
514 523 5.1
524 525 5.2
526 527 6.0
528 52F 7.0
531 556 1.1
559 55F 1.1
560 11.0
561 587 1.1
588 11.0
589 1.1
58A 3.0
58D 58E 7.0
58F 6.1
591 5A1 2.0
5A2 4.1
5A3 5AF 2.0
5B0 5B9 1.1
5BA 5.0
5BB 5C3 1.1
5C4 2.0
5C5 5C7 4.1
5D0 5EA 1.1
5EF 11.0
5F0 5F4 1.1
600 603 4.0
604 6.1
605 7.0
606 60A 5.1
60B 4.1
60C 1.1
60D 615 4.0
616 61A 5.1
61B 1.1
61C 6.3
61E 4.1
61F 1.1
620 6.0
621 63A 1.1
63B 63F 5.1
640 652 1.1
653 655 3.0
656 658 4.0
659 65E 4.1
65F 6.0
660 66D 1.1
66E 66F 3.2
670 6B7 1.1
6B8 6B9 3.0
6BA 6BE 1.1
6BF 3.0
6C0 6CE 1.1
6CF 3.0
6D0 6ED 1.1
6EE 6EF 4.0
6F0 6F9 1.1
6FA 6FE 3.0
6FF 4.0
700 70D 3.0
70F 72C 3.0
72D 72F 4.0
730 74A 3.0
74D 74F 4.0
750 76D 4.1
76E 77F 5.1
780 7B0 3.0
7B1 3.2
7C0 7FA 5.0
7FD 7FF 11.0
800 82D 5.2
830 83E 5.2
840 85B 6.0
85E 6.0
860 86A 10.0
8A0 6.1
8A1 7.0
8A2 8AC 6.1
8AD 8B2 7.0
8B3 8B4 8.0
8B6 8BD 9.0
8D3 11.0
8D4 8E2 9.0
8E3 8.0
8E4 8FE 6.1
8FF 7.0
900 5.2
901 903 1.1
904 4.0
905 939 1.1
93A 93B 6.0
93C 94D 1.1
94E 5.2
94F 6.0
950 954 1.1
955 5.2
956 957 6.0
958 970 1.1
971 972 5.1
973 977 6.0
978 7.0
979 97A 5.2
97B 97C 5.0
97D 4.1
97E 97F 5.0
980 7.0
981 983 1.1
985 98C 1.1
98F 990 1.1
993 9A8 1.1
9AA 9B0 1.1
9B2 1.1
9B6 9B9 1.1
9BC 1.1
9BD 4.0
9BE 9C4 1.1
9C7 9C8 1.1
9CB 9CD 1.1
9CE 4.1
9D7 1.1
9DC 9DD 1.1
9DF 9E3 1.1
9E6 9FA 1.1
9FB 5.2
9FC 9FD 10.0
9FE 11.0
A01 4.0
A02 1.1
A03 4.0
A05 A0A 1.1
A0F A10 1.1
A13 A28 1.1
A2A A30 1.1
A32 A33 1.1
A35 A36 1.1
A38 A39 1.1
A3C 1.1
A3E A42 1.1
A47 A48 1.1
A4B A4D 1.1
A51 5.1
A59 A5C 1.1
A5E 1.1
A66 A74 1.1
A75 5.1
A76 11.0
A81 A83 1.1
A85 A8B 1.1
A8C 4.0
A8D 1.1
A8F A91 1.1
A93 AA8 1.1
AAA AB0 1.1
AB2 AB3 1.1
AB5 AB9 1.1
ABC AC5 1.1
AC7 AC9 1.1
ACB ACD 1.1
AD0 1.1
AE0 1.1
AE1 AE3 4.0
AE6 AEF 1.1
AF0 6.1
AF1 4.0
AF9 8.0
AFA AFF 10.0
B01 B03 1.1
B05 B0C 1.1
B0F B10 1.1
B13 B28 1.1
B2A B30 1.1
B32 B33 1.1
B35 4.0
B36 B39 1.1
B3C B43 1.1
B44 5.1
B47 B48 1.1
B4B B4D 1.1
B56 B57 1.1
B5C B5D 1.1
B5F B61 1.1
B62 B63 5.1
B66 B70 1.1
B71 4.0
B72 B77 6.0
B82 B83 1.1
B85 B8A 1.1
B8E B90 1.1
B92 B95 1.1
B99 B9A 1.1
B9C 1.1
B9E B9F 1.1
BA3 BA4 1.1
BA8 BAA 1.1
BAE BB5 1.1
BB6 4.1
BB7 BB9 1.1
BBE BC2 1.1
BC6 BC8 1.1
BCA BCD 1.1
BD0 5.1
BD7 1.1
BE6 4.1
BE7 BF2 1.1
BF3 BFA 4.0
C00 7.0
C01 C03 1.1
C04 11.0
C05 C0C 1.1
C0E C10 1.1
C12 C28 1.1
C2A C33 1.1
C34 7.0
C35 C39 1.1
C3D 5.1
C3E C44 1.1
C46 C48 1.1
C4A C4D 1.1
C55 C56 1.1
C58 C59 5.1
C5A 8.0
C60 C61 1.1
C62 C63 5.1
C66 C6F 1.1
C77 12.0
C78 C7F 5.1
C80 9.0
C81 7.0
C82 C83 1.1
C84 11.0
C85 C8C 1.1
C8E C90 1.1
C92 CA8 1.1
CAA CB3 1.1
CB5 CB9 1.1
CBC CBD 4.0
CBE CC4 1.1
CC6 CC8 1.1
CCA CCD 1.1
CD5 CD6 1.1
CDE 1.1
CE0 CE1 1.1
CE2 CE3 5.0
CE6 CEF 1.1
CF1 CF2 5.0
D00 10.0
D01 7.0
D02 D03 1.1
D05 D0C 1.1
D0E D10 1.1
D12 D28 1.1
D29 6.0
D2A D39 1.1
D3A 6.0
D3B D3C 10.0
D3D 5.1
D3E D43 1.1
D44 5.1
D46 D48 1.1
D4A D4D 1.1
D4E 6.0
D4F 9.0
D54 D56 9.0
D57 1.1
D58 D5E 9.0
D5F 8.0
D60 D61 1.1
D62 D63 5.1
D66 D6F 1.1
D70 D75 5.1
D76 D78 9.0
D79 D7F 5.1
D82 D83 3.0
D85 D96 3.0
D9A DB1 3.0
DB3 DBB 3.0
DBD 3.0
DC0 DC6 3.0
DCA 3.0
DCF DD4 3.0
DD6 3.0
DD8 DDF 3.0
DE6 DEF 7.0
DF2 DF4 3.0
E01 E3A 1.1
E3F E5B 1.1
E81 E82 1.1
E84 1.1
E86 12.0
E87 E88 1.1
E89 12.0
E8A 1.1
E8C 12.0
E8D 1.1
E8E E93 12.0
E94 E97 1.1
E98 12.0
E99 E9F 1.1
EA0 12.0
EA1 EA3 1.1
EA5 1.1
EA7 1.1
EA8 EA9 12.0
EAA EAB 1.1
EAC 12.0
EAD EB9 1.1
EBA 12.0
EBB EBD 1.1
EC0 EC4 1.1
EC6 1.1
EC8 ECD 1.1
ED0 ED9 1.1
EDC EDD 1.1
EDE EDF 6.1
F00 F47 2.0
F49 F69 2.0
F6A 3.0
F6B F6C 5.1
F71 F8B 2.0
F8C F8F 6.0
F90 F95 2.0
F96 3.0
F97 2.0
F99 FAD 2.0
FAE FB0 3.0
FB1 FB7 2.0
FB8 3.0
FB9 2.0
FBA FBC 3.0
FBE FCC 3.0
FCE 5.1
FCF 3.0
FD0 FD1 4.1
FD2 FD4 5.1
FD5 FD8 5.2
FD9 FDA 6.0
1000 1021 3.0
1022 5.1
1023 1027 3.0
1028 5.1
1029 102A 3.0
102B 5.1
102C 1032 3.0
1033 1035 5.1
1036 1039 3.0
103A 103F 5.1
1040 1059 3.0
105A 1099 5.1
109A 109D 5.2
109E 109F 5.1
10A0 10C5 1.1
10C7 6.1
10CD 6.1
10D0 10F6 1.1
10F7 10F8 3.2
10F9 10FA 4.1
10FB 1.1
10FC 4.1
10FD 10FF 6.1
1100 1159 1.1
115A 115E 5.2
115F 11A2 1.1
11A3 11A7 5.2
11A8 11F9 1.1
11FA 11FF 5.2
1200 1206 3.0
1207 4.1
1208 1246 3.0
1247 4.1
1248 3.0
124A 124D 3.0
1250 1256 3.0
1258 3.0
125A 125D 3.0
1260 1286 3.0
1287 4.1
1288 3.0
128A 128D 3.0
1290 12AE 3.0
12AF 4.1
12B0 3.0
12B2 12B5 3.0
12B8 12BE 3.0
12C0 3.0
12C2 12C5 3.0
12C8 12CE 3.0
12CF 4.1
12D0 12D6 3.0
12D8 12EE 3.0
12EF 4.1
12F0 130E 3.0
130F 4.1
1310 3.0
1312 1315 3.0
1318 131E 3.0
131F 4.1
1320 1346 3.0
1347 4.1
1348 135A 3.0
135D 135E 6.0
135F 1360 4.1
1361 137C 3.0
1380 1399 4.1
13A0 13F4 3.0
13F5 8.0
13F8 13FD 8.0
1400 5.2
1401 1676 3.0
1677 167F 5.2
1680 169C 3.0
16A0 16F0 3.0
16F1 16F8 7.0
1700 170C 3.2
170E 1714 3.2
1720 1736 3.2
1740 1753 3.2
1760 176C 3.2
176E 1770 3.2
1772 1773 3.2
1780 17DC 3.0
17DD 4.0
17E0 17E9 3.0
17F0 17F9 4.0
1800 180E 3.0
1810 1819 3.0
1820 1877 3.0
1878 11.0
1880 18A9 3.0
18AA 5.1
18B0 18F5 5.2
1900 191C 4.0
191D 191E 7.0
1920 192B 4.0
1930 193B 4.0
1940 4.0
1944 196D 4.0
1970 1974 4.0
1980 19A9 4.1
19AA 19AB 5.2
19B0 19C9 4.1
19D0 19D9 4.1
19DA 5.2
19DE 19DF 4.1
19E0 19FF 4.0
1A00 1A1B 4.1
1A1E 1A1F 4.1
1A20 1A5E 5.2
1A60 1A7C 5.2
1A7F 1A89 5.2
1A90 1A99 5.2
1AA0 1AAD 5.2
1AB0 1ABE 7.0
1B00 1B4B 5.0
1B50 1B7C 5.0
1B80 1BAA 5.1
1BAB 1BAD 6.1
1BAE 1BB9 5.1
1BBA 1BBF 6.1
1BC0 1BF3 6.0
1BFC 1BFF 6.0
1C00 1C37 5.1
1C3B 1C49 5.1
1C4D 1C7F 5.1
1C80 1C88 9.0
1C90 1CBA 11.0
1CBD 1CBF 11.0
1CC0 1CC7 6.1
1CD0 1CF2 5.2
1CF3 1CF6 6.1
1CF7 10.0
1CF8 1CF9 7.0
1CFA 12.0
1D00 1D6B 4.0
1D6C 1DC3 4.1
1DC4 1DCA 5.0
1DCB 1DE6 5.1
1DE7 1DF5 7.0
1DF6 1DF9 10.0
1DFB 9.0
1DFC 6.0
1DFD 5.2
1DFE 1DFF 5.0
1E00 1E9A 1.1
1E9B 2.0
1E9C 1E9F 5.1
1EA0 1EF9 1.1
1EFA 1EFF 5.1
1F00 1F15 1.1
1F18 1F1D 1.1
1F20 1F45 1.1
1F48 1F4D 1.1
1F50 1F57 1.1
1F59 1.1
1F5B 1.1
1F5D 1.1
1F5F 1F7D 1.1
1F80 1FB4 1.1
1FB6 1FC4 1.1
1FC6 1FD3 1.1
1FD6 1FDB 1.1
1FDD 1FEF 1.1
1FF2 1FF4 1.1
1FF6 1FFE 1.1
2000 202E 1.1
202F 3.0
2030 2046 1.1
2047 3.2
2048 204D 3.0
204E 2052 3.2
2053 2054 4.0
2055 2056 4.1
2057 3.2
2058 205E 4.1
205F 2063 3.2
2064 5.1
2066 2069 6.3
206A 2070 1.1
2071 3.2
2074 208E 1.1
2090 2094 4.1
2095 209C 6.0
20A0 20AA 1.1
20AB 2.0
20AC 2.1
20AD 20AF 3.0
20B0 20B1 3.2
20B2 20B5 4.1
20B6 20B8 5.2
20B9 6.0
20BA 6.2
20BB 20BD 7.0
20BE 8.0
20BF 10.0
20D0 20E1 1.1
20E2 20E3 3.0
20E4 20EA 3.2
20EB 4.1
20EC 20EF 5.0
20F0 5.1
2100 2138 1.1
2139 213A 3.0
213B 4.0
213C 4.1
213D 214B 3.2
214C 4.1
214D 214E 5.0
214F 5.1
2150 2152 5.2
2153 2182 1.1
2183 3.0
2184 5.0
2185 2188 5.1
2189 5.2
218A 218B 8.0
2190 21EA 1.1
21EB 21F3 3.0
21F4 21FF 3.2
2200 22F1 1.1
22F2 22FF 3.2
2300 1.1
2301 3.0
2302 237A 1.1
237B 3.0
237C 3.2
237D 239A 3.0
239B 23CE 3.2
23CF 23D0 4.0
23D1 23DB 4.1
23DC 23E7 5.0
23E8 5.2
23E9 23F3 6.0
23F4 23FA 7.0
23FB 23FE 9.0
23FF 10.0
2400 2424 1.1
2425 2426 3.0
2440 244A 1.1
2460 24EA 1.1
24EB 24FE 3.2
24FF 4.0
2500 2595 1.1
2596 259F 3.2
25A0 25EF 1.1
25F0 25F7 3.0
25F8 25FF 3.2
2600 2613 1.1
2614 2615 4.0
2616 2617 3.2
2618 4.1
2619 3.0
261A 266F 1.1
2670 2671 3.0
2672 267D 3.2
267E 267F 4.1
2680 2689 3.2
268A 2691 4.0
2692 269C 4.1
269D 5.1
269E 269F 5.2
26A0 26A1 4.0
26A2 26B1 4.1
26B2 5.0
26B3 26BC 5.1
26BD 26BF 5.2
26C0 26C3 5.1
26C4 26CD 5.2
26CE 6.0
26CF 26E1 5.2
26E2 6.0
26E3 5.2
26E4 26E7 6.0
26E8 26FF 5.2
2700 7.0
2701 2704 1.1
2705 6.0
2706 2709 1.1
270A 270B 6.0
270C 2727 1.1
2728 6.0
2729 274B 1.1
274C 6.0
274D 1.1
274E 6.0
274F 2752 1.1
2753 2755 6.0
2756 1.1
2757 5.2
2758 275E 1.1
275F 2760 6.0
2761 2767 1.1
2768 2775 3.2
2776 2794 1.1
2795 2797 6.0
2798 27AF 1.1
27B0 6.0
27B1 27BE 1.1
27BF 6.0
27C0 27C6 4.1
27C7 27CA 5.0
27CB 6.1
27CC 5.1
27CD 6.1
27CE 27CF 6.0
27D0 27EB 3.2
27EC 27EF 5.1
27F0 27FF 3.2
2800 28FF 3.0
2900 2AFF 3.2
2B00 2B0D 4.0
2B0E 2B13 4.1
2B14 2B1A 5.0
2B1B 2B1F 5.1
2B20 2B23 5.0
2B24 2B4C 5.1
2B4D 2B4F 7.0
2B50 2B54 5.1
2B55 2B59 5.2
2B5A 2B73 7.0
2B76 2B95 7.0
2B98 2BB9 7.0
2BBA 2BBC 11.0
2BBD 2BC8 7.0
2BC9 12.0
2BCA 2BD1 7.0
2BD2 10.0
2BD3 2BEB 11.0
2BEC 2BEF 8.0
2BF0 2BFE 11.0
2BFF 12.0
2C00 2C2E 4.1
2C30 2C5E 4.1
2C60 2C6C 5.0
2C6D 2C6F 5.1
2C70 5.2
2C71 2C73 5.1
2C74 2C77 5.0
2C78 2C7D 5.1
2C7E 2C7F 5.2
2C80 2CEA 4.1
2CEB 2CF1 5.2
2CF2 2CF3 6.1
2CF9 2D25 4.1
2D27 6.1
2D2D 6.1
2D30 2D65 4.1
2D66 2D67 6.1
2D6F 4.1
2D70 6.0
2D7F 6.0
2D80 2D96 4.1
2DA0 2DA6 4.1
2DA8 2DAE 4.1
2DB0 2DB6 4.1
2DB8 2DBE 4.1
2DC0 2DC6 4.1
2DC8 2DCE 4.1
2DD0 2DD6 4.1
2DD8 2DDE 4.1
2DE0 2DFF 5.1
2E00 2E17 4.1
2E18 2E1B 5.1
2E1C 2E1D 4.1
2E1E 2E30 5.1
2E31 5.2
2E32 2E3B 6.1
2E3C 2E42 7.0
2E43 2E44 9.0
2E45 2E49 10.0
2E4A 2E4E 11.0
2E4F 12.0
2E80 2E99 3.0
2E9B 2EF3 3.0
2F00 2FD5 3.0
2FF0 2FFB 3.0
3000 3037 1.1
3038 303A 3.0
303B 303D 3.2
303E 3.0
303F 1.1
3041 3094 1.1
3095 3096 3.2
3099 309E 1.1
309F 30A0 3.2
30A1 30FE 1.1
30FF 3.2
3105 312C 1.1
312D 5.1
312E 10.0
312F 11.0
3131 318E 1.1
3190 319F 1.1
31A0 31B7 3.0
31B8 31BA 6.0
31C0 31CF 4.1
31D0 31E3 5.1
31F0 31FF 3.2
3200 321C 1.1
321D 321E 4.0
3220 3243 1.1
3244 324F 5.2
3250 4.0
3251 325F 3.2
3260 327B 1.1
327C 327D 4.0
327E 4.1
327F 32B0 1.1
32B1 32BF 3.2
32C0 32CB 1.1
32CC 32CF 4.0
32D0 32FE 1.1
32FF 12.1
3300 3376 1.1
3377 337A 4.0
337B 33DD 1.1
33DE 33DF 4.0
33E0 33FE 1.1
33FF 4.0
3400 4DB5 3.0
4DC0 4DFF 4.0
4E00 9FA5 1.1
9FA6 9FBB 4.1
9FBC 9FC3 5.1
9FC4 9FCB 5.2
9FCC 6.1
9FCD 9FD5 8.0
9FD6 9FEA 10.0
9FEB 9FEF 11.0
A000 A48C 3.0
A490 A4A1 3.0
A4A2 A4A3 3.2
A4A4 A4B3 3.0
A4B4 3.2
A4B5 A4C0 3.0
A4C1 3.2
A4C2 A4C4 3.0
A4C5 3.2
A4C6 3.0
A4D0 A4FF 5.2
A500 A62B 5.1
A640 A65F 5.1
A660 A661 6.0
A662 A673 5.1
A674 A67B 6.1
A67C A697 5.1
A698 A69D 7.0
A69E 8.0
A69F 6.1
A6A0 A6F7 5.2
A700 A716 4.1
A717 A71A 5.0
A71B A71F 5.1
A720 A721 5.0
A722 A78C 5.1
A78D A78E 6.0
A78F 8.0
A790 A791 6.0
A792 A793 6.1
A794 A79F 7.0
A7A0 A7A9 6.0
A7AA 6.1
A7AB A7AD 7.0
A7AE 9.0
A7AF 11.0
A7B0 A7B1 7.0
A7B2 A7B7 8.0
A7B8 A7B9 11.0
A7BA A7BF 12.0
A7C2 A7C6 12.0
A7F7 7.0
A7F8 A7F9 6.1
A7FA 6.0
A7FB A7FF 5.1
A800 A82B 4.1
A830 A839 5.2
A840 A877 5.0
A880 A8C4 5.1
A8C5 9.0
A8CE A8D9 5.1
A8E0 A8FB 5.2
A8FC A8FD 8.0
A8FE A8FF 11.0
A900 A953 5.1
A95F 5.1
A960 A97C 5.2
A980 A9CD 5.2
A9CF A9D9 5.2
A9DE A9DF 5.2
A9E0 A9FE 7.0
AA00 AA36 5.1
AA40 AA4D 5.1
AA50 AA59 5.1
AA5C AA5F 5.1
AA60 AA7B 5.2
AA7C AA7F 7.0
AA80 AAC2 5.2
AADB AADF 5.2
AAE0 AAF6 6.1
AB01 AB06 6.0
AB09 AB0E 6.0
AB11 AB16 6.0
AB20 AB26 6.0
AB28 AB2E 6.0
AB30 AB5F 7.0
AB60 AB63 8.0
AB64 AB65 7.0
AB66 AB67 12.0
AB70 ABBF 8.0
ABC0 ABED 5.2
ABF0 ABF9 5.2
AC00 D7A3 2.0
D7B0 D7C6 5.2
D7CB D7FB 5.2
D800 DFFF 2.0
E000 FA2D 1.1
FA2E FA2F 6.1
FA30 FA6A 3.2
FA6B FA6D 5.2
FA70 FAD9 4.1
FB00 FB06 1.1
FB13 FB17 1.1
FB1D 3.0
FB1E FB36 1.1
FB38 FB3C 1.1
FB3E 1.1
FB40 FB41 1.1
FB43 FB44 1.1
FB46 FBB1 1.1
FBB2 FBC1 6.0
FBD3 FD3F 1.1
FD50 FD8F 1.1
FD92 FDC7 1.1
FDD0 FDEF 3.1
FDF0 FDFB 1.1
FDFC 3.2
FDFD 4.0
FE00 FE0F 3.2
FE10 FE19 4.1
FE20 FE23 1.1
FE24 FE26 5.1
FE27 FE2D 7.0
FE2E FE2F 8.0
FE30 FE44 1.1
FE45 FE46 3.2
FE47 FE48 4.0
FE49 FE52 1.1
FE54 FE66 1.1
FE68 FE6B 1.1
FE70 FE72 1.1
FE73 3.2
FE74 1.1
FE76 FEFC 1.1
FEFF 1.1
FF01 FF5E 1.1
FF5F FF60 3.2
FF61 FFBE 1.1
FFC2 FFC7 1.1
FFCA FFCF 1.1
FFD2 FFD7 1.1
FFDA FFDC 1.1
FFE0 FFE6 1.1
FFE8 FFEE 1.1
FFF9 FFFB 3.0
FFFC 2.1
FFFD FFFF 1.1
10000 1000B 4.0
1000D 10026 4.0
10028 1003A 4.0
1003C 1003D 4.0
1003F 1004D 4.0
10050 1005D 4.0
10080 100FA 4.0
10100 10102 4.0
10107 10133 4.0
10137 1013F 4.0
10140 1018A 4.1
1018B 1018C 7.0
1018D 1018E 9.0
10190 1019B 5.1
101A0 7.0
101D0 101FD 5.1
10280 1029C 5.1
102A0 102D0 5.1
102E0 102FB 7.0
10300 1031E 3.1
1031F 7.0
10320 10323 3.1
1032D 1032F 10.0
10330 1034A 3.1
10350 1037A 7.0
10380 1039D 4.0
1039F 4.0
103A0 103C3 4.1
103C8 103D5 4.1
10400 10425 3.1
10426 10427 4.0
10428 1044D 3.1
1044E 1049D 4.0
104A0 104A9 4.0
104B0 104D3 9.0
104D8 104FB 9.0
10500 10527 7.0
10530 10563 7.0
1056F 7.0
10600 10736 7.0
10740 10755 7.0
10760 10767 7.0
10800 10805 4.0
10808 4.0
1080A 10835 4.0
10837 10838 4.0
1083C 4.0
1083F 4.0
10840 10855 5.2
10857 1085F 5.2
10860 1089E 7.0
108A7 108AF 7.0
108E0 108F2 8.0
108F4 108F5 8.0
108FB 108FF 8.0
10900 10919 5.0
1091A 1091B 5.2
1091F 5.0
10920 10939 5.1
1093F 5.1
10980 109B7 6.1
109BC 109BD 8.0
109BE 109BF 6.1
109C0 109CF 8.0
109D2 109FF 8.0
10A00 10A03 4.1
10A05 10A06 4.1
10A0C 10A13 4.1
10A15 10A17 4.1
10A19 10A33 4.1
10A34 10A35 11.0
10A38 10A3A 4.1
10A3F 10A47 4.1
10A48 11.0
10A50 10A58 4.1
10A60 10A7F 5.2
10A80 10A9F 7.0
10AC0 10AE6 7.0
10AEB 10AF6 7.0
10B00 10B35 5.2
10B39 10B55 5.2
10B58 10B72 5.2
10B78 10B7F 5.2
10B80 10B91 7.0
10B99 10B9C 7.0
10BA9 10BAF 7.0
10C00 10C48 5.2
10C80 10CB2 8.0
10CC0 10CF2 8.0
10CFA 10CFF 8.0
10D00 10D27 11.0
10D30 10D39 11.0
10E60 10E7E 5.2
10F00 10F27 11.0
10F30 10F59 11.0
10FE0 10FF6 12.0
11000 1104D 6.0
11052 1106F 6.0
1107F 7.0
11080 110C1 5.2
110CD 11.0
110D0 110E8 6.1
110F0 110F9 6.1
11100 11134 6.1
11136 11143 6.1
11144 11146 11.0
11150 11176 7.0
11180 111C8 6.1
111C9 111CC 8.0
111CD 7.0
111D0 111D9 6.1
111DA 7.0
111DB 111DF 8.0
111E1 111F4 7.0
11200 11211 7.0
11213 1123D 7.0
1123E 9.0
11280 11286 8.0
11288 8.0
1128A 1128D 8.0
1128F 1129D 8.0
1129F 112A9 8.0
112B0 112EA 7.0
112F0 112F9 7.0
11300 8.0
11301 11303 7.0
11305 1130C 7.0
1130F 11310 7.0
11313 11328 7.0
1132A 11330 7.0
11332 11333 7.0
11335 11339 7.0
1133B 11.0
1133C 11344 7.0
11347 11348 7.0
1134B 1134D 7.0
11350 8.0
11357 7.0
1135D 11363 7.0
11366 1136C 7.0
11370 11374 7.0
11400 11459 9.0
1145B 9.0
1145D 9.0
1145E 11.0
1145F 12.0
11480 114C7 7.0
114D0 114D9 7.0
11580 115B5 7.0
115B8 115C9 7.0
115CA 115DD 8.0
11600 11644 7.0
11650 11659 7.0
11660 1166C 9.0
11680 116B7 6.1
116B8 12.0
116C0 116C9 6.1
11700 11719 8.0
1171A 11.0
1171D 1172B 8.0
11730 1173F 8.0
11800 1183B 11.0
118A0 118F2 7.0
118FF 7.0
119A0 119A7 12.0
119AA 119D7 12.0
119DA 119E4 12.0
11A00 11A47 10.0
11A50 11A83 10.0
11A84 11A85 12.0
11A86 11A9C 10.0
11A9D 11.0
11A9E 11AA2 10.0
11AC0 11AF8 7.0
11C00 11C08 9.0
11C0A 11C36 9.0
11C38 11C45 9.0
11C50 11C6C 9.0
11C70 11C8F 9.0
11C92 11CA7 9.0
11CA9 11CB6 9.0
11D00 11D06 10.0
11D08 11D09 10.0
11D0B 11D36 10.0
11D3A 10.0
11D3C 11D3D 10.0
11D3F 11D47 10.0
11D50 11D59 10.0
11D60 11D65 11.0
11D67 11D68 11.0
11D6A 11D8E 11.0
11D90 11D91 11.0
11D93 11D98 11.0
11DA0 11DA9 11.0
11EE0 11EF8 11.0
11FC0 11FF1 12.0
11FFF 12.0
12000 1236E 5.0
1236F 12398 7.0
12399 8.0
12400 12462 5.0
12463 1246E 7.0
12470 12473 5.0
12474 7.0
12480 12543 8.0
13000 1342E 5.2
13430 13438 12.0
14400 14646 8.0
16800 16A38 6.0
16A40 16A5E 7.0
16A60 16A69 7.0
16A6E 16A6F 7.0
16AD0 16AED 7.0
16AF0 16AF5 7.0
16B00 16B45 7.0
16B50 16B59 7.0
16B5B 16B61 7.0
16B63 16B77 7.0
16B7D 16B8F 7.0
16E40 16E9A 11.0
16F00 16F44 6.1
16F45 16F4A 12.0
16F4F 12.0
16F50 16F7E 6.1
16F7F 16F87 12.0
16F8F 16F9F 6.1
16FE0 9.0
16FE1 10.0
16FE2 16FE3 12.0
17000 187EC 9.0
187ED 187F1 11.0
187F2 187F7 12.0
18800 18AF2 9.0
1B000 1B001 6.0
1B002 1B11E 10.0
1B150 1B152 12.0
1B164 1B167 12.0
1B170 1B2FB 10.0
1BC00 1BC6A 7.0
1BC70 1BC7C 7.0
1BC80 1BC88 7.0
1BC90 1BC99 7.0
1BC9C 1BCA3 7.0
1D000 1D0F5 3.1
1D100 1D126 3.1
1D129 5.1
1D12A 1D1DD 3.1
1D1DE 1D1E8 8.0
1D200 1D245 4.1
1D2E0 1D2F3 11.0
1D300 1D356 4.0
1D360 1D371 5.0
1D372 1D378 11.0
1D400 1D454 3.1
1D456 1D49C 3.1
1D49E 1D49F 3.1
1D4A2 3.1
1D4A5 1D4A6 3.1
1D4A9 1D4AC 3.1
1D4AE 1D4B9 3.1
1D4BB 3.1
1D4BD 1D4C0 3.1
1D4C1 4.0
1D4C2 1D4C3 3.1
1D4C5 1D505 3.1
1D507 1D50A 3.1
1D50D 1D514 3.1
1D516 1D51C 3.1
1D51E 1D539 3.1
1D53B 1D53E 3.1
1D540 1D544 3.1
1D546 3.1
1D54A 1D550 3.1
1D552 1D6A3 3.1
1D6A4 1D6A5 4.1
1D6A8 1D7C9 3.1
1D7CA 1D7CB 5.0
1D7CE 1D7FF 3.1
1D800 1DA8B 8.0
1DA9B 1DA9F 8.0
1DAA1 1DAAF 8.0
1E000 1E006 9.0
1E008 1E018 9.0
1E01B 1E021 9.0
1E023 1E024 9.0
1E026 1E02A 9.0
1E100 1E12C 12.0
1E130 1E13D 12.0
1E140 1E149 12.0
1E14E 1E14F 12.0
1E2C0 1E2F9 12.0
1E2FF 12.0
1E800 1E8C4 7.0
1E8C7 1E8D6 7.0
1E900 1E94A 9.0
1E94B 12.0
1E950 1E959 9.0
1E95E 1E95F 9.0
1EC71 1ECB4 11.0
1ED01 1ED3D 12.0
1EE00 1EE03 6.1
1EE05 1EE1F 6.1
1EE21 1EE22 6.1
1EE24 6.1
1EE27 6.1
1EE29 1EE32 6.1
1EE34 1EE37 6.1
1EE39 6.1
1EE3B 6.1
1EE42 6.1
1EE47 6.1
1EE49 6.1
1EE4B 6.1
1EE4D 1EE4F 6.1
1EE51 1EE52 6.1
1EE54 6.1
1EE57 6.1
1EE59 6.1
1EE5B 6.1
1EE5D 6.1
1EE5F 6.1
1EE61 1EE62 6.1
1EE64 6.1
1EE67 1EE6A 6.1
1EE6C 1EE72 6.1
1EE74 1EE77 6.1
1EE79 1EE7C 6.1
1EE7E 6.1
1EE80 1EE89 6.1
1EE8B 1EE9B 6.1
1EEA1 1EEA3 6.1
1EEA5 1EEA9 6.1
1EEAB 1EEBB 6.1
1EEF0 1EEF1 6.1
1F000 1F02B 5.1
1F030 1F093 5.1
1F0A0 1F0AE 6.0
1F0B1 1F0BE 6.0
1F0BF 7.0
1F0C1 1F0CF 6.0
1F0D1 1F0DF 6.0
1F0E0 1F0F5 7.0
1F100 1F10A 5.2
1F10B 1F10C 7.0
1F110 1F12E 5.2
1F12F 11.0
1F130 6.0
1F131 5.2
1F132 1F13C 6.0
1F13D 5.2
1F13E 6.0
1F13F 5.2
1F140 1F141 6.0
1F142 5.2
1F143 1F145 6.0
1F146 5.2
1F147 1F149 6.0
1F14A 1F14E 5.2
1F14F 1F156 6.0
1F157 5.2
1F158 1F15E 6.0
1F15F 5.2
1F160 1F169 6.0
1F16A 1F16B 6.1
1F16C 12.0
1F170 1F178 6.0
1F179 5.2
1F17A 6.0
1F17B 1F17C 5.2
1F17D 1F17E 6.0
1F17F 5.2
1F180 1F189 6.0
1F18A 1F18D 5.2
1F18E 1F18F 6.0
1F190 5.2
1F191 1F19A 6.0
1F19B 1F1AC 9.0
1F1E6 1F1FF 6.0
1F200 5.2
1F201 1F202 6.0
1F210 1F231 5.2
1F232 1F23A 6.0
1F23B 9.0
1F240 1F248 5.2
1F250 1F251 6.0
1F260 1F265 10.0
1F300 1F320 6.0
1F321 1F32C 7.0
1F32D 1F32F 8.0
1F330 1F335 6.0
1F336 7.0
1F337 1F37C 6.0
1F37D 7.0
1F37E 1F37F 8.0
1F380 1F393 6.0
1F394 1F39F 7.0
1F3A0 1F3C4 6.0
1F3C5 7.0
1F3C6 1F3CA 6.0
1F3CB 1F3CE 7.0
1F3CF 1F3D3 8.0
1F3D4 1F3DF 7.0
1F3E0 1F3F0 6.0
1F3F1 1F3F7 7.0
1F3F8 1F3FF 8.0
1F400 1F43E 6.0
1F43F 7.0
1F440 6.0
1F441 7.0
1F442 1F4F7 6.0
1F4F8 7.0
1F4F9 1F4FC 6.0
1F4FD 1F4FE 7.0
1F4FF 8.0
1F500 1F53D 6.0
1F53E 1F53F 7.0
1F540 1F543 6.1
1F544 1F54A 7.0
1F54B 1F54F 8.0
1F550 1F567 6.0
1F568 1F579 7.0
1F57A 9.0
1F57B 1F5A3 7.0
1F5A4 9.0
1F5A5 1F5FA 7.0
1F5FB 1F5FF 6.0
1F600 6.1
1F601 1F610 6.0
1F611 6.1
1F612 1F614 6.0
1F615 6.1
1F616 6.0
1F617 6.1
1F618 6.0
1F619 6.1
1F61A 6.0
1F61B 6.1
1F61C 1F61E 6.0
1F61F 6.1
1F620 1F625 6.0
1F626 1F627 6.1
1F628 1F62B 6.0
1F62C 6.1
1F62D 6.0
1F62E 1F62F 6.1
1F630 1F633 6.0
1F634 6.1
1F635 1F640 6.0
1F641 1F642 7.0
1F643 1F644 8.0
1F645 1F64F 6.0
1F650 1F67F 7.0
1F680 1F6C5 6.0
1F6C6 1F6CF 7.0
1F6D0 8.0
1F6D1 1F6D2 9.0
1F6D3 1F6D4 10.0
1F6D5 12.0
1F6E0 1F6EC 7.0
1F6F0 1F6F3 7.0
1F6F4 1F6F6 9.0
1F6F7 1F6F8 10.0
1F6F9 11.0
1F6FA 12.0
1F700 1F773 6.0
1F780 1F7D4 7.0
1F7D5 1F7D8 11.0
1F7E0 1F7EB 12.0
1F800 1F80B 7.0
1F810 1F847 7.0
1F850 1F859 7.0
1F860 1F887 7.0
1F890 1F8AD 7.0
1F900 1F90B 10.0
1F90D 1F90F 12.0
1F910 1F918 8.0
1F919 1F91E 9.0
1F91F 10.0
1F920 1F927 9.0
1F928 1F92F 10.0
1F930 9.0
1F931 1F932 10.0
1F933 1F93E 9.0
1F93F 12.0
1F940 1F94B 9.0
1F94C 10.0
1F94D 1F94F 11.0
1F950 1F95E 9.0
1F95F 1F96B 10.0
1F96C 1F970 11.0
1F971 12.0
1F973 1F976 11.0
1F97A 11.0
1F97B 12.0
1F97C 1F97F 11.0
1F980 1F984 8.0
1F985 1F991 9.0
1F992 1F997 10.0
1F998 1F9A2 11.0
1F9A5 1F9AA 12.0
1F9AE 1F9AF 12.0
1F9B0 1F9B9 11.0
1F9BA 1F9BF 12.0
1F9C0 8.0
1F9C1 1F9C2 11.0
1F9C3 1F9CA 12.0
1F9CD 1F9CF 12.0
1F9D0 1F9E6 10.0
1F9E7 1F9FF 11.0
1FA00 1FA53 12.0
1FA60 1FA6D 11.0
1FA70 1FA73 12.0
1FA78 1FA7A 12.0
1FA80 1FA82 12.0
1FA90 1FA95 12.0
1FFFE 1FFFF 2.0
20000 2A6D6 3.1
2A700 2B734 5.2
2B740 2B81D 6.0
2B820 2CEA1 8.0
2CEB0 2EBE0 10.0
2F800 2FA1D 3.1
2FFFE 2FFFF 2.0
3FFFE 3FFFF 2.0
4FFFE 4FFFF 2.0
5FFFE 5FFFF 2.0
6FFFE 6FFFF 2.0
7FFFE 7FFFF 2.0
8FFFE 8FFFF 2.0
9FFFE 9FFFF 2.0
AFFFE AFFFF 2.0
BFFFE BFFFF 2.0
CFFFE CFFFF 2.0
DFFFE DFFFF 2.0
E0001 3.1
E0020 E007F 3.1
E0100 E01EF 4.0
EFFFE 10FFFF 2.0
END
| operepo/ope | client_tools/svc/rc/usr/share/perl5/core_perl/unicore/To/Age.pl | Perl | mit | 21,000 |
# Copyright 2020, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package Google::Ads::GoogleAds::V9::Services::ThirdPartyAppAnalyticsLinkService::RegenerateShareableLinkIdResponse;
use strict;
use warnings;
use base qw(Google::Ads::GoogleAds::BaseEntity);
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
sub new {
my ($class, $args) = @_;
my $self = {};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
| googleads/google-ads-perl | lib/Google/Ads/GoogleAds/V9/Services/ThirdPartyAppAnalyticsLinkService/RegenerateShareableLinkIdResponse.pm | Perl | apache-2.0 | 1,045 |
=head1 LICENSE
Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
Copyright [2016-2021] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=cut
package Bio::EnsEMBL::Production::Utils::CopyDatabase;
use strict;
use warnings;
use Bio::EnsEMBL::Utils::Exception qw(throw);
use Exporter qw/import/;
our @EXPORT_OK = qw(copy_database);
use Bio::EnsEMBL::Hive::Utils::URL;
use Log::Log4perl qw/:easy/;
use DBI;
use File::Spec::Functions
qw( rel2abs curdir canonpath updir catdir catfile );
use File::Temp;
use IO::File;
use Tie::File;
use Carp qw/croak/;
use Time::Duration;
my $start_time = time();
my $logger = get_logger();
if(!Log::Log4perl->initialized()) {
Log::Log4perl->easy_init($DEBUG);
}
sub copy_database {
my ($source_db_uri,$target_db_uri,$opt_only_tables,$opt_skip_tables,$update,$drop,$convert_innodb_to_myisam,$skip_optimize,$verbose) = @_;
$logger->info("Pre-Copy Checks");
# Path for MySQL dump
my $dump_path='/nfs/nobackup/ensembl/ensprod/copy_service/';
# Get list of tables that we want to copy or skip
my %only_tables;
my %skip_tables;
if ( defined($opt_only_tables) ) {
%only_tables = map( { $_ => 1 } split( /,/, $opt_only_tables ) );
}
if ( defined($opt_skip_tables) ) {
%skip_tables = map( { $_ => 1 } split( /,/, $opt_skip_tables ) );
}
my $source_db = get_db_connection_params( $source_db_uri);
my $target_db = get_db_connection_params( $target_db_uri);
# Verify source server exist.
if ( !defined($source_db->{host}) || $source_db->{host} eq '' ) {
croak "Source server $source_db->{host} is not valid";
}
# Verify target server exist.
if ( !defined($target_db->{host}) || $target_db->{host} eq '' ) {
croak "Target server $target_db->{host} is not valid";
}
if (!defined($target_db->{pass}) || $target_db->{pass} eq ''){
croak "You need to run this script as the MySQL user that can write on $target_db->{host}"
}
if (defined $update && defined $drop) {
croak "You can't drop the target database when using the --update options.";
}
if (!defined($source_db->{dbname}) || !defined($target_db->{dbname})) {
croak "You need to specify a database name in source and target URI";
}
#Connect to source database
my $source_dsn = create_dsn($source_db,$source_db_uri);
my $source_dbh = create_dbh($source_dsn,$source_db);
#Connect to target database
my $target_dsn = create_dsn($target_db,$target_db_uri);
my $target_dbh = create_dbh($target_dsn,$target_db);
# Get source and target server data directories.
my $source_dir = $source_dbh->selectall_arrayref("SHOW VARIABLES LIKE 'datadir'")->[0][1];
my $target_dir = $target_dbh->selectall_arrayref("SHOW VARIABLES LIKE 'datadir'")->[0][1];
if ( !defined($source_dir) ) {
croak "Failed to find data directory for source server at $source_db->{host}";
}
if ( !defined($target_dir) ) {
croak "Failed to find data directory for target server at $target_db->{host}";
}
$logger->debug("Using source server datadir: $source_dir");
$logger->debug("Using target server datadir: $target_dir");
#Check that taget database name doesn't exceed MySQL limit of 64 char
if (length($target_db->{dbname}) > 64){
$logger->error("Target database name $target_db->{dbname} is exceeding MySQL limit of 64 characters");
croak "Target database name $target_db->{dbname} is exceeding MySQL limit of 64 characters";
}
my $destination_dir = catdir( $target_dir, $target_db->{dbname} );
my $staging_dir;
my $force=0;
my $target_db_exist = $target_dbh->selectall_arrayref("show databases like ?",{},$target_db->{dbname})->[0][0];
#Check if database exist on target server
if (defined($target_db_exist)) {
# If option drop enabled, drop database on target server.
if ($drop){
$logger->info("Dropping database $target_db->{dbname} on $target_db->{host}");
$target_dbh->do("DROP DATABASE IF EXISTS $target_db->{dbname};") or die $target_dbh->errstr;
}
# If we update or copy some tables, we need the target database on target server
elsif ($update || $opt_only_tables){
1;
}
# If drop not enabled, die
else
{
$logger->error("Destination directory $destination_dir already exists");
croak "Database destination directory $destination_dir exist. You can use the --drop option to drop the database on the target server";
}
}
#Check if target database still exists on the target server
$target_db_exist = $target_dbh->selectall_arrayref("show databases like ?",{},$target_db->{dbname})->[0][0];
my @tables;
my @views;
my @tables_flush;
my $table_sth = $source_dbh->prepare('SHOW TABLE STATUS') or die $source_dbh->errstr;
$table_sth->execute() or die $source_dbh->errstr;
my %row;
# Fancy magic from DBI manual.
$table_sth->bind_columns( \( @row{ @{ $table_sth->{'NAME_lc'} } } ) );
my $innodb=0;
TABLE:
while ( $table_sth->fetch() ) {
my $table = $row{'name'};
my $engine = $row{'engine'};
if ( defined($opt_only_tables) && !exists( $only_tables{$table} ) )
{
next TABLE;
}
elsif ( defined($opt_skip_tables) && exists( $skip_tables{$table} ) )
{
next TABLE;
}
if ( defined($engine) ) {
if ( $engine eq 'InnoDB' ) {
$innodb=1;
}
}
else {
push( @views, $table );
next TABLE;
}
push( @tables, $table );
# If the table exist in target db, add it to the tables_flush array
if (system("ssh $target_db->{host} ls ${destination_dir}/${table} >/dev/null 2>&1")==0){
push( @tables_flush, $table );
}
} ## end while ( $table_sth->fetch...)
my $copy_mysql_files=0;
#Check if we have access to the server filesystem:
if (system("ssh $source_db->{host} ls $source_dir >/dev/null 2>&1") == 0 and system("ssh $target_db->{host} ls $target_dir >/dev/null 2>&1") == 0 and !$innodb) {
$copy_mysql_files=1;
}
#Check if we have enough space on target server before starting the db copy and make sure that there is 20% free space left after copy
check_space_before_copy($source_db,$source_dir,$target_db,$target_db_exist,$destination_dir,$copy_mysql_files,$source_dbh,$opt_only_tables,$opt_skip_tables,\%only_tables,\%skip_tables);
if ($copy_mysql_files){
if ($source_db->{dbname} !~ /mart/){
#Flushing and locking source database
$logger->info("Flushing and locking source database");
## Checking MySQL version on the server. For MySQL version 5.6 and above, FLUSH TABLES is not permitted when there is an active READ LOCK.
flush_with_read_lock($source_dbh,\@tables);
#Flushing and locking target database
if (defined($target_db_exist) and @tables_flush) {
$logger->info("Flushing and locking target database");
flush_with_read_lock($target_dbh,\@tables_flush);
}
}
# Check executable
$logger->debug("Checking myisamchk exist");
check_executables("myisamchk",$target_db);
$logger->debug("Checking rsync exist");
check_executables("rsync",$target_db);
# Create the temp directories on server filesystem
($force,$staging_dir) = create_temp_dir($target_db_exist,$update,$opt_only_tables,$staging_dir,$destination_dir,$force,$target_dbh,$target_db,$source_dbh);
# Copying mysql database files
copy_mysql_files($force,$update,$opt_only_tables,$opt_skip_tables,\%only_tables,\%skip_tables,$source_db,$target_db,$staging_dir,$source_dir,$verbose);
if ($source_db->{dbname} !~ /mart/){
# Unlock tables source and target
$logger->info("Unlocking tables on source database");
unlock_tables($source_dbh);
# Diconnect from the source once the copy is complete
$source_dbh->disconnect();
if (defined($target_db_exist)){
$logger->info("Unlocking tables on target database");
unlock_tables($target_dbh);
}
}
}
#Using MySQL dump if the database is innodb or we don't have access to the MySQL server filesystem
else{
if ($update){
croak "We don't have file system access on these server so we can't use the --update options";
}
else{
# Diconnect from the source before doing a MySQL dump
$source_dbh->disconnect();
copy_mysql_dump($source_db,$target_db,$dump_path,$opt_only_tables,$opt_skip_tables,\%only_tables,\%skip_tables,$convert_innodb_to_myisam);
}
}
if ($copy_mysql_files){
# Repair views
view_repair($source_db,$target_db,\@views,$staging_dir);
$logger->info("Checking/repairing tables on target database");
# Check target database
myisamchk_db(\@tables,$staging_dir);
}
else{
$logger->info("Checking/repairing tables on target database");
# Check target database
mysqlcheck_db($target_db);
}
#move database from tmp dir to data dir
# Only move the database from the temp directory to live directory if
# we are not using the update option
if (!defined($target_db_exist) and $copy_mysql_files) {
move_database($staging_dir, $destination_dir, \@tables, \@views, $target_db, $opt_only_tables, \%only_tables);
}
#Reconnect to target database after copy if it was not an update
if (!defined($target_db_exist) and $copy_mysql_files){
$target_dbh = create_dbh($target_dsn,$target_db);
}
#Flush tables
$logger->info("Flushing tables on target database");
flush_tables($target_dbh,\@tables,$target_db);
if ($copy_mysql_files){
# Re-connect to source dbh, then Copy functions and procedures if exists
$source_dbh = create_dbh($source_dsn,$source_db);
copy_functions_and_procedures($source_dbh,$target_dbh,$source_db,$target_db);
$source_dbh->disconnect();
}
#Optimize target
if (not $skip_optimize){
$logger->info("Optimizing tables on target database");
optimize_tables($target_dbh,\@tables,$target_db);
}
#disconnect from MySQL server
$target_dbh->disconnect();
$logger->info("Copy of $target_db->{dbname} from $source_db->{host} to $target_db->{host} successfull");
my $runtime = duration(time() - $start_time);
$logger->info("Database copy took: $runtime");
return;
}
sub create_staging_db_tmp_dir {
my ($dbh,$db,$staging_dir,$force) = @_;
$logger->debug("creating database tmp dir on target server");
my $tmp_dir = $dbh->selectall_arrayref("SHOW VARIABLES LIKE 'tmpdir'")->[0][1];
if ( system("ssh $db->{host} ls $tmp_dir >/dev/null 2>&1") != 0 ) {
croak "Cannot find the temporary directory $tmp_dir: $!";
}
$logger->debug("Using tmp dir: $tmp_dir");
$staging_dir = catdir( $tmp_dir, sprintf( "tmp.%s", $db->{dbname} ) );
if (system("ssh $db->{host} ls $staging_dir >/dev/null 2>&1") == 0 ) {
$logger->info("Staging directory $staging_dir already exists, using rsync with delete");
$force=1;
}
else {
# Creating staging directory
$logger->debug("Creating $staging_dir");
system("ssh $db->{host} mkdir -p $staging_dir >/dev/null 2>&1");
if ( system("ssh $db->{host} ls $staging_dir >/dev/null 2>&1") != 0) {
$logger->info("Failed to create staging directory $staging_dir");
croak "Cannot create staging directory $staging_dir: $!";
}
}
return ($force,$staging_dir);
}
sub create_temp_dir {
my ($target_db_exist,$update,$opt_only_tables,$staging_dir,$destination_dir,$force,$target_dbh,$target_db,$source_dbh) = @_;
#Check if database exist on target server
if (defined($target_db_exist)) {
# If we update the database, we don't need a tmp dir
# We will use the dest dir instead of staging dir.
if ($update || $opt_only_tables){
$staging_dir=$destination_dir;
}
else{
# Create the staging dir in server temp directory
($force,$staging_dir)=create_staging_db_tmp_dir($target_dbh,$target_db,$staging_dir,$force);
$target_dbh->disconnect();
}
}
# If database doesn't exist on target server
else {
# If option update is defined, the database need to exist on target server.
if ($update){
croak "The database need to exist on $target_db->{host} if you want to use the --update options"
}
else {
# Create the staging dir in server temp directory
($force,$staging_dir)=create_staging_db_tmp_dir($target_dbh,$target_db,$staging_dir,$force);
$target_dbh->disconnect();
}
}
return ($force,$staging_dir);
}
sub create_dsn {
my ($db,$db_uri) = @_;
my $dsn;
my $password = $db->{pass} // "";
my $exist_db = `mysql -ss -r --host=$db->{host} --port=$db->{port} --user=$db->{user} --password=$password -e "show databases like '$db->{dbname}'"`;
if ($exist_db){
$logger->debug("Connecting to $db_uri database");
$dsn = sprintf( "DBI:mysql:database=%s;host=%s;port=%d", $db->{dbname}, $db->{host}, $db->{port} );
}
else{
$logger->debug("Connecting to server $db->{host}:$db->{port}");
$dsn = sprintf( "DBI:mysql:host=%s;port=%d",$db->{host}, $db->{port} );
}
return $dsn;
}
sub create_dbh {
my ($dsn,$db) = @_;
my $dbh = DBI->connect( $dsn, $db->{user}, $db->{pass}, {'PrintError' => 1,'AutoCommit' => 0 } );
if ( !defined($dbh) ) {
croak "Failed to connect to the server $dsn: $!";
}
return $dbh;
}
sub check_executables {
my ($executable,$db) = @_;
my $output = `ssh $db->{host} which $executable`;
my $rc = $? >> 8;
if($rc != 0) {
chomp $output;
croak "Could not find $executable in PATH: $!";
}
return;
}
sub get_db_connection_params {
my ($uri) = @_;
return '' unless defined $uri;
my $db = Bio::EnsEMBL::Hive::Utils::URL::parse($uri);
return $db;
}
sub flush_with_read_lock {
my ($dbh,$tables) = @_;
# Flush and Lock tables with a read lock.
my $ddl = sprintf( "FLUSH TABLES %s WITH READ LOCK", join( ', ', @{$tables} ) );
$dbh->do($ddl) or die $dbh->errstr;
return;
}
sub optimize_tables {
my ($dbh, $tables, $db) = @_;
$dbh->do("use $db->{dbname}") or die $dbh->errstr;
foreach my $table (@{$tables}) {
$dbh->do( sprintf( "OPTIMIZE TABLE %s", $table ) ) or die $dbh->errstr;
}
return;
}
sub unlock_tables {
my ($dbh) = @_;
$dbh->do('UNLOCK TABLES') or die $dbh->errstr;
return;
}
sub flush_tables {
my ($dbh,$tables,$db) = @_;
$dbh->do("use $db->{dbname}") or die $dbh->errstr;
my $ddl = sprintf('FLUSH TABLES %s', join(q{, }, @{$tables}));
$dbh->do($ddl) or die $dbh->errstr;
return;
}
sub view_repair {
my ($source_db,$target_db,$views,$staging_dir) =@_;
$logger->info("Processing views");
if ( $source_db->{dbname} eq $target_db->{dbname} ) {
$logger->info("Source and target names ($source_db->{dbname}) are the same. Views do not need repairing");
}
else {
foreach my $current_view (@{$views}) {
$logger->info("Processing $current_view");
my $view_frm_loc = catfile( $staging_dir, "${current_view}.frm" );
if ( system("ssh $target_db->{host} sed -i -e 's/$source_db->{dbname}/$target_db->{dbname}/g' $view_frm_loc >/dev/null 2>&1") != 0 ) {
croak "Failed to repair view $current_view in $staging_dir: $!";
}
}
}
return;
}
sub myisamchk_db {
my ($tables,$staging_dir) = @_;
# Check the copied table files with myisamchk. Let myisamchk
# automatically repair any broken or un-closed tables.
foreach my $table (@{$tables}) {
foreach my $index (
glob( catfile( $staging_dir, sprintf( '%s*.MYI', $table ) ) ) )
{
my @check_cmd = (
'myisamchk', '--check', '--check-only-changed',
'--update-state', '--force', '--silent', '--silent', # Yes, twice.
$index );
if ( system(@check_cmd) != 0 ) {
croak "Failed to check $table table: $!. Please clean up $staging_dir";
last;
}
}
} ## end foreach my $table (@tables)
return;
}
sub mysqlcheck_db {
my ($target_db) = @_;
if ( system("mysqlcheck --auto-repair --host=$target_db->{host} --user=$target_db->{user} --password=$target_db->{pass} --port=$target_db->{port} $target_db->{dbname}") != 0 ) {
croak "Issue when checking or repairing $target_db->{dbname} on $target_db->{host}: $!";
}
return;
}
sub move_database {
my ($staging_dir, $destination_dir, $tables, $views, $target_db, $opt_only_tables, $only_tables)=@_;
# Move table files into place in and remove the staging directory. We already
# know that the destination directory does not exist.
$logger->info("Moving $staging_dir to $destination_dir");
if ( system("ssh $target_db->{host} mkdir -p $destination_dir >/dev/null 2>&1") != 0 ) {
croak "Failed to create destination directory $destination_dir: $! Please clean up $staging_dir.";
}
my @mv_db_opt = ('ssh', $target_db->{host},'mv',catfile( $staging_dir, 'db.opt' ), $destination_dir);
if ( system(@mv_db_opt) != 0 ) {
croak "Failed to move db.opt to $destination_dir: $! Please clean up $staging_dir.";
}
my @files;
# Generating list of MYISAM tables
if (defined($opt_only_tables)){
foreach my $key (sort(keys %{$only_tables})) {
foreach my $file_extention ("MYD", "MYI", "frm"){
push @files, catfile( $staging_dir, sprintf( "%s.%s", $key, $file_extention));
}
}
}
else{
foreach my $table (@{$tables}) {
foreach my $file_extention ("MYD", "MYI", "frm"){
push @files, catfile( $staging_dir, sprintf( "%s.%s", $table, $file_extention));
}
}
}
FILE:
foreach my $file (@files) {
#Moving tables
$logger->debug( "Moving $file");
if ( system('ssh', $target_db->{host}, 'mv', $file, $destination_dir) != 0 ) {
croak "Failed to move $file: $! Please clean up $staging_dir and $destination_dir";
next FILE;
}
}
# Moving views
foreach my $view (@{$views}) {
my $file = catfile( $staging_dir, sprintf( "%s.%s", $view, "frm"));
$logger->debug( "Moving $view");
if ( system('ssh', $target_db->{host}, 'mv', $file, $destination_dir) != 0 ) {
croak "Failed to move $file: $! Please clean up $staging_dir and $destination_dir";
}
}
# Remove the now empty staging directory.
if ( system("ssh $target_db->{host} rm -r $staging_dir") != 0 ) {
croak "Failed to unlink the staging directory $staging_dir: $! Clean this up manually.";
}
return;
}
sub copy_functions_and_procedures{
my ($source_dbh,$target_dbh,$source_db,$target_db) = @_;
my $sql_select = "select name, type, returns, body from mysql.proc where db = '$source_db->{dbname}'";
my $proc_funcs = $source_dbh->selectall_hashref($sql_select, 'name') or die $source_dbh->errstr ;
if ($proc_funcs){
foreach my $name (sort keys %{$proc_funcs}){
my $type = $proc_funcs->{$name}->{type};
if($type !~ /FUNCTION|PROCEDURE/){
$logger->warn("Copying '$type' not implemted. Skipping");
next;
}
# Functions must return something, Procedures must not return anything
my $returns = '';
if($type eq 'FUNCTION') {
$returns = "RETURNS $proc_funcs->{$name}->{returns}";
}
my $sql = "CREATE $type $target_db->{dbname}.$name()\n $returns\n $proc_funcs->{$name}->{body}";
$logger->info("COPYING $proc_funcs->{$name}->{type} $name");
$target_dbh->do($sql) or die $source_dbh->errstr;
}
$logger->debug("Finished copying functions and procedures");
}
else {
$logger->debug("No functions or procedures to copy")
}
return;
}
# Set up database copying. We're using rsync for this because it's
# using SSH for network transfers, because it may be used for local
# copy too, and because it has good inclusion/exclusion filter
# options.
sub copy_mysql_files {
my ($force,$update,$opt_only_tables,$opt_skip_tables,$only_tables,$skip_tables,$source_db,$target_db,$staging_dir,$source_dir,$verbose) = @_;
my @copy_cmd;
@copy_cmd = ('ssh', $target_db->{host}, 'rsync');
push(@copy_cmd, '--whole-file', '--archive');
if ($verbose){
push (@copy_cmd, '--progress');
}
if ($force) {
push( @copy_cmd, '--delete', '--delete-excluded' );
}
# Update will copy updated tables from source db to target db
if ($update) {
push( @copy_cmd, '--checksum', '--delete');
}
# Set files permission to 755 (rwxr-xr-x)
push (@copy_cmd, '--chmod=Du=rwx,go=rx,Fu=rwx,go=rx');
# Add TCP with arcfour encryption, TCP does go pretty fast (~110 MB/s) and is a better choice in LAN situation.
push(@copy_cmd, '-e ssh');
# If we have a subset of tables to copy
if ( defined($opt_only_tables) ) {
push( @copy_cmd, '--include=db.opt' );
push( @copy_cmd, '--ignore-times' );
push( @copy_cmd,
map { sprintf( '--include=%s.*', $_ ) } keys(%{$only_tables}) );
# Partitioned tables:
push( @copy_cmd,
map { sprintf( '--include=%s#P#*.*', $_ ) }
keys(%{$only_tables}) );
push( @copy_cmd, "--exclude=*" );
}
# If we have a subset of tables to skip
elsif ( defined($opt_skip_tables) ) {
push( @copy_cmd, '--include=db.opt' );
push( @copy_cmd,
map { sprintf( '--exclude=%s.*', $_ ) } keys(%{$skip_tables}) );
# Partitioned tables:
push( @copy_cmd,
map { sprintf( '--exclude=%s#P#*.*', $_ ) }
keys(%{$skip_tables}) );
push( @copy_cmd, "--include=*" );
}
if ( $source_db->{host} eq $target_db->{host} ) {
# Local copy.
push( @copy_cmd,
sprintf( "%s/", catdir( $source_dir, $source_db->{dbname} ) ) );
}
else {
# Copy from remote server.
push( @copy_cmd,
sprintf( "%s:%s/",
$source_db->{host}, catdir( $source_dir, $source_db->{dbname} ) )
);
}
push( @copy_cmd, sprintf( "%s/", $staging_dir ) );
# Perform the copy and make sure it succeeds.
$logger->info( "Copying $source_db->{host}:$source_db->{port}/$source_db->{dbname} to staging directory $staging_dir");
# For debugging:
# print( join( ' ', @copy_cmd ), "\n" );
if ( system(@copy_cmd) != 0 ) {
croak "Failed to copy database: $!, Please clean up $staging_dir (if needed).";
}
return;
}
# Dump the database in /nfs/nobackup/ensembl/ensprod/copy_service
# Create database on target server
# Load the database to the target server
sub copy_mysql_dump {
my ($source_db,$target_db,$dump_path,$opt_only_tables,$opt_skip_tables,$only_tables,$skip_tables,$convert_innodb_to_myisam) = @_;
my $file=$dump_path.$source_db->{host}.'_'.$source_db->{dbname}.'_'.time().'.sql';
$logger->info("Dumping $source_db->{dbname} from $source_db->{host} to file $file");
my @dump_cmd = ("mysqldump", "--max_allowed_packet=1024M", "--host=$source_db->{host}", "--user=$source_db->{user}", "--port=$source_db->{port}");
# If we are copying a mart database, skip the lock
if ($source_db->{dbname} =~ /mart/){
push (@dump_cmd, "--skip-lock-tables");
}
# IF we have specified a password
if (defined $source_db->{pass}){
push (@dump_cmd, "--password=$source_db->{pass}");
}
# If we have a list of tables to skip
if ( defined($opt_skip_tables)){
push( @dump_cmd, map { sprintf( "--ignore-table=%s.%s", $source_db->{dbname},$_ ) } keys(%{$skip_tables}) );
}
# Adding database name
push (@dump_cmd, "$source_db->{dbname}");
# If we have defined a list of table to copy
if ( defined($opt_only_tables) ) {
push( @dump_cmd, map { sprintf( "%s", $_ ) } keys(%{$only_tables}) );
}
if ( system("@dump_cmd > $file") != 0 ) {
croak "Cannot dump $source_db->{dbname} from $source_db->{host} to file: $!";
}
# Convert InnoDB databases to MyISAM by changing the ENGINE in the dump file
if ($convert_innodb_to_myisam){
$logger->info("Converting database to MyISAM");
my $updated_file = $dump_path.$source_db->{host}.'_'.$source_db->{dbname}.'_'.time().'.sql';
if ( system("cat $file | sed 's/ENGINE=InnoDB/ENGINE=MyISAM/' > $updated_file") !=0 ){
cleanup_file($file);
cleanup_file($updated_file);
croak "Failed to transform InnoDB database to MyISAM";
}
cleanup_file($file);
$file = $updated_file;
}
$logger->info("Creating database $target_db->{dbname} on $target_db->{host}");
if ( system("mysql --host=$target_db->{host} --user=$target_db->{user} --password=$target_db->{pass} --port=$target_db->{port} -e 'CREATE DATABASE $target_db->{dbname};'") !=0 ) {
cleanup_file($file);
croak "Cannot create database $target_db->{dbname} on $target_db->{host}: $!";
}
$logger->info("Loading file $file into $target_db->{dbname} on $target_db->{host}");
if ( system("mysql --max_allowed_packet=1024M --host=$target_db->{host} --user=$target_db->{user} --password=$target_db->{pass} --port=$target_db->{port} $target_db->{dbname} < $file") != 0 ) {
cleanup_file($file);
croak "Cannot load file into $target_db->{dbname} on $target_db->{host}: $!";
}
cleanup_file($file);
return;
}
# Subroutine to check source database size and target server space available.
# Added 20% of server space to the calculation to make sure we don't completely fill up the server.
sub check_space_before_copy {
my ($source_db,$source_dir,$target_db,$target_db_exist,$destination_dir,$copy_mysql_files,$source_dbh,$opt_only_tables,$opt_skip_tables,$only_tables,$skip_tables) = @_;
my $threshold = 20;
my ($source_database_size,$source_database_dir);
#Check if we can ssh to the server
if (system("ssh $target_db->{host} ls /instances/ >/dev/null 2>&1") == 0){
# If system file copy, get the database file size, else get an estimate of the database size.
if ($copy_mysql_files){
# If we have a list of tables to copy, check the size only for these tables
if ($opt_only_tables){
my @command = ("ssh $source_db->{host}", "du -c");
push( @command, map { sprintf( "${source_dir}/$source_db->{dbname}/%s.*", $_ ) } keys(%{$only_tables}) );
push ( @command, "| tail -1 | cut -f 1");
$source_database_size = `@command`;
}
# If we have a list of tables to skip, exclude them from the space calculation
elsif ($opt_skip_tables){
my @command = ("ssh $source_db->{host}", "du -c", "${source_dir}/$source_db->{dbname}/*");
push( @command, map { sprintf( "--exclude=${source_dir}/$source_db->{dbname}/%s.*", $_ ) } keys(%{$skip_tables}) );
push ( @command, "| tail -1 | cut -f 1");
$source_database_size = `@command`;
}
else{
#Getting source database size
($source_database_size,$source_database_dir) = map { m!(\d+)\s+(.*)! } `ssh $source_db->{host} du ${source_dir}/$source_db->{dbname}`;
}
# Getting target database size if target db exist.
if (defined($target_db_exist)){
my ($target_database_size,$target_database_dir) = map { m!(\d+)\s+(.*)! } `ssh $target_db->{host} du ${destination_dir}`;
$source_database_size = $source_database_size - $target_database_size;
}
}
else{
# If we have a list of tables to copy, check the size only for these tables
if ($opt_only_tables){
my @bind = ("$source_db->{dbname}");
my $sql = "SELECT ROUND(SUM(data_length + index_length) / 1024) FROM information_schema.TABLES WHERE table_schema = ? and (";
my $size = keys %$only_tables;
my $count = 1;
foreach my $table (keys %{$only_tables}){
if ($count == $size){
$sql = $sql."table_name = ?";
}
else{
$sql = $sql."table_name = ? or ";
}
push (@bind,$table);
$count ++;
}
$sql = $sql.");";
$source_database_size = $source_dbh->selectall_arrayref($sql,{},@bind)->[0][0] or die $source_dbh->errstr;
}
# If we have a list of tables to skip, exclude them from the space calculation
elsif ($opt_skip_tables){
my @bind = ("$source_db->{dbname}");
my $sql = "SELECT ROUND(SUM(data_length + index_length) / 1024) FROM information_schema.TABLES WHERE table_schema = ?";
foreach my $table (keys %{$skip_tables}){
$sql = $sql." and table_name != ?";
push (@bind,$table);
}
$sql = $sql.";";
$source_database_size = $source_dbh->selectall_arrayref($sql,{},@bind)->[0][0] or die $source_dbh->errstr;
}
else{
$source_database_size = $source_dbh->selectall_arrayref("SELECT ROUND(SUM(data_length + index_length) / 1024) FROM information_schema.TABLES WHERE table_schema = ?",{},$source_db->{dbname})->[0][0] or die $source_dbh->errstr;
}
}
#Getting target server space
my @cmd = `ssh $target_db->{host} df -P /instances/`;
my ($filesystem,$blocks,$used,$available,$used_percent,$mounted_on) = split('\s+',$cmd[1]);
#Calculate extra space to make sure we don't fully fill up the server
my $threshold_server = ($threshold * $available)/100;
my $space_left_after_copy = $available - ($source_database_size + $threshold_server);
if ( $space_left_after_copy == abs($space_left_after_copy) ) {
$logger->debug("The database is ".scaledkbytes($source_database_size)." and there is ".scaledkbytes($available)." available on the $target_db->{host}, we can copy the database.")
} else {
croak("The database is ".scaledkbytes($source_database_size)." and there is ".scaledkbytes($available)." available on the $target_db->{host}, please clean up the server before copying this database.")
}
}
else{
$logger->debug("We can't ssh to the target MySQL server so skipping space check");
}
return;
}
#Subroutine to convert kilobytes in MB, GB, TB...
sub scaledkbytes {
(sort { length $a <=> length $b }
map { sprintf '%.3g%s', $_[0]/1024**$_->[1], $_->[0] }
[KB => 0],[MB=>1],[GB=>2],[TB=>3],[PB=>4],[EB=>5])[0]
}
sub cleanup_file {
my ($file) = @_;
if ( system("rm -f $file") != 0 ) {
croak "Cannot cleanup $file: $!";
}
return;
}
1;
| Ensembl/ensembl-production | modules/Bio/EnsEMBL/Production/Utils/CopyDatabase.pm | Perl | apache-2.0 | 30,430 |
# Copyright 2020, Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
package Google::Ads::GoogleAds::V8::Common::WebpageInfo;
use strict;
use warnings;
use base qw(Google::Ads::GoogleAds::BaseEntity);
use Google::Ads::GoogleAds::Utils::GoogleAdsHelper;
sub new {
my ($class, $args) = @_;
my $self = {
conditions => $args->{conditions},
coveragePercentage => $args->{coveragePercentage},
criterionName => $args->{criterionName},
sample => $args->{sample}};
# Delete the unassigned fields in this object for a more concise JSON payload
remove_unassigned_fields($self, $args);
bless $self, $class;
return $self;
}
1;
| googleads/google-ads-perl | lib/Google/Ads/GoogleAds/V8/Common/WebpageInfo.pm | Perl | apache-2.0 | 1,180 |
# OpenXPKI::Server::Workflow::Activity::SCEPv2::FetchGroupPolicy
# Written by Scott Hardin for the OpenXPKI project 2012
# Copyright (c) 2012 by The OpenXPKI Project
package OpenXPKI::Server::Workflow::Activity::SCEPv2::FetchGroupPolicy;
use strict;
use base qw( OpenXPKI::Server::Workflow::Activity );
use OpenXPKI::Server::Context qw( CTX );
use OpenXPKI::Exception;
use OpenXPKI::Debug;
#use OpenXPKI::Crypto::CSR;
use Data::Dumper;
sub execute {
##! 1: 'execute'
my $self = shift;
my $workflow = shift;
my $context = $workflow->context();
my $config = CTX('config');
my $server = $context->param('server');
# my $pki_realm = CTX('session')->data->pki_realm;
my @policy_params = $config->get_keys("scep.$server.policy");
foreach my $key (@policy_params) {
$context->param( "p_$key" => $config->get("scep.$server.policy.$key") );
}
CTX('log')->application()->debug("SCEP policy loaded for $server");
# Set static policy for our test CA
#$context->param( p_allow_anon_enroll => 0 );
#$context->param( p_allow_man_authen => 0 );
#$context->param( p_max_active_certs => 1 );
return 1;
}
1;
__END__
=head1 Name
OpenXPKI::Server::Workflow::Activity::SCEPv2::FetchGroupPolicy
=head1 Description
This activity fetches the group policy for the SCEPv2 workflow.
The policy is read from the config connector at scep.$server.policy where
server is the name of the server instance as given by the scep client.
The I<p_> prefix is always added by the activitiy!
| aleibl/openxpki | core/server/OpenXPKI/Server/Workflow/Activity/SCEPv2/FetchGroupPolicy.pm | Perl | apache-2.0 | 1,578 |
#! perl -w
use strict;
use Getopt::Long;
use DBI qw(:sql_types);
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use ImportUtils;
my $infile;
my $host;
my $dbname;
my $user;
my $pass;
my $port;
our $verbose;
my $skip_synonyms;
my $skip_phenotypes;
my $source;
my $help;
my $UNIPROT_SOURCE_NAME = "Uniprot";
my $UNIPROT_SOURCE_DESCRIPTION = "Variants with protein annotation imported from Uniprot";
my $UNIPROT_SOURCE_URL = "http://www.uniprot.org/";
my $OMIM_SOURCE_NAME = "OMIM";
my $OMIM_SOURCE_DESCRIPTION = "Variations linked to entries in the Online Mendelian Inheritance in Man (OMIM) database";
my $OMIM_SOURCE_URL = "http://www.ncbi.nlm.nih.gov/omim/";
my $NHGRI_SOURCE_NAME = "NHGRI_GWAS_catalog";
my $NHGRI_SOURCE_DESCRIPTION = "Variants associated with phenotype data from the NHGRI GWAS catalog";
my $NHGRI_SOURCE_URL = "http://www.genome.gov/gwastudies/";
my $EGA_SOURCE_NAME = "EGA";
my $EGA_SOURCE_DESCRIPTION = "Variants imported from the European Genome-phenome Archive with phenotype association";
my $EGA_SOURCE_URL = "http://www.ebi.ac.uk/ega/";
usage() if (!scalar(@ARGV));
GetOptions(
'infile=s' => \$infile,
'host=s' => \$host,
'dbname=s' => \$dbname,
'user=s' => \$user,
'pass=s' => \$pass,
'port=s' => \$port,
'source=s' => \$source,
'verbose!' => \$verbose,
'skip_synonyms!' => \$skip_synonyms,
'skip_phenotypes!' => \$skip_phenotypes,
'help!' => \$help
);
usage() if ($help);
die ("An input file is required") unless (defined($infile));
die ("Database credentials are required") unless (defined($host) && defined($dbname) && defined($user) && defined($pass));
$port ||= 3306;
my $result;
my $source_name;
my $source_description;
my $source_url;
=head
The parser subroutines parse the input file into a common data structure.
Currently what is returned should be a reference to a hash. The hash should
contain the key 'phenotypes' with the value being a reference to an array of
phenotype data objects. The phenotype data object is a reference to a hash
where the keys correspond to the column names in the variation_annotation table.
In addition, there are the keys 'rsid' which holds the rs-id that the phenotype
annotates and 'description' and 'name' which correspond to the columns in the
phenotype table.
In addition, the hash can also contain the key 'synonyms' and the value is a
reference to a hash where the keys are rs-ids and each respective value is a
reference to an array of synonyms for the rs-id.
=cut
# Make sure that the input file is XML compliant
ImportUtils::make_xml_compliant($infile);
# Connect to the variation database
print STDOUT localtime() . "\tConnecting to database $dbname\n" if ($verbose);
my $db_adaptor = new Bio::EnsEMBL::DBSQL::DBAdaptor(
-host => $host,
-user => $user,
-pass => $pass,
-port => $port,
-dbname => $dbname
) or die("Could not get a database adaptor for $dbname on $host:$port");
print STDOUT localtime() . "\tConnected to $dbname on $host:$port\n" if ($verbose);
my @rsids;
# Parse the input files into a hash
if ($source =~ m/uniprot/i) {
$result = parse_uniprot($infile);
$source_name = $UNIPROT_SOURCE_NAME;
$source_description = $UNIPROT_SOURCE_DESCRIPTION;
$source_url = $UNIPROT_SOURCE_URL;
}
elsif ($source =~ m/nhgri/i) {
$result = parse_nhgri($infile);
$source_name = $NHGRI_SOURCE_NAME;
$source_description = $NHGRI_SOURCE_DESCRIPTION;
$source_url = $NHGRI_SOURCE_URL;
}
elsif ($source =~ m/omim/i) {
$result = parse_dbsnp_omim($infile);
$source_name = $OMIM_SOURCE_NAME;
$source_description = $OMIM_SOURCE_DESCRIPTION;
$source_url = $OMIM_SOURCE_URL;
}
elsif ($source =~ m/ega/i) {
$source_name = $EGA_SOURCE_NAME;
$source_description = $EGA_SOURCE_DESCRIPTION;
$source_url = $EGA_SOURCE_URL;
my $source_id = get_or_add_source($source_name,$source_description,$source_url,$db_adaptor);
print STDOUT "$source source_id is $source_id\n" if ($verbose);
parse_ega($infile,$source_id);
exit(0);
}
else {
die("Source $source is not recognized");
}
my %synonym;
my @phenotypes;
if (exists($result->{'synonyms'})) {
%synonym = %{$result->{'synonyms'}};
# To get all the rsids of the source (Uniprot)
@rsids = keys(%synonym);
}
if (exists($result->{'phenotypes'})) {
@phenotypes = @{$result->{'phenotypes'}};
}
# Get internal variation ids for the rsIds
if (scalar @rsids == 0) {
@rsids = map {$_->{'rsid'}} @phenotypes;
}
my $variation_ids = get_dbIDs(\@rsids,$db_adaptor);
# Get or add a source
my $source_id = get_or_add_source($source_name,$source_description,$source_url,$db_adaptor);
print STDOUT "$source source_id is $source_id\n" if ($verbose);
# Add the synonyms if required
add_synonyms(\%synonym,$variation_ids,$source_id,$db_adaptor) unless ($skip_synonyms);
# Now, insert phenotypes
add_phenotypes(\@phenotypes,$variation_ids,$source_id,$db_adaptor) unless ($skip_phenotypes);
# Loop over the remaining rsids (the ones that could not be find in the db) and print them out
while (my ($rs_id,$var_id) = each(%{$variation_ids})) {
next if (defined($var_id->[0]));
print STDOUT "$rs_id could not be found in $dbname";
if (defined($synonym{$rs_id})) {
print STDOUT " (Synonyms: " . join(", ",@{$synonym{$rs_id}}) . ")";
}
print STDOUT "\n";
}
sub parse_uniprot {
my $infile = shift;
my %synonym;
my @phenotypes;
# Open the input file for reading
open(IN,'<',$infile) or die ("Could not open $infile for reading");
# Read through the file and parse out the desired fields
while (<IN>) {
chomp;
# A regexp to catch the meta information in the header. Just echo this to the stdout for logging purposes
if ($_ =~ m/^\s*(Description|Name|Release)\:/) {
print STDOUT $_ . "\n";
}
# Main regexp to extract relevant variation information
if ($_ =~ m/^(\S+)\s+\S+\s+(VAR\_\d+)\s+\w\.\S+\s+(Disease|Polymorphism|Unclassified)\s+(\-|rs\d*)\s*(.*)$/) {
# Get the data that was caught by the regexp
my $gene = $1;
my $uniprot_id = $2;
my $rs_id = $4;
my $phenotype = $5;
# If no rsId was given, will attempt to get one by looking up the Uniprot id in the synonym table
if ($rs_id ne '-') {
push(@{$synonym{$rs_id}},$uniprot_id);
}
else {
$rs_id = $uniprot_id;
}
$phenotype ||= '-';
# Try to further split the phenotype into a short name, description and possibly MIM id
if ($phenotype ne '-') {
my $description;
my $name;
my $mim_id;
($description,$mim_id) = $phenotype =~ m/^([^\[]+)(?:\[(MIM\:.+?)\])?$/;
($description,$name) = $description =~ m/^(.+?)\s*(?:\((.+?)\))?\s*$/;
$mim_id &&= join(",MIM:",split(",",$mim_id));
$mim_id =~ s/\s+//g if (defined($mim_id));
push(
@phenotypes,
{
"rsid" => $rs_id,
"associated_gene" => $gene,
"description" => $description,
"name" => $name,
"variation_names" => $rs_id,
"study" => $mim_id,
"study_type" => 'GWAS'
}
);
}
}
}
close(IN);
print STDOUT "Parsed " . scalar(keys(%synonym)) . " rs-ids with Uniprot synonyms\n" if ($verbose);
print STDOUT scalar(@phenotypes) . " phenotypes were found linked to rs-ids\n" if ($verbose);
my %result = ('synonyms' => \%synonym, 'phenotypes' => \@phenotypes);
return \%result;
}
sub parse_nhgri {
my $infile = shift;
my @phenotypes;
# Open the input file for reading
open(IN,'<',$infile) or die ("Could not open $infile for reading");
# Read through the file and parse out the desired fields
while (<IN>) {
chomp;
my (
$catalog_date,
$pubmed_id,
$author,
$pub_date,
$journal,
$url,
$study,
$phenotype,
$initial_sample_size,
$replication_sample_size,
$region,
$gene,
$rs_risk_allele,
$rs_id,
$risk_frequency,
$pvalue,
$pval_text,
$beta,
$ci,
$platform,
$cnv
) = split(/\t/,$_);
my %data = (
'study_type' => 'GWAS',
'description' => $phenotype,
'associated_gene' => $gene,
'associated_variant_risk_allele' => $rs_risk_allele,
'risk_allele_freq_in_controls' => $risk_frequency,
'p_value' => $pvalue,
'study_description' => $study,
);
# Parse the rsids
my @rsids;
$rs_id ||= "";
while ($rs_id =~ m/(rs[0-9]+)/g) {
push(@rsids,$1);
}
$data{'variation_names'} = join(',',@rsids);
$data{'study'} = 'pubmed/' . $pubmed_id if (defined($pubmed_id));
# If we didn't get any rsIds, skip this row (this will also get rid of the header)
warn("Could not parse any rsIds from string '$rs_id'") if (!scalar(@rsids));
next if (!scalar(@rsids));
map {
my %t_data = %{\%data};
$t_data{'rsid'} = $_;
push(@phenotypes,\%t_data)
} @rsids;
}
close(IN);
my %result = ('phenotypes' => \@phenotypes);
return \%result;
}
sub parse_dbsnp_omim {
my $infile = shift;
my @phenotypes;
my @attribute_keys = (
'ID',
'Phenotype_study',
'Phenotype_associated_variant_risk_seq',
'Omim_title',
'Allele_title',
'Gene_names'
);
# Open the input file for reading
open(IN,'<',$infile) or die ("Could not open $infile for reading");
# Read through the file and parse out the desired fields
while (<IN>) {
chomp;
my @attributes = split(/\t/);
# Skip the risk allele if the variant is "0000"
my $data = {
'rsid' => 'rs' . $attributes[0],
'study' => 'MIM:' . $attributes[1],
'associated_variant_risk_allele' => ($attributes[2] !~ m/^\s*0+\s*$/ ? $attributes[2] : undef),
'associated_gene' => $attributes[5],
'variation_names' => 'rs' . $attributes[0]
};
# If available, use the variant title, else use the omim record title
if (defined($data->{'associated_variant_risk_allele'}) and $attributes[4] ne '') {
$data->{'description'} = $attributes[4];
}
else {
$data->{'description'} = $attributes[3];
}
# If possible, try to extract the last comma-separated word as this should be the short name for the phenotype
@attributes = split(/;/,$data->{'description'});
if (scalar(@attributes) > 1) {
($data->{'name'}) = pop(@attributes) =~ m/(\S+)/;
$data->{'description'} = join(';',@attributes);
}
push(@phenotypes,$data);
}
close(IN);
my %result = ('phenotypes' => \@phenotypes);
return \%result;
}
sub parse_ega {
my $infile = shift;
my $source_id = shift;
my $study_check_stmt = qq{
SELECT
study_id
FROM
study
WHERE
name=? AND source_id=$source_id
LIMIT 1
};
my $nhgri_check_stmt = qq{
SELECT
st.study_id,st.study_type
FROM
study st, source s
WHERE
external_reference=? AND s.name like '%nhgri%'
AND s.source_id=st.source_id
LIMIT 1
};
my $study_ins_stmt = qq{
INSERT INTO
study (
name,
source_id,
external_reference,
url,
study_type
)
VALUES (
?,
$source_id,
?,
?,
?
)
};
# NHGRI and EGA associated studies
my $asso_study_check_stmt = qq{
SELECT
study1_id
FROM
associate_study
WHERE
(study2_id = ? AND study1_id = ?)
or
(study1_id = ? AND study2_id = ?)
LIMIT 1
};
my $asso_study_ins_stmt = qq{
INSERT INTO
associate_study (study1_id,study2_id)
VALUES (?,?)
};
my $nhgri_check_sth = $db_adaptor->dbc->prepare($nhgri_check_stmt);
my $study_check_sth = $db_adaptor->dbc->prepare($study_check_stmt);
my $study_ins_sth = $db_adaptor->dbc->prepare($study_ins_stmt);
my $asso_study_check_sth = $db_adaptor->dbc->prepare($asso_study_check_stmt);
my $asso_study_ins_sth = $db_adaptor->dbc->prepare($asso_study_ins_stmt);
# Open the input file for reading
open(IN,'<',$infile) or die ("Could not open $infile for reading");
# Read through the file and parse out the desired fields
while (<IN>) {
chomp $_;
my @attributes = split("\t",$_);
next if ($attributes[1] eq '');
my $name = $attributes[0];
my $pubmed = 'pubmed/'.$attributes[1];
my $url = $attributes[2];
# NHGRI study
my $nhgri_study_id;
my $study_type;
$nhgri_check_sth->bind_param(1,$pubmed,SQL_VARCHAR);
$nhgri_check_sth->execute();
$nhgri_check_sth->bind_columns(\$nhgri_study_id,\$study_type);
$nhgri_check_sth->fetch();
if (!defined($nhgri_study_id)) {
print "No NHGRI study found for the EGA $name | $pubmed !\n";
next;
}
# EGA study
my $study_id;
$study_check_sth->bind_param(1,$name,SQL_VARCHAR);
$study_check_sth->execute();
$study_check_sth->bind_columns(\$study_id);
$study_check_sth->fetch();
if (!defined($study_id)) {
$study_ins_sth->bind_param(1,$name,SQL_VARCHAR);
$study_ins_sth->bind_param(2,$pubmed,SQL_VARCHAR);
$study_ins_sth->bind_param(3,$url,SQL_VARCHAR);
$study_ins_sth->bind_param(4,$study_type,SQL_VARCHAR);
$study_ins_sth->execute();
$study_check_sth->bind_param(1,$name,SQL_VARCHAR);
$study_check_sth->execute();
$study_check_sth->bind_columns(\$study_id);
$study_check_sth->fetch();
}
my $is_associated;
$asso_study_check_sth->bind_param(1,$nhgri_study_id,SQL_INTEGER);
$asso_study_check_sth->bind_param(2,$study_id,SQL_INTEGER);
$asso_study_check_sth->execute();
$asso_study_check_sth->bind_columns(\$is_associated);
$asso_study_check_sth->fetch();
if (!defined($is_associated)) {
$asso_study_ins_sth->bind_param(1,$nhgri_study_id,SQL_INTEGER);
$asso_study_ins_sth->bind_param(2,$study_id,SQL_INTEGER);
$asso_study_ins_sth->execute();
}
}
close(IN);
}
sub get_dbIDs {
my $rs_ids = shift;
my $db_adaptor = shift;
my $id_stmt = qq{
SELECT
v.variation_id,
v.name
FROM
variation v
WHERE
v.name = ?
LIMIT 1
};
my $syn_stmt = qq{
SELECT
v.variation_id,
v.name
FROM
variation_synonym vs JOIN
variation v ON vs.variation_id = v.variation_id
WHERE
vs.name = ?
LIMIT 1
};
my $id_sth = $db_adaptor->dbc->prepare($id_stmt);
my $syn_sth = $db_adaptor->dbc->prepare($syn_stmt);
my %mapping;
foreach my $rs_id (@{$rs_ids}) {
$id_sth->bind_param(1,$rs_id,SQL_VARCHAR);
$id_sth->execute();
my ($var_id,$var_name);
$id_sth->bind_columns(\$var_id,\$var_name);
$id_sth->fetch();
# If we couldn't find the rs_id, look in the synonym table
if (!defined($var_id)) {
$syn_sth->bind_param(1,$rs_id,SQL_VARCHAR);
$syn_sth->execute();
$syn_sth->bind_columns(\$var_id,\$var_name);
$syn_sth->fetch();
}
$mapping{$rs_id} = [$var_id,$var_name];
}
return \%mapping;
}
sub get_or_add_source {
my $source_name = shift;
my $source_description = shift;
my $source_url = shift;
my $db_adaptor = shift;
my $stmt = qq{
SELECT
source_id
FROM
source
WHERE
name = '$source_name'
LIMIT 1
};
my $sth = $db_adaptor->dbc->prepare($stmt);
$sth->execute();
my $source_id;
$sth->bind_columns(\$source_id);
$sth->fetch();
if (!defined($source_id)) {
$stmt = qq{
INSERT INTO
source (
name,
description,
url
)
VALUES (
'$source_name',
'$source_description',
'$source_url'
)
};
$db_adaptor->dbc->do($stmt);
$source_id = $db_adaptor->dbc->db_handle->{'mysql_insertid'};
print STDOUT "Added source for $source_name (source_id = $source_id)\n" if ($verbose);
}
return $source_id;
}
sub add_phenotypes {
my $phenotypes = shift;
my $variation_ids = shift;
my $source_id = shift;
my $db_adaptor = shift;
# Prepared statements
my $phen_check_stmt = qq{
SELECT
phenotype_id
FROM
phenotype
WHERE
description = ?
LIMIT 1
};
my $phen_ins_stmt = qq{
INSERT INTO
phenotype (
name,
description
)
VALUES (
?,
?
)
};
my $st_ins_stmt = qq{
INSERT INTO
study (
source_id,
external_reference,
study_type,
description
)
VALUES (
$source_id,
?,
?,
?
)
};
my $var_names = '';
if ($source =~ m/uniprot/i) {
$var_names = 'AND variation_names = ? ';
}
my $va_check_stmt = qq{
SELECT
variation_annotation_id
FROM
variation_annotation
WHERE
variation_id = ? AND
phenotype_id = ? AND
study_id = ?
$var_names
LIMIT 1
};
#AND variation_names = ?
my $va_ins_stmt = qq{
INSERT INTO
variation_annotation (
variation_id,
phenotype_id,
study_id,
associated_gene,
associated_variant_risk_allele,
variation_names,
risk_allele_freq_in_controls,
p_value
)
VALUES (
?,
?,
?,
?,
?,
?,
?,
?
)
};
my $phen_check_sth = $db_adaptor->dbc->prepare($phen_check_stmt);
my $phen_ins_sth = $db_adaptor->dbc->prepare($phen_ins_stmt);
#my $st_check_sth = $db_adaptor->dbc->prepare($st_check_stmt);
my $st_ins_sth = $db_adaptor->dbc->prepare($st_ins_stmt);
my $va_check_sth = $db_adaptor->dbc->prepare($va_check_stmt);
my $va_ins_sth = $db_adaptor->dbc->prepare($va_ins_stmt);
# First, sort the array according to the phenotype description
my @sorted = sort {$a->{"description"} cmp $b->{"description"}} @{$phenotypes};
my $current = "";
my $phenotype_id;
my $study_count = 0;
my $phenotype_count = 0;
my $annotation_count = 0;
while (my $phenotype = shift(@sorted)) {
# If the rs could not be mapped to a variation id, skip it
next if (!defined($variation_ids->{$phenotype->{"rsid"}}[0]));
my $sql_study = '= ?';
my $sql_type = '= ?';
my $sql_names = '= ?';
# To avoid duplication of study entries
if (!defined $phenotype->{"study"}) {$sql_study = 'IS NULL'; }
if (!defined $phenotype->{"study_type"}) {$sql_type = 'IS NULL'; }
my $st_check_stmt = qq{
SELECT
study_id
FROM
study
WHERE
source_id = $source_id AND
external_reference $sql_study AND
study_type $sql_type
LIMIT 1
};
my $st_check_sth = $db_adaptor->dbc->prepare($st_check_stmt);
my $second_param_num = 2;
my $study_id;
if (defined $phenotype->{"study"}) {
$st_check_sth->bind_param(1,$phenotype->{"study"},SQL_VARCHAR) if (defined $phenotype->{"study"});
}
else { $second_param_num = 1; }
$st_check_sth->bind_param($second_param_num,$phenotype->{"study_type"},SQL_VARCHAR) if (defined $phenotype->{"study_type"});
$st_check_sth->execute();
$st_check_sth->bind_columns(\$study_id);
$st_check_sth->fetch();
if (!defined($study_id)) {
$st_ins_sth->bind_param(1,$phenotype->{"study"},SQL_VARCHAR);
$st_ins_sth->bind_param(2,$phenotype->{"study_type"},SQL_VARCHAR);
$st_ins_sth->bind_param(3,$phenotype->{"study_description"},SQL_VARCHAR);
$st_ins_sth->execute();
$study_count++;
$st_check_sth->bind_param(1,$phenotype->{"study"},SQL_VARCHAR) if (defined $phenotype->{"study"}); ;
$st_check_sth->bind_param($second_param_num,$phenotype->{"study_type"},SQL_VARCHAR) if (defined $phenotype->{"study_type"});
$st_check_sth->execute();
$st_check_sth->bind_columns(\$study_id);
$st_check_sth->fetch();
}
# If we have a new phenotype we need to see if it exists in the database and otherwise add it
if (defined($phenotype->{"description"}) and $phenotype->{"description"} ne $current) {
undef($phenotype_id);
$phen_check_sth->bind_param(1,$phenotype->{"description"},SQL_VARCHAR);
$phen_check_sth->execute();
$phen_check_sth->bind_columns(\$phenotype_id);
$phen_check_sth->fetch();
# If no phenotype was found, we need to add it
if (!defined($phenotype_id)) {
#$phenotype->{"name"} = ($phenotype->{"name"} ne '' ? $phenotype->{"name"} : undef);
#$phen_ins_sth->bind_param(1,$phenotype->{"name"},SQL_VARCHAR);
$phen_ins_sth->bind_param(1,undef,SQL_VARCHAR);
$phen_ins_sth->bind_param(2,$phenotype->{"description"},SQL_VARCHAR);
$phen_ins_sth->execute();
$phenotype_id = $db_adaptor->dbc->db_handle->{'mysql_insertid'};
$phenotype_count++;
}
$current = $phenotype->{"description"};
}
# Check if this phenotype already exists for this variation and source, in that case we probably want to skip it
my $va_id;
$va_check_sth->bind_param(1,$variation_ids->{$phenotype->{"rsid"}}[0],SQL_INTEGER);
$va_check_sth->bind_param(2,$phenotype_id,SQL_INTEGER);
$va_check_sth->bind_param(3,$study_id,SQL_INTEGER);
# For uniprot data
if ($source =~ m/uniprot/i) {
$va_check_sth->bind_param(4,$phenotype->{"variation_names"},SQL_VARCHAR);
}
$va_check_sth->execute();
$va_check_sth->bind_columns(\$va_id);
$va_check_sth->fetch();
next if (defined($va_id));
if (defined($phenotype->{"p_value"})) {
$phenotype->{"p_value"} = convert_p_value($phenotype->{"p_value"});
}
# Else, insert this phenotype.
$va_ins_sth->bind_param(1,$variation_ids->{$phenotype->{"rsid"}}[0],SQL_INTEGER);
$va_ins_sth->bind_param(2,$phenotype_id,SQL_INTEGER);
$va_ins_sth->bind_param(3,$study_id,SQL_INTEGER);
$va_ins_sth->bind_param(4,$phenotype->{"associated_gene"},SQL_VARCHAR);
$va_ins_sth->bind_param(5,$phenotype->{"associated_variant_risk_allele"},SQL_VARCHAR);
$va_ins_sth->bind_param(6,$phenotype->{"variation_names"},SQL_VARCHAR);
$va_ins_sth->bind_param(7,$phenotype->{"risk_allele_frequency_in_controls"},SQL_VARCHAR);
$va_ins_sth->bind_param(8,$phenotype->{"p_value"},SQL_VARCHAR);
$va_ins_sth->execute();
$annotation_count++;
}
print STDOUT "$study_count new studies added\n" if ($verbose);
print STDOUT "$phenotype_count new phenotypes added\n" if ($verbose);
print STDOUT "$annotation_count variations were annoteted with phenotypes\n" if ($verbose);
}
sub add_synonyms {
my $synonyms = shift;
my $variation_ids = shift;
my $source_id = shift;
my $db_adaptor = shift;
# If we actually didn't get any synonyms, just return
return if (!defined($synonyms) || !scalar(keys(%{$synonyms})));
# Some prepeared statements needed for inserting the synonyms into database
my $ins_stmt = qq{
INSERT IGNORE INTO
variation_synonym (
variation_id,
source_id,
name
)
VALUES (
?,
$source_id,
?
)
};
my $ins_sth = $db_adaptor->dbc->prepare($ins_stmt);
my $alt_count = 0;
my $variation_count = 0;
foreach my $rs_id (keys %{$variation_ids}) {
my $var_id = $variation_ids->{$rs_id}[0];
# If we have a variation id, we can proceed
if (defined($var_id)) {
$variation_count++;
$ins_sth->bind_param(1,$var_id,SQL_INTEGER);
# Handle all synonym ids for this rs_id
while (my $alt_id = shift(@{$synonyms->{$rs_id}})) {
# Add the id as synonym, if it is already present, it will just be ignored
$ins_sth->bind_param(2,$alt_id,SQL_VARCHAR);
$ins_sth->execute();
$alt_count++;
}
}
}
print STDOUT "Added $alt_count synonyms for $variation_count rs-ids\n" if ($verbose);
}
sub convert_p_value {
my $pval = shift;
my $sci_pval = '';
# If a scientific format is not found, then ...
if ($pval !~ /^\d+.*e.+$/i) {
# If a range format is found (e.g. 10^-2 > p > 10^-3)
if ($pval =~ /^\d+\^(-\d+)/) {
if (length("$1")==1) { $1 = "0$1"; }
$sci_pval = "1.00e$1"; # e.g 10^-2 > p > 10^-3 => 1.00e-2
}
# If a decimal format is found (e.g. 0.0023)
elsif ($pval =~ /^\d+/){
$sci_pval = $pval;
#$sci_pval = sprintf("%.2e",$pval); # e.g. 0.002 => 2,30e-3
}
elsif ($pval =~ /^\w+/) {
$sci_pval = "NULL";
}
}
else {
$pval =~ tr/E/e/;
if ($pval =~ /^(\d+)(e-?\d+)/) {
$pval="$1.00$2";
}
if ($pval =~ /^(\d+\.\d{1})(e-?\d+)/) {
$pval="$1"."0$2";
}
if ($pval =~ /^(\d+\.\d+e-?)(\d{1})$/) {
$pval = "$1"."0$2";
}
$sci_pval = $pval;
}
return $sci_pval;
}
sub usage {
print qq{
Usage: perl import_variation_annotation.pl [OPTION]
Import variation annotation phenotype data into a Variation database
Options:
-verbose Progress information is printed
-help Print this message
-skip_phenotypes Skip the study, variation_annotation and phenotype tables insertions.
-skip_synonyms Skip the variation_synonym table insertion.
Database credentials are specified on the command line
-host Variation database host name (Required)
-dbname Variation database name (Required)
-user Variation database user (Required)
-pass Variation database password (Required)
-port Variation database port (Default: 3306)
An input file must be specified. This file contains the data that will be imported, typically tab-delimited
and obtained from the UniProt or NHGRI GWAS catalog. If a new source is required, a method for parsing the
source format into a "standard" data structure can be added.
-infile Typically a tab-delimited file (Required)
The source of the data must be specified so that the correct parser and source table entry will be used. Currently
supported sources are 'uniprot' and 'nhgri'.
-source String indicating the source of the data (Required)
} . "\n";
exit(0);
}
| adamsardar/perl-libs-custom | EnsemblAPI/ensembl-variation/scripts/import/import_variation_annotation.pl | Perl | apache-2.0 | 28,436 |
#
# Copyright 2019 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package network::acmepacket::snmp::mode::components::temperature;
use strict;
use warnings;
use network::acmepacket::snmp::mode::components::resources qw($map_status);
my $mapping = {
apEnvMonTemperatureStatusDescr => { oid => '.1.3.6.1.4.1.9148.3.3.1.3.1.1.3' },
apEnvMonTemperatureStatusValue => { oid => '.1.3.6.1.4.1.9148.3.3.1.3.1.1.4' },
apEnvMonTemperatureState => { oid => '.1.3.6.1.4.1.9148.3.3.1.3.1.1.5', map => $map_status },
};
my $oid_apEnvMonTemperatureStatusEntry = '.1.3.6.1.4.1.9148.3.3.1.3.1.1';
sub load {
my ($self) = @_;
push @{$self->{request}}, { oid => $oid_apEnvMonTemperatureStatusEntry };
}
sub check {
my ($self) = @_;
$self->{output}->output_add(long_msg => "Checking temperatures");
$self->{components}->{temperature} = {name => 'temperatures', total => 0, skip => 0};
return if ($self->check_filter(section => 'temperature'));
my ($exit, $warn, $crit, $checked);
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_apEnvMonTemperatureStatusEntry}})) {
next if ($oid !~ /^$mapping->{apEnvMonTemperatureState}->{oid}\.(.*)$/);
my $instance = $1;
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_apEnvMonTemperatureStatusEntry}, instance => $instance);
next if ($self->check_filter(section => 'temperature', instance => $instance));
next if ($result->{apEnvMonTemperatureState} =~ /notPresent/i &&
$self->absent_problem(section => 'temperature', instance => $instance));
$self->{components}->{temperature}->{total}++;
$self->{output}->output_add(long_msg => sprintf("temperature '%s' status is '%s' [instance = %s, value = %s]",
$result->{apEnvMonTemperatureStatusDescr}, $result->{apEnvMonTemperatureState}, $instance,
$result->{apEnvMonTemperatureStatusValue}));
$exit = $self->get_severity(label => 'default', section => 'temperature', value => $result->{apEnvMonTemperatureState});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Temperature '%s' status is '%s'", $result->{apEnvMonTemperatureStatusDescr}, $result->{apEnvMonTemperatureState}));
}
($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{apEnvMonTemperatureStatusValue});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Temperature '%s' is '%s' C", $result->{apEnvMonTemperatureStatusDescr}, $result->{apEnvMonTemperatureStatusValue}));
}
$self->{output}->perfdata_add(
label => 'temperature', unit => 'C',
nlabel => 'hardware.temperature.celsius',
instances => $result->{apEnvMonTemperatureStatusDescr},
value => $result->{apEnvMonTemperatureStatusValue},
warning => $warn,
critical => $crit
);
}
}
1;
| Sims24/centreon-plugins | network/acmepacket/snmp/mode/components/temperature.pm | Perl | apache-2.0 | 4,150 |
#!/usr/bin/env perl
# See the NOTICE file distributed with this work for additional information
# regarding copyright ownership.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
use strict;
use warnings;
use Bio::AlignIO;
use Bio::EnsEMBL::Registry;
#
# This script fetches the gene tree associated to a given gene, and
# filters it to keep only one2one orthologs (with respect to the
# initial gene). It finally prints the multiple alignment of the
# remaining genes
#
my $reg = 'Bio::EnsEMBL::Registry';
$reg->load_registry_from_db(
-host=>'ensembldb.ensembl.org',
-user=>'anonymous',
);
my $human_gene_adaptor = $reg->get_adaptor("Homo sapiens", "core", "Gene");
my $comparaDBA = Bio::EnsEMBL::Registry-> get_DBAdaptor('Multi', 'compara');
my $gene_member_adaptor = $comparaDBA->get_GeneMemberAdaptor;
my $homology_adaptor = $comparaDBA->get_HomologyAdaptor;
my $genetree_adaptor = $comparaDBA->get_GeneTreeAdaptor;
my $genes = $human_gene_adaptor->fetch_all_by_external_name('PAX2');
my $stdout_alignio = Bio::AlignIO->newFh(-format => 'clustalw');
foreach my $gene (@$genes) {
my $member = $gene_member_adaptor->fetch_by_stable_id($gene->stable_id);
die "no members" unless (defined $member);
my $all_homologies = $homology_adaptor->fetch_all_by_Member($member);
my %leaves_names;
$leaves_names{$gene->stable_id} = 1;
foreach my $homology (@$all_homologies) {
next unless ($homology->description =~ /one2one/);
my ($gene1,$gene2) = @{$homology->gene_list};
my $temp;
unless ($gene1->stable_id =~ /ENSG0/) {
$temp = $gene1;
$gene1 = $gene2;
$gene2 = $temp;
}
$leaves_names{$gene2->stable_id} = 1;
}
# Fetch the gene tree
my $genetree = $genetree_adaptor->fetch_default_for_Member($member);
# Delete the part that is not one2one wrt the human gene
foreach my $leaf (@{$genetree->get_all_leaves}) {
my $gene_name = $leaf->gene_member->stable_id;
unless (defined $leaves_names{$gene_name}) {
$leaf->disavow_parent;
}
}
$genetree->minimize_tree;
# Print the minimized tree
$genetree->print_tree;
# Obtain the MSA for human and all one2ones
my $protein_align = $genetree->get_SimpleAlign;
print $stdout_alignio $protein_align;
$genetree->release_tree;
}
| Ensembl/ensembl-compara | scripts/examples/mixed_filterGeneTreeWithOne2ones.pl | Perl | apache-2.0 | 2,776 |
#!/usr/bin/env perl
# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
# Copyright [2016-2020] EMBL-European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
=head1
test_assembly_mapping.pl [arguments]
Produce statistics on the quality of feature mappings between two different assemblies.
Feature mappings need to be loaded first using script load_feature_mappings.pl
Sample config file: test_assembly_mapping.ini.example
Required arguments:
--host=HOST test database host HOST
--port=PORT test database port PORT
--user=USER test database username USER
--pass=PASS test database passwort PASS
--dbname=NAME test database name NAME
Optional arguments:
--conffile=filename read parameters from FILE
(default: conf/Conversion.ini)
--logfile, --log=FILE log to FILE (default: *STDOUT)
--logpath=PATH write logfile to PATH (default: .)
--logappend, --log_append append to logfile (default: truncate)
=cut
use strict;
use warnings;
no warnings 'uninitialized';
use FindBin qw($Bin);
use Getopt::Long;
use Pod::Usage;
use Bio::EnsEMBL::Utils::ConversionSupport;
use Bio::EnsEMBL::DBSQL::DBAdaptor;
use vars qw($SERVERROOT);
BEGIN {
$SERVERROOT = "$Bin/../";
}
$| = 1;
my $support = new Bio::EnsEMBL::Utils::ConversionSupport($SERVERROOT);
# parse options
$support->parse_common_options(@_);
$support->allowed_params(qw(dbname host port user pass conffile logfile logpath logappend));
if ($support->param('help') or $support->error) {
warn $support->error if $support->error;
pod2usage(1);
}
# ask user to confirm parameters to proceed
$support->confirm_params;
# get log filehandle and print heading and parameters to logfile
$support->init_log;
$support->check_required_params(qw(dbname host port user));
my ($dba, $dbh, $sql, $sth);
$dbh = $support->get_dbconnection();
my %mapping_quality = ( 1 => 'with gaps',
2 => 'without gaps');
#get chromosomes
my @chrs = @{$dbh->selectcol_arrayref("select distinct old_chr from mapping order by old_chr+0")};
foreach my $chr (@chrs) {
my @feature_types = @{$dbh->selectcol_arrayref("select distinct feature_type from mapping where old_chr = '". $chr . "' order by feature_type")};
foreach my $feature_type (@feature_types) {
$support->log_stamped("processing $feature_type mappings for chromosome $chr\n\n",1);
#count all features in the old db
$sql = "select count(1) from mapping where feature_type = '" . $feature_type . "' and old_chr = '". $chr . "'" ;
my ($total_features_old) = $dbh->selectrow_array($sql);
#count all features both in the old and new db
$sql = "select count(1) from mapping where feature_type = '" . $feature_type . "' and feature_found_in_new_db = 1 and old_chr = '". $chr . "'";
my ($total_features_old_new) = $dbh->selectrow_array($sql);
my $perc_features = ($total_features_old_new/$total_features_old) * 100;
$perc_features = sprintf "%.2f", $perc_features;
$support->log_stamped("$total_features_old_new $feature_type" . "s found in both old and new assembly dbs ($perc_features\% in old assembly db found in new db)\n\n", 1);
#count features which have the same length in the new db
$sql = "select count(1) from mapping where feature_type = '" . $feature_type . "' and feature_found_in_new_db = 1 and old_length = new_length and old_chr = '". $chr . "'";
my ($total_same_length) = $dbh->selectrow_array($sql);
my $ok_mappings_1 = 0;
my $perc_mappings_1 = 0;
if ($total_same_length > 0) {
#count mappings where start and end match feature location in the new db by mapping quality (1-contains gaps, 2 - no gaps
$support->log_stamped("$total_same_length $feature_type" . "s where feature length in the old assembly db is the same as in the new assembly db\n\n", 2);
$sql = "select count(1) as mapping_count,mapping_quality from mapping where feature_type = '" . $feature_type . "' and old_chr = '". $chr . "' and feature_found_in_new_db = 1 and old_length = new_length and new_start = mapping_start and new_end = mapping_end and (new_strand = mapping_strands or mapping_strands = 'both') and (mapping_chrs = new_chr or mapping_chrs like concat(new_chr,',%')) group by mapping_quality";
my %mapping_counts = %{$dbh->selectall_hashref($sql,"mapping_quality")};
my $ok_mappings = 0;
foreach my $mapping_q (keys %mapping_counts) {
my $perc = ($mapping_counts{$mapping_q}{'mapping_count'}/$total_same_length) * 100;
$perc = sprintf "%.2f", $perc;
$support->log_stamped("$mapping_counts{$mapping_q}{'mapping_count'} $feature_type mappings $mapping_quality{$mapping_q} where feature length in the old assembly db is the same as in the new assembly db and mapping start and end match feature location in the new db ($perc\%)\n\n", 3);
$ok_mappings += $mapping_counts{$mapping_q}{'mapping_count'};
}
$ok_mappings_1 += $ok_mappings;
my $perc_mappings = ($ok_mappings/$total_same_length) * 100;
$perc_mappings = sprintf "%.2f", $perc_mappings;
$support->log_stamped("total: $ok_mappings ok $feature_type mappings ($perc_mappings\%):\n\n", 3);
} else {
$support->log_stamped("no $feature_type" . "s found for chromosome $chr where feature length in the old assembly db is the same as in the new assembly db\n\n", 2);
}
$sql = "select count(1) from mapping where feature_type = '" . $feature_type . "' and old_chr = '". $chr . "' and feature_found_in_new_db = 1 and old_length != new_length";
my ($total_diff_length) = $dbh->selectrow_array($sql);
if ($total_diff_length > 0) {
$support->log_stamped("$total_diff_length $feature_type" . "s found for chromosome $chr where feature length in the old assembly db is different than in the new assembly db\n\n", 2);
#count features with different length in the new db where either mapping start or end match new feature start or end respectively, by mapping quality
$sql = "select count(1) as mapping_count,mapping_quality from mapping where feature_type = '" . $feature_type . "' and old_chr = '". $chr . "' and feature_found_in_new_db = 1 and old_length != new_length and (new_start = mapping_start or new_end = mapping_end) and (new_strand = mapping_strands or mapping_strands = 'both') and (mapping_chrs = new_chr or mapping_chrs like concat(new_chr,',%')) group by mapping_quality";
my %mapping_counts = %{$dbh->selectall_hashref($sql,"mapping_quality")};
my $ok_mappings = 0;
foreach my $mapping_q (keys %mapping_counts) {
my $perc = ($mapping_counts{$mapping_q}{'mapping_count'}/$total_diff_length) * 100;
$perc = sprintf "%.2f", $perc;
$support->log_stamped("$mapping_counts{$mapping_q}{'mapping_count'} $feature_type mappings $mapping_quality{$mapping_q} found for chromosome where feature length in the old assembly db is different than in the new assembly db and either mapping start or end matches the gene location in the new db ($perc\%)\n\n", 3);
$ok_mappings += $mapping_counts{$mapping_q}{'mapping_count'};
}
#count features with different length in the new db where either mapping start or end is within the difference between old and new length from the new feature start or end respectively, by mapping quality
$sql = "select count(1) as mapping_count,mapping_quality from mapping where feature_type = '" . $feature_type . "' and old_chr = '". $chr . "' and feature_found_in_new_db = 1 and old_length != new_length and (abs(new_start - mapping_start) <= abs(new_length - old_length) or abs(new_end - mapping_end) <= abs(new_length - old_length)) and new_start != mapping_start and new_end != mapping_end and (new_strand = mapping_strands or mapping_strands = 'both') and (mapping_chrs = new_chr or mapping_chrs like concat(new_chr,',%')) group by mapping_quality";
%mapping_counts = %{$dbh->selectall_hashref($sql,"mapping_quality")};
foreach my $mapping_q (keys %mapping_counts) {
my $perc = ($mapping_counts{$mapping_q}{'mapping_count'}/$total_diff_length) * 100;
$perc = sprintf "%.2f", $perc;
$support->log_stamped("$mapping_counts{$mapping_q}{'mapping_count'} $feature_type mappings $mapping_quality{$mapping_q} found for chromosome where feature length in the old assembly db is different than in the new assembly db and either mapping start or end is within the difference between old and new feature length from the new feature start or end, respectively ($perc\%)\n\n", 3);
$ok_mappings += $mapping_counts{$mapping_q}{'mapping_count'};
}
my $perc_mappings = ($ok_mappings/$total_diff_length) * 100;
$perc_mappings = sprintf "%.2f", $perc_mappings;
$support->log_stamped("total: $ok_mappings ok $feature_type mappings ($perc_mappings\%):\n\n", 3);
$ok_mappings_1 += $ok_mappings;
} else {
$support->log_stamped("no $feature_type" . "s found for chromosome $chr where feature length in the old assembly db is different than in the new assembly db\n\n", 2);
}
$perc_mappings_1 = ($ok_mappings_1/$total_features_old_new) * 100;
$perc_mappings_1 = sprintf "%.2f", $perc_mappings_1;
$support->log_stamped("total: $ok_mappings_1 ok $feature_type mappings ($perc_mappings_1\%):\n\n", 1);
}
}
# finish logfile
$support->finish_log;
| james-monkeyshines/ensembl | misc-scripts/assembly/test_assembly_mapping.pl | Perl | apache-2.0 | 10,095 |
eval "exec perl -Ssw $0 $@"
if 0;
sub main
{
$ENV{'GROFF_NO_SGR'} = 1;
# We are trying to generate All.sum and each of the category.sum's.
# All we do is put the data in the file.
open(A, ">All.summaries");
while (<>) {
if (/^NAME\s*$/) {
$line = "";
$_ = <>;
while ($_ !~ /^$/) {
$line .= "\n" if $line && /^\s*bk /;
chop;
s/^\s*//;
s/ \s+/ /g;
$line .= "$_ ";
$_ = <>;
}
$line .= "\n";
$line =~ s/Bit- Keeper/BitKeeper/g;
$line =~ s/\s+\n/\n/g;
print A $line;
}
if (/^CATEGORY\s*$/) {
$_ = <>;
while ($_ !~ /^$/) {
chop;
s/^\s*//;
unless (defined($cat{$_})) {
open($_, ">>$_.summaries");
$cat{$_} = 1;
}
print $_ "$line";
$_ = <>;
}
}
}
$section = "All";
close(A);
&summary;
foreach $section (keys %cat) {
close($section);
&summary;
}
}
sub summary
{
open(O, ">$section.roff") || die "Can't open $section.roff";
open(B, "../bk-macros");
print O <B>;
close(B);
print O ".pl 1000i\n";
print O ".TH \"$section\" sum \"\" \"\\*(BC\" \"\\*(UM\"\n";
print O ".SH NAME\n";
print O "$section \\- summary of ";
if ($section =~ /^[0-9a-zA-Z]$/) {
print O "commands in section $section\n";
} elsif ($section eq "All") {
print O "all commands and topics\n";
} else {
print O "the $section category\n";
}
# amy additions XXX
if (-r "$section.description") {
open (DESC, "$section.description");
print O <DESC>;
close(DESC);
}
# end amy additions XXX
print O ".SH COMMANDS\n";
print O ".nf\n";
open(S, "$section.summaries");
print O <S>;
close(S);
unlink("$section.summaries");
close(O);
open(F, ">$section.done");
print F "help://$section\n";
print F "help://$section.sum\n";
# If you change this list then change help.c and t.git-exporter
if ($section eq "All") {
print F "help://topics\n";
print F "help://topic\n";
print F "help://command\n";
print F "help://commands\n";
}
open(G, "groff -rhelpdoc=1 -I.. -P-u -P-b -Tascii < $section.roff |");
$nl = 0;
while (<G>) {
if (/^$/) {
$nl = 1;
next;
}
print F "\n" if ($nl);
s/^\s+/ /;
print F;
$nl = 0;
}
print F "\$\n";
close(F);
}
&main;
| bitkeeper-scm/bitkeeper | man/man2help/help2sum.pl | Perl | apache-2.0 | 2,179 |
#
# (c) Jan Gehring <jan.gehring@gmail.com>
#
# vim: set ts=3 sw=3 tw=0:
# vim: set expandtab:
package Rex::Misc::ShellBlock;
use strict;
use warnings;
use Rex::Commands;
use Rex::Commands::Fs;
use Rex::Commands::File;
use Rex::Commands::Run;
require Exporter;
use vars qw(@EXPORT);
@EXPORT = qw(shell_block);
use base qw(Exporter);
sub shell_block {
my ($shebang, $code) = @_;
if(! $code) {
$code = $shebang;
$shebang = "#!/bin/bash";
}
if($shebang !~ m/^#!\//) {
$shebang = "#!$shebang";
}
my @lines = split(/\n/, $code);
if($lines[0] !~ m/^#!\//) {
# shebang not there, so add /bin/bash for default
unshift(@lines, $shebang);
}
my $rnd_file = "/tmp/" . get_random(8, 'a' .. 'z') . ".tmp";
file $rnd_file,
content => join("\n", @lines),
mode => 755;
my $ret = run "$rnd_file 2>&1";
# my $ret = run "$rnd_file";
my $ret_code = $?;
unlink $rnd_file;
$? = $ret_code;
return $ret;
}
1;
=pod
=head1 NAME
Rex::Misc::ShellBlock - Module to execute a shell block.
=head1 DESCRIPTION
This module exports a function called I<shell_block>. This function will upload your shell script to the remote system and executes it. Returning its output as a string.
=head1 EXPORTED FUNCTIONS
=over 4
=item shell_block($code)
This function will add a default shebang of '#!/bin/bash' to your code if no shebang is found and return its output.
my $ret = shell_block <<EOF;
echo "hi"
EOF
=item shell_block($shebang, $code)
This function will add $shebang to your code and return its output.
my $ret = shell_block "/bin/sh", <<EOF;
echo "hi"
EOF
=back
=head1 USAGE
use Rex::Misc::ShellBlock;
task "myexec", sub {
shell_block <<EOF;
echo "hi"
EOF
};
| LookingDreamer/RexDeploy | lib/Rex/Misc/ShellBlock/__module__.pm | Perl | apache-2.0 | 1,781 |
# PODNAME: Moose::Manual::MethodModifiers
# ABSTRACT: Moose's method modifiers
__END__
=pod
=encoding UTF-8
=head1 NAME
Moose::Manual::MethodModifiers - Moose's method modifiers
=head1 VERSION
version 2.1404
=head1 WHAT IS A METHOD MODIFIER?
Moose provides a feature called "method modifiers". You can also think
of these as "hooks" or "advice".
It's probably easiest to understand this feature with a few examples:
package Example;
use Moose;
sub foo {
print " foo\n";
}
before 'foo' => sub { print "about to call foo\n"; };
after 'foo' => sub { print "just called foo\n"; };
around 'foo' => sub {
my $orig = shift;
my $self = shift;
print " I'm around foo\n";
$self->$orig(@_);
print " I'm still around foo\n";
};
Now if I call C<< Example->new->foo >> I'll get the following output:
about to call foo
I'm around foo
foo
I'm still around foo
just called foo
You probably could have figured that out from the names "before",
"after", and "around".
Also, as you can see, the before modifiers come before around
modifiers, and after modifiers come last.
When there are multiple modifiers of the same type, the before and
around modifiers run from the last added to the first, and after
modifiers run from first added to last:
before 2
before 1
around 2
around 1
primary
around 1
around 2
after 1
after 2
=head1 WHY USE THEM?
Method modifiers have many uses. They are often used in roles to alter the
behavior of methods in the classes that consume the role. See
L<Moose::Manual::Roles> for more information about roles.
Since modifiers are mostly useful in roles, some of the examples below
are a bit artificial. They're intended to give you an idea of how
modifiers work, but may not be the most natural usage.
=head1 BEFORE, AFTER, AND AROUND
Method modifiers can be used to add behavior to methods without modifying the definition of those methods.
=head2 Before and after Modifiers
Method modifiers can be used to add behavior to a method that Moose
generates for you, such as an attribute accessor:
has 'size' => ( is => 'rw' );
before 'size' => sub {
my $self = shift;
if (@_) {
Carp::cluck('Someone is setting size');
}
};
Another use for the before modifier would be to do some sort of
prechecking on a method call. For example:
before 'size' => sub {
my $self = shift;
die 'Cannot set size while the person is growing'
if @_ && $self->is_growing;
};
This lets us implement logical checks that don't make sense as type
constraints. In particular, they're useful for defining logical rules
about an object's state changes.
Similarly, an after modifier could be used for logging an action that
was taken.
Note that the return values of both before and after modifiers are
ignored.
=head2 Around modifiers
An around modifier is more powerful than either a before or
after modifier. It can modify the arguments being passed to the
original method, and you can even decide to simply not call the
original method at all. You can also modify the return value with an
around modifier.
An around modifier receives the original method as its first argument,
I<then> the object, and finally any arguments passed to the method.
around 'size' => sub {
my $orig = shift;
my $self = shift;
return $self->$orig()
unless @_;
my $size = shift;
$size = $size / 2
if $self->likes_small_things();
return $self->$orig($size);
};
=head2 Wrapping multiple methods at once
C<before>, C<after>, and C<around> can also modify multiple methods
at once. The simplest example of this is passing them as a list:
before [qw(foo bar baz)] => sub {
warn "something is being called!";
};
This will add a C<before> modifier to each of the C<foo>, C<bar>,
and C<baz> methods in the current class, just as though a separate
call to C<before> was made for each of them. The list can be passed
either as a bare list, or as an arrayref. Note that the name of the
function being modified isn't passed in in any way; this syntax is
only intended for cases where the function being modified doesn't
actually matter. If the function name does matter, use something like this:
for my $func (qw(foo bar baz)) {
before $func => sub {
warn "$func was called!";
};
}
=head2 Using regular expressions to select methods to wrap
In addition, you can specify a regular expression to indicate the
methods to wrap, like so:
after qr/^command_/ => sub {
warn "got a command";
};
This will match the regular expression against each method name
returned by L<Class::MOP::Class/get_method_list>, and add a modifier
to each one that matches. The same caveats apply as above.
Using regular expressions to determine methods to wrap is quite a bit more
powerful than the previous alternatives, but it's also quite a bit more
dangerous. Bear in mind that if your regular expression matches certain Perl
and Moose reserved method names with a special meaning to Moose or Perl, such
as C<meta>, C<new>, C<BUILD>, C<DESTROY>, C<AUTOLOAD>, etc, this could cause
unintended (and hard to debug) problems and is best avoided.
=head2 Execution order of method modifiers and inheritance
When both a superclass and an inheriting class have the same method modifiers,
the method modifiers of the inheriting class are wrapped around the method
modifiers of the superclass, as the following example illustrates:
Here is the parent class:
package Parent;
use Moose;
sub rant { printf " RANTING!\n" }
before 'rant' => sub { printf " In %s before\n", __PACKAGE__ };
after 'rant' => sub { printf " In %s after\n", __PACKAGE__ };
around 'rant' => sub {
my $orig = shift;
my $self = shift;
printf " In %s around before calling original\n", __PACKAGE__;
$self->$orig;
printf " In %s around after calling original\n", __PACKAGE__;
};
1;
And the child class:
package Child;
use Moose;
extends 'Parent';
before 'rant' => sub { printf "In %s before\n", __PACKAGE__ };
after 'rant' => sub { printf "In %s after\n", __PACKAGE__ };
around 'rant' => sub {
my $orig = shift;
my $self = shift;
printf " In %s around before calling original\n", __PACKAGE__;
$self->$orig;
printf " In %s around after calling original\n", __PACKAGE__;
};
1;
And here's the output when we call the wrapped method (C<< Child->rant >>):
% perl -MChild -e 'Child->new->rant'
In Child before
In Child around before calling original
In Parent before
In Parent around before calling original
RANTING!
In Parent around after calling original
In Parent after
In Child around after calling original
In Child after
=head1 INNER AND AUGMENT
Augment and inner are two halves of the same feature. The augment
modifier provides a sort of inverted subclassing. You provide part of
the implementation in a superclass, and then document that subclasses
are expected to provide the rest.
The superclass calls C<inner()>, which then calls the C<augment>
modifier in the subclass:
package Document;
use Moose;
sub as_xml {
my $self = shift;
my $xml = "<document>\n";
$xml .= inner();
$xml .= "</document>\n";
return $xml;
}
Using C<inner()> in this method makes it possible for one or more
subclasses to then augment this method with their own specific
implementation:
package Report;
use Moose;
extends 'Document';
augment 'as_xml' => sub {
my $self = shift;
my $xml = " <report>\n";
$xml .= inner();
$xml .= " </report>\n";
return $xml;
};
When we call C<as_xml> on a Report object, we get something like this:
<document>
<report>
</report>
</document>
But we also called C<inner()> in C<Report>, so we can continue
subclassing and adding more content inside the document:
package Report::IncomeAndExpenses;
use Moose;
extends 'Report';
augment 'as_xml' => sub {
my $self = shift;
my $xml = ' <income>' . $self->income . '</income>';
$xml .= "\n";
$xml .= ' <expenses>' . $self->expenses . '</expenses>';
$xml .= "\n";
$xml .= inner() || q{};
return $xml;
};
Now our report has some content:
<document>
<report>
<income>$10</income>
<expenses>$8</expenses>
</report>
</document>
What makes this combination of C<augment> and C<inner()> special is
that it allows us to have methods which are called from parent (least
specific) to child (most specific). This inverts the normal
inheritance pattern.
Note that in C<Report::IncomeAndExpenses> we call C<inner()> again. If the
object is an instance of C<Report::IncomeAndExpenses> then this call is a
no-op, and just returns false. It's a good idea to always call C<inner()> to
allow for future subclassing.
=head1 OVERRIDE AND SUPER
Finally, Moose provides some simple sugar for Perl's built-in method
overriding scheme. If you want to override a method from a parent
class, you can do this with C<override>:
package Employee;
use Moose;
extends 'Person';
has 'job_title' => ( is => 'rw' );
override 'display_name' => sub {
my $self = shift;
return super() . q{, } . $self->title();
};
The call to C<super()> is almost the same as calling C<<
$self->SUPER::display_name >>. The difference is that the arguments
passed to the superclass's method will always be the same as the ones
passed to the method modifier, and cannot be changed.
All arguments passed to C<super()> are ignored, as are any changes
made to C<@_> before C<super()> is called.
=head1 SEMI-COLONS
Because all of these method modifiers are implemented as Perl
functions, you must always end the modifier declaration with a
semi-colon:
after 'foo' => sub { };
=head1 CAVEATS
These method modification features do not work well with multiple inheritance,
due to how method resolution is performed in Perl. Experiment with a test
program to ensure your class hierarchy works as expected, or more preferably,
don't use multiple inheritance (roles can help with this)!
=head1 AUTHORS
=over 4
=item *
Stevan Little <stevan.little@iinteractive.com>
=item *
Dave Rolsky <autarch@urth.org>
=item *
Jesse Luehrs <doy@tozt.net>
=item *
Shawn M Moore <code@sartak.org>
=item *
ΧΧΧΧ Χ§ΧΧ'ΧΧ (Yuval Kogman) <nothingmuch@woobling.org>
=item *
Karen Etheridge <ether@cpan.org>
=item *
Florian Ragwitz <rafl@debian.org>
=item *
Hans Dieter Pearcey <hdp@weftsoar.net>
=item *
Chris Prather <chris@prather.org>
=item *
Matt S Trout <mst@shadowcat.co.uk>
=back
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2006 by Infinity Interactive, Inc..
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
| ray66rus/vndrv | local/lib/perl5/x86_64-linux-thread-multi/Moose/Manual/MethodModifiers.pod | Perl | apache-2.0 | 11,068 |
#!/usr/bin/env perl
# Copyright [1999-2014] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
use strict;
use warnings;
use Bio::EnsEMBL::Registry;
#
# This script creates a species tree for a given list of species using
# the NCBITaxon facilities of the Compara database
#
my $reg = 'Bio::EnsEMBL::Registry';
$reg->load_registry_from_db(
-host=>'ensembldb.ensembl.org',
-user=>'anonymous',
);
my $taxonDBA = $reg->get_adaptor("Multi", "compara", "NCBITaxon");
my @list_of_species = ("Homo sapiens","Mus musculus","Drosophila melanogaster","Caenorhabditis elegans");
my $root;
foreach my $species_name (@list_of_species) {
my $taxon = $taxonDBA->fetch_node_by_name($species_name);
next unless defined($taxon);
unless (defined($taxon->binomial)) {
print STDERR "WARN: No binomial for $species_name\n";
next;
}
my $taxon_name = $taxon->name;
my $taxon_id = $taxon->taxon_id;
print STDERR " $taxon_name [$taxon_id]\n";
$taxon->release_children;
$root = $taxon->root unless($root);
$root->merge_node_via_shared_ancestor($taxon);
}
$root = $root->minimize_tree;
print "MRCA is ", $root->name, "\t", $root->taxon_id, "\n";
$root->print_tree(10);
| dbolser-ebi/ensembl-compara | scripts/examples/species_buildSpeciesTree.pl | Perl | apache-2.0 | 1,765 |
#
# Copyright 2016 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and application monitoring for
# service performance.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
package database::postgres::mode::listdatabases;
use base qw(centreon::plugins::mode);
use strict;
use warnings;
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '1.0';
$options{options}->add_options(arguments =>
{
"exclude:s" => { name => 'exclude', },
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::init(%options);
}
sub manage_selection {
my ($self, %options) = @_;
$self->{sql}->connect();
$self->{sql}->query(query => q{
SELECT datname FROM pg_database
});
$self->{list_db} = [];
while ((my $row = $self->{sql}->fetchrow_hashref())) {
if (defined($self->{option_results}->{exclude}) && $row->{datname} !~ /$self->{option_results}->{exclude}/) {
$self->{output}->output_add(long_msg => "Skipping database '" . $row->{datname} . "': no matching filter name");
next;
}
push @{$self->{list_db}}, $row->{datname};
}
}
sub run {
my ($self, %options) = @_;
# $options{sql} = sqlmode object
$self->{sql} = $options{sql};
$self->manage_selection();
foreach my $name (sort @{$self->{list_db}}) {
$self->{output}->output_add(long_msg => "'" . $name . "'");
}
$self->{output}->output_add(severity => 'OK',
short_msg => "List of databases:");
$self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
$self->{output}->exit();
}
sub disco_format {
my ($self, %options) = @_;
$self->{output}->add_disco_format(elements => ['name']);
}
sub disco_show {
my ($self, %options) = @_;
$self->{sql} = $options{sql};
$self->manage_selection();
foreach (sort @{$self->{list_db}}) {
$self->{output}->add_disco_entry(name => $_);
}
}
1;
__END__
=head1 MODE
Display databases
=over 8
=item B<--exclude>
Filter databases.
=back
=cut
| bcournaud/centreon-plugins | database/postgres/mode/listdatabases.pm | Perl | apache-2.0 | 2,903 |
#!/usr/bin/perl
# A small script to update tenant count of operation server.
# install module DBI, DBD::mysql first.
use DBI;
use Time::Local 'timelocal_nocheck';
use Time::Piece;
use strict;
my $host_op = "localhost";
my $mdm_csv = "mdm.csv";
open(MDM_F, "< :encoding(UTF-8)", $mdm_csv);
binmode(STDOUT, ':utf8');
<MDM_F>; #skip header line
#my $dbh_op = DBI->connect("dbi:mysql:mdm_operation:$host_op:3306", 'root', 'pekall1234');
#my $sth = $dbh->prepare("insert into mdm_deployment (id, name, version, tenant_count, create_time, update_time) values (?,?,?,?,?,?)");
my $dbh_op = create_connection('mdm_operation', $host_op, undef, undef, undef);
#set charset env.
$dbh_op->do("SET character_set_client='utf8'");
$dbh_op->do("SET character_set_connection='utf8'");
$dbh_op->do("SET character_set_results='utf8'");
my $sth_op = $dbh_op->prepare("insert into mdm_deployment (id, name, version, host, port, tenant_count, create_time, update_time) values (?,?,?,?,?,?,?,?)");
$dbh_op->do("delete from mdm_deployment");
$dbh_op->do("delete from mdm_com_deployment");
while(my $line=<MDM_F>){
chomp($line);
my @row = split(",", $line);
print "@row \n\n";
my $name = $row[0];
chomp($name);
my $version = $row[1];
chomp($version);
my $host = $row[2];
chomp($host);
my $port = $row[3];
chomp($port);
my $db_host = $row[4] ? $row[4] : $host;
# create mdm connection
my $dbh_mdm = create_connection('mdm_reactor', $db_host, $row[5], $row[6], $row[7]);
if($dbh_mdm == undef){
print "$DBI::errstr \n";
next;
}
my $count = count($dbh_mdm);
print "$count comany in $host\n\n";
#create deployment
my $deploy_id = createUUID();
$sth_op->execute($deploy_id, $name, $version, $host, $port, $count, now(), now());
my $com_id_arr = get_com_id_array($dbh_mdm);
create_com_deployments($deploy_id , $com_id_arr);
$dbh_mdm->disconnect();
}
$sth_op->finish();
$dbh_op->disconnect();
close(MDM_F);
sub createUUID{
my $uuid = `uuidgen`;
$uuid =~ s/\-//g;
chomp($uuid);
return $uuid;
}
sub now{
my $t = localtime;
my $now = $t->datetime;
$now =~ y/T/ /;
return $now;
}
sub create_connection{
my ($db_name, $db_host, $db_port, $db_user, $db_password) = @_;
if(!$db_port){
$db_port = 3306;
}
if(!$db_user){
$db_user = 'root';
}
if(!$db_password){
$db_password = 'pekall1234';
}
return DBI->connect("dbi:mysql:$db_name:$db_host:$db_port", $db_user, $db_password);
}
sub count{
my $dbh = shift(@_);
my $sth = $dbh->prepare("select count(*) from mdm_company_info");
$sth->execute();
my $count = 0;
while(my @row = $sth->fetchrow_array){
$count = $row[0];
}
return $count;
}
# Create company deployment relations
sub create_com_deployments{
my ($deploy_id, $com_id_arr) = @_;
my $sth = $dbh_op->prepare("insert into mdm_com_deployment (id, deployment_id, tenant_id) values (?,?,?)");
for my $com_id (@$com_id_arr){
my $uuid = createUUID();
$sth->execute($uuid, $deploy_id, $com_id);
print "id=$uuid, com_id=$com_id, deploy_id=$deploy_id\n";
}
$sth->finish();
}
sub get_com_id_array{
my @com_id_list;
my $dbh = shift(@_);
my $sth = $dbh->prepare("select id from mdm_company_info");
$sth->execute();
while(my @row = $sth->fetchrow_array){
push @com_id_list, $row[0];
}
$sth->finish();
return \@com_id_list;
}
| yaohuiwu/perl-examples | dbi_demo/tenant_statistics.pl | Perl | apache-2.0 | 3,294 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.