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 |
|---|---|---|---|---|---|
#! /usr/bin/env perl
use lib "$ENV{HOME}/workspace/Oates/lib/";
use strict;
use warnings;
use DBI;
use Supfam::SQLFunc;
#This program is supposed to: Calculate horizontal transfer between kingdoms (from LUCA)
#Julian Gough 29.3.08
#Adam Sardar 31.1.2011
#SQL--
my $dbh = dbConnect;
my $sth;
#-----
#Variables------------------
my ($usage,$treefile);
my ($i,$ii,$jj,$arch,$deletions,$clade,$example,$avegenomes,$genquery,$thisone,$gennum,$selftest,$html,@flag,@temp,$count);
my (%parent,%genomes,%distances,%childs,%stored,%results,%distribution);
my (@archs,@gens);
my $j=0;my $iarch=0;
my $iterations=500;
my $ratio=0;
my $falsenegrate=0.05;
my $completes='n';
my $average=0;
my $test='n';
#---------------------------
#ARGUEMENTS-------------------------------------------
$usage="hgt.pl <treefile> <outrgoup E/B/A>\n";
die "Usage: $usage" unless (@ARGV == 2);
$treefile=$ARGV[0];
my $outgroup=$ARGV[1];
if ($treefile =~ /(\S+)\.\S+/){$html="$1"."_$outgroup.html";}else{$html="$treefile"."_$outgroup.html";}
open HTML,(">$html");
#-----------------------------------------------------
#Read-tree
@temp=&ReadTree($treefile);
$i=$temp[0];
%parent=%$i;
$i=$temp[1];
%distances=%$i;
$i=$temp[2];
%childs=%$i;
#---------
#Check-genomes-list
$clade='';
foreach $i (keys(%parent)){
if (length($i) == 2){
push @gens,$i;
}
if (length($parent{$i}) > length($clade)){
$clade=$parent{$i};
}
}
$genquery = join "' or genome.genome='",@gens;
$genquery="(genome.genome='$genquery')";
$sth = $dbh->prepare("SELECT include,password,genome FROM genome WHERE $genquery;");
$sth->execute();
while (@temp=$sth->fetchrow_array()){
unless ($temp[0] eq 'y' and $temp[1] eq ''){
print STDERR "Genome: $temp[2] is in the tree but should not be!\n";die;
}
}
#------------------
my $lengenquery = join "' or len_comb.genome='",@gens;
$lengenquery="(len_comb.genome='$lengenquery')";
#Get-list-of-architectures---------------------------
$sth = $dbh->prepare("SELECT DISTINCT len_comb.comb FROM len_comb WHERE $lengenquery AND len_comb.comb != '_gap_';");
$sth->execute();
while (@temp=$sth->fetchrow_array()){
unless ($completes eq 'y' and $temp[0] =~ /_gap_/){
push @archs,$temp[0];
}
}
#----------------------------------------------------
#Main-loop-------------------------------------------
foreach $arch (0 .. scalar(@archs)-1){
#$arch=$archs[(scalar(@archs)-1-$arch)];
$arch=$archs[$arch];
$iarch++;
#get-genomes---
%genomes=();$example='none';@flag=(0,0);
$sth = $dbh->prepare("SELECT DISTINCT len_comb.genome,genome.domain FROM len_comb JOIN genome ON len_comb.genome=genome.genome WHERE (($lengenquery)) AND len_comb.comb = '$arch';");
#OR genome.domain='$outgroup'
$sth->execute();
while (@temp=$sth->fetchrow_array()){
if ($temp[1] eq $outgroup){
$flag[0]=1;
if (exists($parent{$temp[0]})){
$genomes{$temp[0]}=1;
$example=$temp[0];
}
}
else{
$flag[1]=1;
if (exists($parent{$temp[0]})){
$genomes{$temp[0]}=1;
$example=$temp[0];
}
}
}
if ($example eq 'none'){
print STDERR "No genomes for this architecture: $arch\n";die;
}
#--------------
#produce distributions
if ($flag[0] and $flag[1]){
$deletions=&Deleted($clade,\%parent,\%genomes,\%childs,\%distances);
if ($deletions > 0){
$thisone=(length($clade)+1)/3;$thisone=$thisone.":$deletions";
unless (exists($stored{$thisone})){
@temp=&RandomModel($clade,$deletions,\%parent,\%childs,\%distances,$iterations,$falsenegrate);$selftest=pop(@temp);$stored{$thisone}=join ',',@temp;
}
#---------------------
#work out addition to results for this architecture
@temp=split /,/,$stored{$thisone};
%distribution=@temp;
$ii=0;
if ($test eq 'y'){$gennum=$selftest;}else{$gennum=scalar(keys(%genomes));}
for $i (0 .. (length($clade)+1)/3){
if ($i == $gennum){
if (exists($distribution{$i})){
$jj=$ii+1;
for (1 .. $distribution{$i}){
if (exists($results{$jj})){
$results{$jj}=$results{$jj}+1/$distribution{$i};$average=$average+$jj/$distribution{$i};
}
else{
$results{$jj}=1/$distribution{$i};$average=$average+$jj/$distribution{$i};
}
$jj++;
}
}
else{
if (exists($results{$ii})){
$results{$ii}=$results{$ii}+0.5;
}
else{
$results{$ii}=0.5;
}
if (exists($results{($ii+1)})){
$results{($ii+1)}=$results{($ii+1)}+0.5;
}
else{
$results{($ii+1)}=0.5;
}
$average=$average+$ii;
}
last;
}
if (exists($distribution{$i})){
$ii=$ii+$distribution{$i};
}
}
#--------------------------------------------------
#output
$j++;print STDERR "Average: ",($average/$j-$iterations/2)/$iterations," ... done $iarch of ",scalar(@archs),"\n";
#for $i (1 .. $iterations){
# unless ($i == 1){print ",";}
# if (exists($results{$i})){
#print "$i $results{$i}";
# }
#else{
#print "$i 0";
#}
#}
#Commented out so as to simplify output
print "\n";
print HTML "<a href=http://supfam.cs.bris.ac.uk/pethica/cgi-bin/phyloserve/maketree.cgi?genomes=";
print HTML join ',',keys(%genomes);
print HTML ">$arch</a> Score: $ii<BR>\n";
#------
}
}else {$count++;print STDERR "Skipped $count \n ";}
}
#close HTML;
dbDisconnect($dbh) ;
#----------------------------------------------------
sub Deviation{
my $i=$_[0];
my $iter=$_[1];
my %dist;
return (\%dist);
}
sub Clade{
my $clade=$_[0];
my $flag=1;
my @gens;
my $i;
my %children=();$i=$_[1];my %parent=%$i;$i=$_[2];my %genomes=%$i;
until ($flag == 0){
$flag=0;
@gens=split /:/,$clade;
foreach $i (@gens){
$children{$i}=1;
}
foreach $i (keys(%genomes)){
unless (exists($children{$i})){
$flag=1;
if ($parent{$clade} eq ''){print STDERR "Problem with the tree \n";
die;}
$clade=$parent{$clade};
last;
}
}
}
return ($clade);
}
sub Deleted{
my $clade=$_[0];
my ($i,$flag);
$i=$_[1];my %parent=%$i;$i=$_[2];my %genomes=%$i;$i=$_[3];my %childs=%$i;$i=$_[4];my %distances=%$i;
my ($dels,$time);
$time=0;$dels=0;
my @nodes;
my @temp;
if (length($clade) == 2){@nodes=($clade);}else{@nodes=split /,/,$childs{$clade};}
until (scalar(@nodes) == 0){
$clade=pop(@nodes);
#check to see if the clade is empty
$flag=0;
@temp=split /:/,$clade;
foreach $i (@temp){
if (exists($genomes{$i})){
$flag=1;last;
}
}
#----------------------------------
if ($flag == 0){
$time=$time+$distances{$clade}/2;
$dels++;
}
else{
$time=$time+$distances{$clade};
unless (length($clade) == 2){
@temp=split /,/,$childs{$clade};
if (scalar(@temp) != 2){print STDERR "More than one child to a node\n";die;}
foreach $i (@temp){
push @nodes,$i;
}
}
}
}
return(($dels/$time));
}
sub RandomModel{
my $clade=$_[0];
my $deletions=$_[1];
my $iterations=$_[5];
my $falsenegrate=$_[6];
my $i;$i=$_[2];my %parent=%$i;$i=$_[3];my %childs=%$i;$i=$_[4];my %distances=%$i;
my $cladetime=0;
my (@temp,@nodes,@gens);
my ($delstodo,$iter,$gen,$extradels,$delpoint,$falses,$time,$selftest);
my (%genomes,%modelgens,%distribution);
my $totalgens=0;
#work out time in clade
if (length($clade) == 2){@nodes=($clade);}else{@nodes=split /,/,$childs{$clade};}
until (scalar(@nodes) == 0){
$clade=pop(@nodes);
unless (length($clade) == 2){
@temp=split /,/,$childs{$clade};
foreach $i (@temp){
push @nodes,$i;
}
}
else{
$genomes{$clade}=1;
push @gens,$clade;
}
$cladetime=$cladetime+$distances{$clade};
}
#----------------------
$deletions=$deletions*$cladetime;
#do iterations to get averages
$selftest=int(rand($iterations))+1;
for $iter (1 .. $iterations){
$falses=0;
$delstodo=int($deletions);
$extradels=$deletions-int($deletions);
if ($extradels > rand(1)){
$delstodo++;
}
#random model
%modelgens=%genomes;
until ($delstodo == 0){
if (scalar(keys(%modelgens)) == 0){last;}
if ($falsenegrate > rand(1)){
$falses=int(rand(scalar(@gens)));
$falses=$gens[$falses];
delete($modelgens{$falses});
$delstodo--;
next;
}
$delpoint=rand($cladetime);
$clade=$_[0];$time=0;
#tree
@nodes=split /,/,$childs{$clade};
until (scalar(@nodes) == 0){
$clade=pop(@nodes);
unless (length($clade) == 2){
@temp=split /,/,$childs{$clade};
foreach $i (@temp){
push @nodes,$i;
}
}
$time=$time+$distances{$clade};
if ($time > $delpoint){
@temp=split /:/,$clade;
foreach $gen (@temp){
delete($modelgens{$gen});
}
last;
}
}
#----
$delstodo--;
}
$totalgens=scalar(keys(%modelgens));
if ($iter == $selftest){$selftest=scalar(keys(%modelgens));}
if (exists($distribution{$totalgens})){$distribution{$totalgens}++}else{$distribution{$totalgens}=1;}
#------------
}
#-----------------------------
@temp=%distribution;
return (@temp,$selftest);
}
sub ReadTree{
#ARGS: ReadTree($treefile)
#read-in-tree-----------------------------------------
my $leaf='';
my @tree;
my $next=-1;
my $gen;
my $i;
my $flag=1;
my (%nodeup,%nodedown);
my %distances;
my $treefile=$_[0];
my $node;
my ($one,$two,$three);
my @middles;
my $middle;
my $end;
open TREE,("$treefile");
while (<TREE>){
if (/\S/){
$leaf=$leaf.$_;
chomp $leaf;
}
}
close TREE;
$leaf =~ s/\;//g;
@tree=split /,/,$leaf;
until ($flag == 0){
$flag=0;
$next=-1;
foreach $i (0 .. scalar(@tree)-1){
$leaf = $tree[$i];
unless ($leaf eq ':'){
unless ($next == -1){
if ($leaf =~ /^([\w:]+):(-?\d+\.?\d*)\)(\S*)$/){
$distances{$1}=$2;
$end="$1$3";
$node=$gen;
$one=$1;
foreach $middle (@middles){
$middle =~ /^(\S+):(-?\d+\.?\d*),(\d+)$/;
#print '$1= '.$1.'$2= '.$2.' $3= '.$3."\n";
$node=$node.':'.$1;
$tree[$3]=':';
}
$tree[$i]=':';
$node="$node:$end";
$tree[$next]=$node;
$node =~ s/:-?\d+\.?\d*\)//g;$node =~ s/:-?\d+\.?\d*$//g;$node =~ s/\)//g;$node =~ s/\(//g;
$gen =~ s/\)//g;$gen =~ s/\(//g;
$one =~ s/\)//g;$one =~ s/\(//g;
$nodeup{$gen}=$node;if (exists($nodedown{$node})){unless ($nodedown{$node}=~/,/){$nodedown{$node}=$nodedown{$node}.",$gen";}}else{$nodedown{$node}=$gen;}
$nodeup{$one}=$node;if (exists($nodedown{$node})){unless ($nodedown{$node}=~/,/){$nodedown{$node}=$nodedown{$node}.",$one";}}else{$nodedown{$node}=$one;}
foreach $middle (@middles){
$middle =~ /^([\w\:]+):(-?\d+\.?\d*),(\d+)$/;$one=$1;$two=$2;
$distances{$one}=$two;if (exists($nodedown{$node})){unless ($nodedown{$node}=~/,/){$nodedown{$node}=$nodedown{$node}.",$one";}}else{$nodedown{$node}=$one;}
$nodeup{$one}=$node;
}
$flag=1;
$next=-1;
}
elsif ($leaf =~ /\)/ or $leaf =~ /\(/){
$next=-1;
}
else{
push @middles,"$leaf,$i";
}
}
if($leaf =~ /^(\S*)\(([\w:]+):(-?\d+\.?\d*)$/){
$distances{$2}=$3;
@middles=();
$next=$i;
$gen="$1$2";
}
}
}
}
$distances{$node}=0;
return(\%nodeup,\%distances,\%nodedown);
#-----------------------------------------------------
}
| adamsardar/HGT | hgt_luca.pl | Perl | apache-2.0 | 10,254 |
package Paws::AutoScaling::DescribeLaunchConfigurations;
use Moose;
has LaunchConfigurationNames => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
has MaxRecords => (is => 'ro', isa => 'Int');
has NextToken => (is => 'ro', isa => 'Str');
use MooseX::ClassAttribute;
class_has _api_call => (isa => 'Str', is => 'ro', default => 'DescribeLaunchConfigurations');
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::AutoScaling::LaunchConfigurationsType');
class_has _result_key => (isa => 'Str', is => 'ro', default => 'DescribeLaunchConfigurationsResult');
1;
### main pod documentation begin ###
=head1 NAME
Paws::AutoScaling::DescribeLaunchConfigurations - Arguments for method DescribeLaunchConfigurations on Paws::AutoScaling
=head1 DESCRIPTION
This class represents the parameters used for calling the method DescribeLaunchConfigurations on the
Auto Scaling service. Use the attributes of this class
as arguments to method DescribeLaunchConfigurations.
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DescribeLaunchConfigurations.
As an example:
$service_obj->DescribeLaunchConfigurations(Att1 => $value1, Att2 => $value2, ...);
Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
=head1 ATTRIBUTES
=head2 LaunchConfigurationNames => ArrayRef[Str|Undef]
The launch configuration names. If you omit this parameter, all launch
configurations are described.
=head2 MaxRecords => Int
The maximum number of items to return with this call. The default value
is 50 and the maximum value is 100.
=head2 NextToken => Str
The token for the next set of items to return. (You received this token
from a previous call.)
=head1 SEE ALSO
This class forms part of L<Paws>, documenting arguments for method DescribeLaunchConfigurations in L<Paws::AutoScaling>
=head1 BUGS and CONTRIBUTIONS
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
=cut
| ioanrogers/aws-sdk-perl | auto-lib/Paws/AutoScaling/DescribeLaunchConfigurations.pm | Perl | apache-2.0 | 2,242 |
false :-
main_verifier_error.
verifier_error(A,B,C) :-
A=0,
B=0,
C=0.
verifier_error(A,B,C) :-
A=0,
B=1,
C=1.
verifier_error(A,B,C) :-
A=1,
B=0,
C=1.
verifier_error(A,B,C) :-
A=1,
B=1,
C=1.
f91(A,B,C,D,E) :-
A=1,
B=1,
C=1.
f91(A,B,C,D,E) :-
A=0,
B=1,
C=1.
f91(A,B,C,D,E) :-
A=0,
B=0,
C=0.
f91__1(A) :-
true.
f91__3(A) :-
f91__1(A),
A>100.
f91__5(A) :-
f91__1(A),
A=<100.
f91___0(A,B) :-
f91__3(B),
A=B+ -10.
f91___0(A,B) :-
C=1,
D=0,
E=0,
f91__5(B),
f91(1,0,0,B+11,F),
f91(C,D,E,F,A).
f91__split(A,B) :-
f91___0(A,B).
f91(A,B,C,D,E) :-
A=1,
B=0,
C=0,
f91__split(E,D).
main_entry :-
true.
main__un(A,B) :-
main_entry,
f91(1,0,0,A,B),
B<91.
main__un(A,B) :-
main_entry,
f91(1,0,0,A,B),
B>91.
main__un1 :-
main__un(A,B),
A=<102.
main__un1 :-
main__un(A,B),
B<A+ -10.
main__un1 :-
main__un(A,B),
B>A+ -10.
main_verifier_error :-
main__un1.
| bishoksan/RAHFT | benchmarks_scp/SVCOMP15/svcomp15-clp/McCarthy91_false-unreach-call_false-termination.c.pl | Perl | apache-2.0 | 999 |
#!/usr/bin/perl -w
#
# gram5-glue2-endpoint-dynamic: an information provider plugin for the
# dynamic part of the Endpoint object, in v 2.0 of the GLUE schema
# It can be installed as a gip plugin
#
# Author: Dennis van Dok
# Based on glite-info-glue2-endpoint by Stephen Burke,
# with modifications by Massimo Sgaravatto and David Groep.
# Ref: http://www.ogf.org/documents/GFD.147.pdf
# http://glue20.web.cern.ch/glue20/
# Copyright (c) Members of the EGEE Collaboration. 2010.
# See http://www.eu-egee.org/partners/ for details on the copyright
# holders.
#
# 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 FileHandle;
use POSIX qw(strftime);
use Site::Configuration;
use Getopt::Long;
my $debug = 0;
GetOptions("debug" => \$debug) or die "Error parsing command line options";
if ($debug) {
print STDERR q{Entering debugging mode. Configuration read from current directory.
};
$Site::Configuration::confdir = ".";
}
# Hardwire the data validity period to 1 hour for now
my $validity = "3600";
my %ce = readconfig("ce.conf");
my %cluster = readconfig("cluster.conf");
# Determine this host.
chomp(my $hostname = `hostname -f`);
my $host = ($ce{top}{node} || $hostname);
my $n = $ce{$host};
my $clustername = $$n{cluster};
my $c = $cluster{$clustername} or die "Missing cluster $clustername in cluster.conf, stopped";
# Get service id from conf file. This is a cluster property (cf. gLite CLUSTER)
my $ServiceID = $$c{ComputingServiceID} or die "Missing ComputingServiceID in $clustername, stopped";
my $EndPointId = $ServiceID . "_org.globus.gram";
my $bind_dn = "GLUE2ServiceID=$ServiceID,GLUE2GroupID=resource,o=glue";
# Now start outputting LDIF lines for the Endpoint object.
# Note that once we get here we are committed to printing a
# complete, valid object. Start with the DN ...
print "dn: GLUE2EndpointID=$EndPointId,$bind_dn\n";
# Times are mandated to be UTC only
my $TimeNow = strftime("%Y-%m-%dT%H:%M:%SZ", gmtime());
print "GLUE2EntityCreationTime: $TimeNow\n";
# Validity is hardwired above
print "GLUE2EntityValidity: $validity\n";
my $Info = `/sbin/service globus-gatekeeper status`;
# What devilry is this?
my $Status = $? >> 8;
my $Statcode;
if ($Status == 0) { $Statcode = "ok" }
elsif ($Status == 1) { $Statcode = "critical" }
elsif ($Status == 2) { $Statcode = "warning" }
elsif ($Status == 3) { $Statcode = "unknown" }
else { $Statcode = "other" }
print "GLUE2EndpointHealthState: $Statcode\n";
# Info is now optional
if ($Info) {
trunc($Info);
print "GLUE2EndpointHealthStateInfo: $Info\n";
}
| dvandok/gram5-info-provider | globus-gip-gram5-glue2-endpoint-dynamic.pl | Perl | apache-2.0 | 3,095 |
#
# 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 cloud::azure::database::mysql::mode::ioconsumption;
use base qw(cloud::azure::custom::mode);
use strict;
use warnings;
sub get_metrics_mapping {
my ($self, %options) = @_;
my $metrics_mapping = {
'io_consumption_percent' => {
'output' => 'IO Percent',
'label' => 'ioconsumption-usage',
'nlabel' => 'azmysql.ioconsumption.usage.percentage',
'unit' => '%',
'min' => '0',
'max' => '100'
}
};
return $metrics_mapping;
}
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 => {
'filter-metric:s' => { name => 'filter_metric' },
'resource:s' => { name => 'resource' },
'resource-group:s' => { name => 'resource_group' },
'resource-type:s' => { name => 'resource_type' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
if (!defined($self->{option_results}->{resource}) || $self->{option_results}->{resource} eq '') {
$self->{output}->add_option_msg(short_msg => 'Need to specify either --resource <name> with --resource-group option or --resource <id>.');
$self->{output}->option_exit();
}
if (!defined($self->{option_results}->{resource_type}) || $self->{option_results}->{resource_type} eq '') {
$self->{output}->add_option_msg(short_msg => 'Need to specify --resource-type option');
$self->{output}->option_exit();
}
my $resource = $self->{option_results}->{resource};
my $resource_group = defined($self->{option_results}->{resource_group}) ? $self->{option_results}->{resource_group} : '';
my $resource_type = $self->{option_results}->{resource_type};
if ($resource =~ /^\/subscriptions\/.*\/resourceGroups\/(.*)\/providers\/Microsoft\.DBforMySQL\/(.*)\/(.*)$/) {
$resource_group = $1;
$resource_type = $2;
$resource = $3;
}
$self->{az_resource} = $resource;
$self->{az_resource_group} = $resource_group;
$self->{az_resource_type} = $resource_type;
$self->{az_resource_namespace} = 'Microsoft.DBforMySQL';
$self->{az_timeframe} = defined($self->{option_results}->{timeframe}) ? $self->{option_results}->{timeframe} : 900;
$self->{az_interval} = defined($self->{option_results}->{interval}) ? $self->{option_results}->{interval} : 'PT5M';
$self->{az_aggregations} = ['Maximum'];
if (defined($self->{option_results}->{aggregation})) {
$self->{az_aggregations} = [];
foreach my $stat (@{$self->{option_results}->{aggregation}}) {
if ($stat ne '') {
push @{$self->{az_aggregations}}, ucfirst(lc($stat));
}
}
}
foreach my $metric (keys %{$self->{metrics_mapping}}) {
next if (defined($self->{option_results}->{filter_metric}) && $self->{option_results}->{filter_metric} ne ''
&& $metric !~ /$self->{option_results}->{filter_metric}/);
push @{$self->{az_metrics}}, $metric;
}
}
1;
__END__
=head1 MODE
Check Azure Database for MySQL IO comsuption usage.
Example:
Using resource name :
perl centreon_plugins.pl --plugin=cloud::azure::database::mysql::plugin --mode=io-consumption --custommode=api
--resource=<db_id> --resource-group=<resourcegroup_id> --aggregation='maximum'
--warning-ioconsumption-usage='80' --critical-ioconsumption-usage='90'
Using resource id :
perl centreon_plugins.pl --plugin=cloud::azure::integration::servicebus::plugin --mode=io-consumption --custommode=api
--resource='/subscriptions/<subscription_id>/resourceGroups/<resourcegroup_id>/providers/Microsoft.DBforMySQL/servers/<db_id>'
--aggregation='maximum' --warning-ioconsumption-usage='80' --critical-ioconsumption-usage='90'
Default aggregation: 'average' / 'total', 'minimum' and 'maximum' are valid.
=over 8
=item B<--resource>
Set resource name or id (Required).
=item B<--resource-group>
Set resource group (Required if resource's name is used).
=item B<--resource-type>
Set resource type (Default: 'servers'). Can be 'servers', 'flexibleServers'.
=item B<--warning-ioconsumption-usage>
Set warning threshold for IO comsuption usage.
=item B<--critical-ioconsumption-usage>
Set critical threshold for IO comsuption usage.
=back
=cut
| centreon/centreon-plugins | cloud/azure/database/mysql/mode/ioconsumption.pm | Perl | apache-2.0 | 5,225 |
use utf8;
package DB::Schema::Result::UserRole;
# Created by DBIx::Class::Schema::Loader
# DO NOT MODIFY THE FIRST PART OF THIS FILE
=head1 NAME
DB::Schema::Result::UserRole
=cut
use strict;
use warnings;
use Moose;
use MooseX::NonMoose;
use MooseX::MarkAsMethods autoclean => 1;
extends 'DBIx::Class::Core';
=head1 COMPONENTS LOADED
=over 4
=item * L<DBIx::Class::InflateColumn::DateTime>
=back
=cut
__PACKAGE__->load_components("InflateColumn::DateTime");
=head1 TABLE: C<user_role>
=cut
__PACKAGE__->table("user_role");
=head1 ACCESSORS
=head2 id
data_type: 'integer'
is_auto_increment: 1
is_nullable: 0
=head2 created
data_type: 'timestamp'
datetime_undef_if_invalid: 1
default_value: current_timestamp
is_nullable: 0
=head2 user
data_type: 'varchar'
is_nullable: 1
size: 255
=head2 role
data_type: 'varchar'
is_nullable: 1
size: 255
=cut
__PACKAGE__->add_columns(
"id",
{ data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
"created",
{
data_type => "timestamp",
datetime_undef_if_invalid => 1,
default_value => \"current_timestamp",
is_nullable => 0,
},
"user",
{ data_type => "varchar", is_nullable => 1, size => 255 },
"role",
{ data_type => "varchar", is_nullable => 1, size => 255 },
);
=head1 PRIMARY KEY
=over 4
=item * L</id>
=back
=cut
__PACKAGE__->set_primary_key("id");
__PACKAGE__->belongs_to(
"user",
"DB::Schema::Result::User",
{ id => "user" },
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
);
__PACKAGE__->belongs_to(
"role",
"DB::Schema::Result::Role",
{ id => "role" },
{ is_deferrable => 1, on_delete => "RESTRICT", on_update => "RESTRICT" },
);
# Created by DBIx::Class::Schema::Loader v0.07039 @ 2014-11-18 09:52:02
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:6dLun/w3NM9qQm6AIEHhyg
# You can replace this text with custom code or comments, and it will be preserved on regeneration
__PACKAGE__->meta->make_immutable;
1;
| discobeta/MailChimpClone | lib/DB/Schema/Result/UserRole.pm | Perl | apache-2.0 | 2,031 |
=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 EnsEMBL::Web::Form::Element::NonNegFloat;
use strict;
use base qw(EnsEMBL::Web::Form::Element::NonNegInt);
use constant {
VALIDATION_CLASS => '_nonnegfloat',
};
1; | Ensembl/ensembl-webcode | modules/EnsEMBL/Web/Form/Element/NonNegFloat.pm | Perl | apache-2.0 | 889 |
/*§
===========================================================================
WebSolver
===========================================================================
Copyright (C) 2015 Gianluca Costa
===========================================================================
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.
===========================================================================
*/
/**
* buildLocalDb(ListOfRulesAsStrings, LocalDb)
*
* If Rules is a list of strings expressing facts and rules in Prolog syntax, LocalDb is a list
* of :-(Head, Body) predicates.
*
* For example, the list of rules could be:
*
* [
* "p(9).",
* "q(_)",
* "r(X) :- 0 is (X mod 2).",
* "z(X, Y) :- (p(X), q(Y), r(X))"
* ]
* ]
*
* The dot at the end of a rule is optional, but the parentheses around the body
* are MANDATORY in case of 2 or more atoms.
*/
buildLocalDb(Rules, LocalDb) :- buildLocalDb(Rules, [], LocalDb).
buildLocalDb([], AccIn, AccOut) :- reverse(AccIn, AccOut).
buildLocalDb([Head | Tail], AccIn, AccOut) :-
term_string(HeadAsAtom, Head),
convertRule(HeadAsAtom, Rule),
NextAccIn = [Rule|AccIn],
buildLocalDb(Tail, NextAccIn, AccOut).
:- begin_tests(buildLocalDb).
test(buildEmptyDb) :-
buildLocalDb([], []).
test(buildDbWithOneFact) :-
buildLocalDb(
["p(8)"],
[p(8) :- true]
).
test(buildDbWithOneRule) :-
buildLocalDb(
["z(X, Y) :- (p(X), q(Y), r(X))"],
[z(X, Y) :- (p(X), q(Y), r(X))]
).
test(buildDbWithFactsAndRules) :-
buildLocalDb(
[
"p(9).",
"q(_)",
"r(X) :- 0 is (X mod 2).",
"z(X, Y) :- (p(X), q(Y), r(X))"
],
[
p(9) :- true,
q(_) :- true,
r(X) :- (0 is (X mod 2)),
z(X, Y) :- (p(X), q(Y), r(X))
]
).
:- end_tests(buildLocalDb).
/**
* convertRule(RuleAtom, Rule)
*
* Converts a rule to its suitable :-(Head, Body) format used by meta-interpreters
*/
convertRule(
:-(Head, Body),
:-(Head, Body)
) :- !.
convertRule(
Head,
:-(Head, true)
).
:- begin_tests(convertRule).
test(convertFact) :-
convertRule(
p(6),
p(6) :- true
).
test(convertRule) :-
convertRule(
p(X) :- X > 7,
p(X) :- X > 7
).
:- end_tests(convertRule).
/**
* findRule(LocalDb, RuleHead, RuleBody)
*
* Searches the given LocalDb for the requested :-(RuleHead, RuleBody) rule.
*/
findRule([FirstDbRule | _], RuleHead, RuleBody) :-
FirstDbRule = :-(RuleHead, RuleBody).
findRule([_ | DbTail], RuleHead, RuleBody) :-
findRule(DbTail, RuleHead, RuleBody).
:- begin_tests(findRule).
test(searchEmptyDb, [fail]) :-
findRule(
[],
p(43), _
).
test(searchForFact, [nondet]) :-
findRule(
[
q(80) :- true,
p(10) :- true
],
p(10), true
).
test(searchForRule, [nondet]) :-
findRule(
[
q(80) :- true,
p(X) :- X > 100
],
p(X), X > 100
).
:- end_tests(findRule).
| giancosta86/WebSolver | rules.pl | Perl | apache-2.0 | 3,447 |
package Google::Ads::AdWords::v201809::AdGroupService::ApiExceptionFault;
use strict;
use warnings;
{ # BLOCK to scope variables
sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201809' }
__PACKAGE__->__set_name('ApiExceptionFault');
__PACKAGE__->__set_nillable();
__PACKAGE__->__set_minOccurs();
__PACKAGE__->__set_maxOccurs();
__PACKAGE__->__set_ref();
use base qw(
SOAP::WSDL::XSD::Typelib::Element
Google::Ads::AdWords::v201809::ApiException
);
}
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201809::AdGroupService::ApiExceptionFault
=head1 DESCRIPTION
Perl data type class for the XML Schema defined element
ApiExceptionFault from the namespace https://adwords.google.com/api/adwords/cm/v201809.
A fault element of type ApiException.
=head1 METHODS
=head2 new
my $element = Google::Ads::AdWords::v201809::AdGroupService::ApiExceptionFault->new($data);
Constructor. The following data structure may be passed to new():
$a_reference_to, # see Google::Ads::AdWords::v201809::ApiException
=head1 AUTHOR
Generated by SOAP::WSDL
=cut
| googleads/googleads-perl-lib | lib/Google/Ads/AdWords/v201809/AdGroupService/ApiExceptionFault.pm | Perl | apache-2.0 | 1,079 |
=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::Pipeline::PipeConfig::Xref_update_conf;
use strict;
use warnings;
use base ('Bio::EnsEMBL::Production::Pipeline::PipeConfig::Base_conf');
use Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf;
use Bio::EnsEMBL::Hive::Version 2.5;
sub default_options {
my ($self) = @_;
return {
%{ $self->SUPER::default_options() },
'release' => $self->o('ensembl_release'),
'work_dir' => $self->o('ENV', 'HOME')."/work/lib",
'sql_dir' => $self->o('work_dir')."/ensembl/misc-scripts/xref_mapping",
## 'job_factory' parameters
'species' => [],
'antispecies' => [],
'division' => [],
'run_all' => 0,
## Parameters for source download
'config_file' => $self->o('work_dir')."/ensembl-production/modules/Bio/EnsEMBL/Production/Pipeline/Xrefs/xref_sources.json",
'source_url' => '',
'source_dir' => $self->o('work_dir')."/ensembl-production/modules/Bio/EnsEMBL/Production/Pipeline/Xrefs/sql",
'reuse_db' => 0,
'skip_download' => 0,
## Parameters for xref database
'xref_url' => '',
'xref_user' => '',
'xref_pass' => '',
'xref_host' => '',
'xref_port' => '',
# Don't need lots of retries for most analyses
'hive_default_max_retry_count' => 1,
# Datachecks
history_file => undef,
dc_config_file => undef,
old_server_uri => undef
};
}
sub pipeline_analyses {
my ($self) = @_;
return [
{-logic_name => 'schedule_download',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::ScheduleDownload',
-input_ids => [{}],
-parameters => {
config_file => $self->o('config_file'),
source_dir => $self->o('source_dir'),
source_url => $self->o('source_url'),
reuse_db => $self->o('reuse_db'),
skip_download => $self->o('skip_download'),
},
-flow_into => { '2->A' => 'download_source',
'A->1' => 'checksum'},
-rc_name => 'small'
},
{-logic_name => 'download_source',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::DownloadSource',
-parameters => { base_path => $self->o('base_path')},
-max_retry_count => 3,
},
{-logic_name => 'checksum',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::Checksum',
-parameters => {
base_path => $self->o('base_path'),
skip_download => $self->o('skip_download')
},
-flow_into => { '1->A' => 'schedule_species',
'A->1' => 'notify_by_email'},
},
{-logic_name => 'schedule_species',
-module => 'Bio::EnsEMBL::Production::Pipeline::Common::SpeciesFactory',
-parameters => {
species => $self->o('species'),
antispecies => $self->o('antispecies'),
division => $self->o('division'),
run_all => $self->o('run_all'),
},
-flow_into => { '2->A' => 'schedule_source',
'A->2' => 'schedule_dependent_source'},
-rc_name => 'small',
},
{-logic_name => 'schedule_source',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::ScheduleSource',
-parameters => {
release => $self->o('release'),
sql_dir => $self->o('sql_dir'),
priority => 1,
base_path => $self->o('base_path'),
source_url => $self->o('source_url'),
xref_url => $self->o('xref_url'),
xref_host => $self->o('xref_host'),
xref_port => $self->o('xref_port'),
xref_user => $self->o('xref_user'),
xref_pass => $self->o('xref_pass'),
},
-flow_into => { '2' => 'parse_source'},
-rc_name => 'small',
-analysis_capacity => 10,
},
{-logic_name => 'schedule_dependent_source',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::ScheduleSource',
-parameters => {
release => $self->o('release'),
sql_dir => $self->o('sql_dir'),
priority => 2,
base_path => $self->o('base_path'),
source_url => $self->o('source_url'),
xref_url => $self->o('xref_url'),
xref_host => $self->o('xref_host'),
xref_port => $self->o('xref_port'),
xref_user => $self->o('xref_user'),
xref_pass => $self->o('xref_pass'),
},
-flow_into => { '2->A' => 'parse_source',
'A->1' => 'schedule_tertiary_source',
},
-rc_name => 'small',
},
{-logic_name => 'schedule_tertiary_source',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::ScheduleSource',
-parameters => {
release => $self->o('release'),
sql_dir => $self->o('sql_dir'),
priority => 3,
base_path => $self->o('base_path'),
source_url => $self->o('source_url'),
xref_url => $self->o('xref_url'),
xref_host => $self->o('xref_host'),
xref_port => $self->o('xref_port'),
xref_user => $self->o('xref_user'),
xref_pass => $self->o('xref_pass'),
},
-flow_into => { '2->A' => 'parse_source',
'A->1' => 'dump_ensembl',
},
-rc_name => 'small',
},
{-logic_name => 'parse_source',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::ParseSource',
-rc_name => '10GB',
-hive_capacity => 300,
-analysis_capacity => 50,
-batch_size => 30,
},
{-logic_name => 'dump_ensembl',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::DumpEnsembl',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-flow_into => { '2->A' => 'dump_xref',
'A->1' => 'schedule_mapping'
},
-rc_name => '3GB',
},
{-logic_name => 'dump_xref',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::DumpXref',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release'),
config_file => $self->o('config_file')},
-flow_into => { 2 => 'align_factory'},
},
{-logic_name => 'align_factory',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::AlignmentFactory',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-flow_into => { 2 => 'align'},
-rc_name => 'small',
},
{-logic_name => 'align',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::Alignment',
-parameters => {'base_path' => $self->o('base_path')},
-rc_name => '10GB',
-hive_capacity => 300,
-analysis_capacity => 300,
-batch_size => 5,
},
{-logic_name => 'schedule_mapping',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::ScheduleMapping',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release'),
'source_url' => $self->o('source_url')},
-rc_name => 'small',
-flow_into => { '2->A' => ['direct_xrefs', 'rnacentral_mapping'],
'A->1' => 'mapping'
},
},
{-logic_name => 'direct_xrefs',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::DirectXrefs',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-flow_into => { 1 => 'process_alignment' },
-analysis_capacity => 30
},
{-logic_name => 'process_alignment',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::ProcessAlignment',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-analysis_capacity => 30
},
{-logic_name => 'rnacentral_mapping',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::RNAcentralMapping',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-hive_capacity => 300,
-flow_into => { 1 => 'uniparc_mapping' },
-analysis_capacity => 30
},
{-logic_name => 'uniparc_mapping',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::UniParcMapping',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-hive_capacity => 300,
-flow_into => { 1 => 'coordinate_mapping' },
-analysis_capacity => 30
},
{-logic_name => 'coordinate_mapping',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::CoordinateMapping',
-rc_name => '3GB',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-analysis_capacity => 30
},
{-logic_name => 'mapping',
-module => 'Bio::EnsEMBL::Production::Pipeline::Xrefs::Mapping',
-rc_name => '3GB',
-parameters => {'base_path' => $self->o('base_path'),
'release' => $self->o('release')},
-analysis_capacity => 30,
-flow_into => {
'1->A' => ['RunXrefCriticalDatacheck'],
'A->1' => ['RunXrefAdvisoryDatacheck']
}
},
{
-logic_name => 'RunXrefCriticalDatacheck',
-module => 'Bio::EnsEMBL::DataCheck::Pipeline::RunDataChecks',
-max_retry_count => 1,
-analysis_capacity => 10,
-batch_size => 10,
-parameters => {
datacheck_names => ['ForeignKeys'],
datacheck_groups => ['xref_mapping'],
datacheck_types => ['critical'],
registry_file => $self->o('registry'),
config_file => $self->o('dc_config_file'),
history_file => $self->o('history_file'),
old_server_uri => $self->o('old_server_uri'),
failures_fatal => 1,
},
},
{
-logic_name => 'RunXrefAdvisoryDatacheck',
-module => 'Bio::EnsEMBL::DataCheck::Pipeline::RunDataChecks',
-max_retry_count => 1,
-batch_size => 10,
-analysis_capacity => 10,
-parameters => {
datacheck_groups => ['xref_mapping'],
datacheck_types => ['advisory'],
registry_file => $self->o('registry'),
config_file => $self->o('dc_config_file'),
history_file => $self->o('history_file'),
old_server_uri => $self->o('old_server_uri'),
failures_fatal => 0,
},
-flow_into => {
'4' => 'EmailReportXrefAdvisory'
},
},
{
-logic_name => 'EmailReportXrefAdvisory',
-module => 'Bio::EnsEMBL::DataCheck::Pipeline::EmailNotify',
-analysis_capacity => 10,
-max_retry_count => 1,
-parameters => {
email => $self->o('email'),
pipeline_name => $self->o('pipeline_name'),
},
},
{
-logic_name => 'notify_by_email',
-module => 'Bio::EnsEMBL::Hive::RunnableDB::NotifyByEmail',
-parameters => {'email' => $self->o('email'),
'subject' => 'Xref update finished',
'text' => 'completed run'},
-rc_name => 'small',
},
];
}
sub resource_classes {
my ($self) = @_;
return {
%{$self->SUPER::resource_classes},
'small' => { 'LSF' => '-q '.$self->o('production_queue').' -M 200 -R "rusage[mem=200]"'},
'3GB' => { 'LSF' => '-q '.$self->o('production_queue').' -M 3000 -R "rusage[mem=3000]"'},
'10GB' => { 'LSF' => '-q '.$self->o('production_queue').' -M 10000 -R "rusage[mem=10000]"'},
}
}
1;
| Ensembl/ensembl-production | modules/Bio/EnsEMBL/Production/Pipeline/PipeConfig/Xref_update_conf.pm | Perl | apache-2.0 | 15,863 |
package VMOMI::HostCnxFailedAlreadyManagedEvent;
use parent 'VMOMI::HostEvent';
use strict;
use warnings;
our @class_ancestors = (
'HostEvent',
'Event',
'DynamicData',
);
our @class_members = (
['serverName', undef, 0, ],
);
sub get_class_ancestors {
return @class_ancestors;
}
sub get_class_members {
my $class = shift;
my @super_members = $class->SUPER::get_class_members();
return (@super_members, @class_members);
}
1;
| stumpr/p5-vmomi | lib/VMOMI/HostCnxFailedAlreadyManagedEvent.pm | Perl | apache-2.0 | 463 |
=item module @Target@
created: @IsoDate@
author: @User@
=cut
=item function($)
The function() ...
=cut
sub function ($)
{
my $param1 = shift;
}
| realtimeprojects/tg | examples/templates/perl/@Target@.pl | Perl | bsd-3-clause | 153 |
/*************************************************************************
name: godis-basic
description: godis-basic specification file
*************************************************************************/
:- ensure_loaded( search_paths ).
/*========================================================================
Select datatypes
Speficies a list of datatypes to be loaded. Each item DataType in the
list corresponds to a file DataType.pl in the search path.
========================================================================*/
selected_datatypes([string, move, atom, integer, bool, record, set, stack,
stackset, assocset, godis_datatypes]).
/*========================================================================
Select modules
Each module spec has the form Predicate:FileName, where Predicate is the
unary predicate used to call the module, and FileName.pl is the a file
in the search path containing the module specification
========================================================================*/
selected_modules([ input : input_simpletext,
interpret : interpret_simple,
update : update,
select : select,
%generate : generate_empty,
generate : generate_simple,
output : output_simpletext
]).
% dme_module/1 - spefifies which modules have unlimited access to TIS
dme_modules([ update, select ]).
/*========================================================================
Select resources
Speficies a list of resources to be loaded. Each item
ResourceFile in the list corresponds to a a file ResourceFile.pl
in the search path. The file defines a resource object with the same
name as the file.
========================================================================*/
selected_resources( [
database_travel,
lexicon_travel_english,
domain_travel
] ).
/*========================================================================
operations to execute on TIS reset
========================================================================*/
reset_operations( [ set( program_state, run),
set( lexicon, $$dash2underscore(lexicon-Domain-Lang) ),
set( database, $$dash2underscore(database-Domain) ),
set( domain, $$dash2underscore(domain-Domain) ),
% ! ($domain :: plan( Q, Plan )), % single issue
% /private/plan := Plan,
% push(/shared/qud, Q),
push(/private/agenda,greet)]):-
flag( language, Lang ),
flag( domain, Domain ).
batch_files( [ '~sl/GoDiS/Batch/testdialog3.txt']). | TeamSPoon/logicmoo_workspace | packs_sys/logicmoo_nlu/ext/SIRIDUS/UGOT-D31/godis/godis-basic/godis-basic.pl | Perl | mit | 2,567 |
/*****************************************************************************
* This file is part of the Prolog Development Tool (PDT)
*
* WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start
* Mail: pdt@lists.iai.uni-bonn.de
* Copyright (C): 2004-2012, CS Dept. III, University of Bonn
*
* All rights reserved. This program is made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
****************************************************************************/
:- module(simple, []).
a(A):- %direct meta-argument
call(A).
b(B):- %direct unification
A=B,
call(A).
c(C):- %some other stuff happens
a,
b,
call(C).
d(D):- %some other stuff happens with or
a;
call(D).
e(E):- %meta call in meta argument
call(call(E)).
f(F):- %again other stuff happens but with non-atoms
blub(A),
bla(A),
call(F).
g(G):- %stuff happens around (not only before the meta-predicate-call
a,
call(G),
b.
h(H):- %indirect unification
h(H, b) = h(B, _X),
call(B).
h2(H,X):- %X is also a meta-argument -> h2(0,0)
bla(H, H) = bla(X, B),
call(B).
i(H,X):- %another arguement X which is not a meta-argument -> i(0,?)
bla(H, b) = bla(B, X),
call(B).
j(J):- %call to user-defined meta-predicate
d(J).
k(K):- %meta-predicate-call in true-branch of a decision
( bla(K,a) = bla(D,a)
-> call(D)
; fail
).
:-meta_predicate(l(0,0,?)).
l(L,M,C):- %(only L not M is meta-argument, even if they would be aliased in the condition)
( bla(M,C) = bla(L,a) %meta-predicate-call in else-branch of decision
-> a
; call(L)
).
m(File,Functor,Arity):-
file_name_extension(_,Ext,File),
prolog_file_type(Ext,prolog),
!,
functor(Term,Functor,Arity),
arg(1,Term,File),
( catch(call(Term),_,true)
; true
).
z(Z):- %non_meta
Z = 4.
z1(Z1):- %non_meta (parameter is only parameter of meta-call)
call(bla(Z1)).
z2(Z2):- %non_meta (parameter is only parameter of meta-call bound via term manipulation)
F =.. [bla,Z2],
call(F).
z3(Z3):- %non_meta (parameter is only parameter of meta-call combined with unification)
bla(Z3) = Y,
call(Y).
z4(z3) :- %non_meta (paramter is only parameter of meta-call with some term manipulation)
functor(z3,F, A),
assert(aT(F, A)).
| TeamSPoon/logicmoo_base | prolog/logicmoo/pdt_server/pdt.builder/example_files/meta_finder_examples/simple.pl | Perl | mit | 2,523 |
package AsposeSlidesCloud::Object::SlideBackground;
require 5.6.0;
use strict;
use warnings;
use utf8;
use JSON qw(decode_json);
use Data::Dumper;
use Module::Runtime qw(use_module);
use Log::Any qw($log);
use Date::Parse;
use DateTime;
use base "AsposeSlidesCloud::Object::BaseObject";
#
#
#
#NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually.
#
my $swagger_types = {
'Type' => 'FillType',
'FillFormat' => 'FillFormat',
'SelfUri' => 'ResourceUri',
'AlternateLinks' => 'ARRAY[ResourceUri]',
'Links' => 'ARRAY[ResourceUri]'
};
my $attribute_map = {
'Type' => 'Type',
'FillFormat' => 'FillFormat',
'SelfUri' => 'SelfUri',
'AlternateLinks' => 'AlternateLinks',
'Links' => 'Links'
};
# new object
sub new {
my ($class, %args) = @_;
my $self = {
#
'Type' => $args{'Type'},
#
'FillFormat' => $args{'FillFormat'},
#
'SelfUri' => $args{'SelfUri'},
#
'AlternateLinks' => $args{'AlternateLinks'},
#
'Links' => $args{'Links'}
};
return bless $self, $class;
}
# get swagger type of the attribute
sub get_swagger_types {
return $swagger_types;
}
# get attribute mappping
sub get_attribute_map {
return $attribute_map;
}
1;
| aspose-slides/Aspose.Slides-for-Cloud | SDKs/Aspose.Slides-Cloud-SDK-for-Perl/lib/AsposeSlidesCloud/Object/SlideBackground.pm | Perl | mit | 1,330 |
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file is machine-generated by lib/unicore/mktables from the Unicode
# database, Version 8.0.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.
# This file is for the use of utf8_heavy.pl and Unicode::UCD
# Maps Unicode (not Perl single-form extensions) property names in loose
# standard form to their corresponding standard names
%utf8::loose_property_name_of = (
'age' => 'age',
'ahex' => 'ahex',
'alpha' => 'alpha',
'alphabetic' => 'alpha',
'asciihexdigit' => 'ahex',
'bc' => 'bc',
'bidic' => 'bidic',
'bidiclass' => 'bc',
'bidicontrol' => 'bidic',
'bidim' => 'bidim',
'bidimirrored' => 'bidim',
'bidipairedbrackettype' => 'bpt',
'blk' => 'blk',
'block' => 'blk',
'bpt' => 'bpt',
'canonicalcombiningclass' => 'ccc',
'cased' => 'cased',
'caseignorable' => 'ci',
'category' => 'gc',
'ccc' => 'ccc',
'ce' => 'ce',
'changeswhencasefolded' => 'cwcf',
'changeswhencasemapped' => 'cwcm',
'changeswhenlowercased' => 'cwl',
'changeswhennfkccasefolded' => 'cwkcf',
'changeswhentitlecased' => 'cwt',
'changeswhenuppercased' => 'cwu',
'ci' => 'ci',
'compex' => 'compex',
'compositionexclusion' => 'ce',
'cwcf' => 'cwcf',
'cwcm' => 'cwcm',
'cwkcf' => 'cwkcf',
'cwl' => 'cwl',
'cwt' => 'cwt',
'cwu' => 'cwu',
'dash' => 'dash',
'decompositiontype' => 'dt',
'defaultignorablecodepoint' => 'di',
'dep' => 'dep',
'deprecated' => 'dep',
'di' => 'di',
'dia' => 'dia',
'diacritic' => 'dia',
'dt' => 'dt',
'ea' => 'ea',
'eastasianwidth' => 'ea',
'ext' => 'ext',
'extender' => 'ext',
'fullcompositionexclusion' => 'compex',
'gc' => 'gc',
'gcb' => 'gcb',
'generalcategory' => 'gc',
'graphemebase' => 'grbase',
'graphemeclusterbreak' => 'gcb',
'graphemeextend' => 'grext',
'grbase' => 'grbase',
'grext' => 'grext',
'hangulsyllabletype' => 'hst',
'hex' => 'hex',
'hexdigit' => 'hex',
'hst' => 'hst',
'hyphen' => 'hyphen',
'idc' => 'idc',
'idcontinue' => 'idc',
'ideo' => 'ideo',
'ideographic' => 'ideo',
'ids' => 'ids',
'idsb' => 'idsb',
'idsbinaryoperator' => 'idsb',
'idst' => 'idst',
'idstart' => 'ids',
'idstrinaryoperator' => 'idst',
'in' => 'in',
'indicpositionalcategory' => 'inpc',
'indicsyllabiccategory' => 'insc',
'inpc' => 'inpc',
'insc' => 'insc',
'jg' => 'jg',
'joinc' => 'joinc',
'joincontrol' => 'joinc',
'joininggroup' => 'jg',
'joiningtype' => 'jt',
'jt' => 'jt',
'lb' => 'lb',
'linebreak' => 'lb',
'loe' => 'loe',
'logicalorderexception' => 'loe',
'lower' => 'lower',
'lowercase' => 'lower',
'math' => 'math',
'nchar' => 'nchar',
'nfcqc' => 'nfcqc',
'nfcquickcheck' => 'nfcqc',
'nfdqc' => 'nfdqc',
'nfdquickcheck' => 'nfdqc',
'nfkcqc' => 'nfkcqc',
'nfkcquickcheck' => 'nfkcqc',
'nfkdqc' => 'nfkdqc',
'nfkdquickcheck' => 'nfkdqc',
'noncharactercodepoint' => 'nchar',
'nt' => 'nt',
'numerictype' => 'nt',
'numericvalue' => 'nv',
'nv' => 'nv',
'patsyn' => 'patsyn',
'patternsyntax' => 'patsyn',
'patternwhitespace' => 'patws',
'patws' => 'patws',
'presentin' => 'in',
'qmark' => 'qmark',
'quotationmark' => 'qmark',
'radical' => 'radical',
'sb' => 'sb',
'sc' => 'sc',
'script' => 'sc',
'scriptextensions' => 'scx',
'scx' => 'scx',
'sd' => 'sd',
'sentencebreak' => 'sb',
'softdotted' => 'sd',
'space' => 'wspace',
'sterm' => 'sterm',
'term' => 'term',
'terminalpunctuation' => 'term',
'uideo' => 'uideo',
'unifiedideograph' => 'uideo',
'upper' => 'upper',
'uppercase' => 'upper',
'variationselector' => 'vs',
'vs' => 'vs',
'wb' => 'wb',
'whitespace' => 'wspace',
'wordbreak' => 'wb',
'wspace' => 'wspace',
'xidc' => 'xidc',
'xidcontinue' => 'xidc',
'xids' => 'xids',
'xidstart' => 'xids',
);
# Same, but strict names
%utf8::strict_property_name_of = (
'_perlgcb' => 'gcb',
'_perlsb' => 'sb',
);
# Gives the definitions (in the form of inversion lists) for those properties
# whose definitions aren't kept in files
@utf8::inline_definitions = (
'V0',
'V1
0',
'V2
0
1114112',
'V4
9
14
32
33',
'V6
10
14
133
134
8232
8234',
'V6
48
58
65
91
97
123',
'V4
65
91
97
123',
'V4
9
10
32
33',
'V4
0
32
127
128',
'V2
48
58',
'V2
33
127',
'V2
97
123',
'V2
32
127',
'V2
65
91',
'V2
55296
57344',
'V2
12334
12336',
'V2
119149
119150',
'V6
1454
1455
6313
6314
12331
12332',
'V2
12330
12331',
'V6
861
863
864
866
7629
7630',
'V2
837
838',
'V2
12441
12443',
'V2
7630
7631',
'V6
801
803
807
809
7632
7633',
'V2
1456
1457',
'V2
1457
1458',
'V2
1458
1459',
'V2
1459
1460',
'V2
1460
1461',
'V2
1461
1462',
'V2
1462
1463',
'V2
1463
1464',
'V4
1464
1465
1479
1480',
'V2
1465
1467',
'V2
1467
1468',
'V2
1468
1469',
'V2
1469
1470',
'V2
1471
1472',
'V2
1473
1474',
'V2
1474
1475',
'V2
64286
64287',
'V4
1611
1612
2288
2289',
'V4
1612
1613
2289
2290',
'V4
1613
1614
2290
2291',
'V4
1560
1561
1614
1615',
'V4
1561
1562
1615
1616',
'V4
1562
1563
1616
1617',
'V2
1617
1618',
'V2
1618
1619',
'V2
1648
1649',
'V2
1809
1810',
'V2
3157
3158',
'V2
3158
3159',
'V2
3640
3642',
'V2
3656
3660',
'V2
3768
3770',
'V2
3784
3788',
'V2
3953
3954',
'V6
3954
3955
3962
3966
3968
3969',
'V2
3956
3957',
'V6
48
58
65
71
97
103',
'V4
4352
4448
43360
43389',
'V4
4520
4608
55243
55292',
'V4
4448
4520
55216
55239',
'V2
13
14',
'V2
10
11',
'V2
127462
127488',
'V4
12272
12274
12276
12284',
'V2
12274
12276',
'V4
6971
6972
43456
43457',
'V2
6973
6974',
'V2
8205
8206',
'V2
8204
8205',
'V6
6512
6517
43712
43713
43714
43715',
'V2
69759
69760',
'V4
2510
2511
3450
3456',
'V4
2673
2674
70199
70200',
'V4
3660
3661
6093
6094',
'V2
2947
2948',
'V2
6089
6091',
'V2
70082
70084',
'V2
69714
69734',
'V2
3976
3981',
'V4
3313
3315
69635
69637',
'V2
3406
3407',
'V2
8204
8206',
'V6
11904
11930
11931
12020
12032
12246',
'V4
133
134
8232
8234',
'V6
6155
6158
65024
65040
917760
918000',
'V2
34
35',
'V6
11
13
133
134
8232
8234',
'V2
39
40',
'V4
8364
8365
65532
65533',
'V2
8378
8379',
'V4
1564
1565
8294
8298',
'V6
9
10
11
12
31
32',
'V2
8296
8297',
'V2
8234
8235',
'V2
8294
8295',
'V2
8237
8238',
'V2
8236
8237',
'V2
8297
8298',
'V2
8235
8236',
'V2
8295
8296',
'V2
8238
8239',
'V2
65024
65040',
'V2
19968
40960',
'V2
12272
12288',
'V2
3712
3840',
'V2
92736
92784',
'V2
1984
2048',
'V2
9280
9312',
'V2
57344
63744',
'V2
42240
42560',
'V2
71424
71488',
'V2
43520
43616',
'V2
4352
4608',
'V2
42192
42240',
'V2
93952
94112',
'V2
71168
71264',
'V2
69216
69248',
'V2
917504
917632',
'V2
3584
3712',
'V2
5120
5760',
'V2
0
128',
'V2
42656
42752',
'V2
7104
7168',
'V2
5952
5984',
'V2
880
1024',
'V2
6016
6144',
'V2
6400
6480',
'V2
119040
119296',
'V2
5760
5792',
'V2
2816
2944',
'V2
5792
5888',
'V2
6480
6528',
'V2
71296
71376',
'V2
2944
3072',
'V2
917760
918000',
'V2
1536
1792',
'V2
8592
8704',
'V2
69632
69760',
'V2
66208
66272',
'V2
69888
69968',
'V2
11392
11520',
'V2
127024
127136',
'V2
66352
66384',
'V2
44032
55216',
'V2
67808
67840',
'V2
1424
1536',
'V2
592
688',
'V2
69760
69840',
'V2
12688
12704',
'V2
12032
12256',
'V2
70144
70224',
'V2
128
256',
'V2
7168
7248',
'V2
66176
66208',
'V2
67872
67904',
'V2
43312
43360',
'V2
1792
1872',
'V2
3072
3200',
'V2
1920
1984',
'V2
19904
19968',
'V2
68352
68416',
'V2
2432
2560',
'V2
10240
10496',
'V2
13312
19904',
'V2
131072
173792',
'V2
173824
177984',
'V2
177984
178208',
'V2
178208
183984',
'V2
66560
66640',
'V2
66816
66864',
'V2
70400
70528',
'V2
5920
5952',
'V2
110592
110848',
'V2
3200
3328',
'V2
43264
43312',
'V2
67072
67456',
'V2
126976
127024',
'V2
2112
2144',
'V2
70272
70320',
'V2
4096
4256',
'V2
7248
7296',
'V2
66688
66736',
'V2
43072
43136',
'V2
70016
70112',
'V2
66640
66688',
'V2
71040
71168',
'V2
3456
3584',
'V2
983040
1048576',
'V2
1048576
1114112',
'V2
5888
5920',
'V2
6688
6832',
'V2
43648
43744',
'V2
3840
4096',
'V2
70784
70880',
'V2
6320
6400',
'V2
1328
1424',
'V2
6912
7040',
'V2
92160
92736',
'V2
92880
92928',
'V2
12544
12592',
'V2
6656
6688',
'V2
5024
5120',
'V2
1024
1280',
'V2
9984
10176',
'V2
113664
113824',
'V2
4608
4992',
'V2
4256
4352',
'V2
7936
8192',
'V2
2688
2816',
'V2
2560
2688',
'V2
12352
12448',
'V2
43360
43392',
'V2
55216
55296',
'V2
43392
43488',
'V2
12448
12544',
'V2
69968
70016',
'V2
66000
66048',
'V2
65520
65536',
'V2
5984
6016',
'V2
11568
11648',
'V2
66432
66464',
'V2
7376
7424',
'V2
64336
65024',
'V2
65136
65280',
'V2
1872
1920',
'V2
13056
13312',
'V2
73728
74752',
'V2
128512
128592',
'V2
65056
65072',
'V2
70320
70400',
'V2
256
384',
'V2
384
592',
'V2
11360
11392',
'V2
42784
43008',
'V2
43824
43888',
'V2
3328
3456',
'V2
6144
6320',
'V2
67712
67760',
'V2
6528
6624',
'V2
66304
66352',
'V2
66384
66432',
'V2
68608
68688',
'V2
67680
67712',
'V2
72384
72448',
'V2
2048
2112',
'V2
7040
7104',
'V2
128768
128896',
'V2
2208
2304',
'V2
126464
126720',
'V2
9472
9600',
'V2
12736
12784',
'V2
12288
12352',
'V2
12592
12688',
'V2
2304
2432',
'V2
11264
11360',
'V2
68096
68192',
'V2
68288
68352',
'V2
11008
11264',
'V2
66464
66528',
'V2
67840
67872',
'V2
43136
43232',
'V2
65104
65136',
'V2
10224
10240',
'V2
10496
10624',
'V2
129024
129280',
'V2
71840
71936',
'V2
42128
42192',
'V2
12704
12736',
'V2
43888
43968',
'V2
119648
119680',
'V2
1280
1328',
'V2
12800
13056',
'V2
11648
11744',
'V2
4992
5024',
'V2
11520
11568',
'V2
12784
12800',
'V2
43968
44032',
'V2
9728
9984',
'V2
43616
43648',
'V2
43488
43520',
'V2
8528
8592',
'V2
92928
93072',
'V2
7424
7552',
'V2
8192
8304',
'V2
69840
69888',
'V2
8304
8352',
'V2
43008
43056',
'V2
119552
119648',
'V2
40960
42128',
'V2
64256
64336',
'V2
11744
11776',
'V2
42560
42656',
'V2
768
880',
'V2
43776
43824',
'V2
6624
6656',
'V2
119808
120832',
'V2
124928
125152',
'V2
68736
68864',
'V2
127136
127232',
'V2
7360
7376',
'V2
65792
65856',
'V2
9600
9632',
'V2
43232
43264',
'V2
56320
57344',
'V2
8704
8960',
'V2
8960
9216',
'V2
65040
65056',
'V2
65936
66000',
'V2
118784
119040',
'V2
65072
65104',
'V2
11904
12032',
'V2
55296
56192',
'V2
43744
43776',
'V2
7552
7616',
'V2
68480
68528',
'V2
11776
11904',
'V2
9216
9280',
'V2
8352
8400',
'V2
6832
6912',
'V2
7616
7680',
'V2
9632
9728',
'V2
67648
67680',
'V2
68000
68096',
'V2
127744
128512',
'V2
688
768',
'V2
68224
68256',
'V2
68192
68224',
'V2
128640
128768',
'V2
74752
74880',
'V2
67584
67648',
'V2
9312
9472',
'V2
65280
65520',
'V2
56192
56320',
'V2
43056
43072',
'V2
65664
65792',
'V2
65536
65664',
'V2
10176
10224',
'V2
10624
10752',
'V2
10752
11008',
'V2
119296
119376',
'V2
66864
66928',
'V2
8448
8528',
'V2
120832
121520',
'V2
66272
66304',
'V2
128896
129024',
'V2
7680
7936',
'V2
128592
128640',
'V2
65856
65936',
'V2
63744
64256',
'V2
77824
78896',
'V2
127232
127488',
'V2
67968
68000',
'V2
42752
42784',
'V2
82944
83584',
'V2
68448
68480',
'V2
68416
68448',
'V2
70112
70144',
'V2
194560
195104',
'V2
8400
8448',
'V2
74880
75088',
'V2
127488
127744',
'V2
113824
113840',
'V2
129280
129536',
'V6
188
191
8528
8544
8585
8586',
'V6
65104
65107
65108
65127
65128
65132',
'V6
12288
12289
65281
65377
65504
65511',
'V4
0
32
127
160',
'V6
57344
63744
983040
1048574
1048576
1114110',
'V2
8232
8233',
'V2
8233
8234',
'V2
1829
1830',
'V2
1871
1872',
'V2
1815
1816',
'V2
1830
1831',
'V2
1607
1608',
'V2
1825
1826',
'V2
1826
1827',
'V2
1725
1726',
'V6
1591
1593
1695
1696
2211
2212',
'V2
1836
1837',
'V4
1810
1811
1837
1838',
'V2
1818
1819',
'V2
1823
1824',
'V6
1605
1606
1893
1895
2215
2216',
'V6
1606
1607
1721
1725
1895
1898',
'V2
1833
1834',
'V2
1835
1836',
'V2
1819
1821',
'V2
1821
1822',
'V2
1817
1818',
'V2
1808
1809',
'V4
1811
1813
1838
1839',
'V2
1870
1871',
'V2
1832
1833',
'V2
1869
1870',
'V2
1824
1825',
'V2
1822
1823',
'V2
1729
1731',
'V2
1827
1828',
'V2
1706
1707',
'V2
1816
1817',
'V2
1746
1748',
'V6
1813
1815
1834
1835
1839
1840',
'V4
1726
1727
1791
1792',
'V2
1831
1832',
'V6
1577
1578
1728
1729
1749
1750',
'V2
2220
2221',
'V2
2225
2226',
'V2
1741
1742',
'V2
1828
1829',
'V2
68315
68317',
'V2
68310
68311',
'V2
68311
68312',
'V2
68331
68332',
'V2
68324
68325',
'V2
68333
68334',
'V2
68295
68296',
'V2
1731
1732',
'V2
68313
68315',
'V2
68289
68291',
'V2
68332
68333',
'V2
68301
68302',
'V2
68304
68307',
'V2
68318
68321',
'V2
68321
68322',
'V2
68302
68303',
'V2
68303
68304',
'V2
68288
68289',
'V2
68291
68293',
'V2
68317
68318',
'V2
68297
68299',
'V2
68293
68294',
'V2
68307
68308',
'V2
68312
68313',
'V2
68334
68335',
'V2
68308
68309',
'V2
68335
68336',
'V2
68309
68310',
'V2
1914
1916',
'V6
43122
43123
68301
68302
68311
68312',
'V4
8212
8213
11834
11836',
'V4
11
13
8232
8234',
'V2
65532
65533',
'V4
41
42
93
94',
'V2
45
46',
'V2
133
134',
'V2
55296
57344',
'V2
32
33',
'V2
47
48',
'V4
8288
8289
65279
65280',
'V2
8203
8204',
'V2
12881
12882',
'V2
12882
12883',
'V2
12883
12884',
'V2
12884
12885',
'V2
12885
12886',
'V2
12886
12887',
'V2
12887
12888',
'V2
12888
12889',
'V2
12889
12890',
'V2
12891
12892',
'V2
12892
12893',
'V2
12893
12894',
'V2
12894
12895',
'V2
12895
12896',
'V2
12977
12978',
'V2
12978
12979',
'V2
12979
12980',
'V2
12980
12981',
'V2
12982
12983',
'V2
12983
12984',
'V2
12984
12985',
'V2
12985
12986',
'V2
12986
12987',
'V2
12987
12988',
'V2
12988
12989',
'V2
12989
12990',
'V2
12990
12991',
'V2
8533
8534',
'V6
8537
8538
68087
68088
74849
74850',
'V2
8528
8529',
'V2
8529
8530',
'V2
8534
8535',
'V2
3883
3884',
'V2
8535
8536',
'V2
8540
8541',
'V2
8536
8537',
'V2
3884
3885',
'V6
8538
8539
68095
68096
74844
74845',
'V2
8541
8542',
'V2
3885
3886',
'V2
8542
8543',
'V2
3886
3887',
'V2
3891
3892',
'V2
8530
8531',
'V2
68086
68087',
'V6
2548
2549
2933
2934
43059
43060',
'V2
3887
3888',
'V2
3888
3889',
'V2
3889
3890',
'V2
3890
3891',
'V4
65827
65828
68060
68061',
'V6
2550
2551
2935
2936
43061
43062',
'V4
65828
65829
68061
68062',
'V4
65829
65830
68062
68063',
'V2
68090
68091',
'V4
65831
65832
68064
68065',
'V2
68092
68093',
'V4
65832
65833
68065
68066',
'V4
65833
65834
68066
68067',
'V4
65834
65835
68067
68068',
'V2
68028
68029',
'V4
65836
65837
68069
68070',
'V4
65837
65838
68070
68071',
'V4
65838
65839
68071
68072',
'V4
65840
65841
68073
68074',
'V4
65841
65842
68074
68075',
'V4
65842
65843
68075
68076',
'V4
65843
65844
68076
68077',
'V4
8584
8585
68077
68078',
'V2
68078
68079',
'V2
74802
74803',
'V2
68079
68080',
'V2
68080
68081',
'V2
74803
74804',
'V2
68081
68082',
'V2
68082
68083',
'V2
68083
68084',
'V2
68084
68085',
'V2
68085
68086',
'V2
93022
93023',
'V6
20159
20160
20740
20741
93023
93024',
'V2
93024
93025',
'V4
20806
20807
93025
93026',
'V4
40960
42125
42128
42183',
'V6
92736
92767
92768
92778
92782
92784',
'V2
1984
2043',
'V2
42240
42540',
'V4
66864
66916
66927
66928',
'V6
71424
71450
71453
71468
71472
71488',
'V4
67648
67670
67671
67680',
'V4
68352
68406
68409
68416',
'V4
6912
6988
6992
7037',
'V4
42656
42744
92160
92729',
'V4
92880
92910
92912
92918',
'V4
7104
7156
7164
7168',
'V6
746
748
12549
12590
12704
12731',
'V6
69632
69710
69714
69744
69759
69760',
'V4
6656
6684
6686
6688',
'V2
5952
5972',
'V4
69888
69941
69942
69956',
'V4
5120
5760
6320
6390',
'V2
66208
66257',
'V6
5024
5110
5112
5118
43888
43968',
'V6
994
1008
11392
11508
11513
11520',
'V2
77824
78895',
'V2
66816
66856',
'V4
11264
11311
11312
11359',
'V2
66352
66379',
'V2
5920
5941',
'V6
67808
67827
67828
67830
67835
67840',
'V2
82944
83527',
'V6
68736
68787
68800
68851
68858
68864',
'V2
66304
66340',
'V6
43392
43470
43472
43482
43486
43488',
'V4
43264
43310
43311
43312',
'V4
70144
70162
70163
70206',
'V2
69760
69826',
'V6
7168
7224
7227
7242
7245
7248',
'V6
67072
67383
67392
67414
67424
67432',
'V2
66176
66205',
'V4
67872
67898
67903
67904',
'V2
69968
70007',
'V4
2112
2140
2142
2143',
'V4
68288
68327
68331
68343',
'V4
124928
125125
125127
125143',
'V6
68000
68024
68028
68048
68050
68096',
'V6
93952
94021
94032
94079
94095
94112',
'V4
71168
71237
71248
71258',
'V6
43744
43767
43968
44014
44016
44026',
'V6
4096
4256
43488
43519
43616
43648',
'V4
67712
67743
67751
67760',
'V2
5760
5789',
'V2
68608
68681',
'V4
66688
66718
66720
66730',
'V2
72384
72441',
'V2
66384
66427',
'V2
43072
43128',
'V4
68448
68467
68472
68480',
'V6
68480
68498
68505
68509
68521
68528',
'V4
67840
67868
67871
67872',
'V4
68416
68438
68440
68448',
'V4
43312
43348
43359
43360',
'V4
5792
5867
5870
5881',
'V4
2048
2094
2096
2111',
'V4
43136
43205
43214
43226',
'V6
120832
121484
121499
121504
121505
121520',
'V4
70016
70094
70096
70112',
'V4
71040
71094
71096
71134',
'V4
70320
70379
70384
70394',
'V4
69840
69865
69872
69882',
'V4
7040
7104
7360
7368',
'V2
43008
43052',
'V6
1792
1806
1807
1867
1869
1872',
'V6
5984
5997
5998
6001
6002
6004',
'V4
71296
71352
71360
71370',
'V4
6480
6510
6512
6517',
'V4
43648
43715
43739
43744',
'V6
11568
11624
11631
11633
11647
11648',
'V4
5888
5901
5902
5909',
'V2
1920
1970',
'V4
3585
3643
3648
3676',
'V4
70784
70856
70864
70874',
'V4
66432
66462
66463
66464',
'V4
71840
71923
71935
71936',
'V4
66464
66500
66504
66518',
'V6
6656
6684
6686
6688
43471
43472',
'V4
5941
5943
5952
5972',
'V2
5920
5943',
'V6
43392
43470
43471
43482
43486
43488',
'V6
2790
2800
70144
70162
70163
70206',
'V6
2406
2416
43056
43066
69760
69826',
'V6
2404
2416
43056
43066
69968
70007',
'V6
1600
1601
2112
2140
2142
2143',
'V6
1600
1601
68288
68327
68331
68343',
'V6
43056
43066
71168
71237
71248
71258',
'V4
1155
1156
66384
66427',
'V6
6146
6148
6149
6150
43072
43128',
'V6
2404
2406
2534
2544
43008
43052',
'V6
4160
4170
6480
6510
6512
6517',
'V6
5888
5901
5902
5909
5941
5943',
,
);
# Maps property, table to file for those using stricter matching. For paths
# whose directory is '#', the file is in the form of a numeric index into
# @inline_definitions
%utf8::stricter_to_file_of = (
'_canondcij' => 'SD/Y',
'_case_ignorable' => 'CI/Y',
'_combabove' => 'Ccc/A',
'_perl_any_folds' => 'Perl/_PerlAny',
'_perl_charname_begin' => 'Perl/_PerlCha',
'_perl_charname_continue' => 'Perl/_PerlCh2',
'_perl_folds_to_multi_char' => 'Perl/_PerlFol',
'_perl_idcont' => 'Perl/_PerlIDC',
'_perl_idstart' => 'Perl/_PerlIDS',
'_perl_nchar' => 'Perl/_PerlNch',
'_perl_patws' => 'Perl/_PerlPat',
'_perl_problematic_locale_foldeds_start' => 'Perl/_PerlPr2',
'_perl_problematic_locale_folds' => 'Perl/_PerlPro',
'_perl_quotemeta' => 'Perl/_PerlQuo',
'_perl_surrogate' => '#/14',
'age=1.1' => 'Age/V11',
'age=2' => 'Age/V20',
'age=2.0' => 'Age/V20',
'age=2.1' => '#/92',
'age=3' => 'Age/V30',
'age=3.0' => 'Age/V30',
'age=3.1' => 'Age/V31',
'age=3.2' => 'Age/V32',
'age=4' => 'Age/V40',
'age=4.0' => 'Age/V40',
'age=4.1' => 'Age/V41',
'age=5' => 'Age/V50',
'age=5.0' => 'Age/V50',
'age=5.1' => 'Age/V51',
'age=5.2' => 'Age/V52',
'age=6' => 'Age/V60',
'age=6.0' => 'Age/V60',
'age=6.1' => 'Age/V61',
'age=6.2' => '#/93',
'age=6.3' => '#/94',
'age=7' => 'Age/V70',
'age=7.0' => 'Age/V70',
'age=8' => 'Age/V80',
'age=8.0' => 'Age/V80',
'ccc=0' => 'Ccc/NR',
'ccc=1' => 'Ccc/OV',
'ccc=10' => '#/24',
'ccc=103' => '#/53',
'ccc=107' => '#/54',
'ccc=11' => '#/25',
'ccc=118' => '#/55',
'ccc=12' => '#/26',
'ccc=122' => '#/56',
'ccc=129' => '#/57',
'ccc=13' => '#/27',
'ccc=130' => '#/58',
'ccc=132' => '#/59',
'ccc=133' => '#/0',
'ccc=14' => '#/28',
'ccc=15' => '#/29',
'ccc=16' => '#/30',
'ccc=17' => '#/31',
'ccc=18' => '#/32',
'ccc=19' => '#/33',
'ccc=20' => '#/34',
'ccc=200' => '#/0',
'ccc=202' => '#/23',
'ccc=21' => '#/35',
'ccc=214' => '#/22',
'ccc=216' => 'Ccc/ATAR',
'ccc=218' => '#/18',
'ccc=22' => '#/36',
'ccc=220' => 'Ccc/B',
'ccc=222' => 'Ccc/BR',
'ccc=224' => '#/15',
'ccc=226' => '#/16',
'ccc=228' => '#/17',
'ccc=23' => '#/37',
'ccc=230' => 'Ccc/A',
'ccc=232' => 'Ccc/AR',
'ccc=233' => 'Ccc/DB',
'ccc=234' => '#/19',
'ccc=24' => '#/38',
'ccc=240' => '#/20',
'ccc=25' => '#/39',
'ccc=26' => '#/40',
'ccc=27' => '#/41',
'ccc=28' => '#/42',
'ccc=29' => '#/43',
'ccc=30' => '#/44',
'ccc=31' => '#/45',
'ccc=32' => '#/46',
'ccc=33' => '#/47',
'ccc=34' => '#/48',
'ccc=35' => '#/49',
'ccc=36' => '#/50',
'ccc=7' => 'Ccc/NK',
'ccc=8' => '#/21',
'ccc=84' => '#/51',
'ccc=9' => 'Ccc/VR',
'ccc=91' => '#/52',
'in=1.1' => 'Age/V11',
'in=2' => 'In/2_0',
'in=2.0' => 'In/2_0',
'in=2.1' => 'In/2_1',
'in=3' => 'In/3_0',
'in=3.0' => 'In/3_0',
'in=3.1' => 'In/3_1',
'in=3.2' => 'In/3_2',
'in=4' => 'In/4_0',
'in=4.0' => 'In/4_0',
'in=4.1' => 'In/4_1',
'in=5' => 'In/5_0',
'in=5.0' => 'In/5_0',
'in=5.1' => 'In/5_1',
'in=5.2' => 'In/5_2',
'in=6' => 'In/6_0',
'in=6.0' => 'In/6_0',
'in=6.1' => 'In/6_1',
'in=6.2' => 'In/6_2',
'in=6.3' => 'In/6_3',
'in=7' => 'In/7_0',
'in=7.0' => 'In/7_0',
'in=8' => 'In/8_0',
'in=8.0' => 'In/8_0',
'nv=-1/2' => '#/497',
'nv=0' => 'Nv/0',
'nv=1' => 'Nv/1',
'nv=1/10' => '#/498',
'nv=1/12' => '#/499',
'nv=1/16' => '#/500',
'nv=1/2' => 'Nv/1_2',
'nv=1/3' => 'Nv/1_3',
'nv=1/4' => 'Nv/1_4',
'nv=1/5' => '#/482',
'nv=1/6' => '#/483',
'nv=1/7' => '#/484',
'nv=1/8' => 'Nv/1_8',
'nv=1/9' => '#/485',
'nv=10' => 'Nv/10',
'nv=100' => 'Nv/100',
'nv=1000' => 'Nv/1000',
'nv=10000' => 'Nv/10000',
'nv=100000' => '#/523',
'nv=1000000' => '#/534',
'nv=100000000' => '#/535',
'nv=10000000000' => '#/536',
'nv=1000000000000' => '#/537',
'nv=11' => 'Nv/11',
'nv=11/12' => '#/515',
'nv=11/2' => '#/501',
'nv=12' => 'Nv/12',
'nv=13' => 'Nv/13',
'nv=13/2' => '#/502',
'nv=14' => 'Nv/14',
'nv=15' => 'Nv/15',
'nv=15/2' => '#/503',
'nv=16' => 'Nv/16',
'nv=17' => 'Nv/17',
'nv=17/2' => '#/504',
'nv=18' => 'Nv/18',
'nv=19' => 'Nv/19',
'nv=2' => 'Nv/2',
'nv=2/3' => 'Nv/2_3',
'nv=2/5' => '#/486',
'nv=20' => 'Nv/20',
'nv=200' => 'Nv/200',
'nv=2000' => '#/505',
'nv=20000' => '#/516',
'nv=200000' => '#/524',
'nv=21' => '#/455',
'nv=216000' => '#/525',
'nv=22' => '#/456',
'nv=23' => '#/457',
'nv=24' => '#/458',
'nv=25' => '#/459',
'nv=26' => '#/460',
'nv=27' => '#/461',
'nv=28' => '#/462',
'nv=29' => '#/463',
'nv=3' => 'Nv/3',
'nv=3/16' => '#/506',
'nv=3/2' => '#/487',
'nv=3/4' => 'Nv/3_4',
'nv=3/5' => '#/488',
'nv=3/8' => '#/489',
'nv=30' => 'Nv/30',
'nv=300' => 'Nv/300',
'nv=3000' => '#/507',
'nv=30000' => '#/517',
'nv=300000' => '#/526',
'nv=31' => '#/464',
'nv=32' => '#/465',
'nv=33' => '#/466',
'nv=34' => '#/467',
'nv=35' => '#/468',
'nv=36' => '#/469',
'nv=37' => '#/470',
'nv=38' => '#/471',
'nv=39' => '#/472',
'nv=4' => 'Nv/4',
'nv=4/5' => '#/490',
'nv=40' => 'Nv/40',
'nv=400' => 'Nv/400',
'nv=4000' => '#/508',
'nv=40000' => '#/518',
'nv=400000' => '#/527',
'nv=41' => '#/473',
'nv=42' => '#/474',
'nv=43' => '#/475',
'nv=432000' => '#/528',
'nv=44' => '#/476',
'nv=45' => '#/477',
'nv=46' => '#/478',
'nv=47' => '#/479',
'nv=48' => '#/480',
'nv=49' => '#/481',
'nv=5' => 'Nv/5',
'nv=5/12' => '#/509',
'nv=5/2' => '#/491',
'nv=5/6' => '#/492',
'nv=5/8' => '#/493',
'nv=50' => 'Nv/50',
'nv=500' => 'Nv/500',
'nv=5000' => 'Nv/5000',
'nv=50000' => 'Nv/50000',
'nv=500000' => '#/529',
'nv=6' => 'Nv/6',
'nv=60' => 'Nv/60',
'nv=600' => 'Nv/600',
'nv=6000' => '#/510',
'nv=60000' => '#/519',
'nv=600000' => '#/530',
'nv=7' => 'Nv/7',
'nv=7/12' => '#/511',
'nv=7/2' => '#/494',
'nv=7/8' => '#/495',
'nv=70' => 'Nv/70',
'nv=700' => 'Nv/700',
'nv=7000' => '#/512',
'nv=70000' => '#/520',
'nv=700000' => '#/531',
'nv=8' => 'Nv/8',
'nv=80' => 'Nv/80',
'nv=800' => 'Nv/800',
'nv=8000' => '#/513',
'nv=80000' => '#/521',
'nv=800000' => '#/532',
'nv=9' => 'Nv/9',
'nv=9/2' => '#/496',
'nv=90' => 'Nv/90',
'nv=900' => 'Nv/900',
'nv=9000' => '#/514',
'nv=90000' => '#/522',
'nv=900000' => '#/533',
);
# Maps property, table to file for those using loose matching. For paths
# whose directory is '#', the file is in the form of a numeric index into
# @inline_definitions
%utf8::loose_to_file_of = (
'aegeannumbers' => '#/304',
'age=na' => 'Age/NA',
'age=unassigned' => 'Age/NA',
'age=v11' => 'Age/V11',
'age=v20' => 'Age/V20',
'age=v21' => '#/92',
'age=v30' => 'Age/V30',
'age=v31' => 'Age/V31',
'age=v32' => 'Age/V32',
'age=v40' => 'Age/V40',
'age=v41' => 'Age/V41',
'age=v50' => 'Age/V50',
'age=v51' => 'Age/V51',
'age=v52' => 'Age/V52',
'age=v60' => 'Age/V60',
'age=v61' => 'Age/V61',
'age=v62' => '#/93',
'age=v63' => '#/94',
'age=v70' => 'Age/V70',
'age=v80' => 'Age/V80',
'aghb' => '#/542',
'ahex' => '#/60',
'ahex=f' => '#/!60',
'ahex=false' => '#/!60',
'ahex=n' => '#/!60',
'ahex=no' => '#/!60',
'ahex=t' => '#/60',
'ahex=true' => '#/60',
'ahex=y' => '#/60',
'ahex=yes' => '#/60',
'ahom' => '#/543',
'alchemical' => '#/250',
'alchemicalsymbols' => '#/250',
'all' => '#/1',
'alnum' => 'Perl/Alnum',
'alpha' => 'Alpha/Y',
'alpha=f' => '!Alpha/Y',
'alpha=false' => '!Alpha/Y',
'alpha=n' => '!Alpha/Y',
'alpha=no' => '!Alpha/Y',
'alpha=t' => 'Alpha/Y',
'alpha=true' => 'Alpha/Y',
'alpha=y' => 'Alpha/Y',
'alpha=yes' => 'Alpha/Y',
'alphabetic' => 'Alpha/Y',
'alphabeticpf' => '#/293',
'alphabeticpresentationforms' => '#/293',
'anatolianhieroglyphs' => '#/565',
'ancientgreekmusic' => '#/343',
'ancientgreekmusicalnotation' => '#/343',
'ancientgreeknumbers' => '#/351',
'ancientsymbols' => '#/311',
'any' => '#/2',
'arab' => 'Sc/Arab',
'arabic' => 'Sc/Arab',
'arabicexta' => '#/251',
'arabicextendeda' => '#/251',
'arabicmath' => '#/252',
'arabicmathematicalalphabeticsymbols' => '#/252',
'arabicpfa' => '#/226',
'arabicpfb' => '#/227',
'arabicpresentationformsa' => '#/226',
'arabicpresentationformsb' => '#/227',
'arabicsup' => '#/228',
'arabicsupplement' => '#/228',
'armenian' => 'Sc/Armn',
'armi' => '#/544',
'armn' => 'Sc/Armn',
'arrows' => '#/140',
'ascii' => '#/124',
'asciihexdigit' => '#/60',
'assigned' => 'Perl/Assigned',
'avestan' => '#/545',
'avst' => '#/545',
'bali' => '#/546',
'balinese' => '#/546',
'bamu' => '#/547',
'bamum' => '#/547',
'bamumsup' => '#/201',
'bamumsupplement' => '#/201',
'basiclatin' => '#/124',
'bass' => '#/548',
'bassavah' => '#/548',
'batak' => '#/549',
'batk' => '#/549',
'bc=al' => 'Bc/AL',
'bc=an' => 'Bc/AN',
'bc=arabicletter' => 'Bc/AL',
'bc=arabicnumber' => 'Bc/AN',
'bc=b' => 'Bc/B',
'bc=bn' => 'Bc/BN',
'bc=boundaryneutral' => 'Bc/BN',
'bc=commonseparator' => 'Bc/CS',
'bc=cs' => 'Bc/CS',
'bc=en' => 'Bc/EN',
'bc=es' => 'Bc/ES',
'bc=et' => 'Bc/ET',
'bc=europeannumber' => 'Bc/EN',
'bc=europeanseparator' => 'Bc/ES',
'bc=europeanterminator' => 'Bc/ET',
'bc=firststrongisolate' => '#/96',
'bc=fsi' => '#/96',
'bc=l' => 'Bc/L',
'bc=lefttoright' => 'Bc/L',
'bc=lefttorightembedding' => '#/97',
'bc=lefttorightisolate' => '#/98',
'bc=lefttorightoverride' => '#/99',
'bc=lre' => '#/97',
'bc=lri' => '#/98',
'bc=lro' => '#/99',
'bc=nonspacingmark' => 'Bc/NSM',
'bc=nsm' => 'Bc/NSM',
'bc=on' => 'Bc/ON',
'bc=otherneutral' => 'Bc/ON',
'bc=paragraphseparator' => 'Bc/B',
'bc=pdf' => '#/100',
'bc=pdi' => '#/101',
'bc=popdirectionalformat' => '#/100',
'bc=popdirectionalisolate' => '#/101',
'bc=r' => 'Bc/R',
'bc=righttoleft' => 'Bc/R',
'bc=righttoleftembedding' => '#/102',
'bc=righttoleftisolate' => '#/103',
'bc=righttoleftoverride' => '#/104',
'bc=rle' => '#/102',
'bc=rli' => '#/103',
'bc=rlo' => '#/104',
'bc=s' => '#/95',
'bc=segmentseparator' => '#/95',
'bc=whitespace' => 'Bc/WS',
'bc=ws' => 'Bc/WS',
'beng' => 'Sc/Beng',
'bengali' => 'Sc/Beng',
'bidic' => 'BidiC/Y',
'bidic=f' => '!BidiC/Y',
'bidic=false' => '!BidiC/Y',
'bidic=n' => '!BidiC/Y',
'bidic=no' => '!BidiC/Y',
'bidic=t' => 'BidiC/Y',
'bidic=true' => 'BidiC/Y',
'bidic=y' => 'BidiC/Y',
'bidic=yes' => 'BidiC/Y',
'bidicontrol' => 'BidiC/Y',
'bidim' => 'BidiM/Y',
'bidim=f' => '!BidiM/Y',
'bidim=false' => '!BidiM/Y',
'bidim=n' => '!BidiM/Y',
'bidim=no' => '!BidiM/Y',
'bidim=t' => 'BidiM/Y',
'bidim=true' => 'BidiM/Y',
'bidim=y' => 'BidiM/Y',
'bidim=yes' => 'BidiM/Y',
'bidimirrored' => 'BidiM/Y',
'blank' => 'Perl/Blank',
'blk=aegeannumbers' => '#/304',
'blk=ahom' => '#/114',
'blk=alchemical' => '#/250',
'blk=alchemicalsymbols' => '#/250',
'blk=alphabeticpf' => '#/293',
'blk=alphabeticpresentationforms' => '#/293',
'blk=anatolianhieroglyphs' => '#/357',
'blk=ancientgreekmusic' => '#/343',
'blk=ancientgreekmusicalnotation' => '#/343',
'blk=ancientgreeknumbers' => '#/351',
'blk=ancientsymbols' => '#/311',
'blk=arabic' => '#/139',
'blk=arabicexta' => '#/251',
'blk=arabicextendeda' => '#/251',
'blk=arabicmath' => '#/252',
'blk=arabicmathematicalalphabeticsymbols' => '#/252',
'blk=arabicpfa' => '#/226',
'blk=arabicpfb' => '#/227',
'blk=arabicpresentationformsa' => '#/226',
'blk=arabicpresentationformsb' => '#/227',
'blk=arabicsup' => '#/228',
'blk=arabicsupplement' => '#/228',
'blk=armenian' => '#/199',
'blk=arrows' => '#/140',
'blk=ascii' => '#/124',
'blk=avestan' => '#/164',
'blk=balinese' => '#/200',
'blk=bamum' => '#/125',
'blk=bamumsup' => '#/201',
'blk=bamumsupplement' => '#/201',
'blk=basiclatin' => '#/124',
'blk=bassavah' => '#/202',
'blk=batak' => '#/126',
'blk=bengali' => '#/165',
'blk=blockelements' => '#/305',
'blk=bopomofo' => '#/203',
'blk=bopomofoext' => '#/271',
'blk=bopomofoextended' => '#/271',
'blk=boxdrawing' => '#/253',
'blk=brahmi' => '#/141',
'blk=braille' => '#/166',
'blk=braillepatterns' => '#/166',
'blk=buginese' => '#/204',
'blk=buhid' => '#/127',
'blk=byzantinemusic' => '#/312',
'blk=byzantinemusicalsymbols' => '#/312',
'blk=canadiansyllabics' => '#/123',
'blk=carian' => '#/142',
'blk=caucasianalbanian' => '#/344',
'blk=chakma' => '#/143',
'blk=cham' => '#/115',
'blk=cherokee' => '#/205',
'blk=cherokeesup' => '#/272',
'blk=cherokeesupplement' => '#/272',
'blk=cjk' => '#/106',
'blk=cjkcompat' => '#/229',
'blk=cjkcompatforms' => '#/313',
'blk=cjkcompatibility' => '#/229',
'blk=cjkcompatibilityforms' => '#/313',
'blk=cjkcompatibilityideographs' => '#/352',
'blk=cjkcompatibilityideographssupplement' => '#/361',
'blk=cjkcompatideographs' => '#/352',
'blk=cjkcompatideographssup' => '#/361',
'blk=cjkexta' => '#/167',
'blk=cjkextb' => '#/168',
'blk=cjkextc' => '#/169',
'blk=cjkextd' => '#/170',
'blk=cjkexte' => '#/171',
'blk=cjkradicalssup' => '#/314',
'blk=cjkradicalssupplement' => '#/314',
'blk=cjkstrokes' => '#/254',
'blk=cjksymbols' => '#/255',
'blk=cjksymbolsandpunctuation' => '#/255',
'blk=cjkunifiedideographs' => '#/106',
'blk=cjkunifiedideographsextensiona' => '#/167',
'blk=cjkunifiedideographsextensionb' => '#/168',
'blk=cjkunifiedideographsextensionc' => '#/169',
'blk=cjkunifiedideographsextensiond' => '#/170',
'blk=cjkunifiedideographsextensione' => '#/171',
'blk=combiningdiacriticalmarks' => '#/296',
'blk=combiningdiacriticalmarksextended' => '#/322',
'blk=combiningdiacriticalmarksforsymbols' => '#/362',
'blk=combiningdiacriticalmarkssupplement' => '#/323',
'blk=combininghalfmarks' => '#/232',
'blk=combiningmarksforsymbols' => '#/362',
'blk=commonindicnumberforms' => '#/337',
'blk=compatjamo' => '#/256',
'blk=controlpictures' => '#/320',
'blk=coptic' => '#/144',
'blk=copticepactnumbers' => '#/347',
'blk=countingrod' => '#/273',
'blk=countingrodnumerals' => '#/273',
'blk=cuneiform' => '#/230',
'blk=cuneiformnumbers' => '#/332',
'blk=cuneiformnumbersandpunctuation' => '#/332',
'blk=currencysymbols' => '#/321',
'blk=cypriotsyllabary' => '#/333',
'blk=cyrillic' => '#/206',
'blk=cyrillicexta' => '#/294',
'blk=cyrillicextb' => '#/295',
'blk=cyrillicextendeda' => '#/294',
'blk=cyrillicextendedb' => '#/295',
'blk=cyrillicsup' => '#/274',
'blk=cyrillicsupplement' => '#/274',
'blk=cyrillicsupplementary' => '#/274',
'blk=deseret' => '#/172',
'blk=devanagari' => '#/257',
'blk=devanagariext' => '#/306',
'blk=devanagariextended' => '#/306',
'blk=diacriticals' => '#/296',
'blk=diacriticalsext' => '#/322',
'blk=diacriticalsforsymbols' => '#/362',
'blk=diacriticalssup' => '#/323',
'blk=dingbats' => '#/207',
'blk=domino' => '#/145',
'blk=dominotiles' => '#/145',
'blk=duployan' => '#/208',
'blk=earlydynasticcuneiform' => '#/363',
'blk=egyptianhieroglyphs' => '#/353',
'blk=elbasan' => '#/173',
'blk=emoticons' => '#/231',
'blk=enclosedalphanum' => '#/334',
'blk=enclosedalphanumerics' => '#/334',
'blk=enclosedalphanumericsupplement' => '#/354',
'blk=enclosedalphanumsup' => '#/354',
'blk=enclosedcjk' => '#/275',
'blk=enclosedcjklettersandmonths' => '#/275',
'blk=enclosedideographicsup' => '#/364',
'blk=enclosedideographicsupplement' => '#/364',
'blk=ethiopic' => '#/209',
'blk=ethiopicext' => '#/276',
'blk=ethiopicexta' => '#/297',
'blk=ethiopicextended' => '#/276',
'blk=ethiopicextendeda' => '#/297',
'blk=ethiopicsup' => '#/277',
'blk=ethiopicsupplement' => '#/277',
'blk=generalpunctuation' => '#/287',
'blk=geometricshapes' => '#/324',
'blk=geometricshapesext' => '#/348',
'blk=geometricshapesextended' => '#/348',
'blk=georgian' => '#/210',
'blk=georgiansup' => '#/278',
'blk=georgiansupplement' => '#/278',
'blk=glagolitic' => '#/258',
'blk=gothic' => '#/146',
'blk=grantha' => '#/174',
'blk=greek' => '#/128',
'blk=greekandcoptic' => '#/128',
'blk=greekext' => '#/211',
'blk=greekextended' => '#/211',
'blk=gujarati' => '#/212',
'blk=gurmukhi' => '#/213',
'blk=halfandfullforms' => '#/335',
'blk=halfmarks' => '#/232',
'blk=halfwidthandfullwidthforms' => '#/335',
'blk=hangul' => '#/147',
'blk=hangulcompatibilityjamo' => '#/256',
'blk=hanguljamo' => '#/116',
'blk=hanguljamoextendeda' => '#/215',
'blk=hanguljamoextendedb' => '#/216',
'blk=hangulsyllables' => '#/147',
'blk=hanunoo' => '#/175',
'blk=hatran' => '#/148',
'blk=hebrew' => '#/149',
'blk=highprivateusesurrogates' => '#/336',
'blk=highpusurrogates' => '#/336',
'blk=highsurrogates' => '#/315',
'blk=hiragana' => '#/214',
'blk=idc' => '#/107',
'blk=ideographicdescriptioncharacters' => '#/107',
'blk=imperialaramaic' => '#/325',
'blk=indicnumberforms' => '#/337',
'blk=inscriptionalpahlavi' => '#/358',
'blk=inscriptionalparthian' => '#/359',
'blk=ipaext' => '#/150',
'blk=ipaextensions' => '#/150',
'blk=jamo' => '#/116',
'blk=jamoexta' => '#/215',
'blk=jamoextb' => '#/216',
'blk=javanese' => '#/217',
'blk=kaithi' => '#/151',
'blk=kanasup' => '#/176',
'blk=kanasupplement' => '#/176',
'blk=kanbun' => '#/152',
'blk=kangxi' => '#/153',
'blk=kangxiradicals' => '#/153',
'blk=kannada' => '#/177',
'blk=katakana' => '#/218',
'blk=katakanaext' => '#/279',
'blk=katakanaphoneticextensions' => '#/279',
'blk=kayahli' => '#/178',
'blk=kharoshthi' => '#/259',
'blk=khmer' => '#/129',
'blk=khmersymbols' => '#/298',
'blk=khojki' => '#/154',
'blk=khudawadi' => '#/233',
'blk=lao' => '#/108',
'blk=latin1' => '#/155',
'blk=latin1sup' => '#/155',
'blk=latin1supplement' => '#/155',
'blk=latinexta' => '#/234',
'blk=latinextadditional' => '#/349',
'blk=latinextb' => '#/235',
'blk=latinextc' => '#/236',
'blk=latinextd' => '#/237',
'blk=latinexte' => '#/238',
'blk=latinextendeda' => '#/234',
'blk=latinextendedadditional' => '#/349',
'blk=latinextendedb' => '#/235',
'blk=latinextendedc' => '#/236',
'blk=latinextendedd' => '#/237',
'blk=latinextendede' => '#/238',
'blk=lepcha' => '#/156',
'blk=letterlikesymbols' => '#/345',
'blk=limbu' => '#/130',
'blk=lineara' => '#/179',
'blk=linearbideograms' => '#/338',
'blk=linearbsyllabary' => '#/339',
'blk=lisu' => '#/117',
'blk=lowsurrogates' => '#/307',
'blk=lycian' => '#/157',
'blk=lydian' => '#/158',
'blk=mahajani' => '#/219',
'blk=mahjong' => '#/180',
'blk=mahjongtiles' => '#/180',
'blk=malayalam' => '#/239',
'blk=mandaic' => '#/181',
'blk=manichaean' => '#/260',
'blk=mathalphanum' => '#/299',
'blk=mathematicalalphanumericsymbols' => '#/299',
'blk=mathematicaloperators' => '#/308',
'blk=mathoperators' => '#/308',
'blk=meeteimayek' => '#/280',
'blk=meeteimayekext' => '#/316',
'blk=meeteimayekextensions' => '#/316',
'blk=mendekikakui' => '#/300',
'blk=meroiticcursive' => '#/326',
'blk=meroitichieroglyphs' => '#/355',
'blk=miao' => '#/118',
'blk=miscarrows' => '#/261',
'blk=miscellaneousmathematicalsymbolsa' => '#/340',
'blk=miscellaneousmathematicalsymbolsb' => '#/341',
'blk=miscellaneoussymbols' => '#/281',
'blk=miscellaneoussymbolsandarrows' => '#/261',
'blk=miscellaneoussymbolsandpictographs' => '#/327',
'blk=miscellaneoustechnical' => '#/309',
'blk=miscmathsymbolsa' => '#/340',
'blk=miscmathsymbolsb' => '#/341',
'blk=miscpictographs' => '#/327',
'blk=miscsymbols' => '#/281',
'blk=misctechnical' => '#/309',
'blk=modi' => '#/119',
'blk=modifierletters' => '#/328',
'blk=modifiertoneletters' => '#/356',
'blk=mongolian' => '#/240',
'blk=mro' => '#/109',
'blk=multani' => '#/182',
'blk=music' => '#/131',
'blk=musicalsymbols' => '#/131',
'blk=myanmar' => '#/183',
'blk=myanmarexta' => '#/282',
'blk=myanmarextb' => '#/283',
'blk=myanmarextendeda' => '#/282',
'blk=myanmarextendedb' => '#/283',
'blk=nabataean' => '#/241',
'blk=nb' => 'Blk/NB',
'blk=newtailue' => '#/242',
'blk=nko' => '#/110',
'blk=noblock' => 'Blk/NB',
'blk=numberforms' => '#/284',
'blk=ocr' => '#/111',
'blk=ogham' => '#/132',
'blk=olchiki' => '#/184',
'blk=oldhungarian' => '#/301',
'blk=olditalic' => '#/243',
'blk=oldnortharabian' => '#/329',
'blk=oldpermic' => '#/244',
'blk=oldpersian' => '#/262',
'blk=oldsoutharabian' => '#/330',
'blk=oldturkic' => '#/245',
'blk=opticalcharacterrecognition' => '#/111',
'blk=oriya' => '#/133',
'blk=ornamentaldingbats' => '#/350',
'blk=osmanya' => '#/185',
'blk=pahawhhmong' => '#/285',
'blk=palmyrene' => '#/246',
'blk=paucinhau' => '#/247',
'blk=phagspa' => '#/186',
'blk=phaistos' => '#/220',
'blk=phaistosdisc' => '#/220',
'blk=phoenician' => '#/263',
'blk=phoneticext' => '#/286',
'blk=phoneticextensions' => '#/286',
'blk=phoneticextensionssupplement' => '#/317',
'blk=phoneticextsup' => '#/317',
'blk=playingcards' => '#/302',
'blk=privateuse' => '#/112',
'blk=privateusearea' => '#/112',
'blk=psalterpahlavi' => '#/318',
'blk=pua' => '#/112',
'blk=punctuation' => '#/287',
'blk=rejang' => '#/159',
'blk=rumi' => '#/120',
'blk=ruminumeralsymbols' => '#/120',
'blk=runic' => '#/134',
'blk=samaritan' => '#/248',
'blk=saurashtra' => '#/264',
'blk=sharada' => '#/187',
'blk=shavian' => '#/188',
'blk=shorthandformatcontrols' => '#/365',
'blk=siddham' => '#/189',
'blk=sinhala' => '#/190',
'blk=sinhalaarchaicnumbers' => '#/360',
'blk=smallforms' => '#/265',
'blk=smallformvariants' => '#/265',
'blk=sorasompeng' => '#/288',
'blk=spacingmodifierletters' => '#/328',
'blk=specials' => '#/221',
'blk=sundanese' => '#/249',
'blk=sundanesesup' => '#/303',
'blk=sundanesesupplement' => '#/303',
'blk=suparrowsa' => '#/266',
'blk=suparrowsb' => '#/267',
'blk=suparrowsc' => '#/268',
'blk=superandsub' => '#/289',
'blk=superscriptsandsubscripts' => '#/289',
'blk=supmathoperators' => '#/342',
'blk=supplementalarrowsa' => '#/266',
'blk=supplementalarrowsb' => '#/267',
'blk=supplementalarrowsc' => '#/268',
'blk=supplementalmathematicaloperators' => '#/342',
'blk=supplementalpunctuation' => '#/319',
'blk=supplementalsymbolsandpictographs' => '#/366',
'blk=supplementaryprivateuseareaa' => '#/191',
'blk=supplementaryprivateuseareab' => '#/192',
'blk=suppuaa' => '#/191',
'blk=suppuab' => '#/192',
'blk=suppunctuation' => '#/319',
'blk=supsymbolsandpictographs' => '#/366',
'blk=suttonsignwriting' => '#/346',
'blk=sylotinagri' => '#/290',
'blk=syriac' => '#/160',
'blk=tagalog' => '#/193',
'blk=tagbanwa' => '#/222',
'blk=tags' => '#/121',
'blk=taile' => '#/135',
'blk=taitham' => '#/194',
'blk=taiviet' => '#/195',
'blk=taixuanjing' => '#/291',
'blk=taixuanjingsymbols' => '#/291',
'blk=takri' => '#/136',
'blk=tamil' => '#/137',
'blk=telugu' => '#/161',
'blk=thaana' => '#/162',
'blk=thai' => '#/122',
'blk=tibetan' => '#/196',
'blk=tifinagh' => '#/223',
'blk=tirhuta' => '#/197',
'blk=transportandmap' => '#/331',
'blk=transportandmapsymbols' => '#/331',
'blk=ucas' => '#/123',
'blk=ucasext' => '#/198',
'blk=ugaritic' => '#/224',
'blk=unifiedcanadianaboriginalsyllabics' => '#/123',
'blk=unifiedcanadianaboriginalsyllabicsextended' => '#/198',
'blk=vai' => '#/113',
'blk=variationselectors' => '#/105',
'blk=variationselectorssupplement' => '#/138',
'blk=vedicext' => '#/225',
'blk=vedicextensions' => '#/225',
'blk=verticalforms' => '#/310',
'blk=vs' => '#/105',
'blk=vssup' => '#/138',
'blk=warangciti' => '#/269',
'blk=yijing' => '#/163',
'blk=yijinghexagramsymbols' => '#/163',
'blk=yiradicals' => '#/270',
'blk=yisyllables' => '#/292',
'blockelements' => '#/305',
'bopo' => '#/550',
'bopomofo' => '#/550',
'bopomofoext' => '#/271',
'bopomofoextended' => '#/271',
'boxdrawing' => '#/253',
'bpt=c' => 'Bpt/C',
'bpt=close' => 'Bpt/C',
'bpt=n' => 'Bpt/N',
'bpt=none' => 'Bpt/N',
'bpt=o' => 'Bpt/O',
'bpt=open' => 'Bpt/O',
'brah' => '#/551',
'brahmi' => '#/551',
'brai' => '#/166',
'braille' => '#/166',
'braillepatterns' => '#/166',
'bugi' => '#/552',
'buginese' => '#/552',
'buhd' => '#/553',
'buhid' => '#/553',
'byzantinemusic' => '#/312',
'byzantinemusicalsymbols' => '#/312',
'c' => 'Gc/C',
'cakm' => '#/554',
'canadianaboriginal' => '#/555',
'canadiansyllabics' => '#/123',
'cans' => '#/555',
'cari' => '#/556',
'carian' => '#/556',
'cased' => 'Cased/Y',
'cased=f' => '!Cased/Y',
'cased=false' => '!Cased/Y',
'cased=n' => '!Cased/Y',
'cased=no' => '!Cased/Y',
'cased=t' => 'Cased/Y',
'cased=true' => 'Cased/Y',
'cased=y' => 'Cased/Y',
'cased=yes' => 'Cased/Y',
'casedletter' => 'Gc/LC',
'caseignorable' => 'CI/Y',
'caucasianalbanian' => '#/542',
'cc' => '#/370',
'ccc=a' => 'Ccc/A',
'ccc=above' => 'Ccc/A',
'ccc=aboveleft' => '#/17',
'ccc=aboveright' => 'Ccc/AR',
'ccc=al' => '#/17',
'ccc=ar' => 'Ccc/AR',
'ccc=ata' => '#/22',
'ccc=atar' => 'Ccc/ATAR',
'ccc=atb' => '#/23',
'ccc=atbl' => '#/0',
'ccc=attachedabove' => '#/22',
'ccc=attachedaboveright' => 'Ccc/ATAR',
'ccc=attachedbelow' => '#/23',
'ccc=attachedbelowleft' => '#/0',
'ccc=b' => 'Ccc/B',
'ccc=below' => 'Ccc/B',
'ccc=belowleft' => '#/18',
'ccc=belowright' => 'Ccc/BR',
'ccc=bl' => '#/18',
'ccc=br' => 'Ccc/BR',
'ccc=ccc10' => '#/24',
'ccc=ccc103' => '#/53',
'ccc=ccc107' => '#/54',
'ccc=ccc11' => '#/25',
'ccc=ccc118' => '#/55',
'ccc=ccc12' => '#/26',
'ccc=ccc122' => '#/56',
'ccc=ccc129' => '#/57',
'ccc=ccc13' => '#/27',
'ccc=ccc130' => '#/58',
'ccc=ccc132' => '#/59',
'ccc=ccc133' => '#/0',
'ccc=ccc14' => '#/28',
'ccc=ccc15' => '#/29',
'ccc=ccc16' => '#/30',
'ccc=ccc17' => '#/31',
'ccc=ccc18' => '#/32',
'ccc=ccc19' => '#/33',
'ccc=ccc20' => '#/34',
'ccc=ccc21' => '#/35',
'ccc=ccc22' => '#/36',
'ccc=ccc23' => '#/37',
'ccc=ccc24' => '#/38',
'ccc=ccc25' => '#/39',
'ccc=ccc26' => '#/40',
'ccc=ccc27' => '#/41',
'ccc=ccc28' => '#/42',
'ccc=ccc29' => '#/43',
'ccc=ccc30' => '#/44',
'ccc=ccc31' => '#/45',
'ccc=ccc32' => '#/46',
'ccc=ccc33' => '#/47',
'ccc=ccc34' => '#/48',
'ccc=ccc35' => '#/49',
'ccc=ccc36' => '#/50',
'ccc=ccc84' => '#/51',
'ccc=ccc91' => '#/52',
'ccc=da' => '#/19',
'ccc=db' => 'Ccc/DB',
'ccc=doubleabove' => '#/19',
'ccc=doublebelow' => 'Ccc/DB',
'ccc=iotasubscript' => '#/20',
'ccc=is' => '#/20',
'ccc=kanavoicing' => '#/21',
'ccc=kv' => '#/21',
'ccc=l' => '#/15',
'ccc=left' => '#/15',
'ccc=nk' => 'Ccc/NK',
'ccc=notreordered' => 'Ccc/NR',
'ccc=nr' => 'Ccc/NR',
'ccc=nukta' => 'Ccc/NK',
'ccc=ov' => 'Ccc/OV',
'ccc=overlay' => 'Ccc/OV',
'ccc=r' => '#/16',
'ccc=right' => '#/16',
'ccc=virama' => 'Ccc/VR',
'ccc=vr' => 'Ccc/VR',
'ce' => 'CE/Y',
'ce=f' => '!CE/Y',
'ce=false' => '!CE/Y',
'ce=n' => '!CE/Y',
'ce=no' => '!CE/Y',
'ce=t' => 'CE/Y',
'ce=true' => 'CE/Y',
'ce=y' => 'CE/Y',
'ce=yes' => 'CE/Y',
'cf' => 'Gc/Cf',
'chakma' => '#/554',
'cham' => 'Sc/Cham',
'changeswhencasefolded' => 'CWCF/Y',
'changeswhencasemapped' => 'CWCM/Y',
'changeswhenlowercased' => 'CWL/Y',
'changeswhennfkccasefolded' => 'CWKCF/Y',
'changeswhentitlecased' => 'CWT/Y',
'changeswhenuppercased' => 'CWU/Y',
'cher' => '#/557',
'cherokee' => '#/557',
'cherokeesup' => '#/272',
'cherokeesupplement' => '#/272',
'ci' => 'CI/Y',
'ci=f' => '!CI/Y',
'ci=false' => '!CI/Y',
'ci=n' => '!CI/Y',
'ci=no' => '!CI/Y',
'ci=t' => 'CI/Y',
'ci=true' => 'CI/Y',
'ci=y' => 'CI/Y',
'ci=yes' => 'CI/Y',
'cjk' => '#/106',
'cjkcompat' => '#/229',
'cjkcompatforms' => '#/313',
'cjkcompatibility' => '#/229',
'cjkcompatibilityforms' => '#/313',
'cjkcompatibilityideographs' => '#/352',
'cjkcompatibilityideographssupplement' => '#/361',
'cjkcompatideographs' => '#/352',
'cjkcompatideographssup' => '#/361',
'cjkexta' => '#/167',
'cjkextb' => '#/168',
'cjkextc' => '#/169',
'cjkextd' => '#/170',
'cjkexte' => '#/171',
'cjkradicalssup' => '#/314',
'cjkradicalssupplement' => '#/314',
'cjkstrokes' => '#/254',
'cjksymbols' => '#/255',
'cjksymbolsandpunctuation' => '#/255',
'cjkunifiedideographs' => '#/106',
'cjkunifiedideographsextensiona' => '#/167',
'cjkunifiedideographsextensionb' => '#/168',
'cjkunifiedideographsextensionc' => '#/169',
'cjkunifiedideographsextensiond' => '#/170',
'cjkunifiedideographsextensione' => '#/171',
'closepunctuation' => 'Gc/Pe',
'cn' => 'Gc/Cn',
'cntrl' => '#/370',
'co' => '#/371',
'combiningdiacriticalmarks' => '#/296',
'combiningdiacriticalmarksextended' => '#/322',
'combiningdiacriticalmarksforsymbols' => '#/362',
'combiningdiacriticalmarkssupplement' => '#/323',
'combininghalfmarks' => '#/232',
'combiningmark' => 'Gc/M',
'combiningmarksforsymbols' => '#/362',
'common' => 'Sc/Zyyy',
'commonindicnumberforms' => '#/337',
'compatjamo' => '#/256',
'compex' => 'CompEx/Y',
'compex=f' => '!CompEx/Y',
'compex=false' => '!CompEx/Y',
'compex=n' => '!CompEx/Y',
'compex=no' => '!CompEx/Y',
'compex=t' => 'CompEx/Y',
'compex=true' => 'CompEx/Y',
'compex=y' => 'CompEx/Y',
'compex=yes' => 'CompEx/Y',
'compositionexclusion' => 'CE/Y',
'connectorpunctuation' => 'WB/EX',
'control' => '#/370',
'controlpictures' => '#/320',
'copt' => '#/558',
'coptic' => '#/558',
'copticepactnumbers' => '#/347',
'countingrod' => '#/273',
'countingrodnumerals' => '#/273',
'cprt' => 'Sc/Cprt',
'cs' => '#/14',
'cuneiform' => 'Sc/Xsux',
'cuneiformnumbers' => '#/332',
'cuneiformnumbersandpunctuation' => '#/332',
'currencysymbol' => 'Gc/Sc',
'currencysymbols' => '#/321',
'cwcf' => 'CWCF/Y',
'cwcf=f' => '!CWCF/Y',
'cwcf=false' => '!CWCF/Y',
'cwcf=n' => '!CWCF/Y',
'cwcf=no' => '!CWCF/Y',
'cwcf=t' => 'CWCF/Y',
'cwcf=true' => 'CWCF/Y',
'cwcf=y' => 'CWCF/Y',
'cwcf=yes' => 'CWCF/Y',
'cwcm' => 'CWCM/Y',
'cwcm=f' => '!CWCM/Y',
'cwcm=false' => '!CWCM/Y',
'cwcm=n' => '!CWCM/Y',
'cwcm=no' => '!CWCM/Y',
'cwcm=t' => 'CWCM/Y',
'cwcm=true' => 'CWCM/Y',
'cwcm=y' => 'CWCM/Y',
'cwcm=yes' => 'CWCM/Y',
'cwkcf' => 'CWKCF/Y',
'cwkcf=f' => '!CWKCF/Y',
'cwkcf=false' => '!CWKCF/Y',
'cwkcf=n' => '!CWKCF/Y',
'cwkcf=no' => '!CWKCF/Y',
'cwkcf=t' => 'CWKCF/Y',
'cwkcf=true' => 'CWKCF/Y',
'cwkcf=y' => 'CWKCF/Y',
'cwkcf=yes' => 'CWKCF/Y',
'cwl' => 'CWL/Y',
'cwl=f' => '!CWL/Y',
'cwl=false' => '!CWL/Y',
'cwl=n' => '!CWL/Y',
'cwl=no' => '!CWL/Y',
'cwl=t' => 'CWL/Y',
'cwl=true' => 'CWL/Y',
'cwl=y' => 'CWL/Y',
'cwl=yes' => 'CWL/Y',
'cwt' => 'CWT/Y',
'cwt=f' => '!CWT/Y',
'cwt=false' => '!CWT/Y',
'cwt=n' => '!CWT/Y',
'cwt=no' => '!CWT/Y',
'cwt=t' => 'CWT/Y',
'cwt=true' => 'CWT/Y',
'cwt=y' => 'CWT/Y',
'cwt=yes' => 'CWT/Y',
'cwu' => 'CWU/Y',
'cwu=f' => '!CWU/Y',
'cwu=false' => '!CWU/Y',
'cwu=n' => '!CWU/Y',
'cwu=no' => '!CWU/Y',
'cwu=t' => 'CWU/Y',
'cwu=true' => 'CWU/Y',
'cwu=y' => 'CWU/Y',
'cwu=yes' => 'CWU/Y',
'cypriot' => 'Sc/Cprt',
'cypriotsyllabary' => '#/333',
'cyrillic' => 'Sc/Cyrl',
'cyrillicexta' => '#/294',
'cyrillicextb' => '#/295',
'cyrillicextendeda' => '#/294',
'cyrillicextendedb' => '#/295',
'cyrillicsup' => '#/274',
'cyrillicsupplement' => '#/274',
'cyrillicsupplementary' => '#/274',
'cyrl' => 'Sc/Cyrl',
'dash' => 'Dash/Y',
'dash=f' => '!Dash/Y',
'dash=false' => '!Dash/Y',
'dash=n' => '!Dash/Y',
'dash=no' => '!Dash/Y',
'dash=t' => 'Dash/Y',
'dash=true' => 'Dash/Y',
'dash=y' => 'Dash/Y',
'dash=yes' => 'Dash/Y',
'dashpunctuation' => 'Gc/Pd',
'decimalnumber' => 'Gc/Nd',
'defaultignorablecodepoint' => 'DI/Y',
'dep' => 'Dep/Y',
'dep=f' => '!Dep/Y',
'dep=false' => '!Dep/Y',
'dep=n' => '!Dep/Y',
'dep=no' => '!Dep/Y',
'dep=t' => 'Dep/Y',
'dep=true' => 'Dep/Y',
'dep=y' => 'Dep/Y',
'dep=yes' => 'Dep/Y',
'deprecated' => 'Dep/Y',
'deseret' => '#/172',
'deva' => 'Sc/Deva',
'devanagari' => 'Sc/Deva',
'devanagariext' => '#/306',
'devanagariextended' => '#/306',
'di' => 'DI/Y',
'di=f' => '!DI/Y',
'di=false' => '!DI/Y',
'di=n' => '!DI/Y',
'di=no' => '!DI/Y',
'di=t' => 'DI/Y',
'di=true' => 'DI/Y',
'di=y' => 'DI/Y',
'di=yes' => 'DI/Y',
'dia' => 'Dia/Y',
'dia=f' => '!Dia/Y',
'dia=false' => '!Dia/Y',
'dia=n' => '!Dia/Y',
'dia=no' => '!Dia/Y',
'dia=t' => 'Dia/Y',
'dia=true' => 'Dia/Y',
'dia=y' => 'Dia/Y',
'dia=yes' => 'Dia/Y',
'diacritic' => 'Dia/Y',
'diacriticals' => '#/296',
'diacriticalsext' => '#/322',
'diacriticalsforsymbols' => '#/362',
'diacriticalssup' => '#/323',
'digit' => 'Gc/Nd',
'dingbats' => '#/207',
'domino' => '#/145',
'dominotiles' => '#/145',
'dsrt' => '#/172',
'dt=can' => 'NFDQC/N',
'dt=canonical' => 'NFDQC/N',
'dt=circle' => 'Dt/Enc',
'dt=com' => 'Dt/Com',
'dt=compat' => 'Dt/Com',
'dt=enc' => 'Dt/Enc',
'dt=fin' => 'Dt/Fin',
'dt=final' => 'Dt/Fin',
'dt=font' => 'Dt/Font',
'dt=fra' => '#/367',
'dt=fraction' => '#/367',
'dt=init' => 'Dt/Init',
'dt=initial' => 'Dt/Init',
'dt=iso' => 'Dt/Iso',
'dt=isolated' => 'Dt/Iso',
'dt=med' => 'Dt/Med',
'dt=medial' => 'Dt/Med',
'dt=nar' => 'Dt/Nar',
'dt=narrow' => 'Dt/Nar',
'dt=nb' => 'Dt/Nb',
'dt=nobreak' => 'Dt/Nb',
'dt=noncanon' => 'Dt/NonCanon',
'dt=noncanonical' => 'Dt/NonCanon',
'dt=none' => 'NFKDQC/Y',
'dt=small' => '#/368',
'dt=sml' => '#/368',
'dt=sqr' => 'Dt/Sqr',
'dt=square' => 'Dt/Sqr',
'dt=sub' => 'Dt/Sub',
'dt=sup' => 'Dt/Sup',
'dt=super' => 'Dt/Sup',
'dt=vert' => 'Dt/Vert',
'dt=vertical' => 'Dt/Vert',
'dt=wide' => '#/369',
'dupl' => 'Sc/Dupl',
'duployan' => 'Sc/Dupl',
'ea=a' => 'Ea/A',
'ea=ambiguous' => 'Ea/A',
'ea=f' => '#/369',
'ea=fullwidth' => '#/369',
'ea=h' => 'Ea/H',
'ea=halfwidth' => 'Ea/H',
'ea=n' => 'Ea/N',
'ea=na' => 'Ea/Na',
'ea=narrow' => 'Ea/Na',
'ea=neutral' => 'Ea/N',
'ea=w' => 'Ea/W',
'ea=wide' => 'Ea/W',
'earlydynasticcuneiform' => '#/363',
'egyp' => '#/559',
'egyptianhieroglyphs' => '#/559',
'elba' => '#/560',
'elbasan' => '#/560',
'emoticons' => '#/231',
'enclosedalphanum' => '#/334',
'enclosedalphanumerics' => '#/334',
'enclosedalphanumericsupplement' => '#/354',
'enclosedalphanumsup' => '#/354',
'enclosedcjk' => '#/275',
'enclosedcjklettersandmonths' => '#/275',
'enclosedideographicsup' => '#/364',
'enclosedideographicsupplement' => '#/364',
'enclosingmark' => 'Gc/Me',
'ethi' => 'Sc/Ethi',
'ethiopic' => 'Sc/Ethi',
'ethiopicext' => '#/276',
'ethiopicexta' => '#/297',
'ethiopicextended' => '#/276',
'ethiopicextendeda' => '#/297',
'ethiopicsup' => '#/277',
'ethiopicsupplement' => '#/277',
'ext' => 'Ext/Y',
'ext=f' => '!Ext/Y',
'ext=false' => '!Ext/Y',
'ext=n' => '!Ext/Y',
'ext=no' => '!Ext/Y',
'ext=t' => 'Ext/Y',
'ext=true' => 'Ext/Y',
'ext=y' => 'Ext/Y',
'ext=yes' => 'Ext/Y',
'extender' => 'Ext/Y',
'finalpunctuation' => 'Gc/Pf',
'format' => 'Gc/Cf',
'fullcompositionexclusion' => 'CompEx/Y',
'gc=c' => 'Gc/C',
'gc=casedletter' => 'Gc/LC',
'gc=cc' => '#/370',
'gc=cf' => 'Gc/Cf',
'gc=closepunctuation' => 'Gc/Pe',
'gc=cn' => 'Gc/Cn',
'gc=cntrl' => '#/370',
'gc=co' => '#/371',
'gc=combiningmark' => 'Gc/M',
'gc=connectorpunctuation' => 'WB/EX',
'gc=control' => '#/370',
'gc=cs' => '#/14',
'gc=currencysymbol' => 'Gc/Sc',
'gc=dashpunctuation' => 'Gc/Pd',
'gc=decimalnumber' => 'Gc/Nd',
'gc=digit' => 'Gc/Nd',
'gc=enclosingmark' => 'Gc/Me',
'gc=finalpunctuation' => 'Gc/Pf',
'gc=format' => 'Gc/Cf',
'gc=initialpunctuation' => 'Gc/Pi',
'gc=l' => 'Gc/L',
'gc=l&' => 'Gc/LC',
'gc=l_' => 'Gc/LC',
'gc=lc' => 'Gc/LC',
'gc=letter' => 'Gc/L',
'gc=letternumber' => 'Gc/Nl',
'gc=lineseparator' => '#/372',
'gc=ll' => 'Gc/Ll',
'gc=lm' => 'Gc/Lm',
'gc=lo' => 'Gc/Lo',
'gc=lowercaseletter' => 'Gc/Ll',
'gc=lt' => 'Perl/Title',
'gc=lu' => 'Gc/Lu',
'gc=m' => 'Gc/M',
'gc=mark' => 'Gc/M',
'gc=mathsymbol' => 'Gc/Sm',
'gc=mc' => 'Gc/Mc',
'gc=me' => 'Gc/Me',
'gc=mn' => 'Gc/Mn',
'gc=modifierletter' => 'Gc/Lm',
'gc=modifiersymbol' => 'Gc/Sk',
'gc=n' => 'Gc/N',
'gc=nd' => 'Gc/Nd',
'gc=nl' => 'Gc/Nl',
'gc=no' => 'Gc/No',
'gc=nonspacingmark' => 'Gc/Mn',
'gc=number' => 'Gc/N',
'gc=openpunctuation' => 'Gc/Ps',
'gc=other' => 'Gc/C',
'gc=otherletter' => 'Gc/Lo',
'gc=othernumber' => 'Gc/No',
'gc=otherpunctuation' => 'Gc/Po',
'gc=othersymbol' => 'Gc/So',
'gc=p' => 'Gc/P',
'gc=paragraphseparator' => '#/373',
'gc=pc' => 'WB/EX',
'gc=pd' => 'Gc/Pd',
'gc=pe' => 'Gc/Pe',
'gc=pf' => 'Gc/Pf',
'gc=pi' => 'Gc/Pi',
'gc=po' => 'Gc/Po',
'gc=privateuse' => '#/371',
'gc=ps' => 'Gc/Ps',
'gc=punct' => 'Gc/P',
'gc=punctuation' => 'Gc/P',
'gc=s' => 'Gc/S',
'gc=sc' => 'Gc/Sc',
'gc=separator' => 'Gc/Z',
'gc=sk' => 'Gc/Sk',
'gc=sm' => 'Gc/Sm',
'gc=so' => 'Gc/So',
'gc=spaceseparator' => 'Gc/Zs',
'gc=spacingmark' => 'Gc/Mc',
'gc=surrogate' => '#/14',
'gc=symbol' => 'Gc/S',
'gc=titlecaseletter' => 'Perl/Title',
'gc=unassigned' => 'Gc/Cn',
'gc=uppercaseletter' => 'Gc/Lu',
'gc=z' => 'Gc/Z',
'gc=zl' => '#/372',
'gc=zp' => '#/373',
'gc=zs' => 'Gc/Zs',
'gcb=cn' => 'GCB/CN',
'gcb=control' => 'GCB/CN',
'gcb=cr' => '#/64',
'gcb=ex' => 'GCB/EX',
'gcb=extend' => 'GCB/EX',
'gcb=l' => '#/61',
'gcb=lf' => '#/65',
'gcb=lv' => 'GCB/LV',
'gcb=lvt' => 'GCB/LVT',
'gcb=other' => 'GCB/XX',
'gcb=pp' => '#/0',
'gcb=prepend' => '#/0',
'gcb=regionalindicator' => '#/66',
'gcb=ri' => '#/66',
'gcb=sm' => 'GCB/SM',
'gcb=spacingmark' => 'GCB/SM',
'gcb=t' => '#/62',
'gcb=v' => '#/63',
'gcb=xx' => 'GCB/XX',
'generalpunctuation' => '#/287',
'geometricshapes' => '#/324',
'geometricshapesext' => '#/348',
'geometricshapesextended' => '#/348',
'geor' => 'Sc/Geor',
'georgian' => 'Sc/Geor',
'georgiansup' => '#/278',
'georgiansupplement' => '#/278',
'glag' => '#/561',
'glagolitic' => '#/561',
'goth' => '#/562',
'gothic' => '#/562',
'gran' => 'Sc/Gran',
'grantha' => 'Sc/Gran',
'graph' => 'Perl/Graph',
'graphemebase' => 'GrBase/Y',
'graphemeextend' => 'GCB/EX',
'grbase' => 'GrBase/Y',
'grbase=f' => '!GrBase/Y',
'grbase=false' => '!GrBase/Y',
'grbase=n' => '!GrBase/Y',
'grbase=no' => '!GrBase/Y',
'grbase=t' => 'GrBase/Y',
'grbase=true' => 'GrBase/Y',
'grbase=y' => 'GrBase/Y',
'grbase=yes' => 'GrBase/Y',
'greek' => 'Sc/Grek',
'greekandcoptic' => '#/128',
'greekext' => '#/211',
'greekextended' => '#/211',
'grek' => 'Sc/Grek',
'grext' => 'GCB/EX',
'grext=f' => '!GCB/EX',
'grext=false' => '!GCB/EX',
'grext=n' => '!GCB/EX',
'grext=no' => '!GCB/EX',
'grext=t' => 'GCB/EX',
'grext=true' => 'GCB/EX',
'grext=y' => 'GCB/EX',
'grext=yes' => 'GCB/EX',
'gujarati' => 'Sc/Gujr',
'gujr' => 'Sc/Gujr',
'gurmukhi' => 'Sc/Guru',
'guru' => 'Sc/Guru',
'halfandfullforms' => '#/335',
'halfmarks' => '#/232',
'halfwidthandfullwidthforms' => '#/335',
'han' => 'Sc/Han',
'hang' => 'Sc/Hang',
'hangul' => 'Sc/Hang',
'hangulcompatibilityjamo' => '#/256',
'hanguljamo' => '#/116',
'hanguljamoextendeda' => '#/215',
'hanguljamoextendedb' => '#/216',
'hangulsyllables' => '#/147',
'hani' => 'Sc/Han',
'hano' => '#/563',
'hanunoo' => '#/563',
'hatr' => '#/564',
'hatran' => '#/564',
'hebr' => 'Sc/Hebr',
'hebrew' => 'Sc/Hebr',
'hex' => 'Hex/Y',
'hex=f' => '!Hex/Y',
'hex=false' => '!Hex/Y',
'hex=n' => '!Hex/Y',
'hex=no' => '!Hex/Y',
'hex=t' => 'Hex/Y',
'hex=true' => 'Hex/Y',
'hex=y' => 'Hex/Y',
'hex=yes' => 'Hex/Y',
'hexdigit' => 'Hex/Y',
'highprivateusesurrogates' => '#/336',
'highpusurrogates' => '#/336',
'highsurrogates' => '#/315',
'hira' => 'Sc/Hira',
'hiragana' => 'Sc/Hira',
'hluw' => '#/565',
'hmng' => 'Sc/Hmng',
'horizspace' => 'Perl/Blank',
'hst=l' => '#/61',
'hst=leadingjamo' => '#/61',
'hst=lv' => 'GCB/LV',
'hst=lvsyllable' => 'GCB/LV',
'hst=lvt' => 'GCB/LVT',
'hst=lvtsyllable' => 'GCB/LVT',
'hst=na' => 'Hst/NA',
'hst=notapplicable' => 'Hst/NA',
'hst=t' => '#/62',
'hst=trailingjamo' => '#/62',
'hst=v' => '#/63',
'hst=voweljamo' => '#/63',
'hung' => '#/566',
'hyphen' => 'Hyphen/T',
'hyphen=f' => '!Hyphen/T',
'hyphen=false' => '!Hyphen/T',
'hyphen=n' => '!Hyphen/T',
'hyphen=no' => '!Hyphen/T',
'hyphen=t' => 'Hyphen/T',
'hyphen=true' => 'Hyphen/T',
'hyphen=y' => 'Hyphen/T',
'hyphen=yes' => 'Hyphen/T',
'idc' => 'IDC/Y',
'idc=f' => '!IDC/Y',
'idc=false' => '!IDC/Y',
'idc=n' => '!IDC/Y',
'idc=no' => '!IDC/Y',
'idc=t' => 'IDC/Y',
'idc=true' => 'IDC/Y',
'idc=y' => 'IDC/Y',
'idc=yes' => 'IDC/Y',
'idcontinue' => 'IDC/Y',
'ideo' => 'Ideo/Y',
'ideo=f' => '!Ideo/Y',
'ideo=false' => '!Ideo/Y',
'ideo=n' => '!Ideo/Y',
'ideo=no' => '!Ideo/Y',
'ideo=t' => 'Ideo/Y',
'ideo=true' => 'Ideo/Y',
'ideo=y' => 'Ideo/Y',
'ideo=yes' => 'Ideo/Y',
'ideographic' => 'Ideo/Y',
'ideographicdescriptioncharacters' => '#/107',
'ids' => 'IDS/Y',
'ids=f' => '!IDS/Y',
'ids=false' => '!IDS/Y',
'ids=n' => '!IDS/Y',
'ids=no' => '!IDS/Y',
'ids=t' => 'IDS/Y',
'ids=true' => 'IDS/Y',
'ids=y' => 'IDS/Y',
'ids=yes' => 'IDS/Y',
'idsb' => '#/67',
'idsb=f' => '#/!67',
'idsb=false' => '#/!67',
'idsb=n' => '#/!67',
'idsb=no' => '#/!67',
'idsb=t' => '#/67',
'idsb=true' => '#/67',
'idsb=y' => '#/67',
'idsb=yes' => '#/67',
'idsbinaryoperator' => '#/67',
'idst' => '#/68',
'idst=f' => '#/!68',
'idst=false' => '#/!68',
'idst=n' => '#/!68',
'idst=no' => '#/!68',
'idst=t' => '#/68',
'idst=true' => '#/68',
'idst=y' => '#/68',
'idst=yes' => '#/68',
'idstart' => 'IDS/Y',
'idstrinaryoperator' => '#/68',
'imperialaramaic' => '#/544',
'in=unassigned' => 'Age/NA',
'inaegeannumbers' => '#/304',
'inahom' => '#/114',
'inalchemical' => '#/250',
'inalchemicalsymbols' => '#/250',
'inalphabeticpf' => '#/293',
'inalphabeticpresentationforms' => '#/293',
'inanatolianhieroglyphs' => '#/357',
'inancientgreekmusic' => '#/343',
'inancientgreekmusicalnotation' => '#/343',
'inancientgreeknumbers' => '#/351',
'inancientsymbols' => '#/311',
'inarabic' => '#/139',
'inarabicexta' => '#/251',
'inarabicextendeda' => '#/251',
'inarabicmath' => '#/252',
'inarabicmathematicalalphabeticsymbols' => '#/252',
'inarabicpfa' => '#/226',
'inarabicpfb' => '#/227',
'inarabicpresentationformsa' => '#/226',
'inarabicpresentationformsb' => '#/227',
'inarabicsup' => '#/228',
'inarabicsupplement' => '#/228',
'inarmenian' => '#/199',
'inarrows' => '#/140',
'inascii' => '#/124',
'inavestan' => '#/164',
'inbalinese' => '#/200',
'inbamum' => '#/125',
'inbamumsup' => '#/201',
'inbamumsupplement' => '#/201',
'inbasiclatin' => '#/124',
'inbassavah' => '#/202',
'inbatak' => '#/126',
'inbengali' => '#/165',
'inblockelements' => '#/305',
'inbopomofo' => '#/203',
'inbopomofoext' => '#/271',
'inbopomofoextended' => '#/271',
'inboxdrawing' => '#/253',
'inbrahmi' => '#/141',
'inbraille' => '#/166',
'inbraillepatterns' => '#/166',
'inbuginese' => '#/204',
'inbuhid' => '#/127',
'inbyzantinemusic' => '#/312',
'inbyzantinemusicalsymbols' => '#/312',
'incanadiansyllabics' => '#/123',
'incarian' => '#/142',
'incaucasianalbanian' => '#/344',
'inchakma' => '#/143',
'incham' => '#/115',
'incherokee' => '#/205',
'incherokeesup' => '#/272',
'incherokeesupplement' => '#/272',
'incjk' => '#/106',
'incjkcompat' => '#/229',
'incjkcompatforms' => '#/313',
'incjkcompatibility' => '#/229',
'incjkcompatibilityforms' => '#/313',
'incjkcompatibilityideographs' => '#/352',
'incjkcompatibilityideographssupplement' => '#/361',
'incjkcompatideographs' => '#/352',
'incjkcompatideographssup' => '#/361',
'incjkexta' => '#/167',
'incjkextb' => '#/168',
'incjkextc' => '#/169',
'incjkextd' => '#/170',
'incjkexte' => '#/171',
'incjkradicalssup' => '#/314',
'incjkradicalssupplement' => '#/314',
'incjkstrokes' => '#/254',
'incjksymbols' => '#/255',
'incjksymbolsandpunctuation' => '#/255',
'incjkunifiedideographs' => '#/106',
'incjkunifiedideographsextensiona' => '#/167',
'incjkunifiedideographsextensionb' => '#/168',
'incjkunifiedideographsextensionc' => '#/169',
'incjkunifiedideographsextensiond' => '#/170',
'incjkunifiedideographsextensione' => '#/171',
'incombiningdiacriticalmarks' => '#/296',
'incombiningdiacriticalmarksextended' => '#/322',
'incombiningdiacriticalmarksforsymbols' => '#/362',
'incombiningdiacriticalmarkssupplement' => '#/323',
'incombininghalfmarks' => '#/232',
'incombiningmarksforsymbols' => '#/362',
'incommonindicnumberforms' => '#/337',
'incompatjamo' => '#/256',
'incontrolpictures' => '#/320',
'incoptic' => '#/144',
'incopticepactnumbers' => '#/347',
'incountingrod' => '#/273',
'incountingrodnumerals' => '#/273',
'incuneiform' => '#/230',
'incuneiformnumbers' => '#/332',
'incuneiformnumbersandpunctuation' => '#/332',
'incurrencysymbols' => '#/321',
'incypriotsyllabary' => '#/333',
'incyrillic' => '#/206',
'incyrillicexta' => '#/294',
'incyrillicextb' => '#/295',
'incyrillicextendeda' => '#/294',
'incyrillicextendedb' => '#/295',
'incyrillicsup' => '#/274',
'incyrillicsupplement' => '#/274',
'incyrillicsupplementary' => '#/274',
'indeseret' => '#/172',
'indevanagari' => '#/257',
'indevanagariext' => '#/306',
'indevanagariextended' => '#/306',
'indiacriticals' => '#/296',
'indiacriticalsext' => '#/322',
'indiacriticalsforsymbols' => '#/362',
'indiacriticalssup' => '#/323',
'indicnumberforms' => '#/337',
'indingbats' => '#/207',
'indomino' => '#/145',
'indominotiles' => '#/145',
'induployan' => '#/208',
'inearlydynasticcuneiform' => '#/363',
'inegyptianhieroglyphs' => '#/353',
'inelbasan' => '#/173',
'inemoticons' => '#/231',
'inenclosedalphanum' => '#/334',
'inenclosedalphanumerics' => '#/334',
'inenclosedalphanumericsupplement' => '#/354',
'inenclosedalphanumsup' => '#/354',
'inenclosedcjk' => '#/275',
'inenclosedcjklettersandmonths' => '#/275',
'inenclosedideographicsup' => '#/364',
'inenclosedideographicsupplement' => '#/364',
'inethiopic' => '#/209',
'inethiopicext' => '#/276',
'inethiopicexta' => '#/297',
'inethiopicextended' => '#/276',
'inethiopicextendeda' => '#/297',
'inethiopicsup' => '#/277',
'inethiopicsupplement' => '#/277',
'ingeneralpunctuation' => '#/287',
'ingeometricshapes' => '#/324',
'ingeometricshapesext' => '#/348',
'ingeometricshapesextended' => '#/348',
'ingeorgian' => '#/210',
'ingeorgiansup' => '#/278',
'ingeorgiansupplement' => '#/278',
'inglagolitic' => '#/258',
'ingothic' => '#/146',
'ingrantha' => '#/174',
'ingreek' => '#/128',
'ingreekandcoptic' => '#/128',
'ingreekext' => '#/211',
'ingreekextended' => '#/211',
'ingujarati' => '#/212',
'ingurmukhi' => '#/213',
'inhalfandfullforms' => '#/335',
'inhalfmarks' => '#/232',
'inhalfwidthandfullwidthforms' => '#/335',
'inhangul' => '#/147',
'inhangulcompatibilityjamo' => '#/256',
'inhanguljamo' => '#/116',
'inhanguljamoextendeda' => '#/215',
'inhanguljamoextendedb' => '#/216',
'inhangulsyllables' => '#/147',
'inhanunoo' => '#/175',
'inhatran' => '#/148',
'inhebrew' => '#/149',
'inherited' => 'Sc/Zinh',
'inhighprivateusesurrogates' => '#/336',
'inhighpusurrogates' => '#/336',
'inhighsurrogates' => '#/315',
'inhiragana' => '#/214',
'inidc' => '#/107',
'inideographicdescriptioncharacters' => '#/107',
'inimperialaramaic' => '#/325',
'inindicnumberforms' => '#/337',
'ininscriptionalpahlavi' => '#/358',
'ininscriptionalparthian' => '#/359',
'inipaext' => '#/150',
'inipaextensions' => '#/150',
'initialpunctuation' => 'Gc/Pi',
'injamo' => '#/116',
'injamoexta' => '#/215',
'injamoextb' => '#/216',
'injavanese' => '#/217',
'inkaithi' => '#/151',
'inkanasup' => '#/176',
'inkanasupplement' => '#/176',
'inkanbun' => '#/152',
'inkangxi' => '#/153',
'inkangxiradicals' => '#/153',
'inkannada' => '#/177',
'inkatakana' => '#/218',
'inkatakanaext' => '#/279',
'inkatakanaphoneticextensions' => '#/279',
'inkayahli' => '#/178',
'inkharoshthi' => '#/259',
'inkhmer' => '#/129',
'inkhmersymbols' => '#/298',
'inkhojki' => '#/154',
'inkhudawadi' => '#/233',
'inlao' => '#/108',
'inlatin1' => '#/155',
'inlatin1sup' => '#/155',
'inlatin1supplement' => '#/155',
'inlatinexta' => '#/234',
'inlatinextadditional' => '#/349',
'inlatinextb' => '#/235',
'inlatinextc' => '#/236',
'inlatinextd' => '#/237',
'inlatinexte' => '#/238',
'inlatinextendeda' => '#/234',
'inlatinextendedadditional' => '#/349',
'inlatinextendedb' => '#/235',
'inlatinextendedc' => '#/236',
'inlatinextendedd' => '#/237',
'inlatinextendede' => '#/238',
'inlepcha' => '#/156',
'inletterlikesymbols' => '#/345',
'inlimbu' => '#/130',
'inlineara' => '#/179',
'inlinearbideograms' => '#/338',
'inlinearbsyllabary' => '#/339',
'inlisu' => '#/117',
'inlowsurrogates' => '#/307',
'inlycian' => '#/157',
'inlydian' => '#/158',
'inmahajani' => '#/219',
'inmahjong' => '#/180',
'inmahjongtiles' => '#/180',
'inmalayalam' => '#/239',
'inmandaic' => '#/181',
'inmanichaean' => '#/260',
'inmathalphanum' => '#/299',
'inmathematicalalphanumericsymbols' => '#/299',
'inmathematicaloperators' => '#/308',
'inmathoperators' => '#/308',
'inmeeteimayek' => '#/280',
'inmeeteimayekext' => '#/316',
'inmeeteimayekextensions' => '#/316',
'inmendekikakui' => '#/300',
'inmeroiticcursive' => '#/326',
'inmeroitichieroglyphs' => '#/355',
'inmiao' => '#/118',
'inmiscarrows' => '#/261',
'inmiscellaneousmathematicalsymbolsa' => '#/340',
'inmiscellaneousmathematicalsymbolsb' => '#/341',
'inmiscellaneoussymbols' => '#/281',
'inmiscellaneoussymbolsandarrows' => '#/261',
'inmiscellaneoussymbolsandpictographs' => '#/327',
'inmiscellaneoustechnical' => '#/309',
'inmiscmathsymbolsa' => '#/340',
'inmiscmathsymbolsb' => '#/341',
'inmiscpictographs' => '#/327',
'inmiscsymbols' => '#/281',
'inmisctechnical' => '#/309',
'inmodi' => '#/119',
'inmodifierletters' => '#/328',
'inmodifiertoneletters' => '#/356',
'inmongolian' => '#/240',
'inmro' => '#/109',
'inmultani' => '#/182',
'inmusic' => '#/131',
'inmusicalsymbols' => '#/131',
'inmyanmar' => '#/183',
'inmyanmarexta' => '#/282',
'inmyanmarextb' => '#/283',
'inmyanmarextendeda' => '#/282',
'inmyanmarextendedb' => '#/283',
'innabataean' => '#/241',
'innb' => 'Blk/NB',
'innewtailue' => '#/242',
'innko' => '#/110',
'innoblock' => 'Blk/NB',
'innumberforms' => '#/284',
'inocr' => '#/111',
'inogham' => '#/132',
'inolchiki' => '#/184',
'inoldhungarian' => '#/301',
'inolditalic' => '#/243',
'inoldnortharabian' => '#/329',
'inoldpermic' => '#/244',
'inoldpersian' => '#/262',
'inoldsoutharabian' => '#/330',
'inoldturkic' => '#/245',
'inopticalcharacterrecognition' => '#/111',
'inoriya' => '#/133',
'inornamentaldingbats' => '#/350',
'inosmanya' => '#/185',
'inpahawhhmong' => '#/285',
'inpalmyrene' => '#/246',
'inpaucinhau' => '#/247',
'inpc=bottom' => 'InPC/Bottom',
'inpc=bottomandright' => '#/69',
'inpc=left' => 'InPC/Left',
'inpc=leftandright' => 'InPC/LeftAndR',
'inpc=na' => 'InPC/NA',
'inpc=overstruck' => 'InPC/Overstru',
'inpc=right' => 'InPC/Right',
'inpc=top' => 'InPC/Top',
'inpc=topandbottom' => 'InPC/TopAndBo',
'inpc=topandbottomandright' => '#/70',
'inpc=topandleft' => 'InPC/TopAndLe',
'inpc=topandleftandright' => 'InPC/TopAndL2',
'inpc=topandright' => 'InPC/TopAndRi',
'inpc=visualorderleft' => 'InPC/VisualOr',
'inphagspa' => '#/186',
'inphaistos' => '#/220',
'inphaistosdisc' => '#/220',
'inphoenician' => '#/263',
'inphoneticext' => '#/286',
'inphoneticextensions' => '#/286',
'inphoneticextensionssupplement' => '#/317',
'inphoneticextsup' => '#/317',
'inplayingcards' => '#/302',
'inprivateuse' => '#/112',
'inprivateusearea' => '#/112',
'inpsalterpahlavi' => '#/318',
'inpua' => '#/112',
'inpunctuation' => '#/287',
'inrejang' => '#/159',
'inrumi' => '#/120',
'inruminumeralsymbols' => '#/120',
'inrunic' => '#/134',
'insamaritan' => '#/248',
'insaurashtra' => '#/264',
'insc=avagraha' => 'InSC/Avagraha',
'insc=bindu' => 'InSC/Bindu',
'insc=brahmijoiningnumber' => '#/81',
'insc=cantillationmark' => 'InSC/Cantilla',
'insc=consonant' => 'InSC/Consonan',
'insc=consonantdead' => '#/75',
'insc=consonantfinal' => 'InSC/Consona2',
'insc=consonantheadletter' => '#/82',
'insc=consonantkiller' => '#/77',
'insc=consonantmedial' => 'InSC/Consona3',
'insc=consonantplaceholder' => 'InSC/Consona5',
'insc=consonantprecedingrepha' => '#/84',
'insc=consonantprefixed' => '#/80',
'insc=consonantsubjoined' => 'InSC/Consona4',
'insc=consonantsucceedingrepha' => 'InSC/Consona6',
'insc=consonantwithstacker' => '#/83',
'insc=geminationmark' => '#/76',
'insc=invisiblestacker' => 'InSC/Invisibl',
'insc=joiner' => '#/71',
'insc=modifyingletter' => '#/78',
'insc=nonjoiner' => '#/72',
'insc=nukta' => 'InSC/Nukta',
'insc=number' => 'InSC/Number',
'insc=numberjoiner' => '#/74',
'insc=other' => 'InSC/Other',
'insc=purekiller' => 'InSC/PureKill',
'insc=registershifter' => '#/79',
'insc=syllablemodifier' => 'InSC/Syllable',
'insc=toneletter' => '#/73',
'insc=tonemark' => 'InSC/ToneMark',
'insc=virama' => 'InSC/Virama',
'insc=visarga' => 'InSC/Visarga',
'insc=vowel' => 'InSC/Vowel',
'insc=voweldependent' => 'InSC/VowelDep',
'insc=vowelindependent' => 'InSC/VowelInd',
'inscriptionalpahlavi' => '#/592',
'inscriptionalparthian' => '#/595',
'insharada' => '#/187',
'inshavian' => '#/188',
'inshorthandformatcontrols' => '#/365',
'insiddham' => '#/189',
'insinhala' => '#/190',
'insinhalaarchaicnumbers' => '#/360',
'insmallforms' => '#/265',
'insmallformvariants' => '#/265',
'insorasompeng' => '#/288',
'inspacingmodifierletters' => '#/328',
'inspecials' => '#/221',
'insundanese' => '#/249',
'insundanesesup' => '#/303',
'insundanesesupplement' => '#/303',
'insuparrowsa' => '#/266',
'insuparrowsb' => '#/267',
'insuparrowsc' => '#/268',
'insuperandsub' => '#/289',
'insuperscriptsandsubscripts' => '#/289',
'insupmathoperators' => '#/342',
'insupplementalarrowsa' => '#/266',
'insupplementalarrowsb' => '#/267',
'insupplementalarrowsc' => '#/268',
'insupplementalmathematicaloperators' => '#/342',
'insupplementalpunctuation' => '#/319',
'insupplementalsymbolsandpictographs' => '#/366',
'insupplementaryprivateuseareaa' => '#/191',
'insupplementaryprivateuseareab' => '#/192',
'insuppuaa' => '#/191',
'insuppuab' => '#/192',
'insuppunctuation' => '#/319',
'insupsymbolsandpictographs' => '#/366',
'insuttonsignwriting' => '#/346',
'insylotinagri' => '#/290',
'insyriac' => '#/160',
'intagalog' => '#/193',
'intagbanwa' => '#/222',
'intags' => '#/121',
'intaile' => '#/135',
'intaitham' => '#/194',
'intaiviet' => '#/195',
'intaixuanjing' => '#/291',
'intaixuanjingsymbols' => '#/291',
'intakri' => '#/136',
'intamil' => '#/137',
'intelugu' => '#/161',
'inthaana' => '#/162',
'inthai' => '#/122',
'intibetan' => '#/196',
'intifinagh' => '#/223',
'intirhuta' => '#/197',
'intransportandmap' => '#/331',
'intransportandmapsymbols' => '#/331',
'inucas' => '#/123',
'inucasext' => '#/198',
'inugaritic' => '#/224',
'inunifiedcanadianaboriginalsyllabics' => '#/123',
'inunifiedcanadianaboriginalsyllabicsextended' => '#/198',
'invai' => '#/113',
'invariationselectors' => '#/105',
'invariationselectorssupplement' => '#/138',
'invedicext' => '#/225',
'invedicextensions' => '#/225',
'inverticalforms' => '#/310',
'invs' => '#/105',
'invssup' => '#/138',
'inwarangciti' => '#/269',
'inyijing' => '#/163',
'inyijinghexagramsymbols' => '#/163',
'inyiradicals' => '#/270',
'inyisyllables' => '#/292',
'ipaext' => '#/150',
'ipaextensions' => '#/150',
'isaegeannumbers' => '#/304',
'isaghb' => '#/542',
'isahex' => '#/60',
'isahom' => '#/543',
'isalchemical' => '#/250',
'isalchemicalsymbols' => '#/250',
'isall' => '#/1',
'isalnum' => 'Perl/Alnum',
'isalpha' => 'Alpha/Y',
'isalphabetic' => 'Alpha/Y',
'isalphabeticpf' => '#/293',
'isalphabeticpresentationforms' => '#/293',
'isanatolianhieroglyphs' => '#/565',
'isancientgreekmusic' => '#/343',
'isancientgreekmusicalnotation' => '#/343',
'isancientgreeknumbers' => '#/351',
'isancientsymbols' => '#/311',
'isany' => '#/2',
'isarab' => 'Sc/Arab',
'isarabic' => 'Sc/Arab',
'isarabicexta' => '#/251',
'isarabicextendeda' => '#/251',
'isarabicmath' => '#/252',
'isarabicmathematicalalphabeticsymbols' => '#/252',
'isarabicpfa' => '#/226',
'isarabicpfb' => '#/227',
'isarabicpresentationformsa' => '#/226',
'isarabicpresentationformsb' => '#/227',
'isarabicsup' => '#/228',
'isarabicsupplement' => '#/228',
'isarmenian' => 'Sc/Armn',
'isarmi' => '#/544',
'isarmn' => 'Sc/Armn',
'isarrows' => '#/140',
'isascii' => '#/124',
'isasciihexdigit' => '#/60',
'isassigned' => 'Perl/Assigned',
'isavestan' => '#/545',
'isavst' => '#/545',
'isbali' => '#/546',
'isbalinese' => '#/546',
'isbamu' => '#/547',
'isbamum' => '#/547',
'isbamumsup' => '#/201',
'isbamumsupplement' => '#/201',
'isbasiclatin' => '#/124',
'isbass' => '#/548',
'isbassavah' => '#/548',
'isbatak' => '#/549',
'isbatk' => '#/549',
'isbeng' => 'Sc/Beng',
'isbengali' => 'Sc/Beng',
'isbidic' => 'BidiC/Y',
'isbidicontrol' => 'BidiC/Y',
'isbidim' => 'BidiM/Y',
'isbidimirrored' => 'BidiM/Y',
'isblank' => 'Perl/Blank',
'isblockelements' => '#/305',
'isbopo' => '#/550',
'isbopomofo' => '#/550',
'isbopomofoext' => '#/271',
'isbopomofoextended' => '#/271',
'isboxdrawing' => '#/253',
'isbrah' => '#/551',
'isbrahmi' => '#/551',
'isbrai' => '#/166',
'isbraille' => '#/166',
'isbraillepatterns' => '#/166',
'isbugi' => '#/552',
'isbuginese' => '#/552',
'isbuhd' => '#/553',
'isbuhid' => '#/553',
'isbyzantinemusic' => '#/312',
'isbyzantinemusicalsymbols' => '#/312',
'isc' => 'Gc/C',
'iscakm' => '#/554',
'iscanadianaboriginal' => '#/555',
'iscanadiansyllabics' => '#/123',
'iscans' => '#/555',
'iscari' => '#/556',
'iscarian' => '#/556',
'iscased' => 'Cased/Y',
'iscasedletter' => 'Gc/LC',
'iscaseignorable' => 'CI/Y',
'iscaucasianalbanian' => '#/542',
'iscc' => '#/370',
'isce' => 'CE/Y',
'iscf' => 'Gc/Cf',
'ischakma' => '#/554',
'ischam' => 'Sc/Cham',
'ischangeswhencasefolded' => 'CWCF/Y',
'ischangeswhencasemapped' => 'CWCM/Y',
'ischangeswhenlowercased' => 'CWL/Y',
'ischangeswhennfkccasefolded' => 'CWKCF/Y',
'ischangeswhentitlecased' => 'CWT/Y',
'ischangeswhenuppercased' => 'CWU/Y',
'ischer' => '#/557',
'ischerokee' => '#/557',
'ischerokeesup' => '#/272',
'ischerokeesupplement' => '#/272',
'isci' => 'CI/Y',
'iscjk' => '#/106',
'iscjkcompat' => '#/229',
'iscjkcompatforms' => '#/313',
'iscjkcompatibility' => '#/229',
'iscjkcompatibilityforms' => '#/313',
'iscjkcompatibilityideographs' => '#/352',
'iscjkcompatibilityideographssupplement' => '#/361',
'iscjkcompatideographs' => '#/352',
'iscjkcompatideographssup' => '#/361',
'iscjkexta' => '#/167',
'iscjkextb' => '#/168',
'iscjkextc' => '#/169',
'iscjkextd' => '#/170',
'iscjkexte' => '#/171',
'iscjkradicalssup' => '#/314',
'iscjkradicalssupplement' => '#/314',
'iscjkstrokes' => '#/254',
'iscjksymbols' => '#/255',
'iscjksymbolsandpunctuation' => '#/255',
'iscjkunifiedideographs' => '#/106',
'iscjkunifiedideographsextensiona' => '#/167',
'iscjkunifiedideographsextensionb' => '#/168',
'iscjkunifiedideographsextensionc' => '#/169',
'iscjkunifiedideographsextensiond' => '#/170',
'iscjkunifiedideographsextensione' => '#/171',
'isclosepunctuation' => 'Gc/Pe',
'iscn' => 'Gc/Cn',
'iscntrl' => '#/370',
'isco' => '#/371',
'iscombiningdiacriticalmarks' => '#/296',
'iscombiningdiacriticalmarksextended' => '#/322',
'iscombiningdiacriticalmarksforsymbols' => '#/362',
'iscombiningdiacriticalmarkssupplement' => '#/323',
'iscombininghalfmarks' => '#/232',
'iscombiningmark' => 'Gc/M',
'iscombiningmarksforsymbols' => '#/362',
'iscommon' => 'Sc/Zyyy',
'iscommonindicnumberforms' => '#/337',
'iscompatjamo' => '#/256',
'iscompex' => 'CompEx/Y',
'iscompositionexclusion' => 'CE/Y',
'isconnectorpunctuation' => 'WB/EX',
'iscontrol' => '#/370',
'iscontrolpictures' => '#/320',
'iscopt' => '#/558',
'iscoptic' => '#/558',
'iscopticepactnumbers' => '#/347',
'iscountingrod' => '#/273',
'iscountingrodnumerals' => '#/273',
'iscprt' => 'Sc/Cprt',
'iscs' => '#/14',
'iscuneiform' => 'Sc/Xsux',
'iscuneiformnumbers' => '#/332',
'iscuneiformnumbersandpunctuation' => '#/332',
'iscurrencysymbol' => 'Gc/Sc',
'iscurrencysymbols' => '#/321',
'iscwcf' => 'CWCF/Y',
'iscwcm' => 'CWCM/Y',
'iscwkcf' => 'CWKCF/Y',
'iscwl' => 'CWL/Y',
'iscwt' => 'CWT/Y',
'iscwu' => 'CWU/Y',
'iscypriot' => 'Sc/Cprt',
'iscypriotsyllabary' => '#/333',
'iscyrillic' => 'Sc/Cyrl',
'iscyrillicexta' => '#/294',
'iscyrillicextb' => '#/295',
'iscyrillicextendeda' => '#/294',
'iscyrillicextendedb' => '#/295',
'iscyrillicsup' => '#/274',
'iscyrillicsupplement' => '#/274',
'iscyrillicsupplementary' => '#/274',
'iscyrl' => 'Sc/Cyrl',
'isdash' => 'Dash/Y',
'isdashpunctuation' => 'Gc/Pd',
'isdecimalnumber' => 'Gc/Nd',
'isdefaultignorablecodepoint' => 'DI/Y',
'isdep' => 'Dep/Y',
'isdeprecated' => 'Dep/Y',
'isdeseret' => '#/172',
'isdeva' => 'Sc/Deva',
'isdevanagari' => 'Sc/Deva',
'isdevanagariext' => '#/306',
'isdevanagariextended' => '#/306',
'isdi' => 'DI/Y',
'isdia' => 'Dia/Y',
'isdiacritic' => 'Dia/Y',
'isdiacriticals' => '#/296',
'isdiacriticalsext' => '#/322',
'isdiacriticalsforsymbols' => '#/362',
'isdiacriticalssup' => '#/323',
'isdigit' => 'Gc/Nd',
'isdingbats' => '#/207',
'isdomino' => '#/145',
'isdominotiles' => '#/145',
'isdsrt' => '#/172',
'isdupl' => 'Sc/Dupl',
'isduployan' => 'Sc/Dupl',
'isearlydynasticcuneiform' => '#/363',
'isegyp' => '#/559',
'isegyptianhieroglyphs' => '#/559',
'iselba' => '#/560',
'iselbasan' => '#/560',
'isemoticons' => '#/231',
'isenclosedalphanum' => '#/334',
'isenclosedalphanumerics' => '#/334',
'isenclosedalphanumericsupplement' => '#/354',
'isenclosedalphanumsup' => '#/354',
'isenclosedcjk' => '#/275',
'isenclosedcjklettersandmonths' => '#/275',
'isenclosedideographicsup' => '#/364',
'isenclosedideographicsupplement' => '#/364',
'isenclosingmark' => 'Gc/Me',
'isethi' => 'Sc/Ethi',
'isethiopic' => 'Sc/Ethi',
'isethiopicext' => '#/276',
'isethiopicexta' => '#/297',
'isethiopicextended' => '#/276',
'isethiopicextendeda' => '#/297',
'isethiopicsup' => '#/277',
'isethiopicsupplement' => '#/277',
'isext' => 'Ext/Y',
'isextender' => 'Ext/Y',
'isfinalpunctuation' => 'Gc/Pf',
'isformat' => 'Gc/Cf',
'isfullcompositionexclusion' => 'CompEx/Y',
'isgeneralpunctuation' => '#/287',
'isgeometricshapes' => '#/324',
'isgeometricshapesext' => '#/348',
'isgeometricshapesextended' => '#/348',
'isgeor' => 'Sc/Geor',
'isgeorgian' => 'Sc/Geor',
'isgeorgiansup' => '#/278',
'isgeorgiansupplement' => '#/278',
'isglag' => '#/561',
'isglagolitic' => '#/561',
'isgoth' => '#/562',
'isgothic' => '#/562',
'isgran' => 'Sc/Gran',
'isgrantha' => 'Sc/Gran',
'isgraph' => 'Perl/Graph',
'isgraphemebase' => 'GrBase/Y',
'isgraphemeextend' => 'GCB/EX',
'isgrbase' => 'GrBase/Y',
'isgreek' => 'Sc/Grek',
'isgreekandcoptic' => '#/128',
'isgreekext' => '#/211',
'isgreekextended' => '#/211',
'isgrek' => 'Sc/Grek',
'isgrext' => 'GCB/EX',
'isgujarati' => 'Sc/Gujr',
'isgujr' => 'Sc/Gujr',
'isgurmukhi' => 'Sc/Guru',
'isguru' => 'Sc/Guru',
'ishalfandfullforms' => '#/335',
'ishalfmarks' => '#/232',
'ishalfwidthandfullwidthforms' => '#/335',
'ishan' => 'Sc/Han',
'ishang' => 'Sc/Hang',
'ishangul' => 'Sc/Hang',
'ishangulcompatibilityjamo' => '#/256',
'ishanguljamo' => '#/116',
'ishanguljamoextendeda' => '#/215',
'ishanguljamoextendedb' => '#/216',
'ishangulsyllables' => '#/147',
'ishani' => 'Sc/Han',
'ishano' => '#/563',
'ishanunoo' => '#/563',
'ishatr' => '#/564',
'ishatran' => '#/564',
'ishebr' => 'Sc/Hebr',
'ishebrew' => 'Sc/Hebr',
'ishex' => 'Hex/Y',
'ishexdigit' => 'Hex/Y',
'ishighprivateusesurrogates' => '#/336',
'ishighpusurrogates' => '#/336',
'ishighsurrogates' => '#/315',
'ishira' => 'Sc/Hira',
'ishiragana' => 'Sc/Hira',
'ishluw' => '#/565',
'ishmng' => 'Sc/Hmng',
'ishorizspace' => 'Perl/Blank',
'ishung' => '#/566',
'ishyphen' => 'Hyphen/T',
'isidc' => 'IDC/Y',
'isidcontinue' => 'IDC/Y',
'isideo' => 'Ideo/Y',
'isideographic' => 'Ideo/Y',
'isideographicdescriptioncharacters' => '#/107',
'isids' => 'IDS/Y',
'isidsb' => '#/67',
'isidsbinaryoperator' => '#/67',
'isidst' => '#/68',
'isidstart' => 'IDS/Y',
'isidstrinaryoperator' => '#/68',
'isimperialaramaic' => '#/544',
'isindicnumberforms' => '#/337',
'isinherited' => 'Sc/Zinh',
'isinitialpunctuation' => 'Gc/Pi',
'isinscriptionalpahlavi' => '#/592',
'isinscriptionalparthian' => '#/595',
'isipaext' => '#/150',
'isipaextensions' => '#/150',
'isital' => '#/567',
'isjamo' => '#/116',
'isjamoexta' => '#/215',
'isjamoextb' => '#/216',
'isjava' => '#/568',
'isjavanese' => '#/568',
'isjoinc' => '#/85',
'isjoincontrol' => '#/85',
'iskaithi' => '#/571',
'iskali' => '#/569',
'iskana' => 'Sc/Kana',
'iskanasup' => '#/176',
'iskanasupplement' => '#/176',
'iskanbun' => '#/152',
'iskangxi' => '#/153',
'iskangxiradicals' => '#/153',
'iskannada' => 'Sc/Knda',
'iskatakana' => 'Sc/Kana',
'iskatakanaext' => '#/279',
'iskatakanaphoneticextensions' => '#/279',
'iskayahli' => '#/569',
'iskhar' => 'Sc/Khar',
'iskharoshthi' => 'Sc/Khar',
'iskhmer' => 'Sc/Khmr',
'iskhmersymbols' => '#/298',
'iskhmr' => 'Sc/Khmr',
'iskhoj' => '#/570',
'iskhojki' => '#/570',
'iskhudawadi' => '#/603',
'isknda' => 'Sc/Knda',
'iskthi' => '#/571',
'isl' => 'Gc/L',
'isl&' => 'Gc/LC',
'isl_' => 'Gc/LC',
'islana' => 'Sc/Lana',
'islao' => 'Sc/Lao',
'islaoo' => 'Sc/Lao',
'islatin' => 'Sc/Latn',
'islatin1' => '#/155',
'islatin1sup' => '#/155',
'islatin1supplement' => '#/155',
'islatinexta' => '#/234',
'islatinextadditional' => '#/349',
'islatinextb' => '#/235',
'islatinextc' => '#/236',
'islatinextd' => '#/237',
'islatinexte' => '#/238',
'islatinextendeda' => '#/234',
'islatinextendedadditional' => '#/349',
'islatinextendedb' => '#/235',
'islatinextendedc' => '#/236',
'islatinextendedd' => '#/237',
'islatinextendede' => '#/238',
'islatn' => 'Sc/Latn',
'islc' => 'Gc/LC',
'islepc' => '#/572',
'islepcha' => '#/572',
'isletter' => 'Gc/L',
'isletterlikesymbols' => '#/345',
'isletternumber' => 'Gc/Nl',
'islimb' => 'Sc/Limb',
'islimbu' => 'Sc/Limb',
'islina' => '#/573',
'islinb' => 'Sc/Linb',
'islineara' => '#/573',
'islinearb' => 'Sc/Linb',
'islinearbideograms' => '#/338',
'islinearbsyllabary' => '#/339',
'islineseparator' => '#/372',
'islisu' => '#/117',
'isll' => 'Gc/Ll',
'islm' => 'Gc/Lm',
'islo' => 'Gc/Lo',
'isloe' => 'InPC/VisualOr',
'islogicalorderexception' => 'InPC/VisualOr',
'islower' => 'Lower/Y',
'islowercase' => 'Lower/Y',
'islowercaseletter' => 'Gc/Ll',
'islowsurrogates' => '#/307',
'islt' => 'Perl/Title',
'islu' => 'Gc/Lu',
'islyci' => '#/574',
'islycian' => '#/574',
'islydi' => '#/575',
'islydian' => '#/575',
'ism' => 'Gc/M',
'ismahajani' => '#/576',
'ismahj' => '#/576',
'ismahjong' => '#/180',
'ismahjongtiles' => '#/180',
'ismalayalam' => 'Sc/Mlym',
'ismand' => '#/577',
'ismandaic' => '#/577',
'ismani' => '#/578',
'ismanichaean' => '#/578',
'ismark' => 'Gc/M',
'ismath' => 'Math/Y',
'ismathalphanum' => '#/299',
'ismathematicalalphanumericsymbols' => '#/299',
'ismathematicaloperators' => '#/308',
'ismathoperators' => '#/308',
'ismathsymbol' => 'Gc/Sm',
'ismc' => 'Gc/Mc',
'isme' => 'Gc/Me',
'ismeeteimayek' => '#/583',
'ismeeteimayekext' => '#/316',
'ismeeteimayekextensions' => '#/316',
'ismend' => '#/579',
'ismendekikakui' => '#/579',
'ismerc' => '#/580',
'ismero' => '#/355',
'ismeroiticcursive' => '#/580',
'ismeroitichieroglyphs' => '#/355',
'ismiao' => '#/581',
'ismiscarrows' => '#/261',
'ismiscellaneousmathematicalsymbolsa' => '#/340',
'ismiscellaneousmathematicalsymbolsb' => '#/341',
'ismiscellaneoussymbols' => '#/281',
'ismiscellaneoussymbolsandarrows' => '#/261',
'ismiscellaneoussymbolsandpictographs' => '#/327',
'ismiscellaneoustechnical' => '#/309',
'ismiscmathsymbolsa' => '#/340',
'ismiscmathsymbolsb' => '#/341',
'ismiscpictographs' => '#/327',
'ismiscsymbols' => '#/281',
'ismisctechnical' => '#/309',
'ismlym' => 'Sc/Mlym',
'ismn' => 'Gc/Mn',
'ismodi' => '#/582',
'ismodifierletter' => 'Gc/Lm',
'ismodifierletters' => '#/328',
'ismodifiersymbol' => 'Gc/Sk',
'ismodifiertoneletters' => '#/356',
'ismong' => 'Sc/Mong',
'ismongolian' => 'Sc/Mong',
'ismro' => '#/539',
'ismroo' => '#/539',
'ismtei' => '#/583',
'ismult' => 'Sc/Mult',
'ismultani' => 'Sc/Mult',
'ismusic' => '#/131',
'ismusicalsymbols' => '#/131',
'ismyanmar' => '#/584',
'ismyanmarexta' => '#/282',
'ismyanmarextb' => '#/283',
'ismyanmarextendeda' => '#/282',
'ismyanmarextendedb' => '#/283',
'ismymr' => '#/584',
'isn' => 'Gc/N',
'isnabataean' => '#/585',
'isnarb' => '#/329',
'isnb' => 'Blk/NB',
'isnbat' => '#/585',
'isnchar' => 'Perl/_PerlNch',
'isnd' => 'Gc/Nd',
'isnewtailue' => 'Sc/Talu',
'isnko' => '#/540',
'isnkoo' => '#/540',
'isnl' => 'Gc/Nl',
'isno' => 'Gc/No',
'isnoblock' => 'Blk/NB',
'isnoncharactercodepoint' => 'Perl/_PerlNch',
'isnonspacingmark' => 'Gc/Mn',
'isnumber' => 'Gc/N',
'isnumberforms' => '#/284',
'isocr' => '#/111',
'isogam' => '#/586',
'isogham' => '#/586',
'isolchiki' => '#/184',
'isolck' => '#/184',
'isoldhungarian' => '#/566',
'isolditalic' => '#/567',
'isoldnortharabian' => '#/329',
'isoldpermic' => '#/590',
'isoldpersian' => '#/619',
'isoldsoutharabian' => '#/330',
'isoldturkic' => '#/587',
'isopenpunctuation' => 'Gc/Ps',
'isopticalcharacterrecognition' => '#/111',
'isoriya' => 'Sc/Orya',
'isorkh' => '#/587',
'isornamentaldingbats' => '#/350',
'isorya' => 'Sc/Orya',
'isosma' => '#/588',
'isosmanya' => '#/588',
'isother' => 'Gc/C',
'isotherletter' => 'Gc/Lo',
'isothernumber' => 'Gc/No',
'isotherpunctuation' => 'Gc/Po',
'isothersymbol' => 'Gc/So',
'isp' => 'Gc/P',
'ispahawhhmong' => 'Sc/Hmng',
'ispalm' => '#/246',
'ispalmyrene' => '#/246',
'isparagraphseparator' => '#/373',
'ispatsyn' => 'PatSyn/Y',
'ispatternsyntax' => 'PatSyn/Y',
'ispatternwhitespace' => 'Perl/_PerlPat',
'ispatws' => 'Perl/_PerlPat',
'ispauc' => '#/589',
'ispaucinhau' => '#/589',
'ispc' => 'WB/EX',
'ispd' => 'Gc/Pd',
'ispe' => 'Gc/Pe',
'isperlspace' => '#/3',
'isperlword' => 'Perl/PerlWord',
'isperm' => '#/590',
'ispf' => 'Gc/Pf',
'isphag' => '#/591',
'isphagspa' => '#/591',
'isphaistos' => '#/220',
'isphaistosdisc' => '#/220',
'isphli' => '#/592',
'isphlp' => '#/593',
'isphnx' => '#/594',
'isphoenician' => '#/594',
'isphoneticext' => '#/286',
'isphoneticextensions' => '#/286',
'isphoneticextensionssupplement' => '#/317',
'isphoneticextsup' => '#/317',
'ispi' => 'Gc/Pi',
'isplayingcards' => '#/302',
'isplrd' => '#/581',
'ispo' => 'Gc/Po',
'isposixalnum' => '#/5',
'isposixalpha' => '#/6',
'isposixblank' => '#/7',
'isposixcntrl' => '#/8',
'isposixdigit' => '#/9',
'isposixgraph' => '#/10',
'isposixlower' => '#/11',
'isposixprint' => '#/12',
'isposixpunct' => 'Perl/PosixPun',
'isposixspace' => '#/3',
'isposixupper' => '#/13',
'isposixword' => 'Perl/PerlWord',
'isposixxdigit' => '#/60',
'isprint' => 'Perl/Print',
'isprivateuse' => '#/371',
'isprivateusearea' => '#/112',
'isprti' => '#/595',
'isps' => 'Gc/Ps',
'ispsalterpahlavi' => '#/593',
'ispua' => '#/112',
'ispunct' => 'Gc/P',
'ispunctuation' => 'Gc/P',
'isqaac' => '#/558',
'isqaai' => 'Sc/Zinh',
'isqmark' => 'QMark/Y',
'isquotationmark' => 'QMark/Y',
'isradical' => '#/86',
'isrejang' => '#/596',
'isrjng' => '#/596',
'isrumi' => '#/120',
'isruminumeralsymbols' => '#/120',
'isrunic' => '#/597',
'isrunr' => '#/597',
'iss' => 'Gc/S',
'issamaritan' => '#/598',
'issamr' => '#/598',
'issarb' => '#/330',
'issaur' => '#/599',
'issaurashtra' => '#/599',
'issc' => 'Gc/Sc',
'issd' => 'SD/Y',
'isseparator' => 'Gc/Z',
'issgnw' => '#/600',
'issharada' => '#/601',
'isshavian' => '#/188',
'isshaw' => '#/188',
'isshorthandformatcontrols' => '#/365',
'isshrd' => '#/601',
'issidd' => '#/602',
'issiddham' => '#/602',
'issignwriting' => '#/600',
'issind' => '#/603',
'issinh' => 'Sc/Sinh',
'issinhala' => 'Sc/Sinh',
'issinhalaarchaicnumbers' => '#/360',
'issk' => 'Gc/Sk',
'issm' => 'Gc/Sm',
'issmallforms' => '#/265',
'issmallformvariants' => '#/265',
'isso' => 'Gc/So',
'issoftdotted' => 'SD/Y',
'issora' => '#/604',
'issorasompeng' => '#/604',
'isspace' => 'Perl/SpacePer',
'isspaceperl' => 'Perl/SpacePer',
'isspaceseparator' => 'Gc/Zs',
'isspacingmark' => 'Gc/Mc',
'isspacingmodifierletters' => '#/328',
'isspecials' => '#/221',
'issterm' => 'STerm/Y',
'issund' => '#/605',
'issundanese' => '#/605',
'issundanesesup' => '#/303',
'issundanesesupplement' => '#/303',
'issuparrowsa' => '#/266',
'issuparrowsb' => '#/267',
'issuparrowsc' => '#/268',
'issuperandsub' => '#/289',
'issuperscriptsandsubscripts' => '#/289',
'issupmathoperators' => '#/342',
'issupplementalarrowsa' => '#/266',
'issupplementalarrowsb' => '#/267',
'issupplementalarrowsc' => '#/268',
'issupplementalmathematicaloperators' => '#/342',
'issupplementalpunctuation' => '#/319',
'issupplementalsymbolsandpictographs' => '#/366',
'issupplementaryprivateuseareaa' => '#/191',
'issupplementaryprivateuseareab' => '#/192',
'issuppuaa' => '#/191',
'issuppuab' => '#/192',
'issuppunctuation' => '#/319',
'issupsymbolsandpictographs' => '#/366',
'issurrogate' => '#/14',
'issuttonsignwriting' => '#/346',
'issylo' => '#/606',
'issylotinagri' => '#/606',
'issymbol' => 'Gc/S',
'issyrc' => '#/607',
'issyriac' => '#/607',
'istagalog' => '#/613',
'istagb' => '#/608',
'istagbanwa' => '#/608',
'istags' => '#/121',
'istaile' => '#/610',
'istaitham' => 'Sc/Lana',
'istaiviet' => '#/611',
'istaixuanjing' => '#/291',
'istaixuanjingsymbols' => '#/291',
'istakr' => '#/609',
'istakri' => '#/609',
'istale' => '#/610',
'istalu' => 'Sc/Talu',
'istamil' => 'Sc/Taml',
'istaml' => 'Sc/Taml',
'istavt' => '#/611',
'istelu' => 'Sc/Telu',
'istelugu' => 'Sc/Telu',
'isterm' => 'Term/Y',
'isterminalpunctuation' => 'Term/Y',
'istfng' => '#/612',
'istglg' => '#/613',
'isthaa' => '#/614',
'isthaana' => '#/614',
'isthai' => '#/615',
'istibetan' => 'Sc/Tibt',
'istibt' => 'Sc/Tibt',
'istifinagh' => '#/612',
'istirh' => '#/616',
'istirhuta' => '#/616',
'istitle' => 'Perl/Title',
'istitlecase' => 'Perl/Title',
'istitlecaseletter' => 'Perl/Title',
'istransportandmap' => '#/331',
'istransportandmapsymbols' => '#/331',
'isucas' => '#/123',
'isucasext' => '#/198',
'isugar' => '#/617',
'isugaritic' => '#/617',
'isuideo' => 'UIdeo/Y',
'isunassigned' => 'Gc/Cn',
'isunicode' => '#/2',
'isunifiedcanadianaboriginalsyllabics' => '#/123',
'isunifiedcanadianaboriginalsyllabicsextended' => '#/198',
'isunifiedideograph' => 'UIdeo/Y',
'isunknown' => 'Sc/Zzzz',
'isupper' => 'Upper/Y',
'isuppercase' => 'Upper/Y',
'isuppercaseletter' => 'Gc/Lu',
'isvai' => '#/541',
'isvaii' => '#/541',
'isvariationselector' => '#/88',
'isvariationselectors' => '#/105',
'isvariationselectorssupplement' => '#/138',
'isvedicext' => '#/225',
'isvedicextensions' => '#/225',
'isverticalforms' => '#/310',
'isvertspace' => '#/4',
'isvs' => '#/88',
'isvssup' => '#/138',
'iswara' => '#/618',
'iswarangciti' => '#/618',
'iswhitespace' => 'Perl/SpacePer',
'isword' => 'Perl/Word',
'iswspace' => 'Perl/SpacePer',
'isxdigit' => 'Hex/Y',
'isxidc' => 'XIDC/Y',
'isxidcontinue' => 'XIDC/Y',
'isxids' => 'XIDS/Y',
'isxidstart' => 'XIDS/Y',
'isxpeo' => '#/619',
'isxperlspace' => 'Perl/SpacePer',
'isxposixalnum' => 'Perl/Alnum',
'isxposixalpha' => 'Alpha/Y',
'isxposixblank' => 'Perl/Blank',
'isxposixcntrl' => '#/370',
'isxposixdigit' => 'Gc/Nd',
'isxposixgraph' => 'Perl/Graph',
'isxposixlower' => 'Lower/Y',
'isxposixprint' => 'Perl/Print',
'isxposixpunct' => 'Perl/XPosixPu',
'isxposixspace' => 'Perl/SpacePer',
'isxposixupper' => 'Upper/Y',
'isxposixword' => 'Perl/Word',
'isxposixxdigit' => 'Hex/Y',
'isxsux' => 'Sc/Xsux',
'isyi' => '#/538',
'isyiii' => '#/538',
'isyijing' => '#/163',
'isyijinghexagramsymbols' => '#/163',
'isyiradicals' => '#/270',
'isyisyllables' => '#/292',
'isz' => 'Gc/Z',
'iszinh' => 'Sc/Zinh',
'iszl' => '#/372',
'iszp' => '#/373',
'iszs' => 'Gc/Zs',
'iszyyy' => 'Sc/Zyyy',
'iszzzz' => 'Sc/Zzzz',
'ital' => '#/567',
'jamo' => '#/116',
'jamoexta' => '#/215',
'jamoextb' => '#/216',
'java' => '#/568',
'javanese' => '#/568',
'jg=ain' => 'Jg/Ain',
'jg=alaph' => '#/394',
'jg=alef' => 'Jg/Alef',
'jg=beh' => 'Jg/Beh',
'jg=beth' => '#/384',
'jg=burushaskiyehbarree' => '#/442',
'jg=dal' => 'Jg/Dal',
'jg=dalathrish' => '#/406',
'jg=e' => '#/374',
'jg=farsiyeh' => 'Jg/FarsiYeh',
'jg=fe' => '#/375',
'jg=feh' => 'Jg/Feh',
'jg=finalsemkath' => '#/413',
'jg=gaf' => 'Jg/Gaf',
'jg=gamal' => '#/395',
'jg=hah' => 'Jg/Hah',
'jg=hamzaonhehgoal' => '#/421',
'jg=he' => '#/376',
'jg=heh' => '#/378',
'jg=hehgoal' => '#/401',
'jg=heth' => '#/385',
'jg=kaf' => 'Jg/Kaf',
'jg=kaph' => '#/386',
'jg=khaph' => '#/396',
'jg=knottedheh' => '#/407',
'jg=lam' => 'Jg/Lam',
'jg=lamadh' => '#/399',
'jg=manichaeanaleph' => '#/431',
'jg=manichaeanayin' => '#/422',
'jg=manichaeanbeth' => '#/423',
'jg=manichaeandaleth' => '#/435',
'jg=manichaeandhamedh' => '#/439',
'jg=manichaeanfive' => '#/424',
'jg=manichaeangimel' => '#/432',
'jg=manichaeanheth' => '#/425',
'jg=manichaeanhundred' => '#/440',
'jg=manichaeankaph' => '#/426',
'jg=manichaeanlamedh' => '#/436',
'jg=manichaeanmem' => '#/415',
'jg=manichaeannun' => '#/416',
'jg=manichaeanone' => '#/417',
'jg=manichaeanpe' => '#/414',
'jg=manichaeanqoph' => '#/427',
'jg=manichaeanresh' => '#/428',
'jg=manichaeansadhe' => '#/433',
'jg=manichaeansamekh' => '#/437',
'jg=manichaeantaw' => '#/418',
'jg=manichaeanten' => '#/419',
'jg=manichaeanteth' => '#/429',
'jg=manichaeanthamedh' => '#/441',
'jg=manichaeantwenty' => '#/438',
'jg=manichaeanwaw' => '#/420',
'jg=manichaeanyodh' => '#/430',
'jg=manichaeanzayin' => '#/434',
'jg=meem' => '#/387',
'jg=mim' => '#/379',
'jg=nojoininggroup' => 'Jg/NoJoinin',
'jg=noon' => '#/388',
'jg=nun' => '#/380',
'jg=nya' => '#/381',
'jg=pe' => '#/377',
'jg=qaf' => 'Jg/Qaf',
'jg=qaph' => '#/389',
'jg=reh' => 'Jg/Reh',
'jg=reversedpe' => '#/408',
'jg=rohingyayeh' => '#/410',
'jg=sad' => 'Jg/Sad',
'jg=sadhe' => '#/397',
'jg=seen' => 'Jg/Seen',
'jg=semkath' => '#/402',
'jg=shin' => '#/390',
'jg=straightwaw' => '#/411',
'jg=swashkaf' => '#/403',
'jg=syriacwaw' => '#/404',
'jg=tah' => '#/382',
'jg=taw' => '#/383',
'jg=tehmarbuta' => '#/409',
'jg=tehmarbutagoal' => '#/421',
'jg=teth' => '#/391',
'jg=waw' => 'Jg/Waw',
'jg=yeh' => 'Jg/Yeh',
'jg=yehbarree' => '#/405',
'jg=yehwithtail' => '#/412',
'jg=yudh' => '#/392',
'jg=yudhhe' => '#/400',
'jg=zain' => '#/393',
'jg=zhain' => '#/398',
'joinc' => '#/85',
'joinc=f' => '#/!85',
'joinc=false' => '#/!85',
'joinc=n' => '#/!85',
'joinc=no' => '#/!85',
'joinc=t' => '#/85',
'joinc=true' => '#/85',
'joinc=y' => '#/85',
'joinc=yes' => '#/85',
'joincontrol' => '#/85',
'jt=c' => 'Jt/C',
'jt=d' => 'Jt/D',
'jt=dualjoining' => 'Jt/D',
'jt=joincausing' => 'Jt/C',
'jt=l' => '#/443',
'jt=leftjoining' => '#/443',
'jt=nonjoining' => 'Jt/U',
'jt=r' => 'Jt/R',
'jt=rightjoining' => 'Jt/R',
'jt=t' => 'Jt/T',
'jt=transparent' => 'Jt/T',
'jt=u' => 'Jt/U',
'kaithi' => '#/571',
'kali' => '#/569',
'kana' => 'Sc/Kana',
'kanasup' => '#/176',
'kanasupplement' => '#/176',
'kanbun' => '#/152',
'kangxi' => '#/153',
'kangxiradicals' => '#/153',
'kannada' => 'Sc/Knda',
'katakana' => 'Sc/Kana',
'katakanaext' => '#/279',
'katakanaphoneticextensions' => '#/279',
'kayahli' => '#/569',
'khar' => 'Sc/Khar',
'kharoshthi' => 'Sc/Khar',
'khmer' => 'Sc/Khmr',
'khmersymbols' => '#/298',
'khmr' => 'Sc/Khmr',
'khoj' => '#/570',
'khojki' => '#/570',
'khudawadi' => '#/603',
'knda' => 'Sc/Knda',
'kthi' => '#/571',
'l' => 'Gc/L',
'l&' => 'Gc/LC',
'l_' => 'Gc/LC',
'lana' => 'Sc/Lana',
'lao' => 'Sc/Lao',
'laoo' => 'Sc/Lao',
'latin' => 'Sc/Latn',
'latin1' => '#/155',
'latin1sup' => '#/155',
'latin1supplement' => '#/155',
'latinexta' => '#/234',
'latinextadditional' => '#/349',
'latinextb' => '#/235',
'latinextc' => '#/236',
'latinextd' => '#/237',
'latinexte' => '#/238',
'latinextendeda' => '#/234',
'latinextendedadditional' => '#/349',
'latinextendedb' => '#/235',
'latinextendedc' => '#/236',
'latinextendedd' => '#/237',
'latinextendede' => '#/238',
'latn' => 'Sc/Latn',
'lb=ai' => 'Lb/AI',
'lb=al' => 'Lb/AL',
'lb=alphabetic' => 'Lb/AL',
'lb=ambiguous' => 'Lb/AI',
'lb=b2' => '#/444',
'lb=ba' => 'Lb/BA',
'lb=bb' => 'Lb/BB',
'lb=bk' => '#/445',
'lb=breakafter' => 'Lb/BA',
'lb=breakbefore' => 'Lb/BB',
'lb=breakboth' => '#/444',
'lb=breaksymbols' => '#/452',
'lb=carriagereturn' => '#/64',
'lb=cb' => '#/446',
'lb=cj' => 'Lb/CJ',
'lb=cl' => 'Lb/CL',
'lb=closeparenthesis' => '#/447',
'lb=closepunctuation' => 'Lb/CL',
'lb=cm' => 'Lb/CM',
'lb=combiningmark' => 'Lb/CM',
'lb=complexcontext' => 'Lb/SA',
'lb=conditionaljapanesestarter' => 'Lb/CJ',
'lb=contingentbreak' => '#/446',
'lb=cp' => '#/447',
'lb=cr' => '#/64',
'lb=ex' => 'Lb/EX',
'lb=exclamation' => 'Lb/EX',
'lb=gl' => 'Lb/GL',
'lb=glue' => 'Lb/GL',
'lb=h2' => 'GCB/LV',
'lb=h3' => 'GCB/LVT',
'lb=hebrewletter' => 'WB/HL',
'lb=hl' => 'WB/HL',
'lb=hy' => '#/448',
'lb=hyphen' => '#/448',
'lb=id' => 'Lb/ID',
'lb=ideographic' => 'Lb/ID',
'lb=in' => 'Lb/IN',
'lb=infixnumeric' => 'Lb/IS',
'lb=inseparable' => 'Lb/IN',
'lb=inseperable' => 'Lb/IN',
'lb=is' => 'Lb/IS',
'lb=jl' => '#/61',
'lb=jt' => '#/62',
'lb=jv' => '#/63',
'lb=lf' => '#/65',
'lb=linefeed' => '#/65',
'lb=mandatorybreak' => '#/445',
'lb=nextline' => '#/449',
'lb=nl' => '#/449',
'lb=nonstarter' => 'Lb/NS',
'lb=ns' => 'Lb/NS',
'lb=nu' => 'SB/NU',
'lb=numeric' => 'SB/NU',
'lb=op' => 'Lb/OP',
'lb=openpunctuation' => 'Lb/OP',
'lb=po' => 'Lb/PO',
'lb=postfixnumeric' => 'Lb/PO',
'lb=pr' => 'Lb/PR',
'lb=prefixnumeric' => 'Lb/PR',
'lb=qu' => 'Lb/QU',
'lb=quotation' => 'Lb/QU',
'lb=regionalindicator' => '#/66',
'lb=ri' => '#/66',
'lb=sa' => 'Lb/SA',
'lb=sg' => '#/450',
'lb=sp' => '#/451',
'lb=space' => '#/451',
'lb=surrogate' => '#/450',
'lb=sy' => '#/452',
'lb=unknown' => 'Lb/XX',
'lb=wj' => '#/453',
'lb=wordjoiner' => '#/453',
'lb=xx' => 'Lb/XX',
'lb=zw' => '#/454',
'lb=zwspace' => '#/454',
'lc' => 'Gc/LC',
'lepc' => '#/572',
'lepcha' => '#/572',
'letter' => 'Gc/L',
'letterlikesymbols' => '#/345',
'letternumber' => 'Gc/Nl',
'limb' => 'Sc/Limb',
'limbu' => 'Sc/Limb',
'lina' => '#/573',
'linb' => 'Sc/Linb',
'lineara' => '#/573',
'linearb' => 'Sc/Linb',
'linearbideograms' => '#/338',
'linearbsyllabary' => '#/339',
'lineseparator' => '#/372',
'lisu' => '#/117',
'll' => 'Gc/Ll',
'lm' => 'Gc/Lm',
'lo' => 'Gc/Lo',
'loe' => 'InPC/VisualOr',
'loe=f' => '!InPC/VisualOr',
'loe=false' => '!InPC/VisualOr',
'loe=n' => '!InPC/VisualOr',
'loe=no' => '!InPC/VisualOr',
'loe=t' => 'InPC/VisualOr',
'loe=true' => 'InPC/VisualOr',
'loe=y' => 'InPC/VisualOr',
'loe=yes' => 'InPC/VisualOr',
'logicalorderexception' => 'InPC/VisualOr',
'lower' => 'Lower/Y',
'lower=f' => '!Lower/Y',
'lower=false' => '!Lower/Y',
'lower=n' => '!Lower/Y',
'lower=no' => '!Lower/Y',
'lower=t' => 'Lower/Y',
'lower=true' => 'Lower/Y',
'lower=y' => 'Lower/Y',
'lower=yes' => 'Lower/Y',
'lowercase' => 'Lower/Y',
'lowercaseletter' => 'Gc/Ll',
'lowsurrogates' => '#/307',
'lt' => 'Perl/Title',
'lu' => 'Gc/Lu',
'lyci' => '#/574',
'lycian' => '#/574',
'lydi' => '#/575',
'lydian' => '#/575',
'm' => 'Gc/M',
'mahajani' => '#/576',
'mahj' => '#/576',
'mahjong' => '#/180',
'mahjongtiles' => '#/180',
'malayalam' => 'Sc/Mlym',
'mand' => '#/577',
'mandaic' => '#/577',
'mani' => '#/578',
'manichaean' => '#/578',
'mark' => 'Gc/M',
'math' => 'Math/Y',
'math=f' => '!Math/Y',
'math=false' => '!Math/Y',
'math=n' => '!Math/Y',
'math=no' => '!Math/Y',
'math=t' => 'Math/Y',
'math=true' => 'Math/Y',
'math=y' => 'Math/Y',
'math=yes' => 'Math/Y',
'mathalphanum' => '#/299',
'mathematicalalphanumericsymbols' => '#/299',
'mathematicaloperators' => '#/308',
'mathoperators' => '#/308',
'mathsymbol' => 'Gc/Sm',
'mc' => 'Gc/Mc',
'me' => 'Gc/Me',
'meeteimayek' => '#/583',
'meeteimayekext' => '#/316',
'meeteimayekextensions' => '#/316',
'mend' => '#/579',
'mendekikakui' => '#/579',
'merc' => '#/580',
'mero' => '#/355',
'meroiticcursive' => '#/580',
'meroitichieroglyphs' => '#/355',
'miao' => '#/581',
'miscarrows' => '#/261',
'miscellaneousmathematicalsymbolsa' => '#/340',
'miscellaneousmathematicalsymbolsb' => '#/341',
'miscellaneoussymbols' => '#/281',
'miscellaneoussymbolsandarrows' => '#/261',
'miscellaneoussymbolsandpictographs' => '#/327',
'miscellaneoustechnical' => '#/309',
'miscmathsymbolsa' => '#/340',
'miscmathsymbolsb' => '#/341',
'miscpictographs' => '#/327',
'miscsymbols' => '#/281',
'misctechnical' => '#/309',
'mlym' => 'Sc/Mlym',
'mn' => 'Gc/Mn',
'modi' => '#/582',
'modifierletter' => 'Gc/Lm',
'modifierletters' => '#/328',
'modifiersymbol' => 'Gc/Sk',
'modifiertoneletters' => '#/356',
'mong' => 'Sc/Mong',
'mongolian' => 'Sc/Mong',
'mro' => '#/539',
'mroo' => '#/539',
'mtei' => '#/583',
'mult' => 'Sc/Mult',
'multani' => 'Sc/Mult',
'music' => '#/131',
'musicalsymbols' => '#/131',
'myanmar' => '#/584',
'myanmarexta' => '#/282',
'myanmarextb' => '#/283',
'myanmarextendeda' => '#/282',
'myanmarextendedb' => '#/283',
'mymr' => '#/584',
'n' => 'Gc/N',
'nabataean' => '#/585',
'narb' => '#/329',
'nb' => 'Blk/NB',
'nbat' => '#/585',
'nchar' => 'Perl/_PerlNch',
'nchar=f' => '!Perl/_PerlNch',
'nchar=false' => '!Perl/_PerlNch',
'nchar=n' => '!Perl/_PerlNch',
'nchar=no' => '!Perl/_PerlNch',
'nchar=t' => 'Perl/_PerlNch',
'nchar=true' => 'Perl/_PerlNch',
'nchar=y' => 'Perl/_PerlNch',
'nchar=yes' => 'Perl/_PerlNch',
'nd' => 'Gc/Nd',
'newtailue' => 'Sc/Talu',
'nfcqc=m' => 'NFCQC/M',
'nfcqc=maybe' => 'NFCQC/M',
'nfcqc=n' => 'CompEx/Y',
'nfcqc=no' => 'CompEx/Y',
'nfcqc=y' => 'NFCQC/Y',
'nfcqc=yes' => 'NFCQC/Y',
'nfdqc=n' => 'NFDQC/N',
'nfdqc=no' => 'NFDQC/N',
'nfdqc=y' => 'NFDQC/Y',
'nfdqc=yes' => 'NFDQC/Y',
'nfkcqc=m' => 'NFCQC/M',
'nfkcqc=maybe' => 'NFCQC/M',
'nfkcqc=n' => 'NFKCQC/N',
'nfkcqc=no' => 'NFKCQC/N',
'nfkcqc=y' => 'NFKCQC/Y',
'nfkcqc=yes' => 'NFKCQC/Y',
'nfkdqc=n' => 'NFKDQC/N',
'nfkdqc=no' => 'NFKDQC/N',
'nfkdqc=y' => 'NFKDQC/Y',
'nfkdqc=yes' => 'NFKDQC/Y',
'nko' => '#/540',
'nkoo' => '#/540',
'nl' => 'Gc/Nl',
'no' => 'Gc/No',
'noblock' => 'Blk/NB',
'noncharactercodepoint' => 'Perl/_PerlNch',
'nonspacingmark' => 'Gc/Mn',
'nt=de' => 'Gc/Nd',
'nt=decimal' => 'Gc/Nd',
'nt=di' => 'Nt/Di',
'nt=digit' => 'Nt/Di',
'nt=none' => 'Nt/None',
'nt=nu' => 'Nt/Nu',
'nt=numeric' => 'Nt/Nu',
'number' => 'Gc/N',
'numberforms' => '#/284',
'nv=nan' => 'Nt/None',
'ocr' => '#/111',
'ogam' => '#/586',
'ogham' => '#/586',
'olchiki' => '#/184',
'olck' => '#/184',
'oldhungarian' => '#/566',
'olditalic' => '#/567',
'oldnortharabian' => '#/329',
'oldpermic' => '#/590',
'oldpersian' => '#/619',
'oldsoutharabian' => '#/330',
'oldturkic' => '#/587',
'openpunctuation' => 'Gc/Ps',
'opticalcharacterrecognition' => '#/111',
'oriya' => 'Sc/Orya',
'orkh' => '#/587',
'ornamentaldingbats' => '#/350',
'orya' => 'Sc/Orya',
'osma' => '#/588',
'osmanya' => '#/588',
'other' => 'Gc/C',
'otherletter' => 'Gc/Lo',
'othernumber' => 'Gc/No',
'otherpunctuation' => 'Gc/Po',
'othersymbol' => 'Gc/So',
'p' => 'Gc/P',
'pahawhhmong' => 'Sc/Hmng',
'palm' => '#/246',
'palmyrene' => '#/246',
'paragraphseparator' => '#/373',
'patsyn' => 'PatSyn/Y',
'patsyn=f' => '!PatSyn/Y',
'patsyn=false' => '!PatSyn/Y',
'patsyn=n' => '!PatSyn/Y',
'patsyn=no' => '!PatSyn/Y',
'patsyn=t' => 'PatSyn/Y',
'patsyn=true' => 'PatSyn/Y',
'patsyn=y' => 'PatSyn/Y',
'patsyn=yes' => 'PatSyn/Y',
'patternsyntax' => 'PatSyn/Y',
'patternwhitespace' => 'Perl/_PerlPat',
'patws' => 'Perl/_PerlPat',
'patws=f' => '!Perl/_PerlPat',
'patws=false' => '!Perl/_PerlPat',
'patws=n' => '!Perl/_PerlPat',
'patws=no' => '!Perl/_PerlPat',
'patws=t' => 'Perl/_PerlPat',
'patws=true' => 'Perl/_PerlPat',
'patws=y' => 'Perl/_PerlPat',
'patws=yes' => 'Perl/_PerlPat',
'pauc' => '#/589',
'paucinhau' => '#/589',
'pc' => 'WB/EX',
'pd' => 'Gc/Pd',
'pe' => 'Gc/Pe',
'perlspace' => '#/3',
'perlword' => 'Perl/PerlWord',
'perm' => '#/590',
'pf' => 'Gc/Pf',
'phag' => '#/591',
'phagspa' => '#/591',
'phaistos' => '#/220',
'phaistosdisc' => '#/220',
'phli' => '#/592',
'phlp' => '#/593',
'phnx' => '#/594',
'phoenician' => '#/594',
'phoneticext' => '#/286',
'phoneticextensions' => '#/286',
'phoneticextensionssupplement' => '#/317',
'phoneticextsup' => '#/317',
'pi' => 'Gc/Pi',
'playingcards' => '#/302',
'plrd' => '#/581',
'po' => 'Gc/Po',
'posixalnum' => '#/5',
'posixalpha' => '#/6',
'posixblank' => '#/7',
'posixcntrl' => '#/8',
'posixdigit' => '#/9',
'posixgraph' => '#/10',
'posixlower' => '#/11',
'posixprint' => '#/12',
'posixpunct' => 'Perl/PosixPun',
'posixspace' => '#/3',
'posixupper' => '#/13',
'posixword' => 'Perl/PerlWord',
'posixxdigit' => '#/60',
'print' => 'Perl/Print',
'privateuse' => '#/371',
'privateusearea' => '#/112',
'prti' => '#/595',
'ps' => 'Gc/Ps',
'psalterpahlavi' => '#/593',
'pua' => '#/112',
'punct' => 'Gc/P',
'punctuation' => 'Gc/P',
'qaac' => '#/558',
'qaai' => 'Sc/Zinh',
'qmark' => 'QMark/Y',
'qmark=f' => '!QMark/Y',
'qmark=false' => '!QMark/Y',
'qmark=n' => '!QMark/Y',
'qmark=no' => '!QMark/Y',
'qmark=t' => 'QMark/Y',
'qmark=true' => 'QMark/Y',
'qmark=y' => 'QMark/Y',
'qmark=yes' => 'QMark/Y',
'quotationmark' => 'QMark/Y',
'radical' => '#/86',
'radical=f' => '#/!86',
'radical=false' => '#/!86',
'radical=n' => '#/!86',
'radical=no' => '#/!86',
'radical=t' => '#/86',
'radical=true' => '#/86',
'radical=y' => '#/86',
'radical=yes' => '#/86',
'rejang' => '#/596',
'rjng' => '#/596',
'rumi' => '#/120',
'ruminumeralsymbols' => '#/120',
'runic' => '#/597',
'runr' => '#/597',
's' => 'Gc/S',
'samaritan' => '#/598',
'samr' => '#/598',
'sarb' => '#/330',
'saur' => '#/599',
'saurashtra' => '#/599',
'sb=at' => 'SB/AT',
'sb=aterm' => 'SB/AT',
'sb=cl' => 'SB/CL',
'sb=close' => 'SB/CL',
'sb=cr' => '#/64',
'sb=ex' => 'SB/EX',
'sb=extend' => 'SB/EX',
'sb=fo' => 'SB/FO',
'sb=format' => 'SB/FO',
'sb=le' => 'SB/LE',
'sb=lf' => '#/65',
'sb=lo' => 'SB/LO',
'sb=lower' => 'SB/LO',
'sb=nu' => 'SB/NU',
'sb=numeric' => 'SB/NU',
'sb=oletter' => 'SB/LE',
'sb=other' => 'SB/XX',
'sb=sc' => 'SB/SC',
'sb=scontinue' => 'SB/SC',
'sb=se' => '#/87',
'sb=sep' => '#/87',
'sb=sp' => 'SB/Sp',
'sb=st' => 'SB/ST',
'sb=sterm' => 'SB/ST',
'sb=up' => 'SB/UP',
'sb=upper' => 'SB/UP',
'sb=xx' => 'SB/XX',
'sc' => 'Gc/Sc',
'sc=aghb' => '#/542',
'sc=ahom' => '#/543',
'sc=anatolianhieroglyphs' => '#/565',
'sc=arab' => 'Sc/Arab',
'sc=arabic' => 'Sc/Arab',
'sc=armenian' => 'Sc/Armn',
'sc=armi' => '#/544',
'sc=armn' => 'Sc/Armn',
'sc=avestan' => '#/545',
'sc=avst' => '#/545',
'sc=bali' => '#/546',
'sc=balinese' => '#/546',
'sc=bamu' => '#/547',
'sc=bamum' => '#/547',
'sc=bass' => '#/548',
'sc=bassavah' => '#/548',
'sc=batak' => '#/549',
'sc=batk' => '#/549',
'sc=beng' => 'Sc/Beng',
'sc=bengali' => 'Sc/Beng',
'sc=bopo' => '#/550',
'sc=bopomofo' => '#/550',
'sc=brah' => '#/551',
'sc=brahmi' => '#/551',
'sc=brai' => '#/166',
'sc=braille' => '#/166',
'sc=bugi' => '#/552',
'sc=buginese' => '#/552',
'sc=buhd' => '#/553',
'sc=buhid' => '#/553',
'sc=cakm' => '#/554',
'sc=canadianaboriginal' => '#/555',
'sc=cans' => '#/555',
'sc=cari' => '#/556',
'sc=carian' => '#/556',
'sc=caucasianalbanian' => '#/542',
'sc=chakma' => '#/554',
'sc=cham' => 'Sc/Cham',
'sc=cher' => '#/557',
'sc=cherokee' => '#/557',
'sc=common' => 'Sc/Zyyy',
'sc=copt' => '#/558',
'sc=coptic' => '#/558',
'sc=cprt' => 'Sc/Cprt',
'sc=cuneiform' => 'Sc/Xsux',
'sc=cypriot' => 'Sc/Cprt',
'sc=cyrillic' => 'Sc/Cyrl',
'sc=cyrl' => 'Sc/Cyrl',
'sc=deseret' => '#/172',
'sc=deva' => 'Sc/Deva',
'sc=devanagari' => 'Sc/Deva',
'sc=dsrt' => '#/172',
'sc=dupl' => 'Sc/Dupl',
'sc=duployan' => 'Sc/Dupl',
'sc=egyp' => '#/559',
'sc=egyptianhieroglyphs' => '#/559',
'sc=elba' => '#/560',
'sc=elbasan' => '#/560',
'sc=ethi' => 'Sc/Ethi',
'sc=ethiopic' => 'Sc/Ethi',
'sc=geor' => 'Sc/Geor',
'sc=georgian' => 'Sc/Geor',
'sc=glag' => '#/561',
'sc=glagolitic' => '#/561',
'sc=goth' => '#/562',
'sc=gothic' => '#/562',
'sc=gran' => 'Sc/Gran',
'sc=grantha' => 'Sc/Gran',
'sc=greek' => 'Sc/Grek',
'sc=grek' => 'Sc/Grek',
'sc=gujarati' => 'Sc/Gujr',
'sc=gujr' => 'Sc/Gujr',
'sc=gurmukhi' => 'Sc/Guru',
'sc=guru' => 'Sc/Guru',
'sc=han' => 'Sc/Han',
'sc=hang' => 'Sc/Hang',
'sc=hangul' => 'Sc/Hang',
'sc=hani' => 'Sc/Han',
'sc=hano' => '#/563',
'sc=hanunoo' => '#/563',
'sc=hatr' => '#/564',
'sc=hatran' => '#/564',
'sc=hebr' => 'Sc/Hebr',
'sc=hebrew' => 'Sc/Hebr',
'sc=hira' => 'Sc/Hira',
'sc=hiragana' => 'Sc/Hira',
'sc=hluw' => '#/565',
'sc=hmng' => 'Sc/Hmng',
'sc=hung' => '#/566',
'sc=imperialaramaic' => '#/544',
'sc=inherited' => 'Sc/Zinh',
'sc=inscriptionalpahlavi' => '#/592',
'sc=inscriptionalparthian' => '#/595',
'sc=ital' => '#/567',
'sc=java' => '#/568',
'sc=javanese' => '#/568',
'sc=kaithi' => '#/571',
'sc=kali' => '#/569',
'sc=kana' => 'Sc/Kana',
'sc=kannada' => 'Sc/Knda',
'sc=katakana' => 'Sc/Kana',
'sc=kayahli' => '#/569',
'sc=khar' => 'Sc/Khar',
'sc=kharoshthi' => 'Sc/Khar',
'sc=khmer' => 'Sc/Khmr',
'sc=khmr' => 'Sc/Khmr',
'sc=khoj' => '#/570',
'sc=khojki' => '#/570',
'sc=khudawadi' => '#/603',
'sc=knda' => 'Sc/Knda',
'sc=kthi' => '#/571',
'sc=lana' => 'Sc/Lana',
'sc=lao' => 'Sc/Lao',
'sc=laoo' => 'Sc/Lao',
'sc=latin' => 'Sc/Latn',
'sc=latn' => 'Sc/Latn',
'sc=lepc' => '#/572',
'sc=lepcha' => '#/572',
'sc=limb' => 'Sc/Limb',
'sc=limbu' => 'Sc/Limb',
'sc=lina' => '#/573',
'sc=linb' => 'Sc/Linb',
'sc=lineara' => '#/573',
'sc=linearb' => 'Sc/Linb',
'sc=lisu' => '#/117',
'sc=lyci' => '#/574',
'sc=lycian' => '#/574',
'sc=lydi' => '#/575',
'sc=lydian' => '#/575',
'sc=mahajani' => '#/576',
'sc=mahj' => '#/576',
'sc=malayalam' => 'Sc/Mlym',
'sc=mand' => '#/577',
'sc=mandaic' => '#/577',
'sc=mani' => '#/578',
'sc=manichaean' => '#/578',
'sc=meeteimayek' => '#/583',
'sc=mend' => '#/579',
'sc=mendekikakui' => '#/579',
'sc=merc' => '#/580',
'sc=mero' => '#/355',
'sc=meroiticcursive' => '#/580',
'sc=meroitichieroglyphs' => '#/355',
'sc=miao' => '#/581',
'sc=mlym' => 'Sc/Mlym',
'sc=modi' => '#/582',
'sc=mong' => 'Sc/Mong',
'sc=mongolian' => 'Sc/Mong',
'sc=mro' => '#/539',
'sc=mroo' => '#/539',
'sc=mtei' => '#/583',
'sc=mult' => 'Sc/Mult',
'sc=multani' => 'Sc/Mult',
'sc=myanmar' => '#/584',
'sc=mymr' => '#/584',
'sc=nabataean' => '#/585',
'sc=narb' => '#/329',
'sc=nbat' => '#/585',
'sc=newtailue' => 'Sc/Talu',
'sc=nko' => '#/540',
'sc=nkoo' => '#/540',
'sc=ogam' => '#/586',
'sc=ogham' => '#/586',
'sc=olchiki' => '#/184',
'sc=olck' => '#/184',
'sc=oldhungarian' => '#/566',
'sc=olditalic' => '#/567',
'sc=oldnortharabian' => '#/329',
'sc=oldpermic' => '#/590',
'sc=oldpersian' => '#/619',
'sc=oldsoutharabian' => '#/330',
'sc=oldturkic' => '#/587',
'sc=oriya' => 'Sc/Orya',
'sc=orkh' => '#/587',
'sc=orya' => 'Sc/Orya',
'sc=osma' => '#/588',
'sc=osmanya' => '#/588',
'sc=pahawhhmong' => 'Sc/Hmng',
'sc=palm' => '#/246',
'sc=palmyrene' => '#/246',
'sc=pauc' => '#/589',
'sc=paucinhau' => '#/589',
'sc=perm' => '#/590',
'sc=phag' => '#/591',
'sc=phagspa' => '#/591',
'sc=phli' => '#/592',
'sc=phlp' => '#/593',
'sc=phnx' => '#/594',
'sc=phoenician' => '#/594',
'sc=plrd' => '#/581',
'sc=prti' => '#/595',
'sc=psalterpahlavi' => '#/593',
'sc=qaac' => '#/558',
'sc=qaai' => 'Sc/Zinh',
'sc=rejang' => '#/596',
'sc=rjng' => '#/596',
'sc=runic' => '#/597',
'sc=runr' => '#/597',
'sc=samaritan' => '#/598',
'sc=samr' => '#/598',
'sc=sarb' => '#/330',
'sc=saur' => '#/599',
'sc=saurashtra' => '#/599',
'sc=sgnw' => '#/600',
'sc=sharada' => '#/601',
'sc=shavian' => '#/188',
'sc=shaw' => '#/188',
'sc=shrd' => '#/601',
'sc=sidd' => '#/602',
'sc=siddham' => '#/602',
'sc=signwriting' => '#/600',
'sc=sind' => '#/603',
'sc=sinh' => 'Sc/Sinh',
'sc=sinhala' => 'Sc/Sinh',
'sc=sora' => '#/604',
'sc=sorasompeng' => '#/604',
'sc=sund' => '#/605',
'sc=sundanese' => '#/605',
'sc=sylo' => '#/606',
'sc=sylotinagri' => '#/606',
'sc=syrc' => '#/607',
'sc=syriac' => '#/607',
'sc=tagalog' => '#/613',
'sc=tagb' => '#/608',
'sc=tagbanwa' => '#/608',
'sc=taile' => '#/610',
'sc=taitham' => 'Sc/Lana',
'sc=taiviet' => '#/611',
'sc=takr' => '#/609',
'sc=takri' => '#/609',
'sc=tale' => '#/610',
'sc=talu' => 'Sc/Talu',
'sc=tamil' => 'Sc/Taml',
'sc=taml' => 'Sc/Taml',
'sc=tavt' => '#/611',
'sc=telu' => 'Sc/Telu',
'sc=telugu' => 'Sc/Telu',
'sc=tfng' => '#/612',
'sc=tglg' => '#/613',
'sc=thaa' => '#/614',
'sc=thaana' => '#/614',
'sc=thai' => '#/615',
'sc=tibetan' => 'Sc/Tibt',
'sc=tibt' => 'Sc/Tibt',
'sc=tifinagh' => '#/612',
'sc=tirh' => '#/616',
'sc=tirhuta' => '#/616',
'sc=ugar' => '#/617',
'sc=ugaritic' => '#/617',
'sc=unknown' => 'Sc/Zzzz',
'sc=vai' => '#/541',
'sc=vaii' => '#/541',
'sc=wara' => '#/618',
'sc=warangciti' => '#/618',
'sc=xpeo' => '#/619',
'sc=xsux' => 'Sc/Xsux',
'sc=yi' => '#/538',
'sc=yiii' => '#/538',
'sc=zinh' => 'Sc/Zinh',
'sc=zyyy' => 'Sc/Zyyy',
'sc=zzzz' => 'Sc/Zzzz',
'scx=aghb' => '#/542',
'scx=ahom' => '#/543',
'scx=anatolianhieroglyphs' => '#/565',
'scx=arab' => 'Scx/Arab',
'scx=arabic' => 'Scx/Arab',
'scx=armenian' => 'Scx/Armn',
'scx=armi' => '#/544',
'scx=armn' => 'Scx/Armn',
'scx=avestan' => '#/545',
'scx=avst' => '#/545',
'scx=bali' => '#/546',
'scx=balinese' => '#/546',
'scx=bamu' => '#/547',
'scx=bamum' => '#/547',
'scx=bass' => '#/548',
'scx=bassavah' => '#/548',
'scx=batak' => '#/549',
'scx=batk' => '#/549',
'scx=beng' => 'Scx/Beng',
'scx=bengali' => 'Scx/Beng',
'scx=bopo' => 'Scx/Bopo',
'scx=bopomofo' => 'Scx/Bopo',
'scx=brah' => '#/551',
'scx=brahmi' => '#/551',
'scx=brai' => '#/166',
'scx=braille' => '#/166',
'scx=bugi' => '#/620',
'scx=buginese' => '#/620',
'scx=buhd' => '#/621',
'scx=buhid' => '#/621',
'scx=cakm' => 'Scx/Cakm',
'scx=canadianaboriginal' => '#/555',
'scx=cans' => '#/555',
'scx=cari' => '#/556',
'scx=carian' => '#/556',
'scx=caucasianalbanian' => '#/542',
'scx=chakma' => 'Scx/Cakm',
'scx=cham' => 'Sc/Cham',
'scx=cher' => '#/557',
'scx=cherokee' => '#/557',
'scx=common' => 'Scx/Zyyy',
'scx=copt' => 'Scx/Copt',
'scx=coptic' => 'Scx/Copt',
'scx=cprt' => 'Scx/Cprt',
'scx=cuneiform' => 'Sc/Xsux',
'scx=cypriot' => 'Scx/Cprt',
'scx=cyrillic' => 'Scx/Cyrl',
'scx=cyrl' => 'Scx/Cyrl',
'scx=deseret' => '#/172',
'scx=deva' => 'Scx/Deva',
'scx=devanagari' => 'Scx/Deva',
'scx=dsrt' => '#/172',
'scx=dupl' => 'Scx/Dupl',
'scx=duployan' => 'Scx/Dupl',
'scx=egyp' => '#/559',
'scx=egyptianhieroglyphs' => '#/559',
'scx=elba' => '#/560',
'scx=elbasan' => '#/560',
'scx=ethi' => 'Sc/Ethi',
'scx=ethiopic' => 'Sc/Ethi',
'scx=geor' => 'Scx/Geor',
'scx=georgian' => 'Scx/Geor',
'scx=glag' => 'Scx/Glag',
'scx=glagolitic' => 'Scx/Glag',
'scx=goth' => '#/562',
'scx=gothic' => '#/562',
'scx=gran' => 'Scx/Gran',
'scx=grantha' => 'Scx/Gran',
'scx=greek' => 'Scx/Grek',
'scx=grek' => 'Scx/Grek',
'scx=gujarati' => 'Scx/Gujr',
'scx=gujr' => 'Scx/Gujr',
'scx=gurmukhi' => 'Scx/Guru',
'scx=guru' => 'Scx/Guru',
'scx=han' => 'Scx/Han',
'scx=hang' => 'Scx/Hang',
'scx=hangul' => 'Scx/Hang',
'scx=hani' => 'Scx/Han',
'scx=hano' => '#/622',
'scx=hanunoo' => '#/622',
'scx=hatr' => '#/564',
'scx=hatran' => '#/564',
'scx=hebr' => 'Sc/Hebr',
'scx=hebrew' => 'Sc/Hebr',
'scx=hira' => 'Scx/Hira',
'scx=hiragana' => 'Scx/Hira',
'scx=hluw' => '#/565',
'scx=hmng' => 'Sc/Hmng',
'scx=hung' => '#/566',
'scx=imperialaramaic' => '#/544',
'scx=inherited' => 'Scx/Zinh',
'scx=inscriptionalpahlavi' => '#/592',
'scx=inscriptionalparthian' => '#/595',
'scx=ital' => '#/567',
'scx=java' => '#/623',
'scx=javanese' => '#/623',
'scx=kaithi' => '#/625',
'scx=kali' => '#/178',
'scx=kana' => 'Scx/Kana',
'scx=kannada' => 'Scx/Knda',
'scx=katakana' => 'Scx/Kana',
'scx=kayahli' => '#/178',
'scx=khar' => 'Sc/Khar',
'scx=kharoshthi' => 'Sc/Khar',
'scx=khmer' => 'Sc/Khmr',
'scx=khmr' => 'Sc/Khmr',
'scx=khoj' => '#/624',
'scx=khojki' => '#/624',
'scx=khudawadi' => 'Scx/Sind',
'scx=knda' => 'Scx/Knda',
'scx=kthi' => '#/625',
'scx=lana' => 'Sc/Lana',
'scx=lao' => 'Sc/Lao',
'scx=laoo' => 'Sc/Lao',
'scx=latin' => 'Scx/Latn',
'scx=latn' => 'Scx/Latn',
'scx=lepc' => '#/572',
'scx=lepcha' => '#/572',
'scx=limb' => 'Scx/Limb',
'scx=limbu' => 'Scx/Limb',
'scx=lina' => '#/573',
'scx=linb' => 'Scx/Linb',
'scx=lineara' => '#/573',
'scx=linearb' => 'Scx/Linb',
'scx=lisu' => '#/117',
'scx=lyci' => '#/574',
'scx=lycian' => '#/574',
'scx=lydi' => '#/575',
'scx=lydian' => '#/575',
'scx=mahajani' => '#/626',
'scx=mahj' => '#/626',
'scx=malayalam' => 'Scx/Mlym',
'scx=mand' => '#/627',
'scx=mandaic' => '#/627',
'scx=mani' => '#/628',
'scx=manichaean' => '#/628',
'scx=meeteimayek' => '#/583',
'scx=mend' => '#/579',
'scx=mendekikakui' => '#/579',
'scx=merc' => '#/580',
'scx=mero' => '#/355',
'scx=meroiticcursive' => '#/580',
'scx=meroitichieroglyphs' => '#/355',
'scx=miao' => '#/581',
'scx=mlym' => 'Scx/Mlym',
'scx=modi' => '#/629',
'scx=mong' => 'Scx/Mong',
'scx=mongolian' => 'Scx/Mong',
'scx=mro' => '#/539',
'scx=mroo' => '#/539',
'scx=mtei' => '#/583',
'scx=mult' => 'Scx/Mult',
'scx=multani' => 'Scx/Mult',
'scx=myanmar' => 'Scx/Mymr',
'scx=mymr' => 'Scx/Mymr',
'scx=nabataean' => '#/585',
'scx=narb' => '#/329',
'scx=nbat' => '#/585',
'scx=newtailue' => 'Sc/Talu',
'scx=nko' => '#/540',
'scx=nkoo' => '#/540',
'scx=ogam' => '#/586',
'scx=ogham' => '#/586',
'scx=olchiki' => '#/184',
'scx=olck' => '#/184',
'scx=oldhungarian' => '#/566',
'scx=olditalic' => '#/567',
'scx=oldnortharabian' => '#/329',
'scx=oldpermic' => '#/630',
'scx=oldpersian' => '#/619',
'scx=oldsoutharabian' => '#/330',
'scx=oldturkic' => '#/587',
'scx=oriya' => 'Scx/Orya',
'scx=orkh' => '#/587',
'scx=orya' => 'Scx/Orya',
'scx=osma' => '#/588',
'scx=osmanya' => '#/588',
'scx=pahawhhmong' => 'Sc/Hmng',
'scx=palm' => '#/246',
'scx=palmyrene' => '#/246',
'scx=pauc' => '#/589',
'scx=paucinhau' => '#/589',
'scx=perm' => '#/630',
'scx=phag' => '#/631',
'scx=phagspa' => '#/631',
'scx=phli' => '#/592',
'scx=phlp' => 'Scx/Phlp',
'scx=phnx' => '#/594',
'scx=phoenician' => '#/594',
'scx=plrd' => '#/581',
'scx=prti' => '#/595',
'scx=psalterpahlavi' => 'Scx/Phlp',
'scx=qaac' => 'Scx/Copt',
'scx=qaai' => 'Scx/Zinh',
'scx=rejang' => '#/596',
'scx=rjng' => '#/596',
'scx=runic' => '#/597',
'scx=runr' => '#/597',
'scx=samaritan' => '#/598',
'scx=samr' => '#/598',
'scx=sarb' => '#/330',
'scx=saur' => '#/599',
'scx=saurashtra' => '#/599',
'scx=sgnw' => '#/600',
'scx=sharada' => 'Scx/Shrd',
'scx=shavian' => '#/188',
'scx=shaw' => '#/188',
'scx=shrd' => 'Scx/Shrd',
'scx=sidd' => '#/602',
'scx=siddham' => '#/602',
'scx=signwriting' => '#/600',
'scx=sind' => 'Scx/Sind',
'scx=sinh' => 'Scx/Sinh',
'scx=sinhala' => 'Scx/Sinh',
'scx=sora' => '#/604',
'scx=sorasompeng' => '#/604',
'scx=sund' => '#/605',
'scx=sundanese' => '#/605',
'scx=sylo' => '#/632',
'scx=sylotinagri' => '#/632',
'scx=syrc' => 'Scx/Syrc',
'scx=syriac' => 'Scx/Syrc',
'scx=tagalog' => '#/634',
'scx=tagb' => 'Scx/Tagb',
'scx=tagbanwa' => 'Scx/Tagb',
'scx=taile' => '#/633',
'scx=taitham' => 'Sc/Lana',
'scx=taiviet' => '#/611',
'scx=takr' => 'Scx/Takr',
'scx=takri' => 'Scx/Takr',
'scx=tale' => '#/633',
'scx=talu' => 'Sc/Talu',
'scx=tamil' => 'Scx/Taml',
'scx=taml' => 'Scx/Taml',
'scx=tavt' => '#/611',
'scx=telu' => 'Scx/Telu',
'scx=telugu' => 'Scx/Telu',
'scx=tfng' => '#/612',
'scx=tglg' => '#/634',
'scx=thaa' => 'Scx/Thaa',
'scx=thaana' => 'Scx/Thaa',
'scx=thai' => '#/615',
'scx=tibetan' => 'Sc/Tibt',
'scx=tibt' => 'Sc/Tibt',
'scx=tifinagh' => '#/612',
'scx=tirh' => 'Scx/Tirh',
'scx=tirhuta' => 'Scx/Tirh',
'scx=ugar' => '#/617',
'scx=ugaritic' => '#/617',
'scx=unknown' => 'Sc/Zzzz',
'scx=vai' => '#/541',
'scx=vaii' => '#/541',
'scx=wara' => '#/618',
'scx=warangciti' => '#/618',
'scx=xpeo' => '#/619',
'scx=xsux' => 'Sc/Xsux',
'scx=yi' => 'Scx/Yi',
'scx=yiii' => 'Scx/Yi',
'scx=zinh' => 'Scx/Zinh',
'scx=zyyy' => 'Scx/Zyyy',
'scx=zzzz' => 'Sc/Zzzz',
'sd' => 'SD/Y',
'sd=f' => '!SD/Y',
'sd=false' => '!SD/Y',
'sd=n' => '!SD/Y',
'sd=no' => '!SD/Y',
'sd=t' => 'SD/Y',
'sd=true' => 'SD/Y',
'sd=y' => 'SD/Y',
'sd=yes' => 'SD/Y',
'separator' => 'Gc/Z',
'sgnw' => '#/600',
'sharada' => '#/601',
'shavian' => '#/188',
'shaw' => '#/188',
'shorthandformatcontrols' => '#/365',
'shrd' => '#/601',
'sidd' => '#/602',
'siddham' => '#/602',
'signwriting' => '#/600',
'sind' => '#/603',
'sinh' => 'Sc/Sinh',
'sinhala' => 'Sc/Sinh',
'sinhalaarchaicnumbers' => '#/360',
'sk' => 'Gc/Sk',
'sm' => 'Gc/Sm',
'smallforms' => '#/265',
'smallformvariants' => '#/265',
'so' => 'Gc/So',
'softdotted' => 'SD/Y',
'sora' => '#/604',
'sorasompeng' => '#/604',
'space' => 'Perl/SpacePer',
'spaceperl' => 'Perl/SpacePer',
'spaceseparator' => 'Gc/Zs',
'spacingmark' => 'Gc/Mc',
'spacingmodifierletters' => '#/328',
'specials' => '#/221',
'sterm' => 'STerm/Y',
'sterm=f' => '!STerm/Y',
'sterm=false' => '!STerm/Y',
'sterm=n' => '!STerm/Y',
'sterm=no' => '!STerm/Y',
'sterm=t' => 'STerm/Y',
'sterm=true' => 'STerm/Y',
'sterm=y' => 'STerm/Y',
'sterm=yes' => 'STerm/Y',
'sund' => '#/605',
'sundanese' => '#/605',
'sundanesesup' => '#/303',
'sundanesesupplement' => '#/303',
'suparrowsa' => '#/266',
'suparrowsb' => '#/267',
'suparrowsc' => '#/268',
'superandsub' => '#/289',
'superscriptsandsubscripts' => '#/289',
'supmathoperators' => '#/342',
'supplementalarrowsa' => '#/266',
'supplementalarrowsb' => '#/267',
'supplementalarrowsc' => '#/268',
'supplementalmathematicaloperators' => '#/342',
'supplementalpunctuation' => '#/319',
'supplementalsymbolsandpictographs' => '#/366',
'supplementaryprivateuseareaa' => '#/191',
'supplementaryprivateuseareab' => '#/192',
'suppuaa' => '#/191',
'suppuab' => '#/192',
'suppunctuation' => '#/319',
'supsymbolsandpictographs' => '#/366',
'surrogate' => '#/14',
'suttonsignwriting' => '#/346',
'sylo' => '#/606',
'sylotinagri' => '#/606',
'symbol' => 'Gc/S',
'syrc' => '#/607',
'syriac' => '#/607',
'tagalog' => '#/613',
'tagb' => '#/608',
'tagbanwa' => '#/608',
'tags' => '#/121',
'taile' => '#/610',
'taitham' => 'Sc/Lana',
'taiviet' => '#/611',
'taixuanjing' => '#/291',
'taixuanjingsymbols' => '#/291',
'takr' => '#/609',
'takri' => '#/609',
'tale' => '#/610',
'talu' => 'Sc/Talu',
'tamil' => 'Sc/Taml',
'taml' => 'Sc/Taml',
'tavt' => '#/611',
'telu' => 'Sc/Telu',
'telugu' => 'Sc/Telu',
'term' => 'Term/Y',
'term=f' => '!Term/Y',
'term=false' => '!Term/Y',
'term=n' => '!Term/Y',
'term=no' => '!Term/Y',
'term=t' => 'Term/Y',
'term=true' => 'Term/Y',
'term=y' => 'Term/Y',
'term=yes' => 'Term/Y',
'terminalpunctuation' => 'Term/Y',
'tfng' => '#/612',
'tglg' => '#/613',
'thaa' => '#/614',
'thaana' => '#/614',
'thai' => '#/615',
'tibetan' => 'Sc/Tibt',
'tibt' => 'Sc/Tibt',
'tifinagh' => '#/612',
'tirh' => '#/616',
'tirhuta' => '#/616',
'title' => 'Perl/Title',
'titlecase' => 'Perl/Title',
'titlecaseletter' => 'Perl/Title',
'transportandmap' => '#/331',
'transportandmapsymbols' => '#/331',
'ucas' => '#/123',
'ucasext' => '#/198',
'ugar' => '#/617',
'ugaritic' => '#/617',
'uideo' => 'UIdeo/Y',
'uideo=f' => '!UIdeo/Y',
'uideo=false' => '!UIdeo/Y',
'uideo=n' => '!UIdeo/Y',
'uideo=no' => '!UIdeo/Y',
'uideo=t' => 'UIdeo/Y',
'uideo=true' => 'UIdeo/Y',
'uideo=y' => 'UIdeo/Y',
'uideo=yes' => 'UIdeo/Y',
'unassigned' => 'Gc/Cn',
'unicode' => '#/2',
'unifiedcanadianaboriginalsyllabics' => '#/123',
'unifiedcanadianaboriginalsyllabicsextended' => '#/198',
'unifiedideograph' => 'UIdeo/Y',
'unknown' => 'Sc/Zzzz',
'upper' => 'Upper/Y',
'upper=f' => '!Upper/Y',
'upper=false' => '!Upper/Y',
'upper=n' => '!Upper/Y',
'upper=no' => '!Upper/Y',
'upper=t' => 'Upper/Y',
'upper=true' => 'Upper/Y',
'upper=y' => 'Upper/Y',
'upper=yes' => 'Upper/Y',
'uppercase' => 'Upper/Y',
'uppercaseletter' => 'Gc/Lu',
'vai' => '#/541',
'vaii' => '#/541',
'variationselector' => '#/88',
'variationselectors' => '#/105',
'variationselectorssupplement' => '#/138',
'vedicext' => '#/225',
'vedicextensions' => '#/225',
'verticalforms' => '#/310',
'vertspace' => '#/4',
'vs' => '#/88',
'vs=f' => '#/!88',
'vs=false' => '#/!88',
'vs=n' => '#/!88',
'vs=no' => '#/!88',
'vs=t' => '#/88',
'vs=true' => '#/88',
'vs=y' => '#/88',
'vs=yes' => '#/88',
'vssup' => '#/138',
'wara' => '#/618',
'warangciti' => '#/618',
'wb=aletter' => 'WB/LE',
'wb=cr' => '#/64',
'wb=doublequote' => '#/89',
'wb=dq' => '#/89',
'wb=ex' => 'WB/EX',
'wb=extend' => 'SB/EX',
'wb=extendnumlet' => 'WB/EX',
'wb=fo' => 'WB/FO',
'wb=format' => 'WB/FO',
'wb=hebrewletter' => 'WB/HL',
'wb=hl' => 'WB/HL',
'wb=ka' => 'WB/KA',
'wb=katakana' => 'WB/KA',
'wb=le' => 'WB/LE',
'wb=lf' => '#/65',
'wb=mb' => 'WB/MB',
'wb=midletter' => 'WB/ML',
'wb=midnum' => 'WB/MN',
'wb=midnumlet' => 'WB/MB',
'wb=ml' => 'WB/ML',
'wb=mn' => 'WB/MN',
'wb=newline' => '#/90',
'wb=nl' => '#/90',
'wb=nu' => 'WB/NU',
'wb=numeric' => 'WB/NU',
'wb=other' => 'WB/XX',
'wb=regionalindicator' => '#/66',
'wb=ri' => '#/66',
'wb=singlequote' => '#/91',
'wb=sq' => '#/91',
'wb=xx' => 'WB/XX',
'whitespace' => 'Perl/SpacePer',
'word' => 'Perl/Word',
'wspace' => 'Perl/SpacePer',
'wspace=f' => '!Perl/SpacePer',
'wspace=false' => '!Perl/SpacePer',
'wspace=n' => '!Perl/SpacePer',
'wspace=no' => '!Perl/SpacePer',
'wspace=t' => 'Perl/SpacePer',
'wspace=true' => 'Perl/SpacePer',
'wspace=y' => 'Perl/SpacePer',
'wspace=yes' => 'Perl/SpacePer',
'xdigit' => 'Hex/Y',
'xidc' => 'XIDC/Y',
'xidc=f' => '!XIDC/Y',
'xidc=false' => '!XIDC/Y',
'xidc=n' => '!XIDC/Y',
'xidc=no' => '!XIDC/Y',
'xidc=t' => 'XIDC/Y',
'xidc=true' => 'XIDC/Y',
'xidc=y' => 'XIDC/Y',
'xidc=yes' => 'XIDC/Y',
'xidcontinue' => 'XIDC/Y',
'xids' => 'XIDS/Y',
'xids=f' => '!XIDS/Y',
'xids=false' => '!XIDS/Y',
'xids=n' => '!XIDS/Y',
'xids=no' => '!XIDS/Y',
'xids=t' => 'XIDS/Y',
'xids=true' => 'XIDS/Y',
'xids=y' => 'XIDS/Y',
'xids=yes' => 'XIDS/Y',
'xidstart' => 'XIDS/Y',
'xpeo' => '#/619',
'xperlspace' => 'Perl/SpacePer',
'xposixalnum' => 'Perl/Alnum',
'xposixalpha' => 'Alpha/Y',
'xposixblank' => 'Perl/Blank',
'xposixcntrl' => '#/370',
'xposixdigit' => 'Gc/Nd',
'xposixgraph' => 'Perl/Graph',
'xposixlower' => 'Lower/Y',
'xposixprint' => 'Perl/Print',
'xposixpunct' => 'Perl/XPosixPu',
'xposixspace' => 'Perl/SpacePer',
'xposixupper' => 'Upper/Y',
'xposixword' => 'Perl/Word',
'xposixxdigit' => 'Hex/Y',
'xsux' => 'Sc/Xsux',
'yi' => '#/538',
'yiii' => '#/538',
'yijing' => '#/163',
'yijinghexagramsymbols' => '#/163',
'yiradicals' => '#/270',
'yisyllables' => '#/292',
'z' => 'Gc/Z',
'zinh' => 'Sc/Zinh',
'zl' => '#/372',
'zp' => '#/373',
'zs' => 'Gc/Zs',
'zyyy' => 'Sc/Zyyy',
'zzzz' => 'Sc/Zzzz',
);
# Maps floating point to fractional form
%utf8::nv_floating_to_rational = (
'-0.5' => '-1/2',
'0.0625' => '1/16',
'0.0833333333333333' => '1/12',
'0.1' => '1/10',
'0.111111111111111' => '1/9',
'0.125' => '1/8',
'0.142857142857143' => '1/7',
'0.166666666666667' => '1/6',
'0.1875' => '3/16',
'0.2' => '1/5',
'0.25' => '1/4',
'0.333333333333333' => '1/3',
'0.375' => '3/8',
'0.4' => '2/5',
'0.416666666666667' => '5/12',
'0.5' => '1/2',
'0.583333333333333' => '7/12',
'0.6' => '3/5',
'0.625' => '5/8',
'0.666666666666667' => '2/3',
'0.75' => '3/4',
'0.8' => '4/5',
'0.833333333333333' => '5/6',
'0.875' => '7/8',
'0.916666666666667' => '11/12',
'1.5' => '3/2',
'2.5' => '5/2',
'3.5' => '7/2',
'4.5' => '9/2',
'5.5' => '11/2',
'6.5' => '13/2',
'7.5' => '15/2',
'8.5' => '17/2',
);
# If a floating point number doesn't have enough digits in it to get this
# close to a fraction, it isn't considered to be that fraction even if all the
# digits it does have match.
$utf8::max_floating_slop = 0.001;
# Deprecated tables to generate a warning for. The key is the file containing
# the table, so as to avoid duplication, as many property names can map to the
# file, but we only need one entry for all of them.
%utf8::why_deprecated = (
'#/450' => 'Deprecated by Unicode because surrogates should never appear in well-formed text, and therefore shouldn\'t be the basis for line breaking',
'Hyphen/T' => 'Supplanted by Line_Break property values; see www.unicode.org/reports/tr14',
);
# A few properties have different behavior under /i matching. This maps
# those to substitute files to use under /i.
%utf8::caseless_equivalent = (
'gc=ll' => 'Gc/LC',
'gc=lowercaseletter' => 'Gc/LC',
'gc=lt' => 'Gc/LC',
'gc=lu' => 'Gc/LC',
'gc=titlecaseletter' => 'Gc/LC',
'gc=uppercaseletter' => 'Gc/LC',
'isll' => 'Gc/LC',
'islower' => 'Cased/Y',
'islowercase' => 'Cased/Y',
'islowercaseletter' => 'Gc/LC',
'islt' => 'Gc/LC',
'islu' => 'Gc/LC',
'isposixlower' => '#/6',
'isposixupper' => '#/6',
'istitle' => 'Cased/Y',
'istitlecase' => 'Cased/Y',
'istitlecaseletter' => 'Gc/LC',
'isupper' => 'Cased/Y',
'isuppercase' => 'Cased/Y',
'isuppercaseletter' => 'Gc/LC',
'isxposixlower' => 'Cased/Y',
'isxposixupper' => 'Cased/Y',
'll' => 'Gc/LC',
'lower' => 'Cased/Y',
'lower=f' => '!Cased/Y',
'lower=false' => '!Cased/Y',
'lower=n' => '!Cased/Y',
'lower=no' => '!Cased/Y',
'lower=t' => 'Cased/Y',
'lower=true' => 'Cased/Y',
'lower=y' => 'Cased/Y',
'lower=yes' => 'Cased/Y',
'lowercase' => 'Cased/Y',
'lowercaseletter' => 'Gc/LC',
'lt' => 'Gc/LC',
'lu' => 'Gc/LC',
'posixlower' => '#/6',
'posixupper' => '#/6',
'title' => 'Cased/Y',
'titlecase' => 'Cased/Y',
'titlecaseletter' => 'Gc/LC',
'upper' => 'Cased/Y',
'upper=f' => '!Cased/Y',
'upper=false' => '!Cased/Y',
'upper=n' => '!Cased/Y',
'upper=no' => '!Cased/Y',
'upper=t' => 'Cased/Y',
'upper=true' => 'Cased/Y',
'upper=y' => 'Cased/Y',
'upper=yes' => 'Cased/Y',
'uppercase' => 'Cased/Y',
'uppercaseletter' => 'Gc/LC',
'xposixlower' => 'Cased/Y',
'xposixupper' => 'Cased/Y',
);
# Property names to mapping files
%utf8::loose_property_to_file_of = (
'age' => 'To/Age',
'bc' => 'To/Bc',
'bidiclass' => 'To/Bc',
'bidimirroringglyph' => 'To/Bmg',
'bidipairedbracket' => 'To/Bpb',
'bidipairedbrackettype' => 'To/Bpt',
'bmg' => 'To/Bmg',
'bpb' => 'To/Bpb',
'bpt' => 'To/Bpt',
'canonicalcombiningclass' => 'CombiningClass',
'casefolding' => 'To/Cf',
'category' => 'To/Gc',
'ccc' => 'CombiningClass',
'cf' => 'To/Cf',
'ea' => 'To/Ea',
'eastasianwidth' => 'To/Ea',
'gc' => 'To/Gc',
'gcb' => 'To/GCB',
'generalcategory' => 'To/Gc',
'graphemeclusterbreak' => 'To/GCB',
'hangulsyllabletype' => 'To/Hst',
'hst' => 'To/Hst',
'indicpositionalcategory' => 'To/InPC',
'indicsyllabiccategory' => 'To/InSC',
'inpc' => 'To/InPC',
'insc' => 'To/InSC',
'isc' => 'To/Isc',
'isocomment' => 'To/Isc',
'jg' => 'To/Jg',
'joininggroup' => 'To/Jg',
'joiningtype' => 'To/Jt',
'jt' => 'To/Jt',
'lb' => 'To/Lb',
'lc' => 'To/Lc',
'linebreak' => 'To/Lb',
'lowercasemapping' => 'To/Lc',
'na1' => 'To/Na1',
'namealias' => 'To/NameAlia',
'nfcqc' => 'To/NFCQC',
'nfcquickcheck' => 'To/NFCQC',
'nfdqc' => 'To/NFDQC',
'nfdquickcheck' => 'To/NFDQC',
'nfkccasefold' => 'To/NFKCCF',
'nfkccf' => 'To/NFKCCF',
'nfkcqc' => 'To/NFKCQC',
'nfkcquickcheck' => 'To/NFKCQC',
'nfkdqc' => 'To/NFKDQC',
'nfkdquickcheck' => 'To/NFKDQC',
'nt' => 'To/Nt',
'numerictype' => 'To/Nt',
'numericvalue' => 'To/Nv',
'nv' => 'To/Nv',
'perldecimaldigit' => 'To/PerlDeci',
'sb' => 'To/SB',
'sc' => 'To/Sc',
'script' => 'To/Sc',
'scriptextensions' => 'To/Scx',
'scx' => 'To/Scx',
'sentencebreak' => 'To/SB',
'tc' => 'To/Tc',
'titlecasemapping' => 'To/Tc',
'uc' => 'To/Uc',
'unicode1name' => 'To/Na1',
'uppercasemapping' => 'To/Uc',
'wb' => 'To/WB',
'wordbreak' => 'To/WB',
);
# Property names to mapping files
%utf8::strict_property_to_file_of = (
'_perl_gcb' => 'To/GCB',
'_perl_lb' => 'To/_PerlLB',
'_perl_name_alias' => 'To/NameAlia',
'_perl_sb' => 'To/SB',
'_perl_wb' => 'To/_PerlWB',
);
# Files to the swash names within them.
%utf8::file_to_swash_name = (
'CombiningClass' => 'ToCombiningClass',
'To/_PerlLB' => 'To_PerlLB',
'To/_PerlWB' => 'To_PerlWB',
'To/Age' => 'ToAge',
'To/Bc' => 'ToBc',
'To/Bmg' => 'ToBmg',
'To/Bpb' => 'ToBpb',
'To/Bpt' => 'ToBpt',
'To/Cf' => 'ToCf',
'To/Ea' => 'ToEa',
'To/Gc' => 'ToGc',
'To/GCB' => 'ToGCB',
'To/Hst' => 'ToHst',
'To/InPC' => 'ToInPC',
'To/InSC' => 'ToInSC',
'To/Isc' => 'ToIsc',
'To/Jg' => 'ToJg',
'To/Jt' => 'ToJt',
'To/Lb' => 'ToLb',
'To/Lc' => 'ToLc',
'To/Na1' => 'ToNa1',
'To/NameAlia' => 'ToNameAlias',
'To/NFCQC' => 'ToNFCQC',
'To/NFDQC' => 'ToNFDQC',
'To/NFKCCF' => 'ToNFKCCF',
'To/NFKCQC' => 'ToNFKCQC',
'To/NFKDQC' => 'ToNFKDQC',
'To/Nt' => 'ToNt',
'To/Nv' => 'ToNv',
'To/PerlDeci' => 'ToPerlDecimalDigit',
'To/SB' => 'ToSB',
'To/Sc' => 'ToSc',
'To/Scx' => 'ToScx',
'To/Tc' => 'ToTc',
'To/Uc' => 'ToUc',
'To/WB' => 'ToWB',
);
1;
| operepo/ope | bin/usr/share/perl5/core_perl/unicore/Heavy.pl | Perl | mit | 129,498 |
#
# 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 os::windows::wsman::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_wsman);
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class;
$self->{version} = '0.1';
%{$self->{modes}} = (
'list-services' => 'os::windows::wsman::mode::listservices',
'service' => 'os::windows::wsman::mode::service',
);
return $self;
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check Windows operating systems through "WinRM" (ws-management protocol).
=cut
| nichols-356/centreon-plugins | os/windows/wsman/plugin.pm | Perl | apache-2.0 | 1,406 |
use strict;
use warnings;
use Furl::HTTP qw/HEADERS_NONE HEADERS_AS_ARRAYREF/;
use URI;
my $url = shift @ARGV || 'http://127.0.0.1:80/';
my $uri = URI->new($url);
my $host = $uri->host;
my $port = $uri->port;
my $path_query = $uri->path_query;
my $furl = Furl::HTTP->new(header_format => HEADERS_NONE, bufsize => 10_000_000);
for (1..1000) {
my ( $version, $code, $msg, $headers, $content ) = $furl->request(
method => 'GET',
host => $host,
port => $port,
path_query => $path_query,
);
$code == 200 or die "oops : $code, $content";
}
| isucon/isucon3 | final/misc/Furl-patched/author/benchmark/profile.pl | Perl | mit | 609 |
package Carp;
{ use 5.006; }
use strict;
use warnings;
BEGIN {
no strict "refs";
if(exists($::{"utf8::"}) && exists(*{$::{"utf8::"}}{HASH}->{"is_utf8"}) &&
defined(*{*{$::{"utf8::"}}{HASH}->{"is_utf8"}}{CODE})) {
*is_utf8 = \&{"utf8::is_utf8"};
} else {
*is_utf8 = sub { 0 };
}
}
BEGIN {
no strict "refs";
if(exists($::{"utf8::"}) && exists(*{$::{"utf8::"}}{HASH}->{"downgrade"}) &&
defined(*{*{$::{"utf8::"}}{HASH}->{"downgrade"}}{CODE})) {
*downgrade = \&{"utf8::downgrade"};
} else {
*downgrade = sub {};
}
}
our $VERSION = '1.26';
our $MaxEvalLen = 0;
our $Verbose = 0;
our $CarpLevel = 0;
our $MaxArgLen = 64; # How much of each argument to print. 0 = all.
our $MaxArgNums = 8; # How many arguments to print. 0 = all.
require Exporter;
our @ISA = ('Exporter');
our @EXPORT = qw(confess croak carp);
our @EXPORT_OK = qw(cluck verbose longmess shortmess);
our @EXPORT_FAIL = qw(verbose); # hook to enable verbose mode
# The members of %Internal are packages that are internal to perl.
# Carp will not report errors from within these packages if it
# can. The members of %CarpInternal are internal to Perl's warning
# system. Carp will not report errors from within these packages
# either, and will not report calls *to* these packages for carp and
# croak. They replace $CarpLevel, which is deprecated. The
# $Max(EvalLen|(Arg(Len|Nums)) variables are used to specify how the eval
# text and function arguments should be formatted when printed.
our %CarpInternal;
our %Internal;
# disable these by default, so they can live w/o require Carp
$CarpInternal{Carp}++;
$CarpInternal{warnings}++;
$Internal{Exporter}++;
$Internal{'Exporter::Heavy'}++;
# if the caller specifies verbose usage ("perl -MCarp=verbose script.pl")
# then the following method will be called by the Exporter which knows
# to do this thanks to @EXPORT_FAIL, above. $_[1] will contain the word
# 'verbose'.
sub export_fail { shift; $Verbose = shift if $_[0] eq 'verbose'; @_ }
sub _cgc {
no strict 'refs';
return \&{"CORE::GLOBAL::caller"} if defined &{"CORE::GLOBAL::caller"};
return;
}
sub longmess {
# Icky backwards compatibility wrapper. :-(
#
# The story is that the original implementation hard-coded the
# number of call levels to go back, so calls to longmess were off
# by one. Other code began calling longmess and expecting this
# behaviour, so the replacement has to emulate that behaviour.
my $cgc = _cgc();
my $call_pack = $cgc ? $cgc->() : caller();
if ( $Internal{$call_pack} or $CarpInternal{$call_pack} ) {
return longmess_heavy(@_);
}
else {
local $CarpLevel = $CarpLevel + 1;
return longmess_heavy(@_);
}
}
our @CARP_NOT;
sub shortmess {
my $cgc = _cgc();
# Icky backwards compatibility wrapper. :-(
local @CARP_NOT = $cgc ? $cgc->() : caller();
shortmess_heavy(@_);
}
sub croak { die shortmess @_ }
sub confess { die longmess @_ }
sub carp { warn shortmess @_ }
sub cluck { warn longmess @_ }
BEGIN {
if("$]" >= 5.015002 || ("$]" >= 5.014002 && "$]" < 5.015) ||
("$]" >= 5.012005 && "$]" < 5.013)) {
*CALLER_OVERRIDE_CHECK_OK = sub () { 1 };
} else {
*CALLER_OVERRIDE_CHECK_OK = sub () { 0 };
}
}
sub caller_info {
my $i = shift(@_) + 1;
my %call_info;
my $cgc = _cgc();
{
# Some things override caller() but forget to implement the
# @DB::args part of it, which we need. We check for this by
# pre-populating @DB::args with a sentinel which no-one else
# has the address of, so that we can detect whether @DB::args
# has been properly populated. However, on earlier versions
# of perl this check tickles a bug in CORE::caller() which
# leaks memory. So we only check on fixed perls.
@DB::args = \$i if CALLER_OVERRIDE_CHECK_OK;
package DB;
@call_info{
qw(pack file line sub has_args wantarray evaltext is_require) }
= $cgc ? $cgc->($i) : caller($i);
}
unless ( defined $call_info{pack} ) {
return ();
}
my $sub_name = Carp::get_subname( \%call_info );
if ( $call_info{has_args} ) {
my @args;
if (CALLER_OVERRIDE_CHECK_OK && @DB::args == 1
&& ref $DB::args[0] eq ref \$i
&& $DB::args[0] == \$i ) {
@DB::args = (); # Don't let anyone see the address of $i
local $@;
my $where = eval {
my $func = $cgc or return '';
my $gv =
*{
( $::{"B::"} || return '') # B stash
->{svref_2object} || return '' # entry in stash
}{CODE} # coderef in entry
->($func)->GV;
my $package = $gv->STASH->NAME;
my $subname = $gv->NAME;
return unless defined $package && defined $subname;
# returning CORE::GLOBAL::caller isn't useful for tracing the cause:
return if $package eq 'CORE::GLOBAL' && $subname eq 'caller';
" in &${package}::$subname";
} || '';
@args
= "** Incomplete caller override detected$where; \@DB::args were not set **";
}
else {
@args = map { Carp::format_arg($_) } @DB::args;
}
if ( $MaxArgNums and @args > $MaxArgNums )
{ # More than we want to show?
$#args = $MaxArgNums;
push @args, '...';
}
# Push the args onto the subroutine
$sub_name .= '(' . join( ', ', @args ) . ')';
}
$call_info{sub_name} = $sub_name;
return wantarray() ? %call_info : \%call_info;
}
# Transform an argument to a function into a string.
sub format_arg {
my $arg = shift;
if ( ref($arg) ) {
$arg = defined($overload::VERSION) ? overload::StrVal($arg) : "$arg";
}
if ( defined($arg) ) {
$arg =~ s/'/\\'/g;
$arg = str_len_trim( $arg, $MaxArgLen );
# Quote it?
# Downgrade, and use [0-9] rather than \d, to avoid loading
# Unicode tables, which would be liable to fail if we're
# processing a syntax error.
downgrade($arg, 1);
$arg = "'$arg'" unless $arg =~ /^-?[0-9.]+\z/;
}
else {
$arg = 'undef';
}
# The following handling of "control chars" is direct from
# the original code - it is broken on Unicode though.
# Suggestions?
is_utf8($arg)
or $arg =~ s/([[:cntrl:]]|[[:^ascii:]])/sprintf("\\x{%x}",ord($1))/eg;
return $arg;
}
# Takes an inheritance cache and a package and returns
# an anon hash of known inheritances and anon array of
# inheritances which consequences have not been figured
# for.
sub get_status {
my $cache = shift;
my $pkg = shift;
$cache->{$pkg} ||= [ { $pkg => $pkg }, [ trusts_directly($pkg) ] ];
return @{ $cache->{$pkg} };
}
# Takes the info from caller() and figures out the name of
# the sub/require/eval
sub get_subname {
my $info = shift;
if ( defined( $info->{evaltext} ) ) {
my $eval = $info->{evaltext};
if ( $info->{is_require} ) {
return "require $eval";
}
else {
$eval =~ s/([\\\'])/\\$1/g;
return "eval '" . str_len_trim( $eval, $MaxEvalLen ) . "'";
}
}
return ( $info->{sub} eq '(eval)' ) ? 'eval {...}' : $info->{sub};
}
# Figures out what call (from the point of view of the caller)
# the long error backtrace should start at.
sub long_error_loc {
my $i;
my $lvl = $CarpLevel;
{
++$i;
my $cgc = _cgc();
my $pkg = $cgc ? $cgc->($i) : caller($i);
unless ( defined($pkg) ) {
# This *shouldn't* happen.
if (%Internal) {
local %Internal;
$i = long_error_loc();
last;
}
else {
# OK, now I am irritated.
return 2;
}
}
redo if $CarpInternal{$pkg};
redo unless 0 > --$lvl;
redo if $Internal{$pkg};
}
return $i - 1;
}
sub longmess_heavy {
return @_ if ref( $_[0] ); # don't break references as exceptions
my $i = long_error_loc();
return ret_backtrace( $i, @_ );
}
# Returns a full stack backtrace starting from where it is
# told.
sub ret_backtrace {
my ( $i, @error ) = @_;
my $mess;
my $err = join '', @error;
$i++;
my $tid_msg = '';
if ( defined &threads::tid ) {
my $tid = threads->tid;
$tid_msg = " thread $tid" if $tid;
}
my %i = caller_info($i);
$mess = "$err at $i{file} line $i{line}$tid_msg";
if( defined $. ) {
local $@ = '';
local $SIG{__DIE__};
eval {
CORE::die;
};
if($@ =~ /^Died at .*(, <.*?> line \d+).$/ ) {
$mess .= $1;
}
}
$mess .= "\.\n";
while ( my %i = caller_info( ++$i ) ) {
$mess .= "\t$i{sub_name} called at $i{file} line $i{line}$tid_msg\n";
}
return $mess;
}
sub ret_summary {
my ( $i, @error ) = @_;
my $err = join '', @error;
$i++;
my $tid_msg = '';
if ( defined &threads::tid ) {
my $tid = threads->tid;
$tid_msg = " thread $tid" if $tid;
}
my %i = caller_info($i);
return "$err at $i{file} line $i{line}$tid_msg\.\n";
}
sub short_error_loc {
# You have to create your (hash)ref out here, rather than defaulting it
# inside trusts *on a lexical*, as you want it to persist across calls.
# (You can default it on $_[2], but that gets messy)
my $cache = {};
my $i = 1;
my $lvl = $CarpLevel;
{
my $cgc = _cgc();
my $called = $cgc ? $cgc->($i) : caller($i);
$i++;
my $caller = $cgc ? $cgc->($i) : caller($i);
return 0 unless defined($caller); # What happened?
redo if $Internal{$caller};
redo if $CarpInternal{$caller};
redo if $CarpInternal{$called};
redo if trusts( $called, $caller, $cache );
redo if trusts( $caller, $called, $cache );
redo unless 0 > --$lvl;
}
return $i - 1;
}
sub shortmess_heavy {
return longmess_heavy(@_) if $Verbose;
return @_ if ref( $_[0] ); # don't break references as exceptions
my $i = short_error_loc();
if ($i) {
ret_summary( $i, @_ );
}
else {
longmess_heavy(@_);
}
}
# If a string is too long, trims it with ...
sub str_len_trim {
my $str = shift;
my $max = shift || 0;
if ( 2 < $max and $max < length($str) ) {
substr( $str, $max - 3 ) = '...';
}
return $str;
}
# Takes two packages and an optional cache. Says whether the
# first inherits from the second.
#
# Recursive versions of this have to work to avoid certain
# possible endless loops, and when following long chains of
# inheritance are less efficient.
sub trusts {
my $child = shift;
my $parent = shift;
my $cache = shift;
my ( $known, $partial ) = get_status( $cache, $child );
# Figure out consequences until we have an answer
while ( @$partial and not exists $known->{$parent} ) {
my $anc = shift @$partial;
next if exists $known->{$anc};
$known->{$anc}++;
my ( $anc_knows, $anc_partial ) = get_status( $cache, $anc );
my @found = keys %$anc_knows;
@$known{@found} = ();
push @$partial, @$anc_partial;
}
return exists $known->{$parent};
}
# Takes a package and gives a list of those trusted directly
sub trusts_directly {
my $class = shift;
no strict 'refs';
no warnings 'once';
return @{"$class\::CARP_NOT"}
? @{"$class\::CARP_NOT"}
: @{"$class\::ISA"};
}
if(!defined($warnings::VERSION) ||
do { no warnings "numeric"; $warnings::VERSION < 1.03 }) {
# Very old versions of warnings.pm import from Carp. This can go
# wrong due to the circular dependency. If Carp is invoked before
# warnings, then Carp starts by loading warnings, then warnings
# tries to import from Carp, and gets nothing because Carp is in
# the process of loading and hasn't defined its import method yet.
# So we work around that by manually exporting to warnings here.
no strict "refs";
*{"warnings::$_"} = \&$_ foreach @EXPORT;
}
1;
__END__
=head1 NAME
Carp - alternative warn and die for modules
=head1 SYNOPSIS
use Carp;
# warn user (from perspective of caller)
carp "string trimmed to 80 chars";
# die of errors (from perspective of caller)
croak "We're outta here!";
# die of errors with stack backtrace
confess "not implemented";
# cluck not exported by default
use Carp qw(cluck);
cluck "This is how we got here!";
=head1 DESCRIPTION
The Carp routines are useful in your own modules because
they act like die() or warn(), but with a message which is more
likely to be useful to a user of your module. In the case of
cluck, confess, and longmess that context is a summary of every
call in the call-stack. For a shorter message you can use C<carp>
or C<croak> which report the error as being from where your module
was called. There is no guarantee that that is where the error
was, but it is a good educated guess.
You can also alter the way the output and logic of C<Carp> works, by
changing some global variables in the C<Carp> namespace. See the
section on C<GLOBAL VARIABLES> below.
Here is a more complete description of how C<carp> and C<croak> work.
What they do is search the call-stack for a function call stack where
they have not been told that there shouldn't be an error. If every
call is marked safe, they give up and give a full stack backtrace
instead. In other words they presume that the first likely looking
potential suspect is guilty. Their rules for telling whether
a call shouldn't generate errors work as follows:
=over 4
=item 1.
Any call from a package to itself is safe.
=item 2.
Packages claim that there won't be errors on calls to or from
packages explicitly marked as safe by inclusion in C<@CARP_NOT>, or
(if that array is empty) C<@ISA>. The ability to override what
@ISA says is new in 5.8.
=item 3.
The trust in item 2 is transitive. If A trusts B, and B
trusts C, then A trusts C. So if you do not override C<@ISA>
with C<@CARP_NOT>, then this trust relationship is identical to,
"inherits from".
=item 4.
Any call from an internal Perl module is safe. (Nothing keeps
user modules from marking themselves as internal to Perl, but
this practice is discouraged.)
=item 5.
Any call to Perl's warning system (eg Carp itself) is safe.
(This rule is what keeps it from reporting the error at the
point where you call C<carp> or C<croak>.)
=item 6.
C<$Carp::CarpLevel> can be set to skip a fixed number of additional
call levels. Using this is not recommended because it is very
difficult to get it to behave correctly.
=back
=head2 Forcing a Stack Trace
As a debugging aid, you can force Carp to treat a croak as a confess
and a carp as a cluck across I<all> modules. In other words, force a
detailed stack trace to be given. This can be very helpful when trying
to understand why, or from where, a warning or error is being generated.
This feature is enabled by 'importing' the non-existent symbol
'verbose'. You would typically enable it by saying
perl -MCarp=verbose script.pl
or by including the string C<-MCarp=verbose> in the PERL5OPT
environment variable.
Alternately, you can set the global variable C<$Carp::Verbose> to true.
See the C<GLOBAL VARIABLES> section below.
=head1 GLOBAL VARIABLES
=head2 $Carp::MaxEvalLen
This variable determines how many characters of a string-eval are to
be shown in the output. Use a value of C<0> to show all text.
Defaults to C<0>.
=head2 $Carp::MaxArgLen
This variable determines how many characters of each argument to a
function to print. Use a value of C<0> to show the full length of the
argument.
Defaults to C<64>.
=head2 $Carp::MaxArgNums
This variable determines how many arguments to each function to show.
Use a value of C<0> to show all arguments to a function call.
Defaults to C<8>.
=head2 $Carp::Verbose
This variable makes C<carp> and C<croak> generate stack backtraces
just like C<cluck> and C<confess>. This is how C<use Carp 'verbose'>
is implemented internally.
Defaults to C<0>.
=head2 @CARP_NOT
This variable, I<in your package>, says which packages are I<not> to be
considered as the location of an error. The C<carp()> and C<cluck()>
functions will skip over callers when reporting where an error occurred.
NB: This variable must be in the package's symbol table, thus:
# These work
our @CARP_NOT; # file scope
use vars qw(@CARP_NOT); # package scope
@My::Package::CARP_NOT = ... ; # explicit package variable
# These don't work
sub xyz { ... @CARP_NOT = ... } # w/o declarations above
my @CARP_NOT; # even at top-level
Example of use:
package My::Carping::Package;
use Carp;
our @CARP_NOT;
sub bar { .... or _error('Wrong input') }
sub _error {
# temporary control of where'ness, __PACKAGE__ is implicit
local @CARP_NOT = qw(My::Friendly::Caller);
carp(@_)
}
This would make C<Carp> report the error as coming from a caller not
in C<My::Carping::Package>, nor from C<My::Friendly::Caller>.
Also read the L</DESCRIPTION> section above, about how C<Carp> decides
where the error is reported from.
Use C<@CARP_NOT>, instead of C<$Carp::CarpLevel>.
Overrides C<Carp>'s use of C<@ISA>.
=head2 %Carp::Internal
This says what packages are internal to Perl. C<Carp> will never
report an error as being from a line in a package that is internal to
Perl. For example:
$Carp::Internal{ (__PACKAGE__) }++;
# time passes...
sub foo { ... or confess("whatever") };
would give a full stack backtrace starting from the first caller
outside of __PACKAGE__. (Unless that package was also internal to
Perl.)
=head2 %Carp::CarpInternal
This says which packages are internal to Perl's warning system. For
generating a full stack backtrace this is the same as being internal
to Perl, the stack backtrace will not start inside packages that are
listed in C<%Carp::CarpInternal>. But it is slightly different for
the summary message generated by C<carp> or C<croak>. There errors
will not be reported on any lines that are calling packages in
C<%Carp::CarpInternal>.
For example C<Carp> itself is listed in C<%Carp::CarpInternal>.
Therefore the full stack backtrace from C<confess> will not start
inside of C<Carp>, and the short message from calling C<croak> is
not placed on the line where C<croak> was called.
=head2 $Carp::CarpLevel
This variable determines how many additional call frames are to be
skipped that would not otherwise be when reporting where an error
occurred on a call to one of C<Carp>'s functions. It is fairly easy
to count these call frames on calls that generate a full stack
backtrace. However it is much harder to do this accounting for calls
that generate a short message. Usually people skip too many call
frames. If they are lucky they skip enough that C<Carp> goes all of
the way through the call stack, realizes that something is wrong, and
then generates a full stack backtrace. If they are unlucky then the
error is reported from somewhere misleading very high in the call
stack.
Therefore it is best to avoid C<$Carp::CarpLevel>. Instead use
C<@CARP_NOT>, C<%Carp::Internal> and C<%Carp::CarpInternal>.
Defaults to C<0>.
=head1 BUGS
The Carp routines don't handle exception objects currently.
If called with a first argument that is a reference, they simply
call die() or warn(), as appropriate.
=head1 SEE ALSO
L<Carp::Always>,
L<Carp::Clan>
=head1 AUTHOR
The Carp module first appeared in Larry Wall's perl 5.000 distribution.
Since then it has been modified by several of the perl 5 porters.
Andrew Main (Zefram) <zefram@fysh.org> divested Carp into an independent
distribution.
=head1 COPYRIGHT
Copyright (C) 1994-2012 Larry Wall
Copyright (C) 2011, 2012 Andrew Main (Zefram) <zefram@fysh.org>
=head1 LICENSE
This module is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
| Dokaponteam/ITF_Project | xampp/perl/lib/Carp.pm | Perl | mit | 20,408 |
# 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/antarctica. Olson data version 2015g
#
# Do not edit this file directly.
#
package DateTime::TimeZone::Antarctica::Rothera;
$DateTime::TimeZone::Antarctica::Rothera::VERSION = '1.94';
use strict;
use Class::Singleton 1.03;
use DateTime::TimeZone;
use DateTime::TimeZone::OlsonDB;
@DateTime::TimeZone::Antarctica::Rothera::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' );
my $spans =
[
[
DateTime::TimeZone::NEG_INFINITY, # utc_start
62353929600, # utc_end 1976-12-01 00:00:00 (Wed)
DateTime::TimeZone::NEG_INFINITY, # local_start
62353929600, # local_end 1976-12-01 00:00:00 (Wed)
0,
0,
'zzz',
],
[
62353929600, # utc_start 1976-12-01 00:00:00 (Wed)
DateTime::TimeZone::INFINITY, # utc_end
62353918800, # local_start 1976-11-30 21:00:00 (Tue)
DateTime::TimeZone::INFINITY, # local_end
-10800,
0,
'ROTT',
],
];
sub olson_version {'2015g'}
sub has_dst_changes {0}
sub _max_year {2025}
sub _new_instance {
return shift->_init( @_, spans => $spans );
}
1;
| rosiro/wasarabi | local/lib/perl5/DateTime/TimeZone/Antarctica/Rothera.pm | Perl | mit | 1,238 |
%
% ID-BASED ACCESSOR RULES FOR activation AND access predicates
%
%
% RULE DEFINITION: name(TrialId, Id, Name)/3
% DESCRIPTION: get the *Name* of an activation or access (*Id*)
% in a given trial (*TrialId*).
% Note that accesses Ids start with a 'f'.
%
name(_, [], []).
name(TrialId, [Id|Ids], [Name|Names]) :- name(TrialId, Id, Name), name(TrialId, Ids, Names).
name(TrialId, Id, Name) :- activation(TrialId, Id, Name, _, _, _, _).
name(TrialId, Id, Name) :- access(TrialId, Id, Name, _, _, _, _, _).
%
% RULE DEFINITION: timestamp_id(TrialId, Id, Timestamp, start|finish)/4
% DESCRIPTION: get the *Timestamp* of an activation (*Id*)
% in a given trial (*TrialId*).
%
timestamp_id(TrialId, Id, Start, start) :- activation(TrialId, Id, _, _, Start, _, _).
timestamp_id(TrialId, Id, Finish, finish) :- activation(TrialId, Id, _, _, _, Finish, _).
%
% RULE DEFINITION: timestamp_id(TrialId, Id, Timestamp)/3
% DESCRIPTION: get the *Timestamp* of an access (*Id*)
% in a given trial (*TrialId*).
%
timestamp_id(TrialId, Id, Timestamp) :- access(TrialId, Id, _, _, _, _, Timestamp, _).
%
% RULE DEFINITION: duration_id(TrialId, Id, Duration)/3
% DESCRIPTION: get the *Duration* of an activation (*Id*)
% in a given trial (*TrialId*).
%
duration_id(TrialId, Id, Duration) :- timestamp_id(TrialId, Id, Start, start), timestamp_id(TrialId, Id, Finish, finish), Duration is Finish - Start.
%
% RULE DEFINITION: successor_id(TrialId, Before, After)/3
% DESCRIPTION: match activations or accesses that ocurred *Before*
% other activations or accesses (*After*)
% in a given trial (*TrialId*).
% Note that called activations are successors of the caller
%
successor_id(TrialId, Before, After) :- timestamp_id(TrialId, Before, TS1, start), timestamp_id(TrialId, After, TS2, finish), TS1 =< TS2.
successor_id(TrialId, Before, After) :- timestamp_id(TrialId, Before, TS1), timestamp_id(TrialId, After, TS2), TS1 =< TS2.
%
% RULE DEFINITION: activation_id(TrialId, Caller, Called)/3
% DESCRIPTION: match *Called* activations by *Caller*
% in a given trial (*TrialId*).
%
activation_id(TrialId, Caller, Called) :- activation(TrialId, Called, _, _, _, _, Caller).
%
% RULE DEFINITION: mode_id(TrialId, Id, Mode)/3
% DESCRIPTION: match *Mode* of an access (*Id*)
% in a given trial (*TrialId*).
%
mode_id(TrialId, Id, Mode) :- access(TrialId, Id, _, Mode, _, _, _, _).
%
% RULE DEFINITION: read_mode(Mode)/1
% DESCRIPTION: read modes: r, a, +
%
read_mode(Mode) :- sub_atom(Mode, _, _, _, 'r').
read_mode(Mode) :- sub_atom(Mode, _, _, _, '+').
%
% RULE DEFINITION: write_mode(Mode)/1
% DESCRIPTION: write modes: w, x, a, +
%
write_mode(Mode) :- sub_atom(Mode, _, _, _, 'w').
write_mode(Mode) :- sub_atom(Mode, _, _, _, 'x').
write_mode(Mode) :- sub_atom(Mode, _, _, _, 'a').
write_mode(Mode) :- sub_atom(Mode, _, _, _, '+').
%
% RULE DEFINITION: file_read_id(TrialId, Id)/2
% DESCRIPTION: match read accesses (*Id*)
% in a given trial (*TrialId*).
%
file_read_id(TrialId, Id) :- mode_id(TrialId, Id, Mode), once(read_mode(Mode)).
%
% RULE DEFINITION: file_written_id(TrialId, Id)/2
% DESCRIPTION: match written accesses (*Id*)
% in a given trial (*TrialId*).
%
file_written_id(TrialId, Id) :- mode_id(TrialId, Id, Mode), once(write_mode(Mode)).
%
% RULE DEFINITION: hash_id(TrialId, Id, Hash, before|after)/4
% DESCRIPTION: match *Hash* of accesses (*Id*)
% in a given trial (*TrialId*).
%
hash_id(TrialId, Id, Hash, before) :- access(TrialId, Id, _, _, Hash, _, _, _).
hash_id(TrialId, Id, Hash, after) :- access(TrialId, Id, _, _, _, Hash, _, _).
%
% RULE DEFINITION: changed_id(TrialId, Id)/2
% DESCRIPTION: match accesses (*Id*) that changed a file
% in a given trial (*TrialId*).
%
changed_id(TrialId, Id) :- hash_id(TrialId, Id, Hash1, before), hash_id(TrialId, Id, Hash2, after), Hash1 \== Hash2.
%
% RULE DEFINITION: access_id(TrialId, ActivationId, Id)/3
% DESCRIPTION: match accesses (*Id*) to activations (*ActivationId*)
% in a given trial (*TrialId*).
%
access_id(TrialId, ActivationId, Id) :- access(TrialId, Id, _, _, _, _, _, ActivationId).
%
% ID-BASED INFERENCE RULES
%
%
% RULE DEFINITION: activation_stack_id(TrialId, Called, Stack)/3
% DESCRIPTION: match caller *Stack* from a *Called* activation
% in a given trial (*TrialId*).
%
activation_stack_id(TrialId, Called, []) :- activation_id(TrialId, nil, Called).
activation_stack_id(TrialId, Called, [Caller|Callers]) :- activation_id(TrialId, Caller, Called), activation_stack_id(TrialId, Caller, Callers).
%
% RULE DEFINITION: indirect_activation_id(TrialId, Caller, Called)/3
% DESCRIPTION: match *Caller* activations that belongs to *Called* stack
% in a given trial (*TrialId*).
%
indirect_activation_id(TrialId, Caller, Called) :- activation_stack_id(TrialId, Called, Callers), member(Caller, Callers).
%
% RULE DEFINITION: activation_influence_id(TrialId, Influencer, Influenced)/3
% DESCRIPTION: match *Influencer* activations that might have *Influenced* an activation
% in a given trial (*TrialId*).
% This a Naive rule! It considers just the succession order
%
activation_influence_id(TrialId, Influencer, Influenced) :- successor_id(TrialId, Influencer, Influenced).
%
% RULE DEFINITION: access_stack_id(TrialId, File, Stack)/3
% DESCRIPTION: match *File* accesses from an activation *Stack*
% in a given trial (*TrialId*).
%
access_stack_id(TrialId, File, [Function|Functions]) :- access_id(TrialId, Function, File), activation_stack_id(TrialId, Function, Functions).
%
% RULE DEFINITION: indirect_access_id(TrialId, Activation, File)/3
% DESCRIPTION: match *File* accesses that belongs to an *Activation* stack
% in a given trial (*TrialId*).
%
indirect_access_id(TrialId, Function, File) :- access_stack_id(TrialId, File, Functions), member(Function, Functions).
%
% RULE DEFINITION: activation_influence_id(TrialId, Influencer, Influenced)/3
% DESCRIPTION: match *Influencer* activations that might have *Influenced* an access
% in a given trial (*TrialId*).
% This a Naive rule! It considers just the succession order
%
access_influence_id(TrialId, Influencer, Influenced) :- file_read_id(TrialId, Influencer), file_written_id(TrialId, Influenced), successor_id(TrialId, Influencer, Influenced), access_id(TrialId, F1, Influencer), access_id(TrialId, F2, Influenced), activation_influence_id(TrialId, F1, F2).
%
% NAME-BASED ACCESSOR RULES
%
%
% RULE DEFINITION: timestamp(TrialId, Name, Timestamp, start|finish)/4
% DESCRIPTION: get the *Timestamp* of an activation by *Name*
% in a given trial (*TrialId*).
%
timestamp(TrialId, Name, Timestamp, Moment) :- timestamp_id(TrialId, Id, Timestamp, Moment), name(TrialId, Id, Name).
%
% RULE DEFINITION: timestamp(TrialId, Name, Timestamp)/3
% DESCRIPTION: get the *Timestamp* of an access by *Name*
% in a given trial (*TrialId*).
%
timestamp(TrialId, Name, Timestamp) :- timestamp_id(TrialId, Id, Timestamp), name(TrialId, Id, Name).
%
% RULE DEFINITION: duration(TrialId, Name, Duration)/3
% DESCRIPTION: get the *Duration* of an activation by *Name*
% in a given trial (*TrialId*).
%
duration(TrialId, Name, Duration) :- duration_id(TrialId, Id, Duration), name(TrialId, Id, Name).
%
% RULE DEFINITION: successor(TrialId, Before, After)/3
% DESCRIPTION: match activations or accesses by name that ocurred *Before*
% other activations or accesses by name (*After*)
% in a given trial (*TrialId*).
% Note that called activations are successors of the caller
%
successor(TrialId, Before, After) :- successor_id(TrialId, BeforeId, AfterId), name(TrialId, BeforeId, Before), name(TrialId, AfterId, After).
%
% RULE DEFINITION: mode(TrialId, Name, Mode)/3
% DESCRIPTION: match *Mode* of an access by file *Name*
% in a given trial (*TrialId*).
%
mode(TrialId, Name, Mode) :- mode_id(TrialId, Id, Mode), name(TrialId, Id, Name).
%
% RULE DEFINITION: file_read(TrialId, Name)/2
% DESCRIPTION: match read accesses by *Name*
% in a given trial (*TrialId*).
%
file_read(TrialId, Name) :- file_read_id(TrialId, Id), name(TrialId, Id, Name).
% RULE DEFINITION: file_written(TrialId, Name)/2
% DESCRIPTION: match written accesses by *Name*
% in a given trial (*TrialId*).
%
file_written(TrialId, Name) :- file_written_id(TrialId, Id), name(TrialId, Id, Name).
%
% RULE DEFINITION: hash(TrialId, Name, Hash, before|after)/4
% DESCRIPTION: match *Hash* of accesses by *Name*
% in a given trial (*TrialId*).
%
hash(TrialId, Name, Hash, Moment) :- hash_id(TrialId, Id, Hash, Moment), name(TrialId, Id, Name).
%
% RULE DEFINITION: changed(TrialId, Name)/2
% DESCRIPTION: match accesses by *Name* that changed a file
% in a given trial (*TrialId*).
%
changed(TrialId, Name) :- changed_id(TrialId, Id), name(TrialId, Id, Name).
%
% NAME-BASED INFERENCE RULES
%
%
% RULE DEFINITION: activation_stack(TrialId, Called, Callers)/3
% DESCRIPTION: match caller *Stack* from a *Called* activation by name
% in a given trial (*TrialId*).
%
activation_stack(TrialId, Called, Callers) :- activation_stack_id(TrialId, CalledId, CallerIds), name(TrialId, CalledId, Called), name(TrialId, CallerIds, Callers).
% RULE DEFINITION: indirect_activation(TrialId, Caller, Called)/3
% DESCRIPTION: match *Caller* activations by name that belongs to *Called* stack
% in a given trial (*TrialId*).
%
indirect_activation(TrialId, Caller, Called) :- indirect_activation_id(TrialId, CallerId, CalledId), name(TrialId, CalledId, Called), name(TrialId, CallerId, Caller).
%
% RULE DEFINITION: activation_influence(TrialId, Influencer, Influenced)/3
% DESCRIPTION: match *Influencer* activations by name that might have *Influenced* an activation
% in a given trial (*TrialId*).
% This a Naive rule! It considers just the succession order
%
activation_influence(TrialId, Influencer, Influenced) :- activation_influence_id(TrialId, InfluencerId, InfluencedId), name(TrialId, InfluencerId, Influencer), name(TrialId, InfluencedId, Influenced).
%
% RULE DEFINITION: access_stack(TrialId, File, Stack)/3
% DESCRIPTION: match *File* accesses by name from an activation *Stack*
% in a given trial (*TrialId*).
%
access_stack(TrialId, File, Activations) :- access_stack_id(TrialId, FileId, ActivationsId), name(TrialId, FileId, File), name(TrialId, ActivationsId, Activations).
%
% RULE DEFINITION: indirect_access(TrialId, Activation, File)/3
% DESCRIPTION: match *File* accesses by name that belongs to an *Activation* stack
% in a given trial (*TrialId*).
%
indirect_access(TrialId, Activation, File) :- indirect_access_id(TrialId, Activationid, FileId), name(TrialId, Activationid, Activation), name(TrialId, FileId, File).
%
% RULE DEFINITION: access_influence(TrialId, Influencer, Influenced)/3
% DESCRIPTION: match *Influencer* activations by name that might have *Influenced* an access
% in a given trial (*TrialId*).
% This a Naive rule! It considers just the succession order
%
access_influence(TrialId, Influencer, Influenced) :- access_influence_id(TrialId, InfluencerId, InfluencedId), name(TrialId, InfluencerId, Influencer), name(TrialId, InfluencedId, Influenced).
%
% SLICING-BASED ACCESSOR RULES
%
%
% RULE DEFINITION: dep(TrialId, Dependent, Supplier)/3
% DESCRIPTION: match *Dependent* variables to *Supplier* variables
% in a given trial (*TrialId*).
%
dep(TrialId, Dependent, Supplier) :- dependency(TrialId, _, _, Dependent, _, Supplier).
%
% RULE DEFINITION: usage_or_assign(TrialId, Name, Line, Id)/4
% DESCRIPTION: match *Name* and *Line* of variable (*Id*) usages or assignments
% in a given trial (*TrialId*).
%
usage_or_assign(TrialId, Name, Line, Id) :- usage(TrialId, _, Id, _, Name, Line).
usage_or_assign(TrialId, Name, Line, Id) :- variable(TrialId, _, Id, Name, Line, _, _).
%
% RULE DEFINITION: var_name(TrialId, Id, Name)/3
% DESCRIPTION: match *Name* of variable (*Id*)
% in a given trial (*TrialId*).
%
var_name(TrialId, Id, Name) :- variable(TrialId, _, Id, Name, _, _, _).
%
% RULE DEFINITION: var_line(TrialId, Id, Line)/3
% DESCRIPTION: match *Line* of variable (*Id*)
% in a given trial (*TrialId*).
%
var_line(TrialId, Id, Line) :- variable(TrialId, _, Id, _, Line, _, _).
%
% RULE DEFINITION: var_info(TrialId, Id, Variable)/3
% DESCRIPTION: get *Variable* by variable *Id*
% in a given trial (*TrialId*).
%
var_info(TrialId, Id, variable(TrialId, Activation, Id, Name, Line, Value, Timestamp)) :- variable(TrialId, Activation, Id, Name, Line, Value, Timestamp).
%
% SLICING-BASED INFERENCE RULES
%
%
% RULE DEFINITION: slice(TrialId, Dependent, Dependencies)/3
% DESCRIPTION: get *Dependencies* of *Dependent* variable
% in a given trial (*TrialId*).
%
slice(_, [],[]).
slice(TrialId, [Id|L1], L2) :- slice(TrialId, Id, L3), slice(TrialId, L1, L4), union(L3, L4, L2), !.
slice(TrialId, Id, [Id|L1]) :- bagof(X, dep(TrialId, Id, X),L2), !, slice(TrialId, L2, L1).
slice(_, Id, [Id]).
%
% RULE DEFINITION: variable_name_dependencies(TrialId, Dependent, Names)/3
% DESCRIPTION: get name *Dependencies* of *Dependent* variable
% in a given trial (*TrialId*).
%
variable_name_dependencies(TrialId, Id, Names) :- slice(TrialId, Id, X), maplist(var_name(TrialId), X, Names).
%
% RULE DEFINITION: variable_line_dependencies(TrialId, Dependent, Lines)/3
% DESCRIPTION: get line *Dependencies* of *Dependent* variable
% in a given trial (*TrialId*).
%
variable_line_dependencies(TrialId, Id, Lines) :- slice(TrialId, Id, X), maplist(var_line(TrialId), X, Lines).
%
% RULE DEFINITION: variable_dependencies_info(TrialId, Dependent, Infos)/3
% DESCRIPTION: get variable *Dependencies* of *Dependent* variable
% in a given trial (*TrialId*).
%
variable_dependencies_info(TrialId, Id, Infos) :- slice(TrialId, Id, X), maplist(var_info(TrialId), X, Infos).
%
% RULE DEFINITION: variables_variables_dependency(TrialId, Dependents, Dependencies)/3
% DESCRIPTION: match *Dependencies* of *Dependents*
% in a given trial (*TrialId*).
%
variables_variables_dependency(_, [],[]).
variables_variables_dependency(TrialId, [Dependent|Dependents], Dependencies) :- variable_variables_dependency(TrialId, Dependent, SomeDependencies),
variables_variables_dependency(TrialId, Dependents, OtherDependencies),
ord_union(SomeDependencies, OtherDependencies, Dependencies).
%
% RULE DEFINITION: variable_variables_dependency(TrialId, Dependent, Dependencies)/3
% DESCRIPTION: match *Dependencies* of a *Dependent*
% in a given trial (*TrialId*).
%
variable_variables_dependency(TrialId, Dependent, Dependencies) :- variable(TrialId, _, Dependent, _, _, _, _),
findall(Dependency, dependency(TrialId, _, _, Dependent, _, Dependency), DirectDependenciesWithDuplicates),
sort(DirectDependenciesWithDuplicates, DirectDependencies),
variables_variables_dependency(TrialId, DirectDependencies, IndirectDependencies),
ord_union(DirectDependencies, IndirectDependencies, Dependencies).
%
% RULE DEFINITION: variables_activations_dependency(TrialId, DependentVariables, DependencyActivations)/3
% DESCRIPTION: match *DependencyActivations* of *DependentVariables*
% in a given trial (*TrialId*).
%
variables_activations_dependency(_, [], []).
variables_activations_dependency(TrialId, [DependentVariable|DependentVariables], DependencyActivations) :- variable_activations_dependency(TrialId, DependentVariable, SomeDependencyActivations),
variables_activations_dependency(TrialId, DependentVariables, OtherDependencyActivations),
ord_union(SomeDependencyActivations, OtherDependencyActivations, DependencyActivations).
%
% RULE DEFINITION: variable_activations_dependency(TrialId, DependentVariable, DependencyActivations)/3
% DESCRIPTION: match *DependencyActivations* of a *DependentVariable*
% in a given trial (*TrialId*).
%
%variable_activations_dependency(TrialId, DependentVariable, DependencyActivations)
variable_activations_dependency(TrialId, DependentVariable, DependencyActivations) :- variable_variables_dependency(TrialId, DependentVariable, DependencyVariables),
findall(DependencyActivation, (member(DependencyVariable, DependencyVariables), variable(TrialId, DependencyActivation, DependencyVariable, _, _, _, _)), DependencyActivationsWithDuplicates),
sort(DependencyActivationsWithDuplicates, DependencyActivations).
%
% RULE DEFINITION: activation_activations_dependency(TrialId, Dependent, Dependencies)/3
% DESCRIPTION: match *Dependencies* of a *Dependent* activation
% in a given trial (*TrialId*).
%
activation_activations_dependency(TrialId, DependentActivation, DependencyActivations) :- findall(DependentVariable, variable(TrialId, DependentActivation, DependentVariable, _, _, _, _), DependentVariablesWithDuplicates),
sort(DependentVariablesWithDuplicates, DependentVariables),
variables_activations_dependency(TrialId, DependentVariables, AllDependencyActivations),
ord_subtract(AllDependencyActivations, [DependentActivation], DependencyActivations). | gems-uff/noworkflow | capture/noworkflow/resources/rules.pl | Perl | mit | 18,527 |
#!/usr/bin/perl -w
use strict;
die "Usage: trimFastq3.pl <fastq> <#bases>\n" unless @ARGV == 2;
open(IN,$ARGV[0]) or die "Couldn't open $ARGV[0]: $!\n";
my $lineCount = 0;
while(<IN>) {
chomp;
next if !$_;
next unless /^\@HWI/;
print "$_\n";
chomp(my $seq=<IN>);
my $len = length($seq);
my $subseq = substr($seq,0,$len-$ARGV[1]);
# print "$seq\n";
print "$subseq\n";
chomp($_=<IN>);
print "$_\n";
chomp(my $qual=<IN>);
my $subqual = substr($qual,0,$len-$ARGV[1]);
# print "$qual\n";
print "$subqual\n";
# last;
}
close IN;
| cckim47/kimlab | general/trimFastq3.pl | Perl | mit | 589 |
package EVENTS;
##
## syntax:
## cmd?key1=value1&key2=value2
## cmd@YYYYMMDDHHMMSS?key1=value1&key2=value2
## cmd@YYYYMMDD?key1=value1&key2=value2
##
sub parse_macro {
my ($txt) = @_;
my @CMDS = ();
foreach my $line (split(/[\n\r]+/,$txt)) {
my %ref = ();
push @CMDS, [ $ts, $api, $ref ];
}
return(\@CMDS);
}
1;
| CommerceRack/backend | lib/EVENTS.pm | Perl | mit | 340 |
package Paws::CloudTrail::DeleteTrail;
use Moose;
has Name => (is => 'ro', isa => 'Str', required => 1);
use MooseX::ClassAttribute;
class_has _api_call => (isa => 'Str', is => 'ro', default => 'DeleteTrail');
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CloudTrail::DeleteTrailResponse');
class_has _result_key => (isa => 'Str', is => 'ro');
1;
### main pod documentation begin ###
=head1 NAME
Paws::CloudTrail::DeleteTrail - Arguments for method DeleteTrail on Paws::CloudTrail
=head1 DESCRIPTION
This class represents the parameters used for calling the method DeleteTrail on the
AWS CloudTrail service. Use the attributes of this class
as arguments to method DeleteTrail.
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DeleteTrail.
As an example:
$service_obj->DeleteTrail(Att1 => $value1, Att2 => $value2, ...);
Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
=head1 ATTRIBUTES
=head2 B<REQUIRED> Name => Str
Specifies the name or the CloudTrail ARN of the trail to be deleted.
The format of a trail ARN is:
C<arn:aws:cloudtrail:us-east-1:123456789012:trail/MyTrail>
=head1 SEE ALSO
This class forms part of L<Paws>, documenting arguments for method DeleteTrail in L<Paws::CloudTrail>
=head1 BUGS and CONTRIBUTIONS
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
=cut
| ioanrogers/aws-sdk-perl | auto-lib/Paws/CloudTrail/DeleteTrail.pm | Perl | apache-2.0 | 1,689 |
new14(A,B,C,D,E,F) :- A=0.
new10(A,B,C,D,E) :- F=1, A>=100, new8(A,B,C,D,F).
new10(A,B,C,D,E) :- F=0, A=<99, new8(A,B,C,D,F).
new9(A,B,C,D,E) :- C=< -1, new10(A,B,C,D,E).
new9(A,B,C,D,E) :- F=0, C>=0, new8(A,B,C,D,F).
new8(A,B,C,D,E) :- new14(E,A,B,C,D,E).
new7(A,B,C,D,E) :- F=1, C=<0, new8(A,B,C,D,F).
new7(A,B,C,D,E) :- C>=1, new9(A,B,C,D,E).
new6(A,B,C,D,E) :- F=A+C, A=<99, new6(F,B,C,D,E).
new6(A,B,C,D,E) :- A>=100, new7(A,B,C,D,E).
new5(A,B,C,D,E) :- C>=1, new6(A,B,C,D,E).
new5(A,B,C,D,E) :- C=<0, new7(A,B,C,D,E).
new4(A,B,C,D,E) :- new5(A,B,F,F,E).
new3(A,B,C,D,E) :- new4(F,F,C,D,E).
new2 :- new3(A,B,C,D,E).
new1 :- new2.
false :- new1.
| bishoksan/RAHFT | benchmarks_scp/misc/programs-clp/SVCOMP13-loops-terminator_03_unsafe.map.c.map.pl | Perl | apache-2.0 | 650 |
#
# 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 cloud::azure::network::virtualnetwork::plugin;
use strict;
use warnings;
use base qw(centreon::plugins::script_custom);
sub new {
my ( $class, %options ) = @_;
my $self = $class->SUPER::new( package => __PACKAGE__, %options );
bless $self, $class;
$self->{version} = '0.1';
%{ $self->{modes} } = (
'list-virtual-networks' => 'cloud::azure::network::virtualnetwork::mode::listvirtualnetworks',
'peerings-status' => 'cloud::azure::network::virtualnetwork::mode::peeringsstatus',
);
$self->{custom_modes}{azcli} = 'cloud::azure::custom::azcli';
$self->{custom_modes}{api} = 'cloud::azure::custom::api';
return $self;
}
sub init {
my ($self, %options) = @_;
$self->{options}->add_options(arguments =>
{
'api-version:s' => { name => 'api_version', default => '2018-01-01' },
});
$self->SUPER::init(%options);
}
1;
__END__
=head1 PLUGIN DESCRIPTION
Check Microsoft Azure Virtual Network.
=cut
| Sims24/centreon-plugins | cloud/azure/network/virtualnetwork/plugin.pm | Perl | apache-2.0 | 1,858 |
package Google::Ads::AdWords::v201809::AccountLabel;
use strict;
use warnings;
__PACKAGE__->_set_element_form_qualified(1);
sub get_xmlns { 'https://adwords.google.com/api/adwords/mcm/v201809' };
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 %id_of :ATTR(:get<id>);
my %name_of :ATTR(:get<name>);
__PACKAGE__->_factory(
[ qw( id
name
) ],
{
'id' => \%id_of,
'name' => \%name_of,
},
{
'id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
},
{
'id' => 'id',
'name' => 'name',
}
);
} # end BLOCK
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201809::AccountLabel
=head1 DESCRIPTION
Perl data type class for the XML Schema defined complexType
AccountLabel from the namespace https://adwords.google.com/api/adwords/mcm/v201809.
A label that can be attached to accounts. A manager may attach labels to accounts that s/he manages (either directly or indirectly). <p>Note that these are not interchangeable with campaign management labels, and are owned by manager customers.
=head2 PROPERTIES
The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:
=over
=item * id
=item * name
=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/AccountLabel.pm | Perl | apache-2.0 | 1,645 |
#
# Copyright 2016 Centreon (http://www.centreon.com/)
#
# Centreon is a full-fledged industry-strength solution that meets
# the needs in IT infrastructure and temperatureplication 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.temperatureache.org/licenses/LICENSE-2.0
#
# Unless required by temperatureplicable 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::digi::standard::snmp::mode::temperature;
use base qw(centreon::plugins::templates::counter);
use strict;
use warnings;
sub set_counters {
my ($self, %options) = @_;
$self->{maps_counters_type} = [
{ name => 'temperature', type => 0, skipped_code => { -10 => 1 } },
];
$self->{maps_counters}->{temperature} = [
{ label => 'device', set => {
key_values => [ { name => 'device' } ],
output_template => 'Temp Device : %d °C',
perfdatas => [
{ label => 'tempDevice', value => 'device_absolute', template => '%d',
unit => 'C' },
],
}
},
{ label => 'processor', set => {
key_values => [ { name => 'processor' } ],
output_template => 'Temp Processor : %d °C',
perfdatas => [
{ label => 'tempProcessor', value => 'processor_absolute', template => '%d',
unit => 'C' },
],
}
},
{ label => 'modem', set => {
key_values => [ { name => 'modem' } ],
output_template => 'Temp Modem : %d °C',
perfdatas => [
{ label => 'tempModem', value => 'modem_absolute', template => '%d',
unit => 'C' },
],
}
},
];
}
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 =>
{
});
return $self;
}
my $oid_temperature = '.1.3.6.1.4.1.16378.10000.3.11.0';
my $oid_processorTemperature = '.1.3.6.1.4.1.16378.10000.3.12.0';
my $oid_modemTemperature = '.1.3.6.1.4.1.16378.10000.3.13.0';
sub manage_selection {
my ($self, %options) = @_;
$self->{snmp} = $options{snmp};
$self->{temperature} = {};
$self->{results} = $self->{snmp}->get_leef(oids => [ $oid_temperature, $oid_processorTemperature, $oid_modemTemperature ],
nothing_quit => 1);
$self->{temperature} = { device => $self->{results}->{$oid_temperature} > -20 ? $self->{results}->{$oid_temperature} : undef,
processor => $self->{results}->{$oid_processorTemperature},
modem => $self->{results}->{$oid_modemTemperature} };
}
1;
__END__
=head1 MODE
Check Digi equipment temperature (sarian-monitor.mib)
=over 8
=item B<--filter-counters>
Only display some counters (regexp can be used).
Example: --filter-counters='processor|modem'
=item B<--warning-*>
Threshold warning.
Can be: 'device', 'modem', 'processor' (C).
=item B<--critical-*>
Threshold critical.
Can be: 'device', 'modem', 'processor' (C).
=back
=cut
| bcournaud/centreon-plugins | network/digi/standard/snmp/mode/temperature.pm | Perl | apache-2.0 | 3,746 |
:- use_module('../../tools/error_manager.pl',
[add_error/3, add_message/4, add_exception/4, count_errors_occured/1,
set_verbosity_level/2]).
:- use_module(pillow/pillow).
:- use_module('prolog_to_xml_swi.pl').
main(Args) :-
catch(main1(Args),E,
(add_exception(ciao_entry, "Uncaught exception:~n",[],E),
halt(1))).
main1(Args) :-
get_options(Args, Opts, [Plfile|_AX]), !,
add_message(ciao_entry, 2, "Options: ~w", Opts),
(member(help, Opts) -> fail; true),
output_xml_decl('prologtohtml.xsl'),
output_html([begin(article), nl]),
output_file_as_html_no_ann(Plfile),
output_html([end(article), nl]),
halt.
main1(_) :- print_usage.
get_options([],[],[]).
get_options([X|T],Options,OtherArgs) :-
(recognised_option(X,Opt,Values,_) ->
( append(Values, Rest, T), RT = Rest, /* extract args and insert into Opt by shared var*/
Options = [Opt|OT], OtherArgs = AT )
;
( Options = OT, OtherArgs = [X|AT],
RT = T )
),
get_options(RT,OT,AT).
usage('Usage: highlight [Options] File.pl').
recognised_option('--help',help,[],'Prints this message').
print_usage :-
usage(Msg),
format(user_error, "~w~nPossible Options are :~n", [Msg]),
print_options.
print_options :-
recognised_option(Opt,_,Args,Msg),
format(user_error, " ~w", [Opt]),
print_option_args(Args,1),
format(user_error, ": ~w~n", [Msg]),
fail.
print_options.
print_option_args([],_).
print_option_args([_|T],N) :- format(user_error, " ARG~w~n", [N]),
N1 is N+1, print_option_args(T,N1).
| leuschel/logen | weblogen/backend/highlight.pl | Perl | apache-2.0 | 1,513 |
package Paws::SES::VerifyEmailIdentity;
use Moose;
has EmailAddress => (is => 'ro', isa => 'Str', required => 1);
use MooseX::ClassAttribute;
class_has _api_call => (isa => 'Str', is => 'ro', default => 'VerifyEmailIdentity');
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::SES::VerifyEmailIdentityResponse');
class_has _result_key => (isa => 'Str', is => 'ro', default => 'VerifyEmailIdentityResult');
1;
### main pod documentation begin ###
=head1 NAME
Paws::SES::VerifyEmailIdentity - Arguments for method VerifyEmailIdentity on Paws::SES
=head1 DESCRIPTION
This class represents the parameters used for calling the method VerifyEmailIdentity on the
Amazon Simple Email Service service. Use the attributes of this class
as arguments to method VerifyEmailIdentity.
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to VerifyEmailIdentity.
As an example:
$service_obj->VerifyEmailIdentity(Att1 => $value1, Att2 => $value2, ...);
Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
=head1 ATTRIBUTES
=head2 B<REQUIRED> EmailAddress => Str
The email address to be verified.
=head1 SEE ALSO
This class forms part of L<Paws>, documenting arguments for method VerifyEmailIdentity in L<Paws::SES>
=head1 BUGS and CONTRIBUTIONS
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
=cut
| ioanrogers/aws-sdk-perl | auto-lib/Paws/SES/VerifyEmailIdentity.pm | Perl | apache-2.0 | 1,679 |
#!/usr/bin/env perl
=begin EXPLANATION
The code below represents a solver for the puzzle raised in March 2016 on ponder this
(http://www.research.ibm.com/haifa/ponderthis/challenges/March2016.html).
Here are the squarereversed numbers that I found along with their respective squares:
0 -- 0
1 -- 1
5 -- 25
6 -- 36
963 -- 927369
9867 -- 97357689
65766 -- 4325166756
69714 -- 4860041796
6317056 -- 39905196507136
90899553 -- 8262728735599809
169605719 -- 28766099917506961
4270981082 -- 18241279402801890724
96528287587 -- 9317710304478578282569
692153612536 -- 479076623346635216351296
465454256742 -- 216647665119247652454564
182921919071841 -- 33460428476925148170919129281
655785969669834 -- 430055238015804438966969587556
650700037578750084 -- 423410538904986771480057875730007056
125631041500927357539 -- 15783158588607732036935753729005140136521
673774165549097456624 -- 453971626161382585982426654790945561477376
The last solution has length 21.
My solution uses the fact that perfect squares must end in 0,1,4,5,6 and 9 (rule 1).
Assume the square s of a squarereversed number a has positions from 0 to its length-1. I will use indexing a-1 = alength-1 for shorthand.
Since a0 = s-1 (rule 2), I am disregarding perfect squares for which s-1 = 0 aside from 0 itself. (assumption 1)
My solution then becomes an iterative one. I can iterate through squarereversed numbers starting with 1,4,5,6 and 9 based on rules 1 and 2 and assumption 1. From this point, using the fact that
ai = s-(i+1), I can derive equations for a2,...,a(floor(length/2)) based on a-2,...,a(ceil(length/2))+1
so I iterate through all possible values for a-2,...,a(ceil(length/2))+1 which then determine a2,...,a(floor(length/2))
Based on the length, even or odd, my solution may solve for a(floor(length/2))+1
=end EXPLANATION
=cut
my $user_val = shift;
if ($user_val !~ /^\d+$/) {
print STDERR "You must supply a numerical argument...\n";
exit(0);
}
my @starters = (1,4,5,6,9);
my %enders = (
1 => [1,9],
4 => [2,8],
5 => [5],
6 => [4,6],
9 => [3,7]
);
my $initial_val = "0" x $user_val; #10**($user_val-1);
print "$initial_val ".length($initial_val)."\n";
my @a = split //, $initial_val;
my $length = $#a+1;
print "Length $length\n";
my $unknowns = int($length/2) - 1;
# Create the ordering
# We need to start with an initial value for
# a1, a2,..., a(# unknowns)
# no of unknowns = floor(length/2)-1
my $time1 = time;
print "$time1\n";
for $counter (0 .. ((10**$unknowns)-1)) {
# Zero fill counter
$counter = sprintf("%0".$unknowns."d", $counter);
if (($counter % 10**($unknowns-2)) == 0) {
my $time2 = time;
my $diff_time = $time2 - $time1;
print "$counter -- time $time2 $diff_time\n";
}
# Set the end answer values to the counter
my @initial = split //, $counter;
$loop_val = 0;
foreach $setting (@initial) {
$a[-2-$loop_val] = $setting;
$loop_val++;
}
foreach $starter (@starters) {
#print "$starter\n";
$a[0] = $starter;
foreach $ender (@{$enders{$starter}}) {
$a[-1] = $ender;
# After choosing the starter and ender
# here is our number
my $carry_over = $ender**2;
# Create the number
#
for $i (1 .. $unknowns) {
my $i_val = &get_next_number($i, $carry_over, \@a);
$a[$i] = $i_val % 10;
#print "carry from $i_val\n";
$carry_over = $i_val;
}
# Solve for the last number
if (($length % 2) == 0) {
# Test solution
my $test_number = join('',@a);
#print "$test_number\n";
use bigint;
my $square = $test_number**2;
# Treat number as a string
my $reverse_num = reverse $test_number;
if ($square =~ /${reverse_num}$/) {
print "$test_number -- $square\n";
}
} elsif (solve($unknowns+1, $carry_over, \@a) >= 0) {
# Test solution
my $test_number = join('',@a);
use bigint;
my $square = $test_number**2;
# Treat number as a string
my $reverse_num = reverse $test_number;
if ($square =~ /${reverse_num}$/) {
print "$test_number -- $square\n";
}
}
}
}
}
my $endtime = time;
my $diff_time2 = $endtime - $time1;
print "Time $diff_time2\n";
sub get_next_number {
my $c = shift; # current position
my $carry_over = shift; #
my $r_a = shift; # ref to array of numbers that make the number
my $val = int($carry_over/10);
# Build the equation
for $j (0 .. int($c/2)) {
if ($j == ($c/2)) {
$val += ($$r_a[-$j-1]**2);
} else {
$val += 2*($$r_a[-$j-1]*$$r_a[$j-1-$c]);
}
}
return $val;
}
sub solve {
my $c = shift; # current position
my $carry_over = shift; #
my $r_a = shift; # ref to array of numbers that make the number
for $test_val (0 .. 9) {
my $val = int($carry_over/10);
$$r_a[-1-$c] = $test_val;
# Build the equation
for $j (0 .. int($c/2)) {
if ($j == ($c/2)) {
$val += ($$r_a[-$j-1]**2);
} else {
$val += 2*($$r_a[-$j-1]*$$r_a[$j-1-$c]);
}
}
if (($val % 10) == $test_val) {
return $val % 10;
}
}
return -1;
}
| macdougt/perl-examples | ponder_this_201603.pl | Perl | apache-2.0 | 4,978 |
:- module(sample2,[],[objects]).
:- export(sample2/0).
:- use_class(library('javaobs/java/lang/String')).
:- use_class(library('javaobs/java/awt/Frame')).
:- use_class(library('javaobs/java/awt/TextField')).
:- use_class(library('javaobs/java/awt/Button')).
:- use_class(library('javaobs/java/awt/Container')).
:- use_class(library('javaobs/java/awt/GridLayout')).
:- use_class(library('javaobs/java/awt/BorderLayout')).
:- use_class(library('javaobs/java/awt/event/ActionEvent')).
:- use_class(library('javaobs/java/awt/Label')).
:- use_module(library(lists)).
:- dynamic connected/1.
sample2:-
%% Frame.
Frm new 'Frame'("Hello World"),
display(pasa),nl,
Frm:resize(300,200),
Frm:setLocation(100,100),
%% Layout.
Layout new 'GridLayout'(4,1),
Frm:setLayout(Layout),
%% Buttons grid.
BtnClear new 'Button'("Clear"),
BtnHello new 'Button'("Say Hello World"),
BtnExit new 'Button'("Exit"),
LblHello new 'Label'(""),
Frm:add(LblHello,_),
Frm:add(BtnClear,_),
Frm:add(BtnHello,_),
Frm:add(BtnExit,_),
%% Event listeners.
BtnClear:java_add_listener('java.awt.event.ActionEvent',
sample2:clear(LblHello)),
BtnHello:java_add_listener('java.awt.event.ActionEvent',
sample2:helloWorld(LblHello)),
BtnExit:java_add_listener('java.awt.event.ActionEvent',
sample2:exit(Frm)),
%% Show the calculator.
Frm:show.
waitForEver :-
waitForEver.
%%--------------------------------------------------
%% Event Handlers.
%%
exit(Frm) :-
Frm:dispose.
clear(Lbl) :-
Lbl:setText("").
helloWorld(Lbl) :-
Lbl:setText("Hello World").
| leuschel/ecce | www/CiaoDE/ciao/library/javaobs/Examples/sample2.pl | Perl | apache-2.0 | 1,652 |
#!/usr/bin/env perl
# Pragmas.
use strict;
use warnings;
# Modules.
use Indent::Block;
# Object.
my $i = Indent::Block->new(
'line_size' => 2,
'next_indent' => '',
);
# Print in scalar context.
print $i->indent(['text', 'text', 'text'])."\n";
# Output:
# text
# text
# text | gitpan/Indent | examples/ex10.pl | Perl | bsd-2-clause | 287 |
#!/usr/bin/perl
# Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its
# contributors may be used to endorse or promote products derived from this
# software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
# THE POSSIBILITY OF SUCH DAMAGE.
use strict;
use warnings;
use Getopt::Long;
use Brocade::BSC;
use Brocade::BSC::Node::NC::Vrouter::VR5600;
use Brocade::BSC::Node::NC::Vrouter::Firewall;
my $configfile = "";
my $status = undef;
my $fwcfg = undef;
GetOptions("config=s" => \$configfile) or die ("Command line args");
print ("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
print ("<<< Demo Start\n");
print ("<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
my $bvc = new Brocade::BSC(cfgfile => $configfile);
my $vRouter = new Brocade::BSC::Node::NC::Vrouter::VR5600(cfgfile => $configfile,
ctrl=>$bvc);
print "<<< 'Controller': $bvc->{ipAddr}, '"
. "$vRouter->{name}': $vRouter->{ipAddr}\n\n";
$status = $bvc->add_netconf_node($vRouter);
$status->ok or die "!!! Demo terminated, reason: ${\$status->msg}\n";
print "<<< '$vRouter->{name}' added to the Controller\n\n";
sleep(2);
$status = $bvc->check_node_conn_status($vRouter->{name});
$status->connected or die "!!! Demo terminated, reason: ${\$status->msg}\n";
print "<<< '$vRouter->{name}' is connected to the Controller\n\n";
show_firewalls_cfg($vRouter);
my $fw_group = "FW-ACCEPT-SRC-172_22_17_108";
print "<<< Create new firewall instance '$fw_group' on ' $vRouter->{name}'\n\n";
my $firewall = new Brocade::BSC::Node::NC::Vrouter::Firewall;
$firewall->add_group($fw_group);
$firewall->add_rule($fw_group, 33,
'action' => 'accept',
'src_addr' => '172.22.17.108');
$status = $vRouter->create_firewall_instance($firewall);
$status->ok or die "!!! Demo terminated, reason: ${\$status->msg}\n";
print "Firewall instance '$fw_group' was successfully created\n\n";
print "<<< Show content of the firewall instance "
. "'$fw_group' on '$vRouter->{name}'\n";
($status, $fwcfg) = $vRouter->get_firewall_instance_cfg($fw_group);
$status->ok or die "!!! Demo terminated, reason: ${\$status->msg}\n";
print "Firewall instance '" . $fw_group . "':\n";
print JSON->new->canonical->pretty->encode(JSON::decode_json($fwcfg)) . "\n\n";
show_firewalls_cfg($vRouter);
print "<<< Remove firewall instance '$fw_group' on '$vRouter->{name}'\n";
$status = $vRouter->delete_firewall_instance($firewall);
$status->ok or die "!!! Demo terminated, reason: ${\$status->msg}\n";
print "Firewall instance '$fw_group' was successfully deleted\n\n";
show_firewalls_cfg($vRouter);
print ">>> Remove '$vRouter->{name}' NETCONF node from the Controller\n";
$status = $bvc->delete_netconf_node($vRouter);
$status->ok or die "!!! Demo terminated, reason: ${\$status->msg}\n";
print "'$vRouter->{name}' NETCONF node was successfully removed from the Controller\n\n";
print ("\n");
print (">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
print (">>> Demo End\n");
print (">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n");
sub show_firewalls_cfg {
my $vRouter = shift;
print "<<< Show firewalls configuration of the '$vRouter->{name}'\n\n";
($status, $fwcfg) = $vRouter->get_firewalls_cfg();
$status->ok or die "!!! Demo terminated, reason: ${\$status->msg}\n";
print "'$vRouter->{name}' firewalls config:\n";
print JSON->new->canonical->pretty->encode(JSON::decode_json($fwcfg)) . "\n";
}
| BRCDcomm/perlbscsamples | 1.3.0/samplenetconf/demos/vr_demo4.pl | Perl | bsd-3-clause | 4,877 |
package XAQ; # Exoplanet Archive Query API wrapper
=head1 Name
XAQ.pm - Generate and Execute queries to the NASA Exoplanet Archive
=head1 Synopsis
use lib 'Kepler-Discoveries/lib'; # insert correct path here
use XAQ;
=head1 Description
The XAQ package is used to build URL-based queries to the Exoplanet Archive
in a way that takes care of special characters and allows for correct handling
of multiple conditions on WHERE queries, etc.
=cut
use strict;
use warnings;
use LWP::Simple;
our $DEFAULT_INTERNAL=0;
my $BURL="http://exoplanetarchive.ipac.caltech.edu";
my $APIQ="cgi-bin/nstedAPI/nph-nstedAPI?";
my $WC='%25'; # wildcard character
my $DELIM='\|'; # we used pipe-delimited output:
# easier to parse than CSV with fields that may have embedded commas
sub wc { return $WC }
sub delim { return $DELIM }
sub set_default_internal { $DEFAULT_INTERNAL=1 }
sub set_default_external { $DEFAULT_INTERNAL=0 }
# the constructor can take an alternative base url as an optional argument
# data elements are:
# b: (simple string) base URL for queries
# a: (simple string) API query prefix
# q: (array ref) list of query items
# w: (array ref) list of where SELECT logic items
sub new {
my $class=shift;
my $s={};
my $self=bless {}, $class;
$self->{a}=$APIQ;
if ($DEFAULT_INTERNAL) { $self->set_internal_site() } else { $self->set_external_site() }
return $self->clear()->bar_format();
}
sub set_internal_site { my $self=shift; $self->{b}=$BURL.":8000" }
sub set_external_site { my $self=shift; $self->{b}=$BURL }
sub base_url { my $self=shift; return $self->{b} }
# these mutators return a reference to the object to allow cascading calls
# i.e., $object->clear()->bar_format(...)->add_where(...)->add_where(...)
sub clear { my $self=shift; $self->{q}=[]; $self->{w}=[]; return $self }
sub add_query { my $self=shift; push @{$self->{q}}, @_; return $self }
sub add_where { my $self=shift; push @{$self->{w}}, shift(); return $self }
sub from_table { my $self=shift; $self->add_query("table=".shift()); return $self }
sub bar_format { my $self=shift; $self->add_query("format=bar"); return $self }
sub select_all { my $self=shift; $self->add_query("select=*"); return $self }
sub select_col { my $self=shift; $self->add_query("select=".join(',',@_)); return $self }
sub select_distinct_col { my $self=shift; $self->add_query('select=distinct%1E'.join(',',@_)); return $self }
sub like { my $self=shift; my ($k,$v)=@_; $self->add_where("$k+like+'$v'"); return $self }
sub equals_str { my $self=shift; my ($k,$v)=@_; $self->add_where("$k='$v'"); return $self }
# execute a query and provide the result as a single long string
# result takes a list of arguments for query logic additional queries,
# typically specifying which table to use for the query. Suggested
# usage is to call one of the "synonyms" for result(), below, which provide
# the correct argument to result for each table.
sub result {
my $self=shift;
$self->add_query(@_) if scalar(@_); # add any additional query items on argument list
if (scalar(@{$self->{w}})) { # have to handle where items explicitly to combine logic
my $w="where=".join("+AND+",@{$self->{w}});
$self->add_query($w);
}
my $q=$self->base_url().'/'.$APIQ.join("\&",@{$self->{q}});
print STDERR "Executing API Query-->$q<--\n";
return get($q);
}
# execute query the query on a specific table -- just synonyms for result() from the appropriate table
sub exoplanets { return shift()->from_table('exoplanets')->result }
sub keplernames { return shift()->from_table('keplernames')->result }
sub cumulative { return shift()->from_table('cumulative')->result }
sub keplerstellar { return shift()->from_table('keplerstellar')->result }
sub q1_q16_tce { return shift()->from_table('q1_q16_tce')->result }
sub q1_q16_koi { return shift()->from_table('q1_q16_koi')->result }
sub q1_q17_tce { return shift()->from_table('q1_q17_tce')->result }
sub q1_q17_koi { return shift()->from_table('q1_q17_koi')->result }
1;
=head1 License
Copyright (c) 2014, California Institute of Technology
All rights reserved. Based on research funded by NASA.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the California Institute of Technology (Caltech) nor the names
of its contributors may be used to endorse or promote products derived from this
software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=head1 Auther and Version
Version 2015-07-27-a
Dr. David A. Imel, <imel@caltech.edu>
=cut
| Caltech-IPAC/Kepler-Discoveries | lib/XAQ.pm | Perl | bsd-3-clause | 6,033 |
########################################################################
# Bio::KBase::ObjectAPI::KBaseFBA::DB::TemplateReaction - This is the moose object corresponding to the KBaseFBA.TemplateReaction object
# Authors: Christopher Henry, Scott Devoid, Paul Frybarger
# Contact email: chenry@mcs.anl.gov
# Development location: Mathematics and Computer Science Division, Argonne National Lab
########################################################################
package Bio::KBase::ObjectAPI::KBaseFBA::DB::TemplateReaction;
use Bio::KBase::ObjectAPI::BaseObject;
use Moose;
use namespace::autoclean;
extends 'Bio::KBase::ObjectAPI::BaseObject';
# PARENT:
has parent => (is => 'rw', isa => 'Ref', weak_ref => 1, type => 'parent', metaclass => 'Typed');
# ATTRIBUTES:
has uuid => (is => 'rw', lazy => 1, isa => 'Str', type => 'msdata', metaclass => 'Typed',builder => '_build_uuid');
has _reference => (is => 'rw', lazy => 1, isa => 'Str', type => 'msdata', metaclass => 'Typed',builder => '_build_reference');
has GapfillDirection => (is => 'rw', isa => 'Str', printOrder => '-1', default => '=', type => 'attribute', metaclass => 'Typed');
has reverse_penalty => (is => 'rw', isa => 'Num', printOrder => '-1', type => 'attribute', metaclass => 'Typed');
has compartment_ref => (is => 'rw', isa => 'Str', printOrder => '-1', required => 1, type => 'attribute', metaclass => 'Typed');
has base_cost => (is => 'rw', isa => 'Num', printOrder => '-1', type => 'attribute', metaclass => 'Typed');
has reaction_ref => (is => 'rw', isa => 'Str', printOrder => '-1', required => 1, type => 'attribute', metaclass => 'Typed');
has complex_refs => (is => 'rw', isa => 'ArrayRef', printOrder => '-1', type => 'attribute', metaclass => 'Typed');
has direction => (is => 'rw', isa => 'Str', printOrder => '1', type => 'attribute', metaclass => 'Typed');
has forward_penalty => (is => 'rw', isa => 'Num', printOrder => '-1', type => 'attribute', metaclass => 'Typed');
has type => (is => 'rw', isa => 'Str', printOrder => '1', type => 'attribute', metaclass => 'Typed');
has id => (is => 'rw', isa => 'Str', printOrder => '0', required => 1, type => 'attribute', metaclass => 'Typed');
# LINKS:
has compartment => (is => 'rw', type => 'link(Biochemistry,compartments,compartment_ref)', metaclass => 'Typed', lazy => 1, builder => '_build_compartment', clearer => 'clear_compartment', isa => 'Bio::KBase::ObjectAPI::KBaseBiochem::Compartment', weak_ref => 1);
has reaction => (is => 'rw', type => 'link(Biochemistry,reactions,reaction_ref)', metaclass => 'Typed', lazy => 1, builder => '_build_reaction', clearer => 'clear_reaction', isa => 'Bio::KBase::ObjectAPI::KBaseBiochem::Reaction', weak_ref => 1);
has complexs => (is => 'rw', type => 'link(Mapping,complexes,complex_refs)', metaclass => 'Typed', lazy => 1, builder => '_build_complexs', clearer => 'clear_complexs', isa => 'ArrayRef');
# BUILDERS:
sub _build_reference { my ($self) = @_;return $self->parent()->_reference().'/templateReactions/id/'.$self->id(); }
sub _build_uuid { my ($self) = @_;return $self->_reference(); }
sub _build_compartment {
my ($self) = @_;
return $self->getLinkedObject($self->compartment_ref());
}
sub _build_reaction {
my ($self) = @_;
return $self->getLinkedObject($self->reaction_ref());
}
sub _build_complexs {
my ($self) = @_;
return $self->getLinkedObjectArray($self->complex_refs());
}
# CONSTANTS:
sub _type { return 'KBaseFBA.TemplateReaction'; }
sub _module { return 'KBaseFBA'; }
sub _class { return 'TemplateReaction'; }
sub _top { return 0; }
my $attributes = [
{
'req' => 0,
'printOrder' => -1,
'name' => 'GapfillDirection',
'default' => '=',
'type' => 'Str',
'perm' => 'rw'
},
{
'req' => 0,
'printOrder' => -1,
'name' => 'reverse_penalty',
'type' => 'Num',
'perm' => 'rw'
},
{
'req' => 1,
'printOrder' => -1,
'name' => 'compartment_ref',
'default' => undef,
'type' => 'Str',
'description' => undef,
'perm' => 'rw'
},
{
'req' => 0,
'printOrder' => -1,
'name' => 'base_cost',
'type' => 'Num',
'perm' => 'rw'
},
{
'req' => 1,
'printOrder' => -1,
'name' => 'reaction_ref',
'default' => undef,
'type' => 'Str',
'description' => undef,
'perm' => 'rw'
},
{
'req' => 0,
'printOrder' => -1,
'name' => 'complex_refs',
'default' => undef,
'type' => 'ArrayRef',
'description' => undef,
'perm' => 'rw'
},
{
'req' => 0,
'printOrder' => 1,
'name' => 'direction',
'default' => undef,
'type' => 'Str',
'description' => undef,
'perm' => 'rw'
},
{
'req' => 0,
'printOrder' => -1,
'name' => 'forward_penalty',
'type' => 'Num',
'perm' => 'rw'
},
{
'req' => 0,
'printOrder' => 1,
'name' => 'type',
'default' => undef,
'type' => 'Str',
'description' => undef,
'perm' => 'rw'
},
{
'req' => 1,
'printOrder' => 0,
'name' => 'id',
'type' => 'Str',
'perm' => 'rw'
}
];
my $attribute_map = {GapfillDirection => 0, reverse_penalty => 1, compartment_ref => 2, base_cost => 3, reaction_ref => 4, complex_refs => 5, direction => 6, forward_penalty => 7, type => 8, id => 9};
sub _attributes {
my ($self, $key) = @_;
if (defined($key)) {
my $ind = $attribute_map->{$key};
if (defined($ind)) {
return $attributes->[$ind];
} else {
return;
}
} else {
return $attributes;
}
}
my $links = [
{
'parent' => 'Biochemistry',
'name' => 'compartment',
'attribute' => 'compartment_ref',
'clearer' => 'clear_compartment',
'class' => 'Bio::KBase::ObjectAPI::KBaseBiochem::Compartment',
'method' => 'compartments',
'module' => 'KBaseBiochem',
'field' => 'id'
},
{
'parent' => 'Biochemistry',
'name' => 'reaction',
'attribute' => 'reaction_ref',
'clearer' => 'clear_reaction',
'class' => 'Bio::KBase::ObjectAPI::KBaseBiochem::Reaction',
'method' => 'reactions',
'module' => 'KBaseBiochem',
'field' => 'id'
},
{
'parent' => 'Mapping',
'name' => 'complexs',
'attribute' => 'complex_refs',
'array' => 1,
'clearer' => 'clear_complexs',
'class' => 'Bio::KBase::ObjectAPI::KBaseOntology::Complex',
'method' => 'complexes',
'module' => 'KBaseOntology',
'field' => 'id'
}
];
my $link_map = {compartment => 0, reaction => 1, complexs => 2};
sub _links {
my ($self, $key) = @_;
if (defined($key)) {
my $ind = $link_map->{$key};
if (defined($ind)) {
return $links->[$ind];
} else {
return;
}
} else {
return $links;
}
}
my $subobjects = [];
my $subobject_map = {};
sub _subobjects {
my ($self, $key) = @_;
if (defined($key)) {
my $ind = $subobject_map->{$key};
if (defined($ind)) {
return $subobjects->[$ind];
} else {
return;
}
} else {
return $subobjects;
}
}
__PACKAGE__->meta->make_immutable;
1;
| kbase/KBaseFBAModeling | lib/Bio/KBase/ObjectAPI/KBaseFBA/DB/TemplateReaction.pm | Perl | mit | 7,888 |
/*****************************************************************************
* This file is part of the Prolog Development Tool (PDT)
*
* WWW: http://sewiki.iai.uni-bonn.de/research/pdt/start
* Mail: pdt@lists.iai.uni-bonn.de
* Copyright (C): 2004-2012, CS Dept. III, University of Bonn
*
* All rights reserved. This program is made available under the terms
* of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*
****************************************************************************/
%:- module(new_builder,[consult_entry_point_and_parse/2]).
:- use_module(parse_util).
/*
* consult_entry_point_and_parse(+File, +Project)
* - loades the file represented by Arg1 and everything that has to
* be loaded together with it.
* - after that parses every file that was loaded in the first step inside
* of the directory represented by Arg2 and builds the PEF-AST together
* with the edge informations
* (see generate_facts/1 from parse_util_quick.pl).
**/
consult_entry_point_and_parse(File, Project):-
load_files(File,silent(true)),
%consult(File),
findall(ToParse,
( source_file(ToParse),
Project = Lc_Project,
atom_concat(Lc_Project,_,ToParse)
),
ParseList),
% not(library_directory(Directory)),
writeln(ParseList),
generate_facts(ParseList).
%consult_entry_point_and_parse(_,_).
| TeamSPoon/logicmoo_base | prolog/logicmoo/pdt_server/pdt.builder/prolog-src/new_pef_builder.pl | Perl | mit | 1,496 |
class Panda::Bundler {
use Panda::Common;
use Panda::Project;
use File::Find;
use JSON::Fast;
sub guess-project($where, Str :$name is copy, Str :$desc is copy) {
my $source-url;
indir $where, {
my $metafile = find-meta-file(".");
if $metafile.IO.e {
try my $json = from-json $metafile.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;
%*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, :deps(['Panda::DepTracker'])) {
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 ~~ / \.pm6? $/;
$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>.append: $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, :deps(['Panda::DepTracker'])) {
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>.append: $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>,
}
}, :pretty) ~ "\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(/ \.pm6? $/, '').split(/<[\\\/]>/);
shift @names if @names && @names[0] eq 'blib';
shift @names if @names && @names[0] eq 'lib';
@names.join('::');
}
}
# vim: ft=perl6
| TimToady/panda | lib/Panda/Bundler.pm | Perl | mit | 6,826 |
package OpenResty;
our $VERSION = '0.005012';
use strict;
use warnings;
#use Smart::Comments '####';
use Data::UUID;
use YAML::Syck ();
use JSON::XS ();
use Compress::Zlib;
use List::Util qw(first);
use Params::Util qw(_HASH _STRING _ARRAY0 _ARRAY _SCALAR);
use Encode qw(from_to encode decode);
use Data::Structure::Util qw( _utf8_on _utf8_off );
use DBI;
use OpenResty::QuasiQuote::SQL;
use OpenResty::SQL::Select;
use OpenResty::SQL::Update;
use OpenResty::SQL::Insert;
use OpenResty::Backend;
use OpenResty::Limits;
#use encoding "utf8";
use OpenResty::Util;
use Encode::Guess;
#$YAML::Syck::ImplicitUnicode = 1;
#$YAML::Syck::ImplicitBinary = 1;
our ($Backend, $BackendName);
our (%AccountFiltered, %UnsafeAccounts, %UnlimitedAccounts );
our $Cache;
our $UUID = Data::UUID->new;
# XXX we should really put this into the Action handler...
our %AllowForwarding;
our $JsonXs = JSON::XS->new->utf8->allow_nonref;
our %OpMap = (
contains => 'like',
gt => '>',
ge => '>=',
lt => '<',
le => '<=',
eq => '=',
ne => '<>',
);
sub json_encode {
_utf8_on($_[0]);
local *_ = \( $JsonXs->encode($_[0]) );
_utf8_off($_[0]);
$_;
}
our %ext2dumper = (
'.yml' => sub { _utf8_on($_[0]); YAML::Syck::Dump($_[0]); },
'.yaml' => sub { _utf8_on($_[0]); YAML::Syck::Dump($_[0]); },
'.js' => \&json_encode,
'.json' => \&json_encode,
);
our %EncodingMap = (
'cp936' => 'GBK',
'utf8' => 'UTF-8',
'euc-cn' => 'GB2312',
'big5-eten' => 'Big5',
);
our %ext2importer = (
'.yml' => \&YAML::Syck::Load,
'.yaml' => \&YAML::Syck::Load,
'.js' => sub { $JsonXs->decode($_[0]) },
'.json' => sub { $JsonXs->decode($_[0]) },
);
our $Ext = qr/\.(?:js|json|xml|yaml|yml)/;
#our $Dumper =
our $Dumper = $ext2dumper{'.js'};
our $Importer = $ext2importer{'.js'};
sub version {
(my $ver = $OpenResty::VERSION) =~ s{^(\d+)\.(\d{3})(\d{3})$}{join '.', int($1), int($2), int($3)}e;
$ver;
}
# XXX more data types...
sub parse_data {
#shift;
my $data = $_[0]->{_importer}->($_[1]);
_utf8_off($data);
return $data;
}
sub new {
my ($class, $cgi, $call_level) = @_;
return bless {
_cgi => $cgi,
_client_ip => $cgi->remote_host(),
_charset => 'UTF-8',
_call_level => $call_level,
_dumper => $Dumper,
_importer => $Importer,
_http_status => 'HTTP/1.1 200 OK',
_unlimited => undef
}, $class;
}
sub call_level {
return $_[0]->{_call_level};
}
sub config {
my $key = pop;
$OpenResty::Config{$key};
}
sub cache {
$OpenResty::Cache;
}
sub init {
my ($self, $rurl) = @_;
my $class = ref $self;
my $cgi = $self->{_cgi};
if (!$Backend || !$Backend->ping) {
warn "Re-connecting the database...\n";
eval { $Backend->disconnect };
OpenResty::Dispatcher->init({});
}
# cache the results of CGI::Simple::url_param
my (%url_params, %builtin_params);
my $cgi2 = bless {}, 'CGI::Simple';
$cgi2->_parse_params( $ENV{'QUERY_STRING'} );
for my $param ($cgi2->param) {
if ($param =~ /^[A-Za-z]\w*$/) {
$url_params{$param} = $cgi2->param($param);
} elsif ($param =~ /^_\w+/) {
$builtin_params{$param} = $cgi2->param($param);
}
}
$self->{_url_params} = \%url_params;
$self->{_builtin_params} = \%builtin_params;
$self->{_use_cookie} = $self->builtin_param('_use_cookie') || 0;
$self->{_session} = $self->builtin_param('_session');
my $charset = $self->builtin_param('_charset') || 'UTF-8';
if ($charset =~ /^guess(?:ing)?$/i) {
undef $charset;
my $url = $ENV{REQUEST_URI};
$url =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
### Raw URL: $url
my $data = $url .
($cgi->param('PUTDATA') || '') .
($cgi->param('POSTDATA') || '');
### $data
my @enc = qw( UTF-8 GB2312 Big5 GBK Latin1 );
for my $enc (@enc) {
my $decoder = guess_encoding($data, $enc);
if (ref $decoder) {
$charset = $decoder->name;
$charset = $EncodingMap{$charset} || $charset;
last;
}
}
if (!$charset) {
die "Can't determine the charset of the input.\n";
}
### $charset
}
$self->{'_charset'} = $charset;
$self->{'_var'} = $self->builtin_param('_var');
$self->{'_callback'} = $self->builtin_param('_callback');
my $offset = $self->builtin_param('_offset');
$offset ||= 0;
if ($offset !~ /^\d+$/) {
die "Invalid value for the \"offset\" param: $offset\n";
}
$self->{_offset} = $offset;
my $limit = $self->builtin_param('_count');
# limit is an alias for count
if (!defined $limit) {
$limit = $self->builtin_param('_limit');
}
if (!defined $limit) {
$limit = $MAX_SELECT_LIMIT;
} else {
$limit ||= 0;
if ($limit !~ /^\d+$/) {
die "Invalid value for the \"_count\" param: $limit\n";
}
if ($limit > $MAX_SELECT_LIMIT) {
die "Value too large for the _limit param: $limit\n";
}
}
$self->{_limit} = $limit;
my $http_meth = $ENV{REQUEST_METHOD};
my $url = $$rurl;
if ($charset ne 'UTF-8') {
eval {
#warn "HERE!";
from_to($url, $charset, 'utf8');
};
warn $@ if $@;
}
#warn $url;
$url =~ s{/+$}{}g;
$url =~ s/\%2A/*/g;
if ($url =~ s/$Ext$//) {
my $ext = $&;
# XXX obsolete
$self->set_formatter($ext);
} else {
$self->set_formatter;
}
my $req_data;
if ($http_meth eq 'POST') {
$req_data = $cgi->param('POSTDATA');
#die "Howdy! >>$req_data<<", $cgi->param('data'), "\n";
#die $Dumper->(\%ENV);
if (!defined $req_data) {
$req_data = $cgi->param('data');
if (!defined $req_data) {
my $len = $ENV{CONTENT_LENGTH} || 0;
if ($len > $POST_LEN_LIMIT) {
die "Exceeded POST content length limit: $POST_LEN_LIMIT\n";
} else {
die "No POST content specified or no \"data\" field found.\n";
}
}
} else {
if (length($req_data) > $POST_LEN_LIMIT) {
die "Exceeded POST content length limit: $POST_LEN_LIMIT\n";
}
}
}
elsif ($http_meth eq 'PUT') {
$req_data = $cgi->param('PUTDATA');
if (!defined $req_data) {
$req_data = $cgi->param('data');
if (!defined $req_data) {
my $len = $ENV{CONTENT_LENGTH} || 0;
if ($len > $POST_LEN_LIMIT) {
die "Exceeded PUT content length limit: $POST_LEN_LIMIT\n";
} else {
die "No PUT content specified.\n";
}
}
} else {
if (length($req_data) > $POST_LEN_LIMIT) {
die "Exceeded PUT content length limit: $POST_LEN_LIMIT\n";
}
}
}
if ($http_meth eq 'POST' and $url =~ s{^=/put/}{=/}) {
$http_meth = 'PUT';
} elsif ($http_meth =~ /^(?:GET|POST)$/ and $url =~ s{^=/delete/}{=/}) {
$http_meth = 'DELETE';
} elsif ($http_meth eq 'GET' and $url =~ s{^=/(post|put)/}{=/} ) {
$http_meth = uc($1);
$req_data = $self->builtin_param('_data');
#$req_data = $Importer->($content);
#warn "Content: ", $Dumper->($content);
#warn "Data: ", $Dumper->($req_data);
}
#
$$rurl = $url;
$self->{'_url'} = $url;
$self->{'_http_method'} = $http_meth;
if ($req_data) {
from_to($req_data, $charset, 'UTF-8');
#warn "from_to is_utf8(req_data): ", Encode::is_utf8($req_data), "\n";
$req_data = $self->parse_data($req_data);
}
$self->{_req_data} = $req_data;
}
sub fatal {
my ($self, $s) = @_;
#warn "fatal-ing...: $s\n";
$self->error($s);
$self->response();
}
sub error {
my ($self, $s) = @_;
my $lowlevel = ($s =~ s/^DBD::Pg::(?:db|st) \w+ failed:\s*//);
#warn $s, "\n";
if ($s =~ s{^\s*ERROR:\s+PL/Proxy function \w+.\w+\(\d+\): remote error:\s*}{}) {
$s =~ s/\s+CONTEXT: .*//s;
}
$s =~ s/^ERROR:\s*//g;
if (!$OpenResty::Config{'frontend.debug'} && $lowlevel) {
$s = 'Operation failed.';
} else {
$s =~ s/(.+) at \S+\/OpenResty\.pm line \d+(?:, <DATA> line \d+)?\.?$/Syntax error found in the JSON input: $1./;
$s =~ s{ at \S+ line \d+\.?$}{}g;
$s =~ s{ at \S+ line \d+, <\w+> line \d+\.?$}{}g;
}
#$s =~ s/^DBD::Pg::db do failed:\s.*?ERROR:\s+//;
$self->{_error} .= $s . "\n";
}
sub data {
$_[0]->{_data} = $_[1];
}
sub warning {
$_[0]->{_warning} = $_[1];
}
sub http_status {
$_[0]->{_http_status} = $_[1];
}
sub response {
my $self = shift;
if ($self->{_no_response}) { return; }
my $charset = $self->{_charset};
my $cgi = $self->{_cgi};
my $cookie_data = $self->{_cookie};
my @cookies;
if ($cookie_data) {
while (my ($key, $val) = each %$cookie_data) {
push @cookies, CGI::Simple::Cookie->new(
-name => $key, -value => $val
);
}
}
my $use_gzip = $OpenResty::Config{'frontend.use_gzip'} &&
index($ENV{HTTP_ACCEPT_ENCODING} || '', 'gzip') >= 0;
#warn "use gzip: $use_gzip\n";
my $http_status = $self->{_http_status};
if ($OpenResty::Server::IsRunning) {
print "$http_status\r\n";
} else {
$http_status =~ s{^\s*HTTP/\d+\.\d+\s*}{};
#warn "http_status: $http_status\n";
binmode \*STDOUT;
print "Status: $http_status\r\n";
}
#print "$http_status\r\n";
# warn "$http_status";
my $type = $self->{_type} || 'text/plain';
#warn $s;
my $str = '';
if (my $bin_data = $self->{_bin_data}) {
local $_;
if (my $callback = $self->{_callback}) {
chomp($bin_data);
*_ = \"$callback($bin_data);\n";
} else {
*_ = \$bin_data;
}
print $cgi->header(
-type => "$type" . ($type =~ /text/ ? "; charset=$charset" : ""),
'-content-length' => length,
@cookies ? (-cookie => \@cookies) : ()
), $_;
return;
}
if (exists $self->{_error}) {
$str = $self->emit_error($self->{_error});
} elsif (exists $self->{_data}) {
my $data = $self->{_data};
if ($self->{_warning}) {
$data->{warning} = $self->{_warning};
}
$str = $self->emit_data($data);
}
#die $charset;
# XXX if $charset is 'UTF-8' then don't bother decoding and encoding...
if ($charset ne 'UTF-8') {
#warn "HERE!";
eval {
#$str = decode_utf8($str);
#if (is_utf8($str)) {
#} else {
#warn "Encoding: $charset\n";
from_to($str, 'utf8', $charset);
#$str = decode('UTF-8', $str);
#$str = encode($charset, $str);
#}
}; warn $@ if $@;
}
#warn $Dumper;
#warn $ext2dumper{'.js'};
$str =~ s/\n+$//s;
if (my $var = $self->{_var}) {
if ($self->{_dumper} eq $ext2dumper{'.js'}) {
$str = "$var=$str;";
} else {
$str = "$var=" . OpenResty::json_encode($str) . ";";
}
} elsif (my $callback = $self->{_callback}) {
if ($self->{_dumper} eq $ext2dumper{'.js'}) {
$str = "$callback($str);";
} else {
$str = "$callback(" . OpenResty::json_encode($str) . ");";
}
}
#my $meth = $self->{_http_method};
if (my $LastRes = $OpenResty::Dispatcher::Handlers{last}) {
$LastRes->set_last_response($self, $str);
}
#warn ">>>>>>>>>>>>Cookies<<<<<<<<<<<<<<: @cookies\n";
#if (length($str) < 500 && $use_gzip) {
#undef $use_gzip;
#}
{
local $_;
if ($use_gzip) {
# compress the content part
*_ = \(Compress::Zlib::memGzip($str));
} else {
*_ = \"$str\n";
}
print $cgi->header(
-type => "$type" . ($type =~ /text/ ? "; charset=$charset" : ""),
'-content-length' => length,
$use_gzip ? ('-content-encoding' => 'gzip', '-accept-encoding' => 'Vary') : (),
@cookies ? (-cookie => \@cookies) : ()
), $_;
}
}
sub set_formatter {
my ($self, $ext) = @_;
$ext ||= '.js';
#warn "Ext: $ext";
$self->{_dumper} = $ext2dumper{$ext};
$self->{_importer} = $ext2importer{$ext};
}
sub connect {
my $self = shift;
my $name = shift || $BackendName;
$BackendName = $name;
#warn "connect: $BackendName\n";
$Backend = OpenResty::Backend->new($name);
#warn "Backend: $Backend\n";
#$Backend->select("");
}
sub emit_data {
my ($self, $data) = @_;
#warn "$data";
return $self->{_dumper}->($data);
}
sub get_session {
my ($self) = @_;
my $session_from_cookie;
my $call_level = $self->{_call_level};
if ($call_level == 0) { # only check cookies on the toplevel call
my $cookies = CGI::Cookie::XS->fetch;
if ($cookies) {
my $cookie = $cookies->{session};
if ($cookie) {
$self->{_session_from_cookie} =
$session_from_cookie = $cookie->[-1];
}
}
}
$self->{_session} || $session_from_cookie;
}
sub has_feed {
my ($self, $feed) = @_;
_IDENT($feed) or die "Bad feed name: $feed\n";
my $sql = [:sql|
select id
from _feeds
where name = $feed
limit 1;
|];
my $ret;
eval { $ret = $self->select($sql)->[0][0]; };
return $ret;
}
sub has_role {
my ($self, $role) = @_;
return 'password' if $role eq 'Admin';
return 'anonymous' if $role eq 'Public'; # shortcut...
_IDENT($role) or
die "Bad role name: ", $self->dump($role), "\n";
my $user = $self->current_user;
if (my $login_meth = $Cache->get_has_role($user, $role)) {
#warn "has view cache HIT\n";
#warn "from cache: $login_meth\n";
return $login_meth;
}
my $sql = [:sql|
select login
from _roles
where name = $role
limit 1;
|];
my $ret = $self->select($sql);
if ($ret && ref $ret) {
$ret = $ret->[0][0];
#warn "Returned: $ret\n";
if ($ret) { $Cache->set_has_role($user, $role, $ret) }
return $ret;
}
return undef;
#warn "HERE!";
}
sub has_view {
my ($self, $view) = @_;
my $user = $self->current_user;
_IDENT($view) or die "Bad view name: $view\n";
if ($Cache->get_has_view($user, $view)) {
#warn "has view cache HIT\n";
return 1;
}
#warn "HERE!!! has_view: $view";
my $sql = [:sql|
select id
from _views
where name = $view
limit 1;
|];
my $ret;
eval { $ret = $self->select($sql)->[0][0]; };
if ($ret) { $Cache->set_has_view($user, $view) }
return $ret;
}
sub has_model {
my ($self, $model) = @_;
my $user = $self->current_user;
_IDENT($model) or die "Bad model name: $model\n";
if ($Cache->get_has_model($user, $model)) {
#warn "has model cache HIT\n";
return 1;
}
my $sql = [:sql|
select c.oid
from pg_catalog.pg_class c left join pg_catalog.pg_namespace n on n.oid = c.relnamespace
where c.relkind in ('r','') and
n.nspname = $user and
pg_catalog.pg_table_is_visible(c.oid) and
substr(c.relname,1,1) <> '_' and
c.relname = $model
limit 1
|];
my $ret;
eval { $ret = $self->select($sql)->[0][0]; };
if ($ret) { $Cache->set_has_model($user, $model) }
return $ret;
}
sub has_user {
my ($self, $user) = @_;
if ($user && $Cache->get_has_user($user)) {
#warn "Cache hit for has_user!";
return 1;
} else {
my $res = $Backend->has_user($user);
if ($res) {
$Cache->set_has_user($user);
}
return $res;
}
}
sub set_user {
my ($self, $user) = @_;
$Backend->set_user($user);
$self->{_user} = $user;
}
sub current_user {
my ($self) = @_;
# warn "!!!", $self->{_user};
$self->{_user};
}
sub do {
my $self = shift;
$Backend->do(@_);
}
sub select {
my $self = shift;
$Backend->select(@_);
}
sub last_insert_id {
my $self = shift;
$Backend->last_insert_id(@_);
}
sub emit_error {
my $self = shift;
my $msg = shift;
$msg =~ s/\n+$//s;
return $self->emit_data( { success => 0, error => $msg } );
}
sub set_role {
my ($self, $role) = @_;
$self->{_role} = $role;
}
sub get_role {
$_[0]->{_role}
}
sub set_unlimited {
$_[0]->{_unlimted} = shift;
}
sub is_unlimited {
return $_[0]->{_unlimited};
}
sub url_param {
if (@_ > 1) {
$_[0]->{_url_params}->{$_[1]};
} else {
keys %{ $_[0]->{_url_params} };
}
}
sub builtin_param {
if (@_ > 1) {
$_[0]->{_builtin_params}->{$_[1]};
} else {
keys %{ $_[0]->{_builtin_params} };
}
}
1;
__END__
=encoding UTF-8
=head1 NAME
OpenResty - General-purpose web service platform for web applications
=head1 VERSION
This document describes OpenResty 0.5.12 released on Nov 20, 2009.
=head1 DESCRIPTION
This module implements the server-side OpenResty web service protocol. It provides scriptable and extensible web services for both server-side and client-side (pure AJAX) web applications.
Currently this module can serve as a public web interface to a distributed or desktop PostgreSQL database system. In particular, it provides roles, models, views, actions, captchas, the minisql language, and many more to the web users.
"Another framework?" No, no, no, not all!
OpenResty is I<not> a web application framework like L<Jifty> or L<Catalyst>. Rather, it is
=over
=item *
A REST wrapper for relational databases
=item *
A web runtime for 100% JavaScript web sites and other RIAs.
=item *
A "meta web site" supporting other sites via web services.
=item *
A handy personal or company database which can be accessed from anywhere
on the web.
=item *
A (sort of) competitor for the Facebook Data Store API.
=back
We're already running an instance of the OpenResty server on our Yahoo! China's production machines:
L<http://api.openresty.org/=/version>
And there're several (pure-client-side) web sites alreadying taking advantage of the services:
=over
=item OpenResty's admin site
L<http://openresty.org/admin/>
=item agentzh's blog and EEEE Works' blog
L<http://blog.agentzh.org>
L<http://eeeeworks.org>
=item Yisou BBS
L<http://www.yisou.com/opi/post.html>
=back
See L<OpenResty::Spec::Overview> for more detailed information.
L<OpenResty::CheatSheet> also provides a good enough summary for the REST interface.
You'll find my slides for the D2 conference interesting as well:
L<http://agentzh.org/misc/openresty-d2.pdf>
or the original XUL version:
L<http://agentzh.org/misc/openresty-d2/openresty-d2.xul> (Firefox required)
Another good introduction to OpenResty's REST API is summerized in the slides for my Y!ES talk and my Beijing Perl Workshop 2008 talk:
L<http://agentzh.org/misc/openresty-yes.pdf>
and a more pretty (XUL) version can be got from here:
L<http://agentzh.org/misc/openresty-yes/openresty-yes.xul> (Firefox required)
There're also a few interesting discussions about OpenResty on my blog site:
=over
=item "OpenResty versus Google App Engine"
L<http://blog.agentzh.org/#post-75>
=item "Google's crawlers captured OpenResty's API!"
L<http://blog.agentzh.org/#post-79>
=item "Video for my D2 talk about OpenResty and its nifty apps"
L<http://blog.agentzh.org/#post-81>
=item "The first yahoo.cn feature that is powered by OpenResty"
L<http://blog.agentzh.org/#post-86>
=item "Client-side web site DIY" (Chinese)
L<http://blog.agentzh.org/#post-80>
=item "OpenResty 平台相关资料" (Chinese)
L<http://www.eeeeworks.org/#post-6>
=back
=head1 CAVEATS
This library is still in the B<beta> phase and the API is still in flux. We're just following the "release early, releaes often" guideline. So please check back often ;)
=head1 INSTALLATION
Please see L<OpenResty::Spec::Install> for details :)
=head1 SOURCE TREE STRUCTURE
=over
=item bin/
contains some command-line utilities, among which the L<openresty> is the most important one.
=item lib/
contains all the server code, mostly Perl.
=item haskell/
contains the RestyScript compiler for OpenResty
written in Haskell. Support for both OpenResty Views and Actions
is provided.
See F<haskell/README> for more details.
=item font/
contains the font file (*.ttf) for captcha generation.
=item etc/
contains the config files, F<openresty.conf> and F<site_openresty.conf>. The latter one takes precedence over the former.
=item grammar/
contains L<Parse::Yapp> grammar files for the old OpenResty View (or minisql) compiler.
=item t/
contains the test suite.
=item demo/
contains a bunch of OpenResty demo apps.
=item inc/
generated by L<Module::Install> for CPAN building system.
=back
=head1 PERFORMANCE
OpenResty takes runtime performance very seriously because we have to run it on our not-so-good servers and support lots of Yahoo! China's online products with very heavy traffic.
OpenResty prefers modules with XS over pure Perl ones and uses cache aggressively. It's also in favor of source-filter based solutions provided by L<Filter::QuasiQuote> to reduce the length of subroutine calling chains and the number of indirections. Finally, the restyscript compiler is also written in carefully optimized Haskell code to maximize speed.
The benchmark results for OpenResty 0.5.3's test suite on a PentiumIV 3.0GHz machine is given below:
=over
=item in-process frontend + PgMocked backend
DELETE: 4 ms (157 trials)
POST: 23 ms (493 trials)
PUT: 5 ms (132 trials)
GET: 4 ms (648 trials)
=item lighttpd fastcgi frontend + local Pg backend
DELETE: 29 ms (193 trials)
POST: 30 ms (815 trials)
PUT: 11 ms (138 trials)
GET: 9 ms (763 trials)
=item lighttpd fastcgi frontend + remote PgFarm backend
DELETE: 99 ms (193 trials)
POST: 98 ms (815 trials)
PUT: 41 ms (138 trials)
GET: 24 ms (763 trials)
=back
=head1 SOURCE CONTROL
For the very latest version of this module, check out the source from
the Git repos below:
L<http://github.com/agentzh/openresty/tree/master>
There is anonymous access to all. If you'd like a commit bit, please let
us know. :)
=head1 Mailing list
Subscribe to the C<openresty> Google Group here:
L<http://groups.google.com/group/openresty>
=head1 Project Roadmap
Below is a list of currently planned release milestones (but it's also supposed to change as we go):
=over
=item 0.5.x (Where we are)
Action API and an enhanced version of the Model API.
=item 0.6.x
Migrate the View handler to the same style and implementation of the Action handler, i.e., using explicit parameter list and taking advantage of the Haskell version of the restyscript compiler.
Compiling view definition to native PostgreSQL functions is also supposed to realize in this series.
=item 0.7.x
Attachment API, which supports binary file uploading and downloading.
=item 0.8.x
Mail API, which introduces builtin Models for email sentbox and inbox based on third-party POP3/STMP servers.
It will also allow actions to be triggered and/or confirmed by emails.
=item 0.9.x
Prophet/Git integration.
=back
Please don't hesitate to tell us what you love to see in future releases of OpenResty ;)
=head1 TODO
For the project's TODO list, please check out L<http://svn.openfoundry.org/openapi/trunk/TODO>
=head1 BUGS
There must be some serious bugs lurking somewhere given the current status of the implementation and test suite.
Please report bugs or send wish-list to
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=OpenResty>.
=head1 AUTHORS
=over
=item Agent Zhang (agentzh) C<< <agentzh at yahoo dot cn> >>
=item Xunxin Wan (万珣新) C<< <wanxunxin at gmail dot com > >>
=item chaoslawful (王晓哲) C<< <chaoslawful at gmail dot com> >>
=item Lei Yonghua (leiyh)
=item Laser Henry (laser) C<< <laserhenry at gmail dot com> >>
=item Yu Ting (yuting) C<< <yuting at yahoo dot cn> >>
=back
For a complete list of the contributors, please see L<http://svn.openfoundry.org/openapi/trunk/AUTHORS>.
=head1 License and Copyright
OpenResty is licensed under the BSD License:
Copyright (c) 2007-2008, Yahoo! China EEEE Works, Alibaba Inc. All rights reserved.
Copyright (c) 2007-2008, Agent Zhang (agentzh). All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
=over
=item *
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
=item *
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
=item *
Neither the name of the Yahoo! China EEEE Works, Alibaba Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
=back
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=head1 SEE ALSO
L<OpenResty::Spec::Overview>, L<openresty>, L<OpenResty::Spec::REST_cn>, L<OpenResty::CheatSheet>, L<WWW::OpenResty>, L<WWW::OpenResty::Simple>.
| beni55/old-openresty | lib/OpenResty.pm | Perl | bsd-3-clause | 26,609 |
#!/usr/bin/perl
use strict;
use Test::More;
use FindBin qw($Bin);
use lib "$Bin/lib";
use MemcachedTest;
sleep 1;
my $threads = 128;
my $running = 0;
# default engine start option : -m 512
# example) ./memcached -E .libs/default_engine.so -X .libs/ascii_scrub.so -m 512
while ($running < $threads) {
# my $sock = IO::Socket::INET->new(PeerAddr => "$server->{host}:$server->{port}");
my $sock = IO::Socket::INET->new(PeerAddr => "localhost:11211");
my $cpid = fork();
if ($cpid) {
$running++;
print "Launched $cpid. Running $running threads.\n";
} else {
data_work($sock);
exit 0;
}
}
while ($running > 0) {
wait();
print "stopped. Running $running threads.\n";
$running--;
}
sub data_load {
my $sock = shift;
my $i;
my $expire;
for ($i = 0; $i < 100000; $i++) {
my $keyrand = int(rand(9000000));
my $valrand = 30 + int(rand(50));
my $key = "dash$keyrand";
my $val = "B" x $valrand;
my $len = length($val);
my $res;
$expire = 86400;
print $sock "set $key 0 $expire $len\r\n$val\r\n";
$res = scalar <$sock>;
if ($res ne "STORED\r\n") {
print "set $key $len: $res\r\n";
}
}
print "data_load end\n";
}
sub data_work {
my $sock = shift;
my $i;
my $expire;
my $meth;
my $keyrand;
my $valrand;
my $key;
my $val;
my $len;
my $res;
for ($i = 0; $i < 50000000; $i++) {
$meth = int(rand(10));
#my $keyrand = int(rand(9000000));
#my $valrand = 30 + int(rand(30));
#my $keyrand = int(rand(90000000));
#my $valrand = 100 + int(rand(100));
$keyrand = int(rand(200000));
#my $valrand = 800 + int(rand(800));
if (($meth ge 0) and ($meth le 2)) {
$valrand = 6000 + int(rand(1900));
} else {
$valrand = 100 + int(rand(100));
}
$key = "dash$keyrand";
$val = "B" x $valrand;
$len = length($val);
# sleep(0.0001);
# if (($meth ge 0) and ($meth le 5)) {
$expire = 86400;
print $sock "set $key 0 $expire $len\r\n$val\r\n";
$res = scalar <$sock>;
if ($res ne "STORED\r\n") {
print "set $key $len: $res\r\n";
}
# } else {
# print $sock "get $key\r\n";
# $res = scalar <$sock>;
# if ($res =~ /^VALUE/) {
# $res .= scalar(<$sock>) . scalar(<$sock>);
# }
# }
}
print "data_work end\n";
}
#undef $server;
| ropik/arcus-memcached | t/too_many_eviction_set_work.pl | Perl | bsd-3-clause | 2,623 |
package Mail::Toaster::DNS;
use strict;
use warnings;
our $VERSION = '5.50';
use Params::Validate ':all';
use lib 'lib';
use parent 'Mail::Toaster::Base';
sub is_ip_address {
my $self = shift;
my %p = validate(
@_,
{ 'ip' => { type => SCALAR, },
'rbl' => { type => SCALAR, },
$self->get_std_opts,
},
);
my %args = $self->get_std_args( %p );
my ( $ip, $rbl ) = ( $p{'ip'}, $p{'rbl'} );
$ip =~ /^([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/
or return $self->error( "invalid IP address format: $ip", %args);
return "$4.$3.$2.$1.$rbl";
}
sub rbl_test {
my $self = shift;
my %p = validate(
@_, {
'zone' => SCALAR,
'conf' => {
type => HASHREF,
optional => 1,
default => { rbl_enable_lookup_using => 'net-dns' }
},
'fatal' => { type => BOOLEAN, optional => 1, default => 1 },
},
);
my ( $conf, $zone ) = ( $p{'conf'}, $p{'zone'} );
# $net_dns->tcp_timeout(5); # really shouldn't matter
# $net_dns->udp_timeout(5);
# make sure zone has active name servers
return if ! $self->rbl_test_ns( conf => $conf, rbl => $zone );
# test an IP that should always return an A record
return if ! $self->rbl_test_positive_ip( conf => $conf, rbl => $zone );
# test an IP that should always yield a negative response
return if ! $self->rbl_test_negative_ip( conf => $conf, rbl => $zone );
return 1;
}
sub rbl_test_ns {
my $self = shift;
my %p = validate( @_, {
'rbl' => SCALAR,
'conf' => { type => HASHREF, optional => 1, },
$self->get_std_opts,
},
);
my ( $conf, $rbl ) = ( $p{'conf'}, $p{'rbl'} );
my %args = $self->get_std_args( %p );
my $testns = $rbl;
# overrides for dnsbl's where the NS doesn't match the dnsbl name
if ( $rbl =~ /rbl\.cluecentral\.net$/ ) { $testns = "rbl.cluecentral.net"; }
elsif ( $rbl eq 'spews.blackhole.us' ) { $testns = "ls.spews.dnsbl.sorbs.net"; }
elsif ( $rbl eq 'list.dnswl.org' ) { $testns = "dnswl.org" }
elsif ( $rbl eq 'bl.spamcop.net' ) { $testns = "spamcop.net" }
elsif ( $rbl =~ /\.dnsbl\.sorbs\.net$/ ) { $testns = "dnsbl.sorbs.net" }
my $ns = $self->resolve(record=>$testns, type=>'NS', %args ) || 0;
$self->audit( "found $ns NS servers");
return $ns;
}
sub rbl_test_positive_ip {
my $self = shift;
my %p = validate(
@_,
{ 'conf' => { type => HASHREF, optional => 1, },
'rbl' => { type => SCALAR, },
$self->get_std_opts,
},
);
my %args = $self->get_std_args( %p );
my ( $conf, $rbl ) = ( $p{'conf'}, $p{'rbl'} );
# an IP that should always return an A record
# for most RBL's this is 127.0.0.2, (2.0.0.127.bl.example.com)
my $ip = 0;
my $test_ip = $rbl eq "korea.services.net" ? "61.96.1.1"
: $rbl eq "kr.rbl.cluecentral.net" ? "61.96.1.1"
: $rbl eq "cn-kr.blackholes.us" ? "61.96.1.1"
: $rbl eq "cn.rbl.cluecentral.net" ? "210.52.214.8"
: $rbl =~ /rfc-ignorant\.org$/ ? 0 # no test ips!
: "127.0.0.2";
return if ! $test_ip;
$self->audit( "rbl_test_positive_ip: testing with ip $test_ip");
my $test = $self->is_ip_address( ip => $test_ip, rbl => $rbl, %args ) or return;
$self->audit( "\tquerying $test..." );
my @rrs = $self->resolve( record => $test, type => 'A' );
foreach my $rr ( @rrs ) {
next unless $rr =~ /127\.[0-1]\.[0-9]{1,3}/;
$ip++;
$self->audit( " from $rr matched.");
}
$self->audit( "rbl_test_positive_ip: we have $ip addresses.");
return $ip;
}
sub rbl_test_negative_ip {
my $self = shift;
my %p = validate( @_, {
'rbl' => SCALAR,
'conf' => { type => HASHREF, optional => 1, },
$self->get_std_opts,
},
);
my %args = $self->get_std_args( %p );
my ( $conf, $rbl ) = ( $p{'conf'}, $p{'rbl'} );
my $test_ip = $rbl eq "korea.services.net" ? "208.75.177.127"
: $rbl eq "kr.rbl.cluecentral.net" ? "208.75.177.127"
: $rbl eq "cn.rbl.cluecentral.net" ? "208.75.177.127"
: $rbl eq "us.rbl.cluecentral.net" ? "210.52.214.8"
: "208.75.177.127";
my $test = $self->is_ip_address( ip => $test_ip, rbl => $rbl, %args ) or return;
$self->audit( "querying $test" );
my @rrs = $self->resolve( record => $test, type => 'A', %args );
return 1 if scalar @rrs == 0;
foreach my $rr ( @rrs ) {
next unless $rr =~ /127\.0\.0/;
$self->audit( " from $rr matched.");
}
return 0;
}
sub resolve {
my $self = shift;
my %p = validate(@_, {
record => SCALAR,
type => SCALAR,
timeout=> { type=>SCALAR, optional=>1, default=>5 },
conf => { type=>HASHREF, optional=>1, },
$self->get_std_opts,
},
);
my ( $conf, $record, $type ) = ( $p{'conf'}, $p{'record'}, $p{'type'} );
#my %args = $self->get_std_args( %p );
return $self->resolve_dig($record, $type )
if ( $conf
&& $conf->{'rbl_enable_lookup_using'}
&& $conf->{'rbl_enable_lookup_using'} eq "dig" );
return $self->resolve_dig($record, $type ) if ! $self->util->has_module("Net::DNS");
return $self->resolve_net_dns($record, $type, $p{timeout} );
};
sub resolve_net_dns {
my ($self, $record, $type, $timeout) = @_;
$self->audit("resolving $record type $type with Net::DNS");
require Net::DNS;
my $net_dns = Net::DNS::Resolver->new;
$timeout ||= '5';
$net_dns->tcp_timeout($timeout);
$net_dns->udp_timeout($timeout);
my $query = $net_dns->query( $record, $type ) or
return $self->error( "resolver query failed for $record: " . $net_dns->errorstring, fatal => 0);
my @records;
foreach my $rr (grep { $_->type eq $type } $query->answer ) {
if ( $type eq "NS" ) {
$self->audit("\t$record $type: ". $rr->nsdname );
push @records, $rr->nsdname;
}
elsif ( $type eq "A" ) {
$self->audit("\t$record $type: ". $rr->address );
push @records, $rr->address;
}
elsif ( $type eq "PTR" ) {
push @records, $rr->rdatastr;
$self->audit("\t$record $type: ". $rr->rdatastr );
}
else {
$self->error("unknown record type: $type", fatal => 0);
};
}
return @records;
};
sub resolve_dig {
my ($self, $record, $type) = @_;
$self->audit("resolving $record type $type with dig");
my $dig = $self->util->find_bin( 'dig' );
my @records;
foreach (`$dig $type $record +short`) {
chomp;
push @records, $_;
$self->audit("found $_");
}
return @records;
};
1;
__END__
=head1 NAME
Mail::Toaster::DNS - DNS functions, primarily to test RBLs
=head1 SYNOPSIS
A set of subroutines for testing rbls to verify that they are functioning properly. If Net::DNS is installed it will be used but we can also test using dig.
=head1 DESCRIPTION
These functions are used by toaster-watcher to determine if RBL's are available when generating qmail's smtpd/run control file.
=head1 SUBROUTINES
=over
=item new
Create a new DNS method:
use Mail::Toaster;
use Mail::Toaster::DNS;
my $dns = Mail::Toaster::DNS->new;
=item rbl_test
After the demise of osirusoft and the DDoS attacks currently under way against RBL operators, this little subroutine becomes one of necessity for using RBL's on mail servers. It is called by the toaster-watcher.pl script to test the RBLs before including them in the SMTP invocation.
my $r = $dns->rbl_test(conf=>$conf, zone=>"bl.example.com");
if ($r) { print "bl tests good!" };
arguments required:
zone - the zone of a blacklist to test
Tests to make sure that name servers are found for the zone and then run several test queries against the zone to verify that the answers it returns are sane. We want to detect if a RBL operator does something like whitelist or blacklist the entire planet.
If the blacklist fails any test, the sub will return zero and you should not use that blacklist.
=item rbl_test_ns
my $count = $t_dns->rbl_test_ns(
conf => $conf,
rbl => $rbl,
);
arguments required:
rbl - the reverse zone we use to test this rbl.
This script requires a zone name. It will then return a count of how many NS records exist for that zone. This sub is used by the rbl tests. Before we bother to look up addresses, we make sure valid nameservers are defined.
=item rbl_test_positive_ip
$t_dns->rbl_test_positive_ip( rbl=>'sbl.spamhaus.org' );
arguments required:
rbl - the reverse zone we use to test this rbl.
arguments optional:
conf
A positive test is a test that should always return a RBL match. If it should and does not, then we assume that RBL has been disabled by its operator.
Some RBLs have test IP(s) to verify they are working. For geographic RBLs (like korea.services.net) we can simply choose any IP within their allotted space. Most other RBLs use 127.0.0.2 as a positive test.
In the case of rfc-ignorant.org, they have no known test IPs and thus we have to skip testing them.
=item rbl_test_negative_ip
$t_dns->rbl_test_negative_ip(conf=>$conf, rbl=>$rbl);
This test is a little more difficult as RBL operators don't typically have an IP that is whitelisted. The DNS location based lists are very easy to test negatively. For the rest I'm listing my own IP as the default unless the RBL has a specific one. At the very least, my site won't get blacklisted that way. ;) I'm open to better suggestions.
=back
=head1 AUTHOR
Matt Simerson <matt@tnpi.net>
=head1 BUGS
None known. Report any to author.
=head1 SEE ALSO
The following man/perldoc pages:
Mail::Toaster
Mail::Toaster::Conf
toaster.conf
toaster-watcher.conf
http://mail-toaster.org/
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2004-2008, The Network People, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the The Network People, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=cut
| msimerson/Mail-Toaster | lib/Mail/Toaster/DNS.pm | Perl | bsd-3-clause | 11,757 |
#!perl
use Test::More;
use Test::Exception;
use strict;
use warnings;
no warnings 'redefine';
our ( $es, $es_version );
my $r;
SKIP: {
skip "Warmers only supported in 0.20", 31
if $es_version lt '0.20';
ok $es->create_warmer( warmer => 'warmer_1', queryb => { foo => 1 } ),
'warmer:all/all';
ok $r = $es->warmer, 'get all warmers';
ok $r->{es_test_1}
&& $r->{es_test_2}
&& 0 == @{ $r->{es_test_1}{warmers}{warmer_1}{types} }
&& 0 == @{ $r->{es_test_2}{warmers}{warmer_1}{types} },
' - warmer:all/all created';
ok $es->delete_warmer( index => '_all', warmer => '*' ),
' delete all warmers';
ok $es->create_warmer(
warmer => 'warmer_1',
index => 'es_test_1',
type => 'type_1',
queryb => { foo => 1 }
),
'warmer:one/one';
ok $r = $es->warmer, 'get all warmers';
ok $r->{es_test_1}
&& !$r->{es_test_2}
&& 1 == @{ $r->{es_test_1}{warmers}{warmer_1}{types} },
' - warmer:one/one created';
ok $es->delete_warmer( index => '_all', warmer => '*' ),
' delete all warmers';
ok $es->create_warmer(
warmer => 'warmer_1',
index => [ 'es_test_1', 'es_test_2' ],
type => [ 'type_1', 'type_2' ],
queryb => { foo => 1 }
),
'warmer:two/two';
ok $r = $es->warmer, 'get all warmers';
ok $r->{es_test_1}
&& $r->{es_test_2}
&& 2 == @{ $r->{es_test_1}{warmers}{warmer_1}{types} }
&& 2 == @{ $r->{es_test_2}{warmers}{warmer_1}{types} },
' - warmer:two/two created';
ok $r= $es->warmer( index => 'es_test_1' ), 'get one index warmer';
ok $r->{es_test_1} && !$r->{es_test_2}, ' - one index warmer returned';
ok $r= $es->warmer( index => [ 'es_test_1', 'es_test_2' ] ),
'get two index warmers';
ok $r->{es_test_1} && $r->{es_test_2}, ' - two index warmers returned';
throws_ok { $es->warmer( index => 'es_test_3' ) } qr/Missing/,
'get bad index';
ok !$es->warmer( index => 'es_test_3', ignore_missing => 1 ),
'ignore missing index';
ok $r= $es->warmer( warmer => 'warm*' ), 'get wildcard';
ok $r->{es_test_1} && $r->{es_test_2}, ' - wildcard get';
throws_ok { $es->warmer( warmer => 'bad*' ) } qr/Missing/, 'bad wildcard';
ok !$es->warmer( warmer => 'bad*', ignore_missing => 1 ),
'ignore bad wildcard';
throws_ok { $es->delete_warmer( index => 'es_test_3', warmer => '*' ) }
qr/Missing/, 'delete missing index';
ok !$es->delete_warmer(
index => 'es_test_3',
warmer => '*',
ignore_missing => 1
),
'ignore delete missing index';
throws_ok {
$es->delete_warmer( index => 'es_test_2', warmer => 'bad*' );
}
qr/Missing/, 'delete missing wildcard';
ok !$es->delete_warmer(
index => 'es_test_2',
warmer => 'bad*',
ignore_missing => 1
),
'ignore delete missing wildcard';
ok $es->delete_warmer( index => 'es_test_2', warmer => 'warm*' ),
' delete wildcard';
ok $r = $es->warmer(), 'get all warmers';
ok $r->{es_test_1} && !$r->{es_test_2}, 'wildcard warmer deleted';
ok $es->create_warmer(
index => 'es_test_1',
warmer => 'warmer_2',
type => [ 'type_1', 'type_2' ],
queryb => { foo => 1 },
filterb => { foo => 1 },
facets => {
bar => { filterb => { bar => 1 }, facet_filterb => { bar => 2 } }
}
),
'create warmer with searchbuilder';
is_deeply $es->warmer( index => 'es_test_1' )
->{es_test_1}{warmers}{warmer_2},
{
"source" => {
"filter" => { "term" => { "foo" => 1 } },
"query" => { "match" => { "foo" => 1 } },
"facets" => {
"bar" => {
"filter" => { "term" => { "bar" => 1 } },
"facet_filter" => { "term" => { "bar" => 2 } }
}
}
},
"types" => [ "type_1", "type_2" ]
},
'search builder warmer transformed';
ok $es->delete_warmer( index => '_all', warmer => '*' ),
' delete all warmers';
}
1;
| gitpan/Search-Elasticsearch-Compat | t/request_tests/warmers.pl | Perl | apache-2.0 | 4,290 |
#
# 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::adic::tape::snmp::mode::components::temperature;
use strict;
use warnings;
my %map_status = (
1 => 'nominal',
2 => 'warningLow', 3 => 'warningHigh',
4 => 'alarmLow', 5 => 'alarmHigh',
6 => 'notInstalled', 7 => 'noData',
);
my $mapping = {
temperatureSensorName => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.2' },
temperatureSensorStatus => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.3', map => \%map_status },
temperatureSensorDegreesCelsius => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.4' },
temperatureSensorWarningHi => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.8' },
temperatureSensorNominalHi => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.6' },
temperatureSensorNominalLo => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.5' },
temperatureSensorWarningLo => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.7' },
temperatureSensorLocation => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.30.1.9' },
};
my $oid_temperatureSensorEntry = '.1.3.6.1.4.1.3764.1.1.200.200.30.1';
sub load {
my ($self) = @_;
push @{$self->{request}}, { oid => $oid_temperatureSensorEntry };
}
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'));
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_temperatureSensorEntry}})) {
next if ($oid !~ /^$mapping->{temperatureSensorStatus}->{oid}\.(.*)$/);
my $instance = $1;
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_temperatureSensorEntry}, instance => $instance);
$result->{temperatureSensorName} =~ s/\s+/ /g;
$result->{temperatureSensorName} = centreon::plugins::misc::trim($result->{temperatureSensorName});
$result->{temperatureSensorLocation} =~ s/,/_/g;
my $id = $result->{temperatureSensorName} . '_' . $result->{temperatureSensorLocation};
next if ($self->check_filter(section => 'temperature', instance => $id));
$self->{components}->{temperature}->{total}++;
$self->{output}->output_add(long_msg => sprintf("temperature '%s' status is '%s' [instance = %s] [value = %s]",
$id, $result->{temperatureSensorStatus}, $id,
$result->{temperatureSensorDegreesCelsius}));
my $exit = $self->get_severity(label => 'sensor', section => 'temperature', value => $result->{temperatureSensorStatus});
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'", $id, $result->{temperatureSensorStatus}));
next;
}
if (defined($result->{temperatureSensorDegreesCelsius}) && $result->{temperatureSensorDegreesCelsius} =~ /[0-9]/) {
my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $result->{temperatureSensorDegreesCelsius});
if ($checked == 0) {
$result->{temperatureSensorNominalLo} = (defined($result->{temperatureSensorNominalLo}) && $result->{temperatureSensorNominalLo} =~ /[0-9]/) ?
$result->{temperatureSensorNominalLo} : '';
$result->{temperatureSensorWarningLo} = (defined($result->{temperatureSensorWarningLo}) && $result->{temperatureSensorWarningLo} =~ /[0-9]/) ?
$result->{temperatureSensorWarningLo} : '';
$result->{temperatureSensorNominalHi} = (defined($result->{temperatureSensorNominalHi}) && $result->{temperatureSensorNominalHi} =~ /[0-9]/) ?
$result->{temperatureSensorNominalHi} : '';
$result->{temperatureSensorWarningHi} = (defined($result->{temperatureSensorWarningHi}) && $result->{temperatureSensorWarningHi} =~ /[0-9]/) ?
$result->{temperatureSensorWarningHi} : '';
my $warn_th = $result->{temperatureSensorNominalLo} . ':' . $result->{temperatureSensorNominalHi};
my $crit_th = $result->{temperatureSensorWarningLo} . ':' . $result->{temperatureSensorWarningHi};
$self->{perfdata}->threshold_validate(label => 'warning-temperature-instance-' . $instance, value => $warn_th);
$self->{perfdata}->threshold_validate(label => 'critical-temperature-instance-' . $instance, value => $crit_th);
$exit = $self->{perfdata}->threshold_check(value => $result->{temperatureSensorDegreesCelsius}, threshold => [ { label => 'critical-temperature-instance-' . $instance, exit_litteral => 'critical' },
{ label => 'warning-temperature-instance-' . $instance, exit_litteral => 'warning' } ]);
$warn = $self->{perfdata}->get_perfdata_for_output(label => 'warning-temperature-instance-' . $instance);
$crit = $self->{perfdata}->get_perfdata_for_output(label => 'critical-temperature-instance-' . $instance);
}
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Temperature '%s' is %s degree centigrade", $id, $result->{temperatureSensorDegreesCelsius}));
}
$self->{output}->perfdata_add(label => 'temp_' . $id, unit => 'C',
value => $result->{temperatureSensorDegreesCelsius},
warning => $warn,
critical => $crit,
);
}
}
}
1; | nichols-356/centreon-plugins | centreon/common/adic/tape/snmp/mode/components/temperature.pm | Perl | apache-2.0 | 6,896 |
# 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 Clownfish::CharBuf;
use Clownfish;
our $VERSION = '0.006000';
$VERSION = eval $VERSION;
1;
__END__
| nwellnhof/lucy-clownfish | runtime/perl/lib/Clownfish/CharBuf.pm | Perl | apache-2.0 | 893 |
package Imager::Font::FT2;
use strict;
use Imager;
use vars qw($VERSION @ISA);
@ISA = qw(Imager::Font);
BEGIN {
$VERSION = "0.85";
require XSLoader;
XSLoader::load('Imager::Font::FT2', $VERSION);
}
*_first = \&Imager::Font::_first;
sub new {
my $class = shift;
my %hsh=(color=>Imager::Color->new(255,0,0,255),
size=>15,
@_);
unless ($hsh{file}) {
$Imager::ERRSTR = "No font file specified";
return;
}
unless (-e $hsh{file}) {
$Imager::ERRSTR = "Font file $hsh{file} not found";
return;
}
unless ($Imager::formats{ft2}) {
$Imager::ERRSTR = "Freetype2 not supported in this build";
return;
}
my $id = i_ft2_new($hsh{file}, $hsh{'index'} || 0);
unless ($id) { # the low-level code may miss some error handling
$Imager::ERRSTR = Imager::_error_as_msg();
return;
}
return bless {
id => $id,
aa => $hsh{aa} || 0,
file => $hsh{file},
type => 't1',
size => $hsh{size},
color => $hsh{color},
utf8 => $hsh{utf8},
vlayout => $hsh{vlayout},
}, $class;
}
sub _draw {
my $self = shift;
my %input = @_;
if (exists $input{channel}) {
i_ft2_cp($self->{id}, $input{image}{IMG}, $input{'x'}, $input{'y'},
$input{channel}, $input{size}, $input{sizew} || 0,
$input{string}, , $input{align}, $input{aa}, $input{vlayout},
$input{utf8});
} else {
i_ft2_text($self->{id}, $input{image}{IMG},
$input{'x'}, $input{'y'},
$input{color}, $input{size}, $input{sizew} || 0,
$input{string}, $input{align}, $input{aa}, $input{vlayout},
$input{utf8});
}
}
sub _bounding_box {
my $self = shift;
my %input = @_;
return i_ft2_bbox($self->{id}, $input{size}, $input{sizew}, $input{string},
$input{utf8});
}
sub dpi {
my $self = shift;
my @old = i_ft2_getdpi($self->{id});
if (@_) {
my %hsh = @_;
my $result;
unless ($hsh{xdpi} && $hsh{ydpi}) {
if ($hsh{dpi}) {
$hsh{xdpi} = $hsh{ydpi} = $hsh{dpi};
}
else {
$Imager::ERRSTR = "dpi method requires xdpi and ydpi or just dpi";
return;
}
i_ft2_setdpi($self->{id}, $hsh{xdpi}, $hsh{ydpi}) or return;
}
}
return @old;
}
sub hinting {
my ($self, %opts) = @_;
i_ft2_sethinting($self->{id}, $opts{hinting} || 0);
}
sub _transform {
my $self = shift;
my %hsh = @_;
my $matrix = $hsh{matrix} or return undef;
return i_ft2_settransform($self->{id}, $matrix)
}
sub utf8 {
return 1;
}
# check if the font has the characters in the given string
sub has_chars {
my ($self, %hsh) = @_;
unless (defined $hsh{string} && length $hsh{string}) {
$Imager::ERRSTR = "No string supplied to \$font->has_chars()";
return;
}
return i_ft2_has_chars($self->{id}, $hsh{string},
_first($hsh{'utf8'}, $self->{utf8}, 0));
}
sub face_name {
my ($self) = @_;
i_ft2_face_name($self->{id});
}
sub can_glyph_names {
i_ft2_can_do_glyph_names();
}
sub glyph_names {
my ($self, %input) = @_;
my $string = $input{string};
defined $string
or return Imager->_set_error("no string parameter passed to glyph_names");
my $utf8 = _first($input{utf8}, 0);
my $reliable_only = _first($input{reliable_only}, 1);
my @names = i_ft2_glyph_name($self->{id}, $string, $utf8, $reliable_only);
@names or return Imager->_set_error(Imager->_error_as_msg);
return @names if wantarray;
return pop @names;
}
sub is_mm {
my ($self) = @_;
i_ft2_is_multiple_master($self->{id});
}
sub mm_axes {
my ($self) = @_;
my ($num_axis, $num_design, @axes) =
i_ft2_get_multiple_masters($self->{id})
or return Imager->_set_error(Imager->_error_as_msg);
return @axes;
}
sub set_mm_coords {
my ($self, %opts) = @_;
$opts{coords}
or return Imager->_set_error("Missing coords parameter");
ref($opts{coords}) && $opts{coords} =~ /ARRAY\(0x[\da-f]+\)$/
or return Imager->_set_error("coords parameter must be an ARRAY ref");
i_ft2_set_mm_coords($self->{id}, @{$opts{coords}})
or return Imager->_set_error(Imager->_error_as_msg);
return 1;
}
1;
__END__
=head1 NAME
Imager::Font::FT2 - font support using FreeType 2
=head1 SYNOPSIS
use Imager;
my $img = Imager->new;
my $font = Imager::Font->new(file => "foo.ttf", type => "ft2");
$img->string(... font => $font);
=head1 DESCRIPTION
This provides font support on FreeType 2.
=head1 CAVEATS
Unfortunately, older versions of Imager would install
C<Imager::Font::FreeType2> even if FreeType 2 wasn't available, and if
no font was created would succeed in loading the module. This means
that an existing C<FreeType2.pm> could cause a probe success for
supported font files, so I've renamed it.
=head1 AUTHOR
Tony Cook <tonyc@cpan.org>
=head1 SEE ALSO
Imager, Imager::Font.
=cut
| leighpauls/k2cro4 | third_party/perl/perl/vendor/lib/Imager/Font/FT2.pm | Perl | bsd-3-clause | 4,878 |
=pod
=head1 NAME
ASN1_STRING_print_ex, ASN1_STRING_print_ex_fp, ASN1_STRING_print - ASN1_STRING output routines
=head1 SYNOPSIS
#include <openssl/asn1.h>
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
int ASN1_STRING_print(BIO *out, const ASN1_STRING *str);
=head1 DESCRIPTION
These functions output an B<ASN1_STRING> structure. B<ASN1_STRING> is used to
represent all the ASN1 string types.
ASN1_STRING_print_ex() outputs B<str> to B<out>, the format is determined by
the options B<flags>. ASN1_STRING_print_ex_fp() is identical except it outputs
to B<fp> instead.
ASN1_STRING_print() prints B<str> to B<out> but using a different format to
ASN1_STRING_print_ex(). It replaces unprintable characters (other than CR, LF)
with '.'.
=head1 NOTES
ASN1_STRING_print() is a legacy function which should be avoided in new applications.
Although there are a large number of options frequently B<ASN1_STRFLGS_RFC2253> is
suitable, or on UTF8 terminals B<ASN1_STRFLGS_RFC2253 & ~ASN1_STRFLGS_ESC_MSB>.
The complete set of supported options for B<flags> is listed below.
Various characters can be escaped. If B<ASN1_STRFLGS_ESC_2253> is set the characters
determined by RFC2253 are escaped. If B<ASN1_STRFLGS_ESC_CTRL> is set control
characters are escaped. If B<ASN1_STRFLGS_ESC_MSB> is set characters with the
MSB set are escaped: this option should B<not> be used if the terminal correctly
interprets UTF8 sequences.
Escaping takes several forms.
If the character being escaped is a 16 bit character then the form "\UXXXX" is used
using exactly four characters for the hex representation. If it is 32 bits then
"\WXXXXXXXX" is used using eight characters of its hex representation. These forms
will only be used if UTF8 conversion is not set (see below).
Printable characters are normally escaped using the backslash '\' character. If
B<ASN1_STRFLGS_ESC_QUOTE> is set then the whole string is instead surrounded by
double quote characters: this is arguably more readable than the backslash
notation. Other characters use the "\XX" using exactly two characters of the hex
representation.
If B<ASN1_STRFLGS_UTF8_CONVERT> is set then characters are converted to UTF8
format first. If the terminal supports the display of UTF8 sequences then this
option will correctly display multi byte characters.
If B<ASN1_STRFLGS_IGNORE_TYPE> is set then the string type is not interpreted at
all: everything is assumed to be one byte per character. This is primarily for
debugging purposes and can result in confusing output in multi character strings.
If B<ASN1_STRFLGS_SHOW_TYPE> is set then the string type itself is printed out
before its value (for example "BMPSTRING"), this actually uses ASN1_tag2str().
The content of a string instead of being interpreted can be "dumped": this just
outputs the value of the string using the form #XXXX using hex format for each
octet.
If B<ASN1_STRFLGS_DUMP_ALL> is set then any type is dumped.
Normally non character string types (such as OCTET STRING) are assumed to be
one byte per character, if B<ASN1_STRFLGS_DUMP_UNKNOWN> is set then they will
be dumped instead.
When a type is dumped normally just the content octets are printed, if
B<ASN1_STRFLGS_DUMP_DER> is set then the complete encoding is dumped
instead (including tag and length octets).
B<ASN1_STRFLGS_RFC2253> includes all the flags required by RFC2253. It is
equivalent to:
ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB |
ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN ASN1_STRFLGS_DUMP_DER
=head1 SEE ALSO
L<X509_NAME_print_ex(3)>,
L<ASN1_tag2str(3)>
=head1 COPYRIGHT
Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the OpenSSL license (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
| openweave/openweave-core | third_party/openssl/openssl/doc/crypto/ASN1_STRING_print_ex.pod | Perl | apache-2.0 | 4,059 |
package Signal::Pending;
$Signal::Pending::VERSION = '0.008';
use strict;
use warnings FATAL => 'all';
use Config;
use POSIX qw/sigpending/;
use IPC::Signal qw/sig_num sig_name/;
use Carp qw/croak/;
my $sig_max = $Config{sig_count} - 1;
tie %Signal::Pending, __PACKAGE__;
sub TIEHASH {
my $class = shift;
my $self = { iterator => 1, };
return bless $self, $class;
}
sub _get_status {
my ($self, $num) = @_;
my $mask = POSIX::SigSet->new;
sigpending($mask);
return $mask->ismember($num);
}
sub FETCH {
my ($self, $key) = @_;
return $self->_get_status(sig_num($key));
}
sub STORE {
my ($self, $key, $value) = @_;
croak 'Can\'t assign to %Signal::Pending';
}
sub DELETE {
my ($self, $key) = @_;
croak 'Can\'t delete from %Signal::Pending';
}
sub CLEAR {
my ($self) = @_;
croak 'Can\'t clear %Signal::Pending';
}
sub EXISTS {
my ($self, $key) = @_;
return defined sig_num($key);
}
sub FIRSTKEY {
my $self = shift;
$self->{iterator} = 1;
return $self->NEXTKEY;
}
sub NEXTKEY {
my $self = shift;
if ($self->{iterator} <= $sig_max) {
my $num = $self->{iterator}++;
return wantarray ? (sig_name($num) => $self->_get_status($num)) : sig_name($num);
}
else {
return;
}
}
sub SCALAR {
my $self = shift;
my $mask = POSIX::SigSet->new;
sigpending($mask);
return scalar grep { $mask->ismember($_) } 1 .. $sig_max;
}
sub UNTIE {
}
sub DESTROY {
}
1; # End of Signal::Mask
# ABSTRACT: Signal pending status made easy
__END__
=pod
=encoding UTF-8
=head1 NAME
Signal::Pending - Signal pending status made easy
=head1 VERSION
version 0.008
=head1 SYNOPSIS
use Signal::Mask;
use Signal::Pending;
{
local $Signal::Mask{INT} = 1;
do {
something();
} while (not $Signal::Pending{INT})
}
#signal delivery gets postponed until now
=head1 DESCRIPTION
Signal::Pending is an abstraction around your process'/thread's pending signals. It can be used in combination with signal masks to handle signals in a controlled manner. The set of pending signals is available as the global hash %Signal::Pending.
=for Pod::Coverage SCALAR
=head1 AUTHOR
Leon Timmermans <fawaka@gmail.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2010 by Leon Timmermans.
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
| rosiro/wasarabi | local/lib/perl5/Signal/Pending.pm | Perl | mit | 2,371 |
package Svg::Scripting; # define a new package
require 5.000; # needs version 5, latest version 5.00402
require Exporter; # standard module for making functions public
@ISA = qw(Exporter);
@EXPORT = qw( drawScript beginScript endScript
drawStyle beginStyle endStyle );
# use Svg::Std qw( message_out );
use strict qw ( subs vars refs );
# draws an empty 'script' tag
sub drawScript {
my $self = shift;
$self->{LineNumber}++;
if ($self->{inBoundary} =~ /^empty$/) {$self->{inBoundary} = pop(@{$self->{inQueue}})}
if ($self->{inBoundary} =~ /^(svg|g|defs|glyph|missing-glyph|symbol|marker|mask|pattern|a)$/) {
$self->newline();
$self->indent();
$self->svgPrint("<script");
my @arguments = @_;
for (my $i=0; $i<@arguments; $i++) {
$_ = $arguments[$i];
SWITCH: {
/^externalResourcesRequired$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reBoolean}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^type$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^xlink:href$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
}
}
@arguments = $self->stdAttrs(@arguments);
@arguments = $self->xlinkRefAttrs(@arguments);
if (@arguments > 0) {$self->message_err("unrecognised argument(s) or value(s) - @arguments", $self->{LineNumber})}
$self->svgPrint(" />");
} else {$self->message_err("element \"script\" not allowed in the \"$self->{inBoundary}\" boundary", $self->{LineNumber})}
}
# opens a 'script' boundary
sub beginScript {
my $self = shift;
$self->{LineNumber}++;
if ($self->{inBoundary} =~ /^empty$/) {$self->{inBoundary} = pop(@{$self->{inQueue}})}
if ($self->{inBoundary} =~ /^(svg|g|defs|glyph|missing-glyph|symbol|marker|mask|pattern|a)$/) {
$self->newline();
$self->indent();
$self->svgPrint("<script");
push(@{$self->{inQueue}}, $self->{inBoundary});
$self->{inBoundary} = "script";
$self->{tab}+=1;
my @arguments = @_;
for (my $i=0; $i<@arguments; $i++) {
$_ = $arguments[$i];
SWITCH: {
/^externalResourcesRequired$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reBoolean}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^type$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^xlink:href$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
}
}
@arguments = $self->stdAttrs(@arguments);
@arguments = $self->xlinkRefAttrs(@arguments);
if (@arguments > 0) {$self->message_err("unrecognised argument(s) or value(s) - @arguments", $self->{LineNumber})}
$self->svgPrint(">");
} else {
$self->message_err("element \"script\" not allowed in the \"$self->{inBoundary}\" boundary", $self->{LineNumber});
push(@{$self->{inQueue}}, $self->{inBoundary});
$self->{inBoundary} = "empty";
}
}
# closes a 'script' boundary
sub endScript {
my $self = shift;
$self->{LineNumber}++;
$self->{tab}-=1;
$self->newline();
$self->indent();
$self->svgPrint("</script>");
$self->{inBoundary} = pop(@{$self->{inQueue}});
}
# draws an empty 'style' tag
sub drawStyle {
my $self = shift;
$self->{LineNumber}++;
if ($self->{inBoundary} =~ /^empty$/) {$self->{inBoundary} = pop(@{$self->{inQueue}})}
if ($self->{inBoundary} =~ /^(svg|g|defs|glyph|missing-glyph|symbol|marker|mask|pattern|a)$/) {
$self->newline();
$self->indent();
$self->svgPrint("<style");
my @arguments = @_;
for (my $i=0; $i<@arguments; $i++) {
$_ = $arguments[$i];
SWITCH: {
/^type$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^xml:space$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^(default|preserve)$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^media$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^title$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
}
}
@arguments = $self->stdAttrs(@arguments);
if (@arguments > 0) {$self->message_err("unrecognised argument(s) or value(s) - @arguments", $self->{LineNumber})}
$self->svgPrint(" />");
} else {$self->message_err("element \"style\" not allowed in the \"$self->{inBoundary}\" boundary", $self->{LineNumber})}
}
# opens a 'style' boundary
sub beginStyle {
my $self = shift;
$self->{LineNumber}++;
if ($self->{inBoundary} =~ /^empty$/) {$self->{inBoundary} = pop(@{$self->{inQueue}})}
if ($self->{inBoundary} =~ /^(svg|g|defs|glyph|missing-glyph|symbol|marker|mask|pattern|a)$/) {
$self->newline();
$self->indent();
$self->svgPrint("<style");
push(@{$self->{inQueue}}, $self->{inBoundary});
$self->{inBoundary} = "style";
$self->{tab}+=1;
my @arguments = @_;
for (my $i=0; $i<@arguments; $i++) {
$_ = $arguments[$i];
SWITCH: {
/^type$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^xml:space$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^(default|preserve)$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^media$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
/^title$/ &&
do {
(my $attrib, my $value) = splice(@arguments, $i--, 2);
if ($value =~ /^$self->{reAnyOneOrMore}$/) {
$self->svgPrint(" $attrib=\"$value\"");
} else {$self->message_err("\"$attrib\" attribute value not valid", $self->{LineNumber})}
last SWITCH;
};
}
}
@arguments = $self->stdAttrs(@arguments);
if (@arguments > 0) {$self->message_err("unrecognised argument(s) or value(s) - @arguments", $self->{LineNumber})}
$self->svgPrint(">");
} else {
$self->message_err("element \"style\" not allowed in the \"$self->{inBoundary}\" boundary", $self->{LineNumber});
push(@{$self->{inQueue}}, $self->{inBoundary});
$self->{inBoundary} = "empty";
}
}
# closes a 'style' boundary
sub endStyle {
my $self = shift;
$self->{LineNumber}++;
$self->{tab}-=1;
$self->newline();
$self->indent();
$self->svgPrint("</style>");
$self->{inBoundary} = pop(@{$self->{inQueue}});
}
1; # Perl notation to end a module | ablifedev/ABLIRC | ABLIRC/bin/Clip-Seq/ABLIFE/svg/Svg/Scripting.pm | Perl | mit | 8,858 |
package UUIDB::Util;
use v5.10;
use strict;
use warnings;
use Carp qw( carp croak confess );
use Scalar::Util qw( blessed );
use base qw( Exporter );
our @EXPORT_OK = qw(
check_args
is_loaded
safe_require
);
# TODO: POD
# TODO: make it possible to pass an arrayref of constraints, all of which must
# be satisfied (where "regex" or "coderef" are also valid types)
sub check_args (%) {
my (%arg_details) = @_;
my $args = delete $arg_details{args};
croak "Missing args to check"
unless $args;
croak "Args must be a hashref, not " . ref $args
unless ref( $args )
and ref( $args ) eq 'HASH';
my $validate = sub {
my ($data, $validation) = @_;
my @checks = (
ref $validation && ref $validation eq "ARRAY"
? @$validation
: ( $validation )
);
foreach my $check ( @checks ) {
if ( blessed $check ) {
if ( ref $check eq "Regexp" ) {
my $pass = eval { $data =~ $check };
confess "Data failed regex $check: " . ( $data // "undef" )
unless $pass;
} else {
croak "Expected Type::Tiny, not " . ref( $check )
unless blessed $check
and (
$check->isa( "Type::Tiny" )
or $check->can( "assert_valid" )
);
my $checked = $check->validate( $data );
confess $checked if defined $checked;
}
} elsif ( ref $check eq "CODE" ) {
local $@;
my $pass = eval { $check->( $data ) };
confess $@ if $@;
confess "Data failed sub check" unless $pass;
} else {
confess "Invalid validator";
}
}
};
my %known_elements = map { $_ => 1 } keys %$args;
if (my $must = delete $arg_details{must}) {
MUST: foreach my $key ( keys %$must ) {
delete $known_elements{$key}
if exists $known_elements{$key};
confess "Missing required $key"
unless exists $args->{$key};
$validate->( $args->{$key}, $must->{$key} );
}
}
if (my $should = delete $arg_details{should}) {
SHOULD: foreach my $key ( keys %$should ) {
delete $known_elements{$key}
if exists $known_elements{$key};
unless ( exists( $args->{$key} ) ) {
warn "Should have passed a $key but didn't, skipping";
next SHOULD;
}
unless ( defined( $args->{$key} ) ) {
warn "Skipping undefined $key";
next SHOULD;
}
$validate->( $args->{$key}, $should->{$key} );
}
}
if (my $can = delete $arg_details{can}) {
return 1 if ( !ref( $can ) && $can eq "*" );
CAN: foreach my $key ( keys %$can ) {
delete $known_elements{$key}
if exists $known_elements{$key};
next CAN unless defined( $args->{$key} );
$validate->( $args->{$key}, $can->{$key} );
}
}
if ( scalar( keys( %arg_details ) ) ) {
croak "Found unrecognized validation spec in call to check_args";
}
if ( scalar( keys( %known_elements ) ) ) {
croak "Found unrecognized args in call to check_args";
}
return 1;
}
sub is_loaded (_) {
my ($package_name) = @_;
$package_name =~ s{::}{/}g;
$package_name =~ s{(?<!\.pm)\Z}{.pm};
return exists $INC{ $package_name };
}
sub safe_require (_) {
my ($package_name) = @_;
$package_name =~ s{::}{/}g;
$package_name =~ s{(?<!\.pm)\Z}{.pm};
require $package_name;
}
1;
| PLTGit/uuidb | lib/UUIDB/Util.pm | Perl | mit | 3,908 |
=head1 NAME
App::perlbrew - Manage perl installations in your $HOME
=head1 SYNOPSIS
# Initialize
perlbrew init
# Install some Perls
perlbrew install perl-5.8.1
perlbrew install perl-5.11.5
# See what were installed
perlbrew installed
# Switch perl in the $PATH
perlbrew switch perl-5.11.5
perl -v
# Switch to another version
perlbrew switch perl-5.8.1
perl -v
# Switch to a certain perl executable not managed by perlbrew.
perlbrew switch /usr/bin/perl
# Or turn it off completely. Useful when you messed up too deep.
perlbrew off
# Use 'switch' command to turn it back on.
perlbrew switch perl-5.11.5
=head1 DESCRIPTION
perlbrew is a program to automate the building and installation of
perl in the users HOME. At the moment, it installs everything to
C<~/perl5/perlbrew>, and requires you to tweak your PATH by including a
bashrc/cshrc file it provides. You then can benefit from not having
to run 'sudo' commands to install cpan modules because those are
installed inside your HOME too. It's almost like an isolated perl
environments.
=head1 INSTALLATION
The recommended way to install perlbrew is to run these statements in
your shell:
curl -LO http://xrl.us/perlbrew
chmod +x perlbrew
./perlbrew install
After that, C<perlbrew> installs itself to C<~/perl5/perlbrew/bin>,
and you should follow the instruction on screen to setup your
C<.bashrc> or C<.cshrc> to put it in your PATH.
The downloaded perlbrew is a self-contained standalone program that
embed all non-core modules it uses. It should be runnable with perl
5.8 or high versions of perls.
You may also install perlbrew from CPAN with cpan / cpanp / cpanm:
cpan App::perlbrew
This installs 'perlbrew' into your current PATH and it is always
executed with your current perl.
=head1 USAGE
Please read the program usage by running
perlbrew
(No arguments.) To read a more detail one:
perlbrew -h
Alternatively, this should also do:
perldoc perlbrew
If you messed up to much or get confused by having to many perls
installed, you can do:
perlbrew switch /usr/bin/perl
It will make sure that your current perl in the PATH is pointing
to C</usr/bin/perl>.
As a matter of fact the C<switch> command checks whether the given
argument is an executale or not, and create a symlink named 'perl' to
it if it is. If you really want to you are able to do:
perlbrew switch /usr/bin/perl6
But maybe not. After running this you might not be able to run
perlbrew anymore. So be careful not making mistakes there.
=head1 AUTHOR
Kang-min Liu C<< <gugod@gugod.org> >>
=head1 COPYRIGHT
Copyright (c) 2010, Kang-min Liu C<< <gugod@gugod.org> >>.
The standalone executable contains the following modules embedded.
=over 4
=item L<HTTP::Lite>
Copyright (c) 2000-2002 Roy Hopper, 2009 Adam Kennedy.
Licensed under the same term as Perl itself.
=back
=head1 LICENCE
The MIT License
=head1 CONTRIBUTORS
Patches and code improvements were contributed by:
Tatsuhiko Miyagawa, Chris Prather, Yanick Champoux, aero
=head1 DISCLAIMER OF WARRANTY
BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
NECESSARY SERVICING, REPAIR, OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
=cut
| miyagawa/App-perlbrew | README.pod | Perl | mit | 4,378 |
package #
Date::Manip::TZ::assama00;
# Copyright (c) 2008-2015 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: Wed Nov 25 11:33:42 EST 2015
# Data version: tzdata2015g
# Code version: tzcode2015g
# 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.52';
END { undef $VERSION; }
%Dates = (
1 =>
[
[ [1,1,2,0,0,0],[1,1,2,4,27,53],'+04:27:53',[4,27,53],
'LMT',0,[1924,5,1,19,32,6],[1924,5,1,23,59,59],
'0001010200:00:00','0001010204:27:53','1924050119:32:06','1924050123:59:59' ],
],
1924 =>
[
[ [1924,5,1,19,32,7],[1924,5,1,23,32,7],'+04:00:00',[4,0,0],
'SAMT',0,[1930,6,20,19,59,59],[1930,6,20,23,59,59],
'1924050119:32:07','1924050123:32:07','1930062019:59:59','1930062023:59:59' ],
],
1930 =>
[
[ [1930,6,20,20,0,0],[1930,6,21,1,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1981,3,31,18,59,59],[1981,3,31,23,59,59],
'1930062020:00:00','1930062101:00:00','1981033118:59:59','1981033123:59:59' ],
],
1981 =>
[
[ [1981,3,31,19,0,0],[1981,4,1,1,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1981,9,30,17,59,59],[1981,9,30,23,59,59],
'1981033119:00:00','1981040101:00:00','1981093017:59:59','1981093023:59:59' ],
[ [1981,9,30,18,0,0],[1981,10,1,0,0,0],'+06:00:00',[6,0,0],
'TAST',0,[1982,3,31,17,59,59],[1982,3,31,23,59,59],
'1981093018:00:00','1981100100:00:00','1982033117:59:59','1982033123:59:59' ],
],
1982 =>
[
[ [1982,3,31,18,0,0],[1982,4,1,0,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1982,9,30,17,59,59],[1982,9,30,23,59,59],
'1982033118:00:00','1982040100:00:00','1982093017:59:59','1982093023:59:59' ],
[ [1982,9,30,18,0,0],[1982,9,30,23,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1983,3,31,18,59,59],[1983,3,31,23,59,59],
'1982093018:00:00','1982093023:00:00','1983033118:59:59','1983033123:59:59' ],
],
1983 =>
[
[ [1983,3,31,19,0,0],[1983,4,1,1,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1983,9,30,17,59,59],[1983,9,30,23,59,59],
'1983033119:00:00','1983040101:00:00','1983093017:59:59','1983093023:59:59' ],
[ [1983,9,30,18,0,0],[1983,9,30,23,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1984,3,31,18,59,59],[1984,3,31,23,59,59],
'1983093018:00:00','1983093023:00:00','1984033118:59:59','1984033123:59:59' ],
],
1984 =>
[
[ [1984,3,31,19,0,0],[1984,4,1,1,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1984,9,29,20,59,59],[1984,9,30,2,59,59],
'1984033119:00:00','1984040101:00:00','1984092920:59:59','1984093002:59:59' ],
[ [1984,9,29,21,0,0],[1984,9,30,2,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1985,3,30,20,59,59],[1985,3,31,1,59,59],
'1984092921:00:00','1984093002:00:00','1985033020:59:59','1985033101:59:59' ],
],
1985 =>
[
[ [1985,3,30,21,0,0],[1985,3,31,3,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1985,9,28,20,59,59],[1985,9,29,2,59,59],
'1985033021:00:00','1985033103:00:00','1985092820:59:59','1985092902:59:59' ],
[ [1985,9,28,21,0,0],[1985,9,29,2,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1986,3,29,20,59,59],[1986,3,30,1,59,59],
'1985092821:00:00','1985092902:00:00','1986032920:59:59','1986033001:59:59' ],
],
1986 =>
[
[ [1986,3,29,21,0,0],[1986,3,30,3,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1986,9,27,20,59,59],[1986,9,28,2,59,59],
'1986032921:00:00','1986033003:00:00','1986092720:59:59','1986092802:59:59' ],
[ [1986,9,27,21,0,0],[1986,9,28,2,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1987,3,28,20,59,59],[1987,3,29,1,59,59],
'1986092721:00:00','1986092802:00:00','1987032820:59:59','1987032901:59:59' ],
],
1987 =>
[
[ [1987,3,28,21,0,0],[1987,3,29,3,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1987,9,26,20,59,59],[1987,9,27,2,59,59],
'1987032821:00:00','1987032903:00:00','1987092620:59:59','1987092702:59:59' ],
[ [1987,9,26,21,0,0],[1987,9,27,2,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1988,3,26,20,59,59],[1988,3,27,1,59,59],
'1987092621:00:00','1987092702:00:00','1988032620:59:59','1988032701:59:59' ],
],
1988 =>
[
[ [1988,3,26,21,0,0],[1988,3,27,3,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1988,9,24,20,59,59],[1988,9,25,2,59,59],
'1988032621:00:00','1988032703:00:00','1988092420:59:59','1988092502:59:59' ],
[ [1988,9,24,21,0,0],[1988,9,25,2,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1989,3,25,20,59,59],[1989,3,26,1,59,59],
'1988092421:00:00','1988092502:00:00','1989032520:59:59','1989032601:59:59' ],
],
1989 =>
[
[ [1989,3,25,21,0,0],[1989,3,26,3,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1989,9,23,20,59,59],[1989,9,24,2,59,59],
'1989032521:00:00','1989032603:00:00','1989092320:59:59','1989092402:59:59' ],
[ [1989,9,23,21,0,0],[1989,9,24,2,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1990,3,24,20,59,59],[1990,3,25,1,59,59],
'1989092321:00:00','1989092402:00:00','1990032420:59:59','1990032501:59:59' ],
],
1990 =>
[
[ [1990,3,24,21,0,0],[1990,3,25,3,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1990,9,29,20,59,59],[1990,9,30,2,59,59],
'1990032421:00:00','1990032503:00:00','1990092920:59:59','1990093002:59:59' ],
[ [1990,9,29,21,0,0],[1990,9,30,2,0,0],'+05:00:00',[5,0,0],
'SAMT',0,[1991,3,30,20,59,59],[1991,3,31,1,59,59],
'1990092921:00:00','1990093002:00:00','1991033020:59:59','1991033101:59:59' ],
],
1991 =>
[
[ [1991,3,30,21,0,0],[1991,3,31,3,0,0],'+06:00:00',[6,0,0],
'SAMST',1,[1991,8,31,17,59,59],[1991,8,31,23,59,59],
'1991033021:00:00','1991033103:00:00','1991083117:59:59','1991083123:59:59' ],
[ [1991,8,31,18,0,0],[1991,9,1,0,0,0],'+06:00:00',[6,0,0],
'UZST',1,[1991,9,28,20,59,59],[1991,9,29,2,59,59],
'1991083118:00:00','1991090100:00:00','1991092820:59:59','1991092902:59:59' ],
[ [1991,9,28,21,0,0],[1991,9,29,2,0,0],'+05:00:00',[5,0,0],
'UZT',0,[9999,12,31,0,0,0],[9999,12,31,5,0,0],
'1991092821:00:00','1991092902:00:00','9999123100:00:00','9999123105:00:00' ],
],
);
%LastRule = (
);
1;
| jkb78/extrajnm | local/lib/perl5/Date/Manip/TZ/assama00.pm | Perl | mit | 6,840 |
#!/usr/bin/env perl
=head1 NAME
AddNdprotocolDescriptionChado
=head1 SYNOPSIS
mx-run ThisPackageName [options] -H hostname -D dbname -u username [-F]
this is a subclass of L<CXGN::Metadata::Dbpatch>
see the perldoc of parent class for more details.
=head1 DESCRIPTION
Add a description column to the Chado table nd_protocol
This change will go into Chado version 1.4. See GMOD git repo for details.
DO NOT ALTER CHADO TABLES WITHOUT COORDINATING WITH GMOD FIRST!
This subclass uses L<Moose>. The parent class uses L<MooseX::Runnable>
=head1 AUTHOR
Naama Menda<nm249@cornell.edu>
=head1 COPYRIGHT & LICENSE
Copyright 2010 Boyce Thompson Institute for Plant Research
This program is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
package AddNdprotocolDescriptionChado;
use Moose;
extends 'CXGN::Metadata::Dbpatch';
has '+description' => ( default => <<'' );
patch for adding descriotion column to chado table nd_protocol. This change will go into Chado version 1.4. DO NOT ALTER CHADO TABLES WITHOUT COORDINATING FIRST WITH GMOD!
sub patch {
my $self=shift;
print STDOUT "Executing the patch:\n " . $self->name . ".\n\nDescription:\n ". $self->description . ".\n\nExecuted by:\n " . $self->username . " .";
print STDOUT "\nChecking if this db_patch was executed before or if previous db_patches have been executed.\n";
print STDOUT "\nExecuting the SQL commands.\n";
$self->dbh->do(<<EOSQL);
--do your SQL here
--
ALTER TABLE nd_protocol ADD COLUMN description varchar(255) DEFAULT null;
EOSQL
print "You're done!\n";
}
####
1; #
####
| solgenomics/sgn | db/00064/AddNdprotocolDescriptionChado.pm | Perl | mit | 1,643 |
/* Part of Extended Tools for SWI-Prolog
Author: Edison Mera Menendez
E-mail: efmera@gmail.com
WWW: https://github.com/edisonm/xtools
Copyright (C): 2015, Process Design Center, Breda, The Netherlands.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
:- module(record_locations, [record_location/0]).
:- use_module(library(extra_location)). % shold be the first
:- use_module(library(apply)).
:- use_module(library(filepos_line)).
:- use_module(library(from_utils)).
:- multifile
system:term_expansion/4,
system:goal_expansion/4.
:- dynamic record_location/0.
record_location. % Enable recording of locations
:- thread_local rl_tmp/3. % trick to detect if term_expansion was applied
% Extra location for assertions of a given predicate
extra_location:loc_declaration(Head, M, assertion(Status, Type), From) :-
assertions:asr_head_prop(_, CM, Head, Status, Type, _, From),
predicate_property(CM:Head, implementation_module(M)).
:- multifile skip_record_decl/1.
skip_record_decl(initialization(_)) :- !.
skip_record_decl(Decl) :-
nonvar(Decl),
'$current_source_module'(M),
predicate_property(M:Decl, imported_from(assertions)),
functor(Decl, Type, Arity),
memberchk(Arity, [1, 2]),
assertions:assrt_type(Type), !.
:- public record_extra_location/4.
record_extra_location((:- Decl),
term_position(_, _, _, _, [DPos])) -->
( {\+ skip_record_decl(Decl)}
->record_extra_decl(Decl, DPos)
; []
).
record_extra_decl(Decl, DPos) -->
{ '$current_source_module'(SM),
declaration_pos(Decl, DPos, SM, M, IdL, ArgL, PosL)
},
foldl(assert_declaration(M), IdL, ArgL, PosL),
!.
record_extra_decl(Goal, Pos) -->
{ nonvar(Goal),
source_location(File, Line),
retractall(rl_tmp(File, Line, _)),
asserta(rl_tmp(File, Line, 1)),
assert_position(Goal, Pos, body)
}.
declaration_pos(DM:Decl, term_position(_, _, _, _, [_, DPos]), _, M, ID, U, Pos) :-
declaration_pos(Decl, DPos, DM, M, ID, U, Pos).
declaration_pos(module(M, L), DPos,
_, M, [module_2, export], [module(M, L), L], [DPos, Pos]) :-
DPos = term_position(_, _, _, _, [_, Pos]).
declaration_pos(volatile(L), term_position(_, _, _, _, PosL),
M, M, [volatile], [L], PosL).
declaration_pos(dynamic(L), term_position(_, _, _, _, PosL),
M, M, [dynamic], [L], PosL).
declaration_pos(thread_local(L), term_position(_, _, _, _, PosL),
M, M, [thread_local], [L], PosL).
declaration_pos(public(L), term_position(_, _, _, _, PosL),
M, M, [public], [L], PosL).
declaration_pos(export(L), term_position(_, _, _, _, PosL),
M, M, [export], [L], PosL).
declaration_pos(multifile(L), term_position(_, _, _, _, PosL),
M, M, [multifile], [L], PosL).
declaration_pos(discontiguous(L), term_position(_, _, _, _, PosL),
M, M, [discontiguous], [L], PosL).
declaration_pos(meta_predicate(L), term_position(_, _, _, _, PosL),
M, M, [meta_predicate], [L], PosL).
declaration_pos(reexport(SM:DU), DPos, _, M, ID, U, Pos) :- !,
declaration_pos(reexport(DU), DPos, SM, M, ID, U, Pos).
declaration_pos(use_module(SM:DU), DPos, _, M, ID, U, Pos) :- !,
declaration_pos(use_module(DU), DPos, SM, M, ID, U, Pos).
declaration_pos(use_module(SM:DU, L), DPos, ID, _, M, U, Pos) :- !,
declaration_pos(use_module(DU, L), DPos, ID, SM, M, U, Pos).
declaration_pos(reexport(SM:DU, L), DPos, ID, _, M, U, Pos) :- !,
declaration_pos(reexport(DU, L), DPos, ID, SM, M, U, Pos).
declaration_pos(include(U), DPos, M, M, [include], [U], [DPos]).
declaration_pos(use_module(U), DPos, M, M, [use_module], [U], [DPos]).
declaration_pos(reexport(U), DPos, M, M, [reexport], [U], [DPos]).
declaration_pos(consult(U), DPos, M, M, [consult], [U], [DPos]).
declaration_pos(reexport(U, L), DPos, M, M,
[reexport_2, reexport(U)], [reexport(U, L), L], [DPos, Pos]) :-
DPos = term_position(_, _, _, _, [_, Pos]).
declaration_pos(use_module(U, L), DPos, M, M,
[use_module_2, import(U)], [use_module(U, L), L], [DPos, Pos]) :-
DPos = term_position(_, _, _, _, [_, Pos]).
:- meta_predicate foldsequence(4,?,?,?,?).
foldsequence(G, A, B) --> foldsequence_(A, G, B).
foldsequence_(A, _, _) -->
{var(A)},
!.
% call(G, A).
foldsequence_([], _, _) --> !.
foldsequence_([E|L], G, list_position(_, _, PosL, _)) -->
!,
foldl(foldsequence(G), [E|L], PosL).
foldsequence_((A, B), G, term_position(_, _, _, _, [PA, PB])) -->
!,
foldsequence_(A, G, PA),
foldsequence_(B, G, PB).
foldsequence_(A, G, PA) --> call(G, A, PA).
assert_declaration(M, Declaration, Sequence, Pos) -->
foldsequence(assert_declaration_one(Declaration, M), Sequence, Pos).
assert_declaration_one(reexport(U), M, PI, Pos) -->
!,
assert_reexport_declaration_2(PI, U, Pos, M).
assert_declaration_one(Declaration, _, M:PI,
term_position(_, _, _, _, [_, Pos])) -->
!,
assert_declaration_one(Declaration, M, PI, Pos).
assert_declaration_one(Declaration, M, F/A, Pos) -->
{ atom(F),
integer(A)
},
!,
{functor(H, F, A)},
assert_position(H, M, Declaration, Pos).
assert_declaration_one(Declaration, M, F//A1, Pos) -->
{ atom(F),
integer(A1)
},
!,
{ A is A1+2,
functor(H, F, A)
},
assert_position(H, M, Declaration, Pos).
assert_declaration_one(Declaration, M, H, Pos) -->
assert_position(H, M, Declaration, Pos).
assert_reexport_declaration_2((F/A as G), U, Pos, M) -->
{functor(H, G, A)},
assert_position(H, M, reexport(U, [F/A as G]), Pos).
assert_reexport_declaration_2(F/A, U, Pos, M) -->
{functor(H, F, A)},
assert_position(H, M, reexport(U, [F/A]), Pos).
assert_reexport_declaration_2(op(_, _, _), _, _, _) --> [].
assert_reexport_declaration_2(except(_), _, _, _) --> [].
assert_position(H, M, Type, TermPos) :-
assert_position(H, M, Type, TermPos, Clauses, []),
compile_aux_clauses(Clauses).
assert_position(H, M, Type, TermPos) -->
{ source_location(File, Line1),
( nonvar(TermPos)
->arg(1, TermPos, Chars),
filepos_line(File, Chars, Line, LinePos)
% Meld TermPos because later the source code will not be available and
% therefore we will not be able to get LinePos
; Line = Line1,
LinePos = -1
)
},
assert_location(H, M, Type, File, Line, file(File, Line, LinePos, Chars)).
assert_location(H, M, Type, File, Line, From) -->
( {\+ have_extra_location(From, H, M, Type)}
->['$source_location'(File, Line):extra_location:loc_declaration(H, M, Type, From)]
; []
).
/*
have_extra_location(file(File, Line, _, _), H, M, Type) :- !,
extra_location(H, M, Type, From),
from_to_file(From, File),
from_to_line(From, Line).
have_extra_location(From, H, M, Type) :-
extra_location(H, M, Type, From).
*/
have_extra_location(From1, H, M, Type) :-
extra_location(H, M, Type, From),
subsumes_from(From1, From).
system:term_expansion(Term, Pos, [Term|Clauses], Pos) :-
record_location,
source_location(File, Line),
( rl_tmp(File, Line, _)
->fail
; retractall(rl_tmp(_, _, _)),
asserta(rl_tmp(File, Line, 0 )),
record_extra_location(Term, Pos, Clauses, []),
Clauses \= []
).
redundant((_,_)).
redundant((_;_)).
redundant((_:_)).
redundant(true).
redundant(!).
assert_position(G, Pos, T) :-
'$current_source_module'(M),
assert_position(G, M, T, Pos).
:- public rl_goal_expansion/2.
rl_goal_expansion(Goal, Pos) :-
callable(Goal),
\+ redundant(Goal),
source_location(File, Line),
( rl_tmp(File, Line, Flag)
->Flag == 1
; true
),
b_getval('$term', Term),
memberchk(Term, [(:-_), []]),
\+ clause(declaration_pos(Goal, _, _, _, _, _, _), _),
\+ skip_record_decl(Goal),
assert_position(Goal, Pos, goal),
!.
system:goal_expansion(Goal, Pos, _, _) :-
record_location,
rl_goal_expansion(Goal, Pos),
fail.
| TeamSPoon/logicmoo_workspace | packs_lib/xtools/prolog/record_locations.pl | Perl | mit | 9,442 |
# 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::V10::Enums::FeedItemQualityDisapprovalReasonEnum;
use strict;
use warnings;
use Const::Exporter enums => [
UNSPECIFIED => "UNSPECIFIED",
UNKNOWN => "UNKNOWN",
PRICE_TABLE_REPETITIVE_HEADERS => "PRICE_TABLE_REPETITIVE_HEADERS",
PRICE_TABLE_REPETITIVE_DESCRIPTION => "PRICE_TABLE_REPETITIVE_DESCRIPTION",
PRICE_TABLE_INCONSISTENT_ROWS => "PRICE_TABLE_INCONSISTENT_ROWS",
PRICE_DESCRIPTION_HAS_PRICE_QUALIFIERS =>
"PRICE_DESCRIPTION_HAS_PRICE_QUALIFIERS",
PRICE_UNSUPPORTED_LANGUAGE => "PRICE_UNSUPPORTED_LANGUAGE",
PRICE_TABLE_ROW_HEADER_TABLE_TYPE_MISMATCH =>
"PRICE_TABLE_ROW_HEADER_TABLE_TYPE_MISMATCH",
PRICE_TABLE_ROW_HEADER_HAS_PROMOTIONAL_TEXT =>
"PRICE_TABLE_ROW_HEADER_HAS_PROMOTIONAL_TEXT",
PRICE_TABLE_ROW_DESCRIPTION_NOT_RELEVANT =>
"PRICE_TABLE_ROW_DESCRIPTION_NOT_RELEVANT",
PRICE_TABLE_ROW_DESCRIPTION_HAS_PROMOTIONAL_TEXT =>
"PRICE_TABLE_ROW_DESCRIPTION_HAS_PROMOTIONAL_TEXT",
PRICE_TABLE_ROW_HEADER_DESCRIPTION_REPETITIVE =>
"PRICE_TABLE_ROW_HEADER_DESCRIPTION_REPETITIVE",
PRICE_TABLE_ROW_UNRATEABLE => "PRICE_TABLE_ROW_UNRATEABLE",
PRICE_TABLE_ROW_PRICE_INVALID => "PRICE_TABLE_ROW_PRICE_INVALID",
PRICE_TABLE_ROW_URL_INVALID => "PRICE_TABLE_ROW_URL_INVALID",
PRICE_HEADER_OR_DESCRIPTION_HAS_PRICE =>
"PRICE_HEADER_OR_DESCRIPTION_HAS_PRICE",
STRUCTURED_SNIPPETS_HEADER_POLICY_VIOLATED =>
"STRUCTURED_SNIPPETS_HEADER_POLICY_VIOLATED",
STRUCTURED_SNIPPETS_REPEATED_VALUES => "STRUCTURED_SNIPPETS_REPEATED_VALUES",
STRUCTURED_SNIPPETS_EDITORIAL_GUIDELINES =>
"STRUCTURED_SNIPPETS_EDITORIAL_GUIDELINES",
STRUCTURED_SNIPPETS_HAS_PROMOTIONAL_TEXT =>
"STRUCTURED_SNIPPETS_HAS_PROMOTIONAL_TEXT"
];
1;
| googleads/google-ads-perl | lib/Google/Ads/GoogleAds/V10/Enums/FeedItemQualityDisapprovalReasonEnum.pm | Perl | apache-2.0 | 2,405 |
=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 EnsEMBL::Web::Component::StructuralVariation::LocalGenes;
use strict;
use base qw(EnsEMBL::Web::Component::LocalGenes);
1;
| Ensembl/ensembl-webcode | modules/EnsEMBL/Web/Component/StructuralVariation/LocalGenes.pm | Perl | apache-2.0 | 845 |
#!/usr/bin/perl
use strict;
use warnings;
use File::Basename;
use CQS::PBS;
use CQS::ConfigUtils;
use CQS::SystemUtils;
use CQS::FileUtils;
use CQS::NGSCommon;
use CQS::StringUtils;
use CQS::ProgramWrapperOneToMany;
use Test::More tests => 4;
my $test = CQS::ProgramWrapperOneToMany->new();
my $config = {
general => {
task_name => "one2many",
},
"test" => {
class => "CQS::ProgramWrapperOneToMany",
target_dir => "/test",
source => {
"G1" => [ "S1_1", "S1_2" ],
"G2" => [ "S2_1", "S2_2" ],
},
output_file_ext => "._ITER_.1.csv",
output_other_ext => "._ITER_.2.csv",
iteration => 3,
output_to_same_folder => 1,
pbs => {
email => "a\@b.c",
}
},
};
#test result
my $expect_result = {
'G1_ITER_1' => ['/test/result/G1.1.1.csv','/test/result/G1.1.2.csv'],
'G1_ITER_2' => ['/test/result/G1.2.1.csv','/test/result/G1.2.2.csv'],
'G1_ITER_3' => ['/test/result/G1.3.1.csv','/test/result/G1.3.2.csv'],
'G2_ITER_1' => ['/test/result/G2.1.1.csv','/test/result/G2.1.2.csv'],
'G2_ITER_2' => ['/test/result/G2.2.1.csv','/test/result/G2.2.2.csv'],
'G2_ITER_3' => ['/test/result/G2.3.1.csv','/test/result/G2.3.2.csv'],
};
my $actual_result = $test->result( $config, "test" );
is_deeply( $actual_result, $expect_result );
#test pbs
my $expect_pbs = {
'G1' => '/test/pbs/G1_o2m.pbs',
'G2' => '/test/pbs/G2_o2m.pbs'
};
my $actual_pbs = $test->get_pbs_files( $config, "test" );
is_deeply( $actual_pbs, $expect_pbs );
#test result_pbs
my $expect_pbs_sample_map = {
'/test/pbs/G1_o2m.pbs' => ['G1'],
'/test/pbs/G2_o2m.pbs' => ['G2']
};
my $pbs_sample_map = $test->get_pbs_source($config, "test");
is_deeply( $pbs_sample_map, $expect_pbs_sample_map );
#test result_pbs
my $expect_result_pbs_map = {
'G1_ITER_1' => '/test/pbs/G1_o2m.pbs',
'G1_ITER_2' => '/test/pbs/G1_o2m.pbs',
'G1_ITER_3' => '/test/pbs/G1_o2m.pbs',
'G2_ITER_1' => '/test/pbs/G2_o2m.pbs',
'G2_ITER_2' => '/test/pbs/G2_o2m.pbs',
'G2_ITER_3' => '/test/pbs/G2_o2m.pbs',
};
my $result_pbs_map = $test->get_result_pbs($config, "test");
is_deeply( $result_pbs_map, $expect_result_pbs_map );
1 | shengqh/ngsperl | test/CQS/TestProgramWrapperOneToMany.pl | Perl | apache-2.0 | 2,145 |
###########################################$
# Copyright 2008-2010 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompanying this file. This file 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.
###########################################$
# __ _ _ ___
# ( )( \/\/ )/ __)
# /__\ \ / \__ \
# (_)(_) \/\/ (___/
#
# Amazon EC2 Perl Library
# API Version: 2010-06-15
# Generated: Wed Jul 21 13:37:54 PDT 2010
#
package Amazon::EC2::Model::DescribeVpnGatewaysRequest;
use base qw (Amazon::EC2::Model);
#
# Amazon::EC2::Model::DescribeVpnGatewaysRequest
#
# Properties:
#
#
# VpnGatewayId: string
# Filter: Amazon::EC2::Model::Filter
#
#
#
sub new {
my ($class, $data) = @_;
my $self = {};
$self->{_fields} = {
VpnGatewayId => {FieldValue => [], FieldType => ["string"]},
Filter => {FieldValue => [], FieldType => ["Amazon::EC2::Model::Filter"]},
};
bless ($self, $class);
if (defined $data) {
$self->_fromHashRef($data);
}
return $self;
}
sub getVpnGatewayId {
return shift->{_fields}->{VpnGatewayId}->{FieldValue};
}
sub setVpnGatewayId {
my ($self, $value) = @_;
$self->{_fields}->{VpnGatewayId}->{FieldValue} = $value;
return $self;
}
sub withVpnGatewayId {
my $self = shift;
my $list = $self->{_fields}->{VpnGatewayId}->{FieldValue};
for (@_) {
push (@$list, $_);
}
return $self;
}
sub isSetVpnGatewayId {
return scalar (@{shift->{_fields}->{VpnGatewayId}->{FieldValue}}) > 0;
}
sub getFilter {
return shift->{_fields}->{Filter}->{FieldValue};
}
sub setFilter {
my $self = shift;
foreach my $filter (@_) {
if (not $self->_isArrayRef($filter)) {
$filter = [$filter];
}
$self->{_fields}->{Filter}->{FieldValue} = $filter;
}
}
sub withFilter {
my ($self, $filterArgs) = @_;
foreach my $filter (@$filterArgs) {
$self->{_fields}->{Filter}->{FieldValue} = $filter;
}
return $self;
}
sub isSetFilter {
return scalar (@{shift->{_fields}->{Filter}->{FieldValue}}) > 0;
}
1;
| electric-cloud/EC-EC2 | src/main/resources/project/lib/Amazon/EC2/Model/DescribeVpnGatewaysRequest.pm | Perl | apache-2.0 | 2,851 |
package OpenXPKI::Server::Workflow::Condition::SubjectValid;
use strict;
use warnings;
use base qw( OpenXPKI::Server::Workflow::Condition );
use Workflow::Exception qw( condition_error configuration_error );
use OpenXPKI::Server::Context qw( CTX );
use OpenXPKI::Debug;
use OpenXPKI::DN;
use Data::Dumper;
sub _evaluate {
##! 1: 'start'
my ( $self, $workflow ) = @_;
my $context = $workflow->context();
##! 64: 'context: ' . Dumper($context)
my $subject = $self->param('cert_subject') // $context->param('cert_subject');
if (!$subject) {
condition_error('Subject is empty!');
}
my %dn = OpenXPKI::DN->new( $subject )->get_hashed_content();
my $max_length = {
CN => 64,
OU => 64,
O => 64,
L => 128,
ST => 128,
C => 2,
%{$self->param()}
};
##! 64: $max_length
foreach my $rdn (keys %dn) {
# we use the upper bound ub-name as absolute max
my $maxlen = $max_length->{$rdn} || 32768;
##! 16: 'Testing rdn ' . $rdn . ' with maxlen of ' . $maxlen
##! 32: 'Component ' . Dumper $dn{$rdn}
foreach my $comp (@{$dn{$rdn}}) {
condition_error('Subject has empty components') if ($comp eq '');
condition_error('RDN $rdn exceeds $maxlen character limit') if (length($comp) > $maxlen);
}
}
return 1;
##! 16: 'end'
}
1;
__END__
=head1 NAME
OpenXPKI::Server::Workflow::Condition::SubjectValid
=head1 DESCRIPTION
Subject can be set via param I<cert_subject>, if unset its read from
the context value I<cert_subject>.
Check if the subject has no empty RDNs and if the RDN components do not
exceed the the length limits. Length check is done on CN/OU/O (64),
L/ST (128), C (2). You can add extra checks by adding a parameter with
the RDN name as key, e.g.
class: OpenXPKI::Server::Workflow::Condition::SubjectValid
param:
DC=256
To check any rdn for "DC" to be no larger than 256 chars.
| openxpki/openxpki | core/server/OpenXPKI/Server/Workflow/Condition/SubjectValid.pm | Perl | apache-2.0 | 1,994 |
=head1 LICENSE
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.
=cut
=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::IdMapping::SyntenyFramework - framework representing syntenic
regions across the genome
=head1 SYNOPSIS
# build the SyntenyFramework from unambiguous gene mappings
my $sf = Bio::EnsEMBL::IdMapping::SyntenyFramework->new(
-DUMP_PATH => $dump_path,
-CACHE_FILE => 'synteny_framework.ser',
-LOGGER => $self->logger,
-CONF => $self->conf,
-CACHE => $self->cache,
);
$sf->build_synteny($gene_mappings);
# use it to rescore the genes
$gene_scores = $sf->rescore_gene_matrix_lsf($gene_scores);
=head1 DESCRIPTION
The SyntenyFramework is a set of SyntenyRegions. These are pairs of
locations very analoguous to the information in the assembly table (the
locations dont have to be the same length though). They are built from
genes that map uniquely between source and target.
Once built, the SyntenyFramework is used to score source and target gene
pairs to determine whether they are similar. This process is slow (it
involves testing all gene pairs against all SyntenyRegions), this module
therefor has built-in support to run the process in parallel via LSF.
=head1 METHODS
new
build_synteny
_by_overlap
add_SyntenyRegion
get_all_SyntenyRegions
rescore_gene_matrix_lsf
rescore_gene_matrix
logger
conf
cache
=cut
package Bio::EnsEMBL::IdMapping::SyntenyFramework;
use strict;
use warnings;
no warnings 'uninitialized';
use Bio::EnsEMBL::IdMapping::Serialisable;
our @ISA = qw(Bio::EnsEMBL::IdMapping::Serialisable);
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::Utils::ScriptUtils qw(path_append);
use Bio::EnsEMBL::IdMapping::SyntenyRegion;
use Bio::EnsEMBL::IdMapping::ScoredMappingMatrix;
use FindBin qw($Bin);
FindBin->again;
=head2 new
Arg [LOGGER]: Bio::EnsEMBL::Utils::Logger $logger - a logger object
Arg [CONF] : Bio::EnsEMBL::Utils::ConfParser $conf - a configuration object
Arg [CACHE] : Bio::EnsEMBL::IdMapping::Cache $cache - a cache object
Arg [DUMP_PATH] : String - path for object serialisation
Arg [CACHE_FILE] : String - filename of serialised object
Example : my $sf = Bio::EnsEMBL::IdMapping::SyntenyFramework->new(
-DUMP_PATH => $dump_path,
-CACHE_FILE => 'synteny_framework.ser',
-LOGGER => $self->logger,
-CONF => $self->conf,
-CACHE => $self->cache,
);
Description : Constructor.
Return type : Bio::EnsEMBL::IdMapping::SyntenyFramework
Exceptions : thrown on wrong or missing arguments
Caller : InternalIdMapper plugins
Status : At Risk
: under development
=cut
sub new {
my $caller = shift;
my $class = ref($caller) || $caller;
my $self = $class->SUPER::new(@_);
my ($logger, $conf, $cache) = rearrange(['LOGGER', 'CONF', 'CACHE'], @_);
unless ($logger and ref($logger) and
$logger->isa('Bio::EnsEMBL::Utils::Logger')) {
throw("You must provide a Bio::EnsEMBL::Utils::Logger for logging.");
}
unless ($conf and ref($conf) and
$conf->isa('Bio::EnsEMBL::Utils::ConfParser')) {
throw("You must provide configuration as a Bio::EnsEMBL::Utils::ConfParser object.");
}
unless ($cache and ref($cache) and
$cache->isa('Bio::EnsEMBL::IdMapping::Cache')) {
throw("You must provide configuration as a Bio::EnsEMBL::IdMapping::Cache object.");
}
# initialise
$self->logger($logger);
$self->conf($conf);
$self->cache($cache);
$self->{'cache'} = [];
return $self;
}
=head2 build_synteny
Arg[1] : Bio::EnsEMBL::IdMapping::MappingList $mappings - gene mappings
to build the SyntenyFramework from
Example : $synteny_framework->build_synteny($gene_mappings);
Description : Builds the SyntenyFramework from unambiguous gene mappings.
SyntenyRegions are allowed to overlap. At most two overlapping
SyntenyRegions are merged (otherwise we'd get too large
SyntenyRegions with little information content).
Return type : none
Exceptions : thrown on wrong or missing argument
Caller : InternalIdMapper plugins
Status : At Risk
: under development
=cut
sub build_synteny {
my $self = shift;
my $mappings = shift;
unless ($mappings and
$mappings->isa('Bio::EnsEMBL::IdMapping::MappingList')) {
throw('Need a gene Bio::EnsEMBL::IdMapping::MappingList.');
}
# create a synteny region for each mapping
my @synteny_regions = ();
foreach my $entry (@{ $mappings->get_all_Entries }) {
my $source_gene = $self->cache->get_by_key('genes_by_id', 'source',
$entry->source);
my $target_gene = $self->cache->get_by_key('genes_by_id', 'target',
$entry->target);
my $sr = Bio::EnsEMBL::IdMapping::SyntenyRegion->new_fast([
$source_gene->start,
$source_gene->end,
$source_gene->strand,
$source_gene->seq_region_name,
$target_gene->start,
$target_gene->end,
$target_gene->strand,
$target_gene->seq_region_name,
$entry->score,
]);
push @synteny_regions, $sr;
}
unless (@synteny_regions) {
$self->logger->warning("No synteny regions could be identified.\n");
return;
}
# sort synteny regions
#my @sorted = sort _by_overlap @synteny_regions;
my @sorted = reverse sort {
$a->source_seq_region_name cmp $b->source_seq_region_name ||
$a->source_start <=> $b->source_start ||
$a->source_end <=> $b->source_end } @synteny_regions;
$self->logger->info("SyntenyRegions before merging: ".scalar(@sorted)."\n");
# now create merged regions from overlapping syntenies, but only merge a
# maximum of 2 regions (otherwise you end up with large synteny blocks which
# won't contain much information in this context)
my $last_merged = 0;
my $last_sr = shift(@sorted);
while (my $sr = shift(@sorted)) {
#$self->logger->debug("this ".$sr->to_string."\n");
my $merged_sr = $last_sr->merge($sr);
if (! $merged_sr) {
unless ($last_merged) {
$self->add_SyntenyRegion($last_sr->stretch(2));
#$self->logger->debug("nnn ".$last_sr->to_string."\n");
}
$last_merged = 0;
} else {
$self->add_SyntenyRegion($merged_sr->stretch(2));
#$self->logger->debug("mmm ".$merged_sr->to_string."\n");
$last_merged = 1;
}
$last_sr = $sr;
}
# deal with last synteny region in @sorted
unless ($last_merged) {
$self->add_SyntenyRegion($last_sr->stretch(2));
$last_merged = 0;
}
#foreach my $sr (@{ $self->get_all_SyntenyRegions }) {
# $self->logger->debug("SRs ".$sr->to_string."\n");
#}
$self->logger->info("SyntenyRegions after merging: ".scalar(@{ $self->get_all_SyntenyRegions })."\n");
}
#
# sort SyntenyRegions by overlap
#
sub _by_overlap {
# first sort by seq_region
my $retval = ($b->source_seq_region_name cmp $a->source_seq_region_name);
return $retval if ($retval);
# then sort by overlap:
# return -1 if $a is downstream, 1 if it's upstream, 0 if they overlap
if ($a->source_end < $b->source_start) { return 1; }
if ($a->source_start < $b->source_end) { return -1; }
return 0;
}
=head2 add_SyntenyRegion
Arg[1] : Bio::EnsEMBL::IdMaping::SyntenyRegion - SyntenyRegion to add
Example : $synteny_framework->add_SyntenyRegion($synteny_region);
Description : Adds a SyntenyRegion to the framework. For speed reasons (and
since this is an internal method), no argument check is done.
Return type : none
Exceptions : none
Caller : internal
Status : At Risk
: under development
=cut
sub add_SyntenyRegion {
push @{ $_[0]->{'cache'} }, $_[1];
}
=head2 get_all_SyntenyRegions
Example : foreach my $sr (@{ $sf->get_all_SyntenyRegions }) {
# do something with the SyntenyRegion
}
Description : Get a list of all SyntenyRegions in the framework.
Return type : Arrayref of Bio::EnsEMBL::IdMapping::SyntenyRegion
Exceptions : none
Caller : general
Status : At Risk
: under development
=cut
sub get_all_SyntenyRegions {
return $_[0]->{'cache'};
}
=head2 rescore_gene_matrix_lsf
Arg[1] : Bio::EnsEMBL::IdMapping::ScoredmappingMatrix $matrix - gene
scores to rescore
Example : my $new_scores = $sf->rescore_gene_matrix_lsf($gene_scores);
Description : This method runs rescore_gene_matrix() (via the
synteny_resocre.pl script) in parallel with lsf, then combines
the results to return a single rescored scoring matrix.
Parallelisation is done by chunking the scoring matrix into
several pieces (determined by the --synteny_rescore_jobs
configuration option).
Return type : Bio::EnsEMBL::IdMapping::ScoredMappingMatrix
Exceptions : thrown on wrong or missing argument
thrown on filesystem I/O error
thrown on failure of one or mor lsf jobs
Caller : InternalIdMapper plugins
Status : At Risk
: under development
=cut
sub rescore_gene_matrix_lsf {
my $self = shift;
my $matrix = shift;
unless ($matrix and
$matrix->isa('Bio::EnsEMBL::IdMapping::ScoredMappingMatrix')) {
throw('Need a Bio::EnsEMBL::IdMapping::ScoredMappingMatrix.');
}
# serialise SyntenyFramework to disk
$self->logger->debug("Serialising SyntenyFramework...\n", 0, 'stamped');
$self->write_to_file;
$self->logger->debug("Done.\n", 0, 'stamped');
# split the ScoredMappingMatrix into chunks and write to disk
my $matrix_size = $matrix->size;
$self->logger->debug("Scores before rescoring: $matrix_size.\n");
my $num_jobs = $self->conf->param('synteny_rescore_jobs') || 20;
$num_jobs++;
my $dump_path = path_append($self->conf->param('basedir'),
'matrix/synteny_rescore');
$self->logger->debug("Creating sub-matrices...\n", 0, 'stamped');
foreach my $i (1..$num_jobs) {
my $start = (int($matrix_size/($num_jobs-1)) * ($i - 1)) + 1;
my $end = int($matrix_size/($num_jobs-1)) * $i;
$self->logger->debug("$start-$end\n", 1);
my $sub_matrix = $matrix->sub_matrix($start, $end);
$sub_matrix->cache_file_name("gene_matrix_synteny$i.ser");
$sub_matrix->dump_path($dump_path);
$sub_matrix->write_to_file;
}
$self->logger->debug("Done.\n", 0, 'stamped');
# create an empty lsf log directory
my $logpath = path_append($self->logger->logpath, 'synteny_rescore');
system("rm -rf $logpath") == 0 or
$self->logger->error("Unable to delete lsf log dir $logpath: $!\n");
system("mkdir -p $logpath") == 0 or
$self->logger->error("Can't create lsf log dir $logpath: $!\n");
# build lsf command
my $lsf_name = 'idmapping_synteny_rescore_'.time;
my $options = $self->conf->create_commandline_options(
logauto => 1,
logautobase => "synteny_rescore",
logpath => $logpath,
interactive => 0,
is_component => 1,
);
my $cmd = qq{$Bin/synteny_rescore.pl $options --index \$LSB_JOBINDEX};
my $bsub_cmd =
sprintf( "|bsub -J '%s[1-%d]' "
. "-o %s/synteny_rescore.%%I.out "
. "-e %s/synteny_rescore.%%I.err %s",
$lsf_name, $num_jobs, $logpath, $logpath,
$self->conf()->param('lsf_opt_synteny_rescore') );
# run lsf job array
$self->logger->info("Submitting $num_jobs jobs to lsf.\n");
$self->logger->debug("$cmd\n\n");
local *BSUB;
open( BSUB, $bsub_cmd ) ## no critic
or $self->logger->error("Could not open open pipe to bsub: $!\n");
print BSUB $cmd;
$self->logger->error("Error submitting synteny rescoring jobs: $!\n")
unless ($? == 0);
close BSUB;
# submit dependent job to monitor finishing of jobs
$self->logger->info("Waiting for jobs to finish...\n", 0, 'stamped');
my $dependent_job =
qq{bsub -K -w "ended($lsf_name)" -q production-rh7 } .
qq{-M 1000 -R 'select[mem>1000]' -R 'rusage[mem=1000]' } .
qq{-o $logpath/synteny_rescore_depend.out /bin/true};
system($dependent_job) == 0 or
$self->logger->error("Error submitting dependent job: $!\n");
$self->logger->info("All jobs finished.\n", 0, 'stamped');
# check for lsf errors
sleep(5);
my $err;
foreach my $i (1..$num_jobs) {
$err++ unless (-e "$logpath/synteny_rescore.$i.success");
}
if ($err) {
$self->logger->error("At least one of your jobs failed.\nPlease check the logfiles at $logpath for errors.\n");
}
# merge and return matrix
$self->logger->debug("Merging rescored matrices...\n");
$matrix->flush;
foreach my $i (1..$num_jobs) {
# read partial matrix created by lsf job from file
my $sub_matrix = Bio::EnsEMBL::IdMapping::ScoredMappingMatrix->new(
-DUMP_PATH => $dump_path,
-CACHE_FILE => "gene_matrix_synteny$i.ser",
);
$sub_matrix->read_from_file;
# merge with main matrix
$matrix->merge($sub_matrix);
}
$self->logger->debug("Done.\n");
$self->logger->debug("Scores after rescoring: ".$matrix->size.".\n");
return $matrix;
}
#
#
=head2 rescore_gene_matrix
Arg[1] : Bio::EnsEMBL::IdMapping::ScoredmappingMatrix $matrix - gene
scores to rescore
Example : my $new_scores = $sf->rescore_gene_matrix($gene_scores);
Description : Rescores a gene matrix. Retains 70% of old score and builds
other 30% from the synteny match.
Return type : Bio::EnsEMBL::IdMapping::ScoredMappingMatrix
Exceptions : thrown on wrong or missing argument
Caller : InternalIdMapper plugins
Status : At Risk
: under development
=cut
sub rescore_gene_matrix {
my $self = shift;
my $matrix = shift;
unless ($matrix and
$matrix->isa('Bio::EnsEMBL::IdMapping::ScoredMappingMatrix')) {
throw('Need a Bio::EnsEMBL::IdMapping::ScoredMappingMatrix.');
}
my $retain_factor = 0.7;
foreach my $entry (@{ $matrix->get_all_Entries }) {
my $source_gene = $self->cache->get_by_key('genes_by_id', 'source',
$entry->source);
my $target_gene = $self->cache->get_by_key('genes_by_id', 'target',
$entry->target);
my $highest_score = 0;
foreach my $sr (@{ $self->get_all_SyntenyRegions }) {
my $score = $sr->score_location_relationship($source_gene, $target_gene);
$highest_score = $score if ($score > $highest_score);
}
#$self->logger->debug("highscore ".$entry->to_string." ".
# sprintf("%.6f\n", $highest_score));
$matrix->set_score($entry->source, $entry->target,
($entry->score * 0.7 + $highest_score * 0.3));
}
return $matrix;
}
=head2 logger
Arg[1] : (optional) Bio::EnsEMBL::Utils::Logger - the logger to set
Example : $object->logger->info("Starting ID mapping.\n");
Description : Getter/setter for logger object
Return type : Bio::EnsEMBL::Utils::Logger
Exceptions : none
Caller : constructor
Status : At Risk
: under development
=cut
sub logger {
my $self = shift;
$self->{'_logger'} = shift if (@_);
return $self->{'_logger'};
}
=head2 conf
Arg[1] : (optional) Bio::EnsEMBL::Utils::ConfParser - the configuration
to set
Example : my $basedir = $object->conf->param('basedir');
Description : Getter/setter for configuration object
Return type : Bio::EnsEMBL::Utils::ConfParser
Exceptions : none
Caller : constructor
Status : At Risk
: under development
=cut
sub conf {
my $self = shift;
$self->{'_conf'} = shift if (@_);
return $self->{'_conf'};
}
=head2 cache
Arg[1] : (optional) Bio::EnsEMBL::IdMapping::Cache - the cache to set
Example : $object->cache->read_from_file('source');
Description : Getter/setter for cache object
Return type : Bio::EnsEMBL::IdMapping::Cache
Exceptions : none
Caller : constructor
Status : At Risk
: under development
=cut
sub cache {
my $self = shift;
$self->{'_cache'} = shift if (@_);
return $self->{'_cache'};
}
1;
| james-monkeyshines/ensembl | modules/Bio/EnsEMBL/IdMapping/SyntenyFramework.pm | Perl | apache-2.0 | 17,224 |
package MemTest_conf;
use strict;
use warnings;
use base ('Bio::EnsEMBL::Hive::PipeConfig::HiveGeneric_conf');
sub default_options {
my ($self) = @_;
# The hash returned from this function is used to configure the
# pipeline, you can supply any of these options on the command
# line to override these default values.
# You shouldn't need to edit anything in this file other than
# these values, if you find you do need to then we should probably
# make it an option here, contact the variation team to discuss
# this - patches are welcome!
return {
hive_force_init => 1,
hive_use_param_stack => 0,
hive_use_triggers => 0,
hive_auto_rebalance_semaphores => 0, # do not attempt to rebalance semaphores periodically by default
hive_no_init => 0, # setting it to 1 will skip pipeline_create_commands (useful for topping up)
hive_root_dir => $ENV{'HOME'} . '/DEV/ensembl-hive',
ensembl_cvs_root_dir => $ENV{'HOME'} . '/DEV',
hive_db_port => 3306,
hive_db_user => 'ensadmin',
hive_db_host => 'ens-variation',
pipeline_name => 'ehive_test',
pipeline_db => {
-host => $self->o('hive_db_host'),
-port => $self->o('hive_db_port'),
-user => $self->o('hive_db_user'),
-pass => $self->o('hive_db_password'),
-dbname => $ENV{'USER'} . '_' . $self->o('pipeline_name'),
-driver => 'mysql',
},
};
}
sub resource_classes {
my ($self) = @_;
return {
%{$self->SUPER::resource_classes},
'100MB' => { 'LSF' => '-R"select[mem>100] rusage[mem=100]" -M100' },
'500MB' => { 'LSF' => '-R"select[mem>500] rusage[mem=500]" -M500' },
'1GB' => { 'LSF' => '-R"select[mem>1000] rusage[mem=1000]" -M1000' },
};
}
sub pipeline_wide_parameters {
my ($self) = @_;
return {
%{$self->SUPER::pipeline_wide_parameters},
};
}
sub pipeline_analyses {
my ($self) = @_;
my @analyses = ();
push @analyses, (
{
-logic_name => 'mem_test',
-module => 'MemTest',
-input_ids => [{},],
-rc_name => '100MB',
-flow_into => {
'2->A' => ['computation'],
'A->1' => ['report_results'],
}
},
{
-logic_name => 'computation',
-module => 'Computation',
-rc_name => 'default',
-flow_into => {
'-1' => ['computation_highmem']
},
},
{
-logic_name => 'computation_highmem',
-module => 'Computation',
-rc_name => '1GB',
},
{
-logic_name => 'report_results',
-module => 'ReportResults',
-rc_name => 'default',
}
);
return \@analyses;
}
1;
| at7/work | pipelines/memtest/MemTest_conf.pm | Perl | apache-2.0 | 2,691 |
package Paws::Glue::CreateDevEndpointResponse;
use Moose;
has AvailabilityZone => (is => 'ro', isa => 'Str');
has CreatedTimestamp => (is => 'ro', isa => 'Str');
has EndpointName => (is => 'ro', isa => 'Str');
has ExtraJarsS3Path => (is => 'ro', isa => 'Str');
has ExtraPythonLibsS3Path => (is => 'ro', isa => 'Str');
has FailureReason => (is => 'ro', isa => 'Str');
has NumberOfNodes => (is => 'ro', isa => 'Int');
has RoleArn => (is => 'ro', isa => 'Str');
has SecurityGroupIds => (is => 'ro', isa => 'ArrayRef[Str|Undef]');
has Status => (is => 'ro', isa => 'Str');
has SubnetId => (is => 'ro', isa => 'Str');
has VpcId => (is => 'ro', isa => 'Str');
has YarnEndpointAddress => (is => 'ro', isa => 'Str');
has _request_id => (is => 'ro', isa => 'Str');
### main pod documentation begin ###
=head1 NAME
Paws::Glue::CreateDevEndpointResponse
=head1 ATTRIBUTES
=head2 AvailabilityZone => Str
The AWS availability zone where this DevEndpoint is located.
=head2 CreatedTimestamp => Str
The point in time at which this DevEndpoint was created.
=head2 EndpointName => Str
The name assigned to the new DevEndpoint.
=head2 ExtraJarsS3Path => Str
Path to one or more Java Jars in an S3 bucket that will be loaded in
your DevEndpoint.
=head2 ExtraPythonLibsS3Path => Str
Path to one or more Python libraries in an S3 bucket that will be
loaded in your DevEndpoint.
=head2 FailureReason => Str
The reason for a current failure in this DevEndpoint.
=head2 NumberOfNodes => Int
The number of nodes in this DevEndpoint.
=head2 RoleArn => Str
The AWS ARN of the role assigned to the new DevEndpoint.
=head2 SecurityGroupIds => ArrayRef[Str|Undef]
The security groups assigned to the new DevEndpoint.
=head2 Status => Str
The current status of the new DevEndpoint.
=head2 SubnetId => Str
The subnet ID assigned to the new DevEndpoint.
=head2 VpcId => Str
The ID of the VPC used by this DevEndpoint.
=head2 YarnEndpointAddress => Str
The address of the YARN endpoint used by this DevEndpoint.
=head2 _request_id => Str
=cut
1; | ioanrogers/aws-sdk-perl | auto-lib/Paws/Glue/CreateDevEndpointResponse.pm | Perl | apache-2.0 | 2,091 |
#
# 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 apps::virtualization::ovirt::mode::listhosts;
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 => {
"filter-name:s" => { name => 'filter_name' },
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::init(%options);
}
sub manage_selection {
my ($self, %options) = @_;
$self->{hosts} = $options{custom}->list_hosts();
}
sub run {
my ($self, %options) = @_;
$self->manage_selection(%options);
foreach my $host (@{$self->{hosts}}) {
next if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne ''
&& $host->{name} !~ /$self->{option_results}->{filter_name}/);
$self->{output}->output_add(long_msg => sprintf("[id = %s][name = %s][address = %s][status = %s]",
$host->{id},
$host->{name},
$host->{address},
$host->{status}));
}
$self->{output}->output_add(severity => 'OK',
short_msg => 'List hosts:');
$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 => ['id', 'name', 'address', 'status']);
}
sub disco_show {
my ($self, %options) = @_;
$self->manage_selection(%options);
foreach my $host (@{$self->{hosts}}) {
$self->{output}->add_disco_entry(
id => $host->{id},
name => $host->{name},
address => $host->{address},
status => $host->{status},
);
}
}
1;
__END__
=head1 MODE
List hosts.
=over 8
=item B<--filter-name>
Filter host name (Can be a regexp).
=back
=cut
| Sims24/centreon-plugins | apps/virtualization/ovirt/mode/listhosts.pm | Perl | apache-2.0 | 2,752 |
=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
use strict;
=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 warnings;
package ImportUtils;
use Exporter;
our @ISA = ('Exporter');
our @EXPORT_OK = qw(dumpSQL debug create create_and_load load loadfile get_create_statement make_xml_compliant update_table);
our $TMP_DIR = "/tmp";
our $TMP_FILE = 'tabledump.txt';
# This will strip non-xml-compliant characters from an infile, saving a backup in {infile name}.bak
# If no infile was specified, will use the tempfile but no backup will be kept. If no xml version was specified, will default to 1.1
# A replacement character or string can be passed
# If the xml version was not recognized, will do nothing.
sub make_xml_compliant {
my $infile = shift;
my $version = shift;
my $replacement = shift;
my $keep_backup = defined($infile);
$infile ||= $TMP_DIR . "/" . $TMP_FILE;
$version ||= "1.1";
$replacement ||= "";
my @ARGV_bak = @ARGV;
@ARGV = ($infile);
$^I = ".bak";
while (<>) {
if ($version =~ m/1\.1/) {
s/[^\x01-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/$replacement/go;
s/[\x01-\x08\x0B-\x0C\x0E-\x1F\x7F-\x84\x86-\x9F]/$replacement/go;
}
elsif ($version =~ m/1\.0/) {
s/[^\x09\x0A\x0D\x20-\x{D7FF}\x{E000}-\x{FFFD}\x{10000}-\x{10FFFF}]/$replacement/go;
}
print;
}
# Remove the backup if an input file wasn't supplied
unlink($infile . ".bak") if (!$keep_backup);
# Restore the @ARGV variable
@ARGV = @ARGV_bak;
}
# successive dumping and loading of tables is typical for this process
# dump does effectively a select into outfile without server file system access
sub dumpSQL {
my $db = shift;
my $sql = shift;
my $dbe = shift; ## handle postgreSQL differently
if($dbe =~/pg|postgreSQL/i ){
dumpSQL_PG($db, $sql);
}
else{
my $sth = $db->prepare( $sql );
dumpPreparedSQL($sth);
$sth->finish();
}
}
sub dumpPreparedSQL {
my $sth = shift;
local *FH;
my $counter = 0;
open( FH, ">$TMP_DIR/$TMP_FILE" )
or die( "Cannot open $TMP_DIR/$TMP_FILE: $!" );
$sth->{mysql_use_result} = 1;
$sth->execute();
my $first;
while ( my $aref = $sth->fetchrow_arrayref() ) {
my @a = map {defined($_) ? $_ : '\N'} @$aref;
print FH join("\t", @a), "\n";
}
close FH;
}
## use postgresql cursors to avoid memory issues on large exports
sub dumpSQL_PG {
my $dbh = shift;
my $sql = shift;
local *FH;
my $counter = 0;
open( FH, ">$TMP_DIR/$TMP_FILE" )
or die( "Cannot open $TMP_DIR/$TMP_FILE: $!" );
$dbh->db_handle->begin_work();
$dbh->do("DECLARE csr CURSOR FOR $sql");
while (1) {
my $sth = $dbh->prepare("fetch 100000 from csr");
$sth->execute;
last if 0 == $sth->rows;
while ( my $aref = $sth->fetchrow_arrayref() ) {
my @a = map {defined($_) ? $_ : '\N'} @$aref;
print FH join("\t", @a), "\n";
}
}
$dbh->do("CLOSE csr");
$dbh->db_handle->rollback();
close FH;
}
# load imports a table, optionally not all columns
# if table doesnt exist, create a varchar(255) for each column
sub load {
loadfile("$TMP_DIR/$TMP_FILE",@_);
}
sub loadfile {
my $loadfile = shift;
my $db = shift;
my $tablename = shift;
my @colnames = @_;
my $cols = join( ",", @colnames );
my $table_file = "$TMP_DIR/$tablename\_$$\.txt";
if (! -e $loadfile) {
die("File to load ($loadfile) does not exist");
}
# Do not rename the $loadfile to the $table_file
# if the $table_file already exists
if (-e $table_file) {
die("File to rename to for table load exists ($table_file)");
}
my $ret = rename($loadfile, $table_file);
if (! $ret) {
die("rename of ($loadfile) to ($table_file) for table load fails");
}
# my $host = $db->host();
# my $user = $db->user();
# my $pass = $db->pass();
# my $port = $db->port();
# my $dbname = $db->dbname();
# my $call = "mysqlimport -c $cols -h $host -u $user " .
# "-p$pass -P$port $dbname $table_file";
# system($call);
# unlink("$TMP_DIR/$tablename.txt");
##### Alternative way of doing same thing
my $sql;
#need to find out if possible use the LOCAL option
# my $local_option = 'LOCAL'; #by default, use the LOCAL option
# if( `hostname` =~ /^bc/ ){ # No LOCAL on bcs nodes
# $local_option = '';
# }
# elsif( ! -e $table_file ){ # File is not on local filesystem
# $local_option = '';
# }
my $local_option = 'LOCAL';
# my $host = `hostname`;
# chop $host;
# $host =~ /(ecs\d+)/; #get the machine, only use LOCAL in ecs machines (ecs2, ecs4)
# my $local_option = '';
# #the script is running in ecs machine, let's find out if the file is in the same machine, too
# if ($1){
# if ($table_file =~ /$1/){
# $local_option = 'LOCAL';
# }
# }
if ( @colnames ) {
$sql = qq{
LOAD DATA $local_option INFILE "$table_file"
INTO TABLE $tablename( $cols )
};
} else {
$sql = qq{
LOAD DATA $local_option INFILE "$table_file"
INTO TABLE $tablename
};
}
$db->do( $sql );
unlink( "$table_file" );
}
#
# creates a table with specified columns
#
# by default all columns are VARCHAR(255), but an 'i' may be added after the
# column name to make it an INT. Additionally a '*' means add an index to
# the column.
#
# e.g. create($db, 'mytable', 'col0', 'col1 *', 'col2 i', 'col3 i*');
#
sub create {
my $db = shift;
my $tablename = shift;
my @cols = @_;
my $sql = "CREATE TABLE $tablename ( ";
my @col_defs;
my @idx_defs;
my @col_names;
foreach my $col (@cols) {
my ($name, $type, $nullable, $unsigned) = split(/\s+/,$col);
push @col_names, $name;
my $null ="";
if (defined($nullable) && $nullable =~/not_null/){$null =" NOT NULL";}
if(defined($type) && $type =~ /i/ && defined $unsigned ) {
push @col_defs, "$name INT unsigned $null";
}
elsif(defined($type) && $type =~ /i/) {
push @col_defs, "$name INT $null";
}
elsif (defined($type) && $type =~ /f/) {
push @col_defs, "$name FLOAT $null";
}
elsif (defined($type) && $type =~ /l/) {
push @col_defs, "$name TEXT $null";
}
elsif (defined($type) && $type =~ /d/) {
push @col_defs, "$name DOUBLE $null";
}
elsif (defined($type) && $type =~ /v/) {
$type =~ s/v//;
my $len = 255;
push @col_defs, "$name VARCHAR($len) $null";
}
else {
push @col_defs, "$name VARCHAR(255) $null";
}
if(defined($type) && $type =~ /\*/) {
push @idx_defs, "KEY ${name}_idx($name)";
}
}
my $create_cols = join( ",\n", @col_defs, @idx_defs);
$sql .= $create_cols.")";
$sql .= " MAX_ROWS = 100000000" if ($tablename =~ /^tmp.*gty$/); #need to make bigger this table for human
$sql .= " ENGINE = 'MyISAM' "; ##may not be default engine
$db->do( $sql );
return @col_names;
}
#
# creates a table with specified columns and loads data that was dumped
# to a tmp file into the table.
#
# by default all columns are VARCHAR(255), but an 'i' may be added after the
# column name to make it an INT. Additionally a '*' means add an index to
# the column.
#
# e.g. create_and_load($db, 'mytable', 'col0', 'col1 *', 'col2 i', 'col3 i*');
#
sub create_and_load {
my $db = shift;
my $tablename = shift;
my @cols = @_;
my @col_names = create($db,$tablename,@cols);
load( $db, $tablename, @col_names );
}
#
#ÊGets the create statement to create the desired table from the master_schema_variation database
#
sub get_create_statement_from_db {
my $dbc = shift;
my $table = shift;
my $db_name = shift;
if (defined($db_name)) {
$table = $db_name . '.' . $table;
}
my $stmt = qq{
SHOW CREATE TABLE
$table
};
my $result = $dbc->db_handle->selectall_arrayref($stmt)->[0][1];
return $result;
}
#ÊGet the create statement for a table from e.g. the table.sql schema definition file
sub get_create_statement {
my $table = shift;
my $sql_file = shift;
# Parse the file
open(FH,'<',$sql_file) or die("Could not open $sql_file for reading");
# Parse the file into a string
my $contents = "";
while (<FH>) {
chomp;
$contents .= "$_ ";
}
close(FH);
# Grab the correct create statement
my ($stmt) = $contents =~ m/(create table $table [^\;]+)\;/i;
if (!$stmt) {
warn("Could not find CREATE TABLE statement for $table");
}
return $stmt;
}
sub update_table {
my $db = shift;
my $source_table = shift;
my $target_table = shift;
my $source_key = shift;
my $target_key = shift;
my $source_col = shift;
my $target_col = shift;
my $clean = shift;
die("Incorrect arguments supplied to update_table\n") unless
defined($db) &&
defined($source_table) &&
defined($target_table) &&
defined($source_key) &&
defined($target_key) &&
defined($source_col) &&
defined($target_col);
my ($stmt, $sth);
# get columns of source table
$stmt = qq{
DESCRIBE $source_table
};
$sth = $db->prepare($stmt);
$sth->execute;
my @source_cols = map {$_->[0]} @{$sth->fetchall_arrayref};
$sth->finish;
die("No columns found in table $source_table\n") unless @source_cols;
die("Key column $source_key not found in source table $source_table\n") unless grep {$_ eq $source_key} @source_cols;
die("Data column $source_col not found in source table $source_table\n") unless grep {$_ eq $source_col} @source_cols;
# get columns of target table
$stmt = qq{
DESCRIBE $target_table
};
$sth = $db->prepare($stmt);
$sth->execute;
my @target_cols = map {$_->[0]} @{$sth->fetchall_arrayref};
$sth->finish;
die("No columns found in table $target_table\n") unless @target_cols;
die("Key column $target_key not found in target table $target_table\n") unless grep {$_ eq $target_key} @target_cols;
die("Data column $target_col not found in target table $target_table\n") unless grep {$_ eq $target_col} @target_cols;
# construct columns to select
my (@select_cols, $select_cols);
foreach my $col(@target_cols) {
if($col eq $target_col) {
if($clean) {
push @select_cols, $source_table.'.'.$source_col;
}
else {
push @select_cols, qq{if($source_table.$source_col is null, $target_table.$col, $source_table.$source_col)};
}
}
else {
push @select_cols, $target_table.'.'.$col;
}
}
$select_cols = join ",", @select_cols;
# create tmp table
my $tmp_table = $target_table.'_tmp_'.$$;
$stmt = qq{
CREATE TABLE $tmp_table LIKE $target_table
};
$db->do($stmt);
# construct SQL
$stmt = qq{
INSERT INTO $tmp_table
SELECT $select_cols
FROM $target_table
LEFT JOIN $source_table
ON $target_table.$target_key = $source_table.$source_key
};
$db->do($stmt);
# check things went OK
$sth = $db->prepare("SELECT COUNT(*) FROM $target_table");
$sth->execute();
my $old_count = $sth->fetchall_arrayref()->[0]->[0];
$sth->finish();
$sth = $db->prepare("SELECT COUNT(*) FROM $tmp_table");
$sth->execute();
my $new_count = $sth->fetchall_arrayref()->[0]->[0];
$sth->finish();
die("New tmp table ($new_count) does not have the same number of rows as original target table ($old_count)\n") unless $old_count == $new_count;
# rename and drop
$db->do(qq{DROP TABLE $target_table});
$db->do(qq{RENAME TABLE $tmp_table TO $target_table});
}
sub debug {
print STDERR @_, "\n";
}
1;
| Ensembl/ensembl-variation | scripts/import/ImportUtils.pm | Perl | apache-2.0 | 12,413 |
package Dancer::Route;
# ABSTRACT: Class to represent a route in Dancer
use strict;
use warnings;
use Carp;
use base 'Dancer::Object';
use Dancer::App;
use Dancer::Logger;
use Dancer::Config 'setting';
use Dancer::Request;
use Dancer::Response;
use Dancer::Exception qw(:all);
use Dancer::Factory::Hook;
Dancer::Route->attributes(
qw(
app
method
pattern
prefix
code
prev
regexp
next
options
match_data
)
);
Dancer::Factory::Hook->instance->install_hooks(
qw/on_route_exception/
);
# supported options and aliases
my @_supported_options = Dancer::Request->get_attributes();
my %_options_aliases = (agent => 'user_agent');
sub init {
my ($self) = @_;
$self->{'_compiled_regexp'} = undef;
raise core_route => "cannot create Dancer::Route without a pattern"
unless defined $self->pattern;
# If the route is a Regexp, store it directly
$self->regexp($self->pattern)
if ref($self->pattern) eq 'Regexp';
$self->check_options();
$self->app(Dancer::App->current);
$self->prefix(Dancer::App->current->prefix) if not $self->prefix;
$self->_init_prefix() if $self->prefix;
$self->_build_regexp();
$self->set_previous($self->prev) if $self->prev;
return $self;
}
sub set_previous {
my ($self, $prev) = @_;
$self->prev($prev);
$self->prev->{'next'} = $self;
return $prev;
}
sub save_match_data {
my ($self, $request, $match_data) = @_;
$self->match_data($match_data);
$request->_set_route_params($match_data);
return $match_data;
}
# Does the route match the request
sub match {
my ($self, $request) = @_;
my $method = lc($request->method);
my $path = $request->path_info;
Dancer::Logger::core(
sprintf "Trying to match '%s %s' against /%s/ (generated from '%s')",
$request->method, $path, $self->{_compiled_regexp}, $self->pattern
);
my @values = $path =~ $self->{_compiled_regexp};
return unless @values;
Dancer::Logger::core(
" --> got " .
map { defined $_ ? $_ : 'undef' } @values
);
# if some named captures found, return captures
# no warnings is for perl < 5.10
if (my %captures =
do { no warnings; %+ }
)
{
Dancer::Logger::core(
" --> captures are: " . join(", ", keys(%captures)))
if keys %captures;
return $self->save_match_data($request, {captures => \%captures});
}
# save the route pattern that matched
# TODO : as soon as we have proper Dancer::Internal, we should remove
# that, it's just a quick hack for plugins to access the matching
# pattern.
# NOTE: YOU SHOULD NOT USE THAT, OR IF YOU DO, YOU MUST KNOW
# IT WILL MOVE VERY SOON
$request->{_route_pattern} = $self->pattern;
# regex comments are how we know if we captured a token,
# splat or a megasplat
my @token_or_splat
= $self->{_compiled_regexp} =~ /\(\?#([token|(?:mega)?splat]+)\)/g;
if (@token_or_splat) {
# named tokens
my @tokens = @{$self->{_params} || []};
Dancer::Logger::core(" --> named tokens are: @tokens") if @tokens;
my %params;
my @splat;
for ( my $i = 0; $i < @values; $i++ ) {
# Is this value from a token?
if ( $token_or_splat[$i] eq 'token' ) {
$params{ shift @tokens } = $values[$i];
next;
}
# megasplat values are split on '/'
if ($token_or_splat[$i] eq 'megasplat') {
$values[$i] = [ split '/', $values[$i] || '' ];
}
push @splat, $values[$i];
}
return $self->save_match_data( $request, {
%params,
( @splat ? ( splat => \@splat ) : () ),
});
}
if ($self->{_should_capture}) {
return $self->save_match_data($request, {splat => \@values});
}
return $self->save_match_data($request, {});
}
sub has_options {
my ($self) = @_;
return keys(%{$self->options}) ? 1 : 0;
}
sub check_options {
my ($self) = @_;
return 1 unless defined $self->options;
for my $opt (keys %{$self->options}) {
raise core_route => "Not a valid option for route matching: `$opt'"
if not( (grep {/^$opt$/} @{$_supported_options[0]})
|| (grep {/^$opt$/} keys(%_options_aliases)));
}
return 1;
}
sub validate_options {
my ($self, $request) = @_;
while (my ($option, $value) = each %{$self->options}) {
$option = $_options_aliases{$option}
if exists $_options_aliases{$option};
return 0 if (not $request->$option) || ($request->$option !~ $value);
}
return 1;
}
sub run {
my ($self, $request) = @_;
my $content = try {
$self->execute();
} continuation {
my ($continuation) = @_;
# route related continuation
$continuation->isa('Dancer::Continuation::Route')
or $continuation->rethrow();
# If the continuation carries some content, get it
my $content = $continuation->return_value();
defined $content or return; # to avoid returning undef;
return $content;
} catch {
my ($exception) = @_;
Dancer::Factory::Hook->execute_hooks('on_route_exception', $exception);
die $exception;
};
my $response = Dancer::SharedData->response;
if ( $response && $response->is_forwarded ) {
my $new_req =
Dancer::Request->forward($request, $response->{forward});
my $marshalled = Dancer::Handler->handle_request($new_req);
return Dancer::Response->new(
encoded => 1,
status => $marshalled->[0],
headers => $marshalled->[1],
# if the forward failed with 404, marshalled->[2] is not an array, but a GLOB
content => ref($marshalled->[2]) eq "ARRAY" ? @{ $marshalled->[2] } : $marshalled->[2]
);
}
if ($response && $response->has_passed) {
$response->pass(0);
# find the next matching route and run it
while ($self = $self->next) {
return $self->run($request) if $self->match($request);
}
Dancer::Logger::core('Last matching route passed!');
return Dancer::Renderer->render_error(404);
}
# coerce undef content to empty string to
# prevent warnings
$content = (defined $content) ? $content : '';
my $ct =
( defined $response && defined $response->content_type )
? $response->content_type()
: setting('content_type');
my $st = defined $response ? $response->status : 200;
my $headers = [];
push @$headers, @{ $response->headers_to_array } if defined $response;
# content type may have already be set earlier
# (eg: with send_error)
push(@$headers, 'Content-Type' => $ct)
unless grep {/Content-Type/} @$headers;
return $content if ref($content) eq 'Dancer::Response';
return Dancer::Response->new(
status => $st,
headers => $headers,
content => $content,
);
}
sub execute {
my ($self) = @_;
if (Dancer::Config::setting('warnings')) {
my $warning;
my $content = do {
local $SIG{__WARN__} = sub { $warning ||= $_[0] };
$self->code->();
};
if ($warning) {
die "Warning caught during route execution: $warning";
}
return $content;
}
else {
return $self->code->();
}
}
sub _init_prefix {
my ($self) = @_;
my $prefix = $self->prefix;
if ($self->is_regexp) {
my $regexp = $self->regexp;
if ($regexp !~ /^$prefix/) {
$self->regexp(qr{${prefix}${regexp}});
}
}
elsif ($self->pattern eq '/') {
# if pattern is '/', we should match:
# - /prefix/
# - /prefix
# this is done by creating a regex for this case
my $qpattern = quotemeta( $self->pattern );
my $qprefix = quotemeta( $self->prefix );
my $regex = qr/^$qprefix(?:$qpattern)?$/;
$self->{regexp} = $regex;
$self->{pattern} = $regex;
}
else {
$self->{pattern} = $prefix . $self->pattern;
}
return $prefix;
}
sub equals {
my ($self, $route) = @_;
return $self->regexp eq $route->regexp;
}
sub is_regexp {
my ($self) = @_;
return defined $self->regexp;
}
sub _build_regexp {
my ($self) = @_;
if ($self->is_regexp) {
$self->{_compiled_regexp} = $self->regexp;
$self->{_compiled_regexp} = qr/^$self->{_compiled_regexp}$/;
$self->{_should_capture} = 1;
}
else {
$self->_build_regexp_from_string($self->pattern);
}
return $self->{_compiled_regexp};
}
sub _build_regexp_from_string {
my ($self, $pattern) = @_;
my $capture = 0;
my @params;
# look for route with params (/hello/:foo)
if ($pattern =~ /:/) {
@params = $pattern =~ /:([^\/\.\?]+)/g;
if (@params) {
$pattern =~ s!(:[^\/\.\?]+)!(?#token)([^/]+)!g;
$capture = 1;
}
}
# parse megasplat
# we use {0,} instead of '*' not to fall in the splat rule
# same logic for [^\n] instead of '.'
$capture = 1 if $pattern =~ s!\Q**\E!(?#megasplat)([^\n]+)!g;
# parse wildcards
$capture = 1 if $pattern =~ s!\*!(?#splat)([^/]+)!g;
# escape dots
$pattern =~ s/\./\\\./g if $pattern =~ /\./;
# escape slashes
$pattern =~ s/\//\\\//g;
$self->{_compiled_regexp} = "^${pattern}\$";
$self->{_params} = \@params;
$self->{_should_capture} = $capture;
return $self->{_compiled_regexp};
}
1;
| sonar-perl/sonar-perl | perl/Dancer/lib/Dancer/Route.pm | Perl | apache-2.0 | 9,777 |
#
# 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::kemp::snmp::mode::rsstatus;
use base qw(centreon::plugins::templates::counter);
use strict;
use warnings;
use Digest::MD5 qw(md5_hex);
use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);
sub custom_status_output {
my ($self, %options) = @_;
my $msg = 'status : ' . $self->{result_values}->{status};
return $msg;
}
sub custom_status_calc {
my ($self, %options) = @_;
$self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'};
$self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'};
return 0;
}
sub set_counters {
my ($self, %options) = @_;
$self->{maps_counters_type} = [
{ name => 'rs', type => 1, cb_prefix_output => 'prefix_rs_output', message_multiple => 'All real servers are ok' }
];
$self->{maps_counters}->{rs} = [
{ label => 'status', threshold => 0, set => {
key_values => [ { name => 'status' }, { name => 'display' } ],
closure_custom_calc => $self->can('custom_status_calc'),
closure_custom_output => $self->can('custom_status_output'),
closure_custom_perfdata => sub { return 0; },
closure_custom_threshold_check => \&catalog_status_threshold,
}
},
{ label => 'active', set => {
key_values => [ { name => 'rSActiveConns' }, { name => 'display' } ],
output_template => 'Active connections : %s',
perfdatas => [
{ label => 'active', template => '%s', min => 0, label_extra_instance => 1, instance_use => 'display' },
],
}
},
{ label => 'in-traffic', set => {
key_values => [ { name => 'rSInBytes', per_second => 1 }, { name => 'display' } ],
output_template => 'Traffic In : %s %s/s',
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_in', template => '%.2f', min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' },
],
}
},
{ label => 'out-traffic', set => {
key_values => [ { name => 'rSOutBytes', per_second => 1 }, { name => 'display' } ],
output_template => 'Traffic Out : %s %s/s',
output_change_bytes => 2,
perfdatas => [
{ label => 'traffic_out', template => '%.2f', min => 0, unit => 'b/s', label_extra_instance => 1, instance_use => 'display' },
],
}
},
];
}
sub new {
my ($class, %options) = @_;
my $self = $class->SUPER::new(package => __PACKAGE__, %options, statefile => 1);
bless $self, $class;
$options{options}->add_options(arguments => {
'filter-name:s' => { name => 'filter_name' },
'warning-status:s' => { name => 'warning_status', default => '' },
'critical-status:s' => { name => 'critical_status', default => '%{status} !~ /inService|disabled/i' }
});
return $self;
}
sub check_options {
my ($self, %options) = @_;
$self->SUPER::check_options(%options);
$self->change_macros(macros => ['warning_status', 'critical_status']);
}
sub prefix_rs_output {
my ($self, %options) = @_;
return "Real server '" . $options{instance_value}->{display} . "' ";
}
my %map_state = (
1 => 'inService',
2 => 'outOfService',
4 => 'disabled',
);
my $mapping = {
rSvsidx => { oid => '.1.3.6.1.4.1.12196.13.2.1.1' },
rSip => { oid => '.1.3.6.1.4.1.12196.13.2.1.2' },
rSport => { oid => '.1.3.6.1.4.1.12196.13.2.1.3' },
rSstate => { oid => '.1.3.6.1.4.1.12196.13.2.1.8', map => \%map_state },
rSInBytes => { oid => '.1.3.6.1.4.1.12196.13.2.1.15' },
rSOutBytes => { oid => '.1.3.6.1.4.1.12196.13.2.1.16' },
rSActiveConns => { oid => '.1.3.6.1.4.1.12196.13.2.1.17' },
};
my $oid_rsEntry = '.1.3.6.1.4.1.12196.13.2.1';
my $oid_vSname = '.1.3.6.1.4.1.12196.13.1.1.13';
sub manage_selection {
my ($self, %options) = @_;
$self->{rs} = {};
my $snmp_result = $options{snmp}->get_multiple_table(oids => [ { oid => $oid_rsEntry }, { oid => $oid_vSname } ],
nothing_quit => 1);
foreach my $oid (keys %{$snmp_result->{$oid_rsEntry}}) {
next if ($oid !~ /^$mapping->{rSstate}->{oid}\.(.*)$/);
my $instance = $1;
my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result->{$oid_rsEntry}, instance => $instance);
my $vs_name = $snmp_result->{$oid_vSname}->{$oid_vSname . '.' . $result->{rSvsidx}};
my $display_name = $vs_name . '/' . $result->{rSip} . ':' . $result->{rSport};
if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' &&
$display_name !~ /$self->{option_results}->{filter_name}/) {
$self->{output}->output_add(long_msg => "skipping '" . $display_name . "': no matching filter.", debug => 1);
next;
}
$self->{rs}->{$instance} = { display => $display_name,
status => $result->{rSstate},
rSInBytes => defined($result->{rSInBytes}) ? $result->{rSInBytes} * 8 : undef,
rSOutBytes => defined($result->{rSOutBytes}) ? $result->{rSOutBytes} * 8 : undef,
rSActiveConns => $result->{rSActiveConns} };
}
if (scalar(keys %{$self->{rs}}) <= 0) {
$self->{output}->add_option_msg(short_msg => "No real server found.");
$self->{output}->option_exit();
}
$self->{cache_name} = "kemp_" . $self->{mode} . '_' . $options{snmp}->get_hostname() . '_' . $options{snmp}->get_port() . '_' .
(defined($self->{option_results}->{filter_counters}) ? md5_hex($self->{option_results}->{filter_counters}) : md5_hex('all'));
}
1;
__END__
=head1 MODE
Check real server status.
=over 8
=item B<--filter-counters>
Only display some counters (regexp can be used).
Example: --filter-counters='^status$'
=item B<--filter-name>
Filter real server name (can be a regexp).
=item B<--warning-status>
Set warning threshold for status.
Can used special variables like: %{status}, %{display}
=item B<--critical-status>
Set critical threshold for status (Default: '%{status} !~ /inService|disabled/i').
Can used special variables like: %{status}, %{display}
=item B<--warning-*>
Threshold warning.
Can be: 'active', 'in-traffic' (b/s), 'out-traffic' (b/s).
=item B<--critical-*>
Threshold critical.
Can be: 'active', 'in-traffic' (b/s), 'out-traffic' (b/s).
=back
=cut
| centreon/centreon-plugins | network/kemp/snmp/mode/rsstatus.pm | Perl | apache-2.0 | 7,657 |
package Paws::CognitoIdp::DescribeUserPool;
use Moose;
has UserPoolId => (is => 'ro', isa => 'Str', required => 1);
use MooseX::ClassAttribute;
class_has _api_call => (isa => 'Str', is => 'ro', default => 'DescribeUserPool');
class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CognitoIdp::DescribeUserPoolResponse');
class_has _result_key => (isa => 'Str', is => 'ro');
1;
### main pod documentation begin ###
=head1 NAME
Paws::CognitoIdp::DescribeUserPool - Arguments for method DescribeUserPool on Paws::CognitoIdp
=head1 DESCRIPTION
This class represents the parameters used for calling the method DescribeUserPool on the
Amazon Cognito Identity Provider service. Use the attributes of this class
as arguments to method DescribeUserPool.
You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DescribeUserPool.
As an example:
$service_obj->DescribeUserPool(Att1 => $value1, Att2 => $value2, ...);
Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
=head1 ATTRIBUTES
=head2 B<REQUIRED> UserPoolId => Str
The user pool ID for the user pool you want to describe.
=head1 SEE ALSO
This class forms part of L<Paws>, documenting arguments for method DescribeUserPool in L<Paws::CognitoIdp>
=head1 BUGS and CONTRIBUTIONS
The source code is located here: https://github.com/pplu/aws-sdk-perl
Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
=cut
| ioanrogers/aws-sdk-perl | auto-lib/Paws/CognitoIdp/DescribeUserPool.pm | Perl | apache-2.0 | 1,668 |
#
# Copyright 2018 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::ibm::fs900::snmp::mode::components::psu;
use strict;
use warnings;
my %map_psu_state = (
0 => 'success',
1 => 'error',
);
# In MIB 'IBM-FLASHSYSTEM.MIB'
my $mapping = {
psuObject => { oid => '.1.3.6.1.4.1.2.6.255.1.1.5.10.1.2' },
psuCommErr => { oid => '.1.3.6.1.4.1.2.6.255.1.1.5.10.1.3', map => \%map_psu_state },
psuACGood => { oid => '.1.3.6.1.4.1.2.6.255.1.1.5.10.1.4', map => \%map_psu_state },
psuDCGood => { oid => '.1.3.6.1.4.1.2.6.255.1.1.5.10.1.5', map => \%map_psu_state },
psuFan => { oid => '.1.3.6.1.4.1.2.6.255.1.1.5.10.1.6' },
};
my $oid_powerTableEntry = '.1.3.6.1.4.1.2.6.255.1.1.5.10.1';
sub load {
my ($self) = @_;
push @{$self->{request}}, { oid => $oid_powerTableEntry };
}
sub check {
my ($self) = @_;
$self->{output}->output_add(long_msg => "Checking psu");
$self->{components}->{psu} = {name => 'psu', total => 0, skip => 0};
return if ($self->check_filter(section => 'psu'));
foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_powerTableEntry}})) {
next if ($oid !~ /^$mapping->{psuObject}->{oid}\.(.*)$/);
my $instance = $1;
my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_powerTableEntry}, instance => $instance);
next if ($self->check_filter(section => 'psu', instance => $instance));
$self->{components}->{psu}->{total}++;
$self->{output}->output_add(long_msg => sprintf("Psu '%s' [instance = %s, communications = %s, AC = %s, DC = %s, fan = %s rpm]",
$result->{psuObject}, $instance, $result->{psuCommErr}, $result->{psuACGood}, $result->{psuDCGood}, $result->{psuFan}));
my $exit = $self->get_severity(section => 'psu', value => $result->{psuCommErr});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Psu '%s' communications state is %s",
$instance, $result->{psuCommErr}));
}
$exit = $self->get_severity(section => 'psu', value => $result->{psuACGood});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Psu '%s' AC state is %s",
$instance, $result->{psuACGood}));
}
$exit = $self->get_severity(section => 'psu', value => $result->{psuDCGood});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Psu '%s' DC state is %s",
$instance, $result->{psuDCGood}));
}
if (defined($result->{psuFan}) && $result->{psuFan} =~ /[0-9]/) {
my ($exit, $warn, $crit) = $self->get_severity_numeric(section => 'psu.fan', instance => $instance, value => $result->{psuFan});
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
$self->{output}->output_add(severity => $exit,
short_msg => sprintf("Psu '%s' fan speed is %s rpm", $instance, $result->{psuFan}));
}
$self->{output}->perfdata_add(label => 'psu_fan_' . $instance,
unit => 'rpm',
value => $result->{psuFan},
warning => $warn,
critical => $crit,
min => 0,
);
}
}
}
1; | wilfriedcomte/centreon-plugins | storage/ibm/fs900/snmp/mode/components/psu.pm | Perl | apache-2.0 | 4,770 |
# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute
# Copyright [2016-2018] 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.
=pod
=head1 NAME
Bio::EnsEMBL::Analysis::RunnableDB::ProjectedTranscriptEvidence
=head1 SYNOPSIS
my $runnable =
Bio::EnsEMBL::Analysis::RunnableDB::ProjectedTranscriptEvidence->new(
);
$runnable->run;
my @results = $runnable->output;
=head1 DESCRIPTION
Designed to be used after the genes have been projected to the assembly patches and once the final stable IDs are set.
This aligns the two transcripts (original and projected), creating a
dna_align_feature, which is then moved from transcript to genomic coords and added
as an extra piece of supporting evidence for the projected transcript.
The original transcripts are fetched via the parent_exon_key transcript attribute added at the time of projection.
=head1 CONTACT
http://lists.ensembl.org/mailman/listinfo/dev
=cut
package Bio::EnsEMBL::Analysis::RunnableDB::ProjectedTranscriptEvidence;
use vars qw(@ISA);
use strict;
use warnings;
use Bio::EnsEMBL::Analysis::RunnableDB::BaseGeneBuild;
use Bio::EnsEMBL::Analysis::Config::GeneBuild::ProjectedTranscriptEvidence;
use Bio::EnsEMBL::Analysis::Runnable::ExonerateAlignFeature;
use Bio::EnsEMBL::Pipeline::DBSQL::DBAdaptor;
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Analysis::Tools::Utilities qw(parse_config create_file_name write_seqfile);
use Bio::EnsEMBL::Analysis::Config::General qw (ANALYSIS_WORK_DIR);
@ISA = qw(Bio::EnsEMBL::Analysis::RunnableDB::BaseGeneBuild);
$| = 1;
sub new {
my ( $class, @args ) = @_;
my $self = $class->SUPER::new(@args);
$self->db->dbc->disconnect_when_inactive(1);
my( $program, $options, $genedb, $outgenedb) =
rearrange(['PROGRAM','OPTIONS','GENEDB','OUTGENEDB'], @args);
# config
# config precedence is default, param hash, constructor and finally logic_name config
# read default config entries and do checks
parse_config($self, $PROJECTED_TRANSCRIPT_EVIDENCE_CONFIG_BY_LOGIC, 'DEFAULT');
# Defaults are over-ridden by parameters given in analysis table...
my $ph = $self->parameters_hash;
$self->PROGRAM($ph->{-program}) if $ph->{-program};
$self->OPTIONS($ph->{-options}) if $ph->{-options};
$self->OUTGENEDB($ph->{-outgenedb}) if $ph->{-outgenedb};
$self->GENEDB($ph->{-genedb}) if $ph->{-genedb};
# ...which are over-ridden by constructor arguments.
$self->PROGRAM($program);
$self->OPTIONS($options);
$self->OUTGENEDB($outgenedb);
$self->GENEDB($genedb);
#Finally, analysis specific config
#use uc as parse_config call above switches logic name to upper case
$self->PROGRAM(${$PROJECTED_TRANSCRIPT_EVIDENCE_CONFIG_BY_LOGIC}{uc($self->analysis->logic_name)}{PROGRAM});
$self->OPTIONS(${$PROJECTED_TRANSCRIPT_EVIDENCE_CONFIG_BY_LOGIC}{uc($self->analysis->logic_name)}{OPTIONS});
$self->OUTGENEDB(${$PROJECTED_TRANSCRIPT_EVIDENCE_CONFIG_BY_LOGIC}{uc($self->analysis->logic_name)}{OUTGENEDB});
$self->GENEDB(${$PROJECTED_TRANSCRIPT_EVIDENCE_CONFIG_BY_LOGIC}{uc($self->analysis->logic_name)}{GENEDB});
return $self;
}
# fetch input
sub fetch_input {
my ($self) = @_;
my $gene_db = $self->get_dbadaptor($self->GENEDB);
my $outgene_db = $self->get_dbadaptor($self->OUTGENEDB);
my $out_sa = $outgene_db->get_SliceAdaptor;
my $out_ga = $outgene_db->get_GeneAdaptor;
my $out_ta = $outgene_db->get_TranscriptAdaptor;
my $ga = $gene_db->get_GeneAdaptor;
my $ta = $gene_db->get_TranscriptAdaptor;
$self->outta($out_ta);
my $patch_slice = $out_sa->fetch_by_name($self->input_id);
my @out_genes = @{$out_ga->fetch_all_by_Slice($patch_slice)};
my @out_transcripts;
#make sure get transcripts outside the patch
foreach my $out_gene (@out_genes) {
my @out_trans = @{$out_gene->get_all_Transcripts};
foreach my $out_t (@out_trans) {
if ($out_t->analysis->logic_name() =~ m/^proj/) {
push @out_transcripts, $out_t;
}
}
}
#get reference slice
my $ref_slice = get_ref_slice($patch_slice);
if (!$ref_slice) {
throw("Cannot find reference slice for patch slice ".$patch_slice->name());
}
#create reference transcripts hash
my @ref_genes = @{$ga->fetch_all_by_Slice($ref_slice)};
my @ref_transcripts;
my %ref_trans_hash = ();
foreach my $ref_gene (@ref_genes){ #make sure get transcripts outside the patch
my @ref_trans = @{$ref_gene->get_all_Transcripts};
foreach my $t (@ref_trans) {
$ref_trans_hash{get_transcript_exon_key($t)} = $t->stable_id;
push @ref_transcripts, $t;
}
}
$self->out_transcripts(\@out_transcripts);
print "Fetched ".scalar(@out_transcripts)." projected transcripts\n";
print "Fetched ".scalar(@ref_transcripts)." reference transcripts\n";
foreach my $out_transcript (@out_transcripts){
#get the transcripts (reference and output from projection)
my @parent_exon_key_attribs = @{$out_transcript->get_all_Attributes('parent_exon_key')};
my $parent_exon_key = "";
if (scalar(@parent_exon_key_attribs) > 1) {
warning("Projected transcript ".$out_transcript->stable_id." has more than 1 parent_exon_key attribute.");
} elsif (scalar(@parent_exon_key_attribs) > 0) {
$parent_exon_key = $parent_exon_key_attribs[0]->value();
}
my @parent_sid_attribs = @{$out_transcript->get_all_Attributes('parent_sid')};
my $parent_sid = "";
if (scalar(@parent_sid_attribs) > 1) {
warning("Projected transcript ".$out_transcript->stable_id." has more than 1 parent_sid attribute.");
} elsif (scalar(@parent_sid_attribs) > 0) {
$parent_sid = $parent_sid_attribs[0]->value();
}
if ($parent_exon_key) {
if (exists($ref_trans_hash{$parent_exon_key})) {
my $ref_stable_id = $ref_trans_hash{$parent_exon_key};
# print comparison between previous way of getting the stable id and the current one
if (!($ref_stable_id eq $parent_sid)) {
print("Parent stable ID $ref_stable_id for projected transcript ".$out_transcript->stable_id." is different from the parent stable ID set in the old way $parent_sid. This is only for statistical purposes.\n");
}
my $ref_transcript = $ta->fetch_by_stable_id($ref_stable_id);
if ($ref_transcript) {
my $ref_seq = $ref_transcript->seq;
my $out_seq = $out_transcript->seq;
my $ref_seq_file = create_file_name( "refseq_", "fa", $self->ANALYSIS_WORK_DIR );
my $out_seq_file = create_file_name( "outseq_", "fa", $self->ANALYSIS_WORK_DIR );
write_seqfile($ref_seq, $ref_seq_file, 'fasta');
write_seqfile($out_seq, $out_seq_file, 'fasta');
my %parameters;
if (not exists( $parameters{-options} )
and defined $self->OPTIONS) {
$parameters{-options} = $self->OPTIONS;
}
#set up the runnable and add the files to delete
my $runnable = Bio::EnsEMBL::Analysis::Runnable::ExonerateAlignFeature->new(
-analysis => $self->analysis,
-program => $self->PROGRAM,
-query_type => 'dna',
-query_file => $ref_seq_file,
-query_chunk_number => undef,
-query_chunk_total => undef,
-target_file => $out_seq_file,
%parameters,
);
$runnable->files_to_delete($ref_seq_file);
$runnable->files_to_delete($out_seq_file);
$self->runnable($runnable);
} else {
warning("Parent transcript $ref_stable_id could not be fetched for projected transcript ".$out_transcript->stable_id);
}
} else {
warning("Projected transcript ".$out_transcript->stable_id." does not have a parent.");
}
} else {
throw("Projected transcript ".$out_transcript->stable_id." does not have a parent_exon_key attribute. It should have been added during the projection stage!");
}
}
}
sub run {
my ($self) = @_;
throw("Can't run - no runnable objects") unless ( $self->runnable );
my @p_transcripts = @{$self->out_transcripts};
my $pt_count = 0;
foreach my $runnable (@{$self->runnable}){
$runnable->run;
my $features = $runnable->output;
my @feats = @{$features};
my $p_transcript = $p_transcripts[$pt_count];
my $genomic_features = $self->process_features($features, $p_transcript);
$self->output($genomic_features);
$pt_count++;
}
}
=head2 write_output
Arg [1] : array ref of Bio::EnsEMBL::DnaDnaAlignFeature
Function : Overrides the write_output method from the superclass.
Adds the align feature as a TranscriptSupportingFeature
of the projected transcript.
Returntype: 1
Exceptions: Throws if there isn't one AlignFeature (there should be
one and only one, representing the alignment of the two
Transcripts).
=cut
sub write_output {
my ( $self ) = @_;
my @output = @{$self->output};
my @p_transcripts = @{$self->out_transcripts};
print "Got " . scalar(@output) ." genomic features \n";
warning("Should only be one dna align feature per projected transcript.\n") unless scalar(@output) == scalar(@p_transcripts);
my $out_count = 0;
foreach my $transcript (@p_transcripts){
my $tsfa = $self->get_dbadaptor($self->OUTGENEDB)->get_TranscriptSupportingFeatureAdaptor;
my $t_id = $transcript->dbID;
my $gf = $output[$out_count];
$tsfa->store($t_id, [$gf]);
$out_count++;
}
print "out_count is: ".$out_count."\n";
}
=head2 process_features
Arg [1] : array ref of Bio::EnsEMBL::DnaDnaAlignFeature
Function : Uses cdna2genomic to convert the ungapped align
features into genomic coords
Returntype: 1
=cut
sub process_features {
my ( $self, $flist, $trans ) = @_;
# first do all the standard processing, adding a slice and analysis etc.
my $slice_adaptor = $self->db->get_SliceAdaptor;
my @dafs;
my $count = 0;
FEATURE: foreach my $f (@$flist) {
$count++;
#my $trans = $self->out_transcript;
my @mapper_objs;
my @features;
my $start = 1;
my $end = $f->length;
my $out_slice = $slice_adaptor->fetch_by_name($trans->slice->name);
# get as ungapped features
foreach my $ugf ( $f->ungapped_features ) {
# Project onto the genome
foreach my $obj ($trans->cdna2genomic($ugf->start, $ugf->end)){
if( $obj->isa("Bio::EnsEMBL::Mapper::Coordinate")){
# make into feature pairs
# NOTE: this is an unusual case. The original and projected transcripts should always align to each other
# with both strands = 1
# This means the hit is always forward and the target gets updated to the strand of the projected transcript.
if(!($f->hstrand == 1) or !($f->strand == 1)){
throw("Feature strands are not as expected\n");
}
my $strand = $trans->strand;
my $hstrand = $f->hstrand;
my $fp;
$fp = Bio::EnsEMBL::FeaturePair->new
(-start => $obj->start,
-end => $obj->end,
-strand => $strand,
-slice => $trans->slice,
-hstart => 1,
-hend => $obj->length,
-hstrand => $hstrand,
-percent_id => $f->percent_id,
-score => $f->score,
-hseqname => $f->hseqname,
-hcoverage => $f->hcoverage,
-p_value => $f->p_value,
);
push @features, $fp->transfer($out_slice);
}
}
}
@features = sort { $a->start <=> $b->start } @features;
my $feat = new Bio::EnsEMBL::DnaDnaAlignFeature(-features => \@features);
# corect for hstart end bug
$feat->hstart($f->hstart);
$feat->hend($f->hend);
$feat->analysis($self->analysis);
# transfer the original sequence of the read
$feat->{"_feature_seq"} = $f->{"_feature_seq"};
push @dafs,$feat;
}
return \@dafs;
}
###########################################################
# containers
sub out_transcript {
my ($self,$value) = @_;
if (defined $value) {
$self->{'_out_transcript'} = $value;
}
if (exists($self->{'_out_transcript'})) {
return $self->{'_out_transcript'};
} else {
return undef;
}
}
sub out_transcripts {
my ($self,$value) = @_;
if (defined $value) {
$self->{'_out_transcripts'} = $value;
}
if (exists($self->{'_out_transcripts'})) {
return $self->{'_out_transcripts'};
} else {
return undef;
}
}
sub runnables {
my ($self,$value) = @_;
if (defined $value) {
$self->{'_runnabless'} = $value;
}
if (exists($self->{'_runnables'})) {
return $self->{'_runnables'};
} else {
return undef;
}
}
#transcript adaptor to output gene db
sub outta {
my ($self,$value) = @_;
if (defined $value) {
$self->{'_outta'} = $value;
}
if (exists($self->{'_outta'})) {
return $self->{'_outta'};
} else {
return undef;
}
}
sub PROGRAM {
my ( $self, $value ) = @_;
if ( defined $value ) {
$self->{'_CONFIG_PROGRAM'} = $value;
}
if ( exists( $self->{'_CONFIG_PROGRAM'} ) ) {
return $self->{'_CONFIG_PROGRAM'};
} else {
return undef;
}
}
sub OPTIONS {
my ( $self, $value ) = @_;
if ( defined $value ) {
$self->{'_CONFIG_OPTIONS'} = $value;
}
if ( exists( $self->{'_CONFIG_OPTIONS'} ) ) {
return $self->{'_CONFIG_OPTIONS'};
} else {
return undef;
}
}
sub ANALYSIS_WORK_DIR {
my ($self, $val) = @_;
if (defined $val) {
$self->{_ana_dir} = $val;
}
return $self->{_ana_dir};
}
sub GENEDB {
my ($self,$value) = @_;
if (defined $value) {
$self->{'_CONFIG_GENEDB'} = $value;
}
if (exists($self->{'_CONFIG_GENEDB'})) {
return $self->{'_CONFIG_GENEDB'};
} else {
return undef;
}
}
sub OUTGENEDB {
my ($self,$value) = @_;
if (defined $value) {
$self->{'_CONFIG_OUTGENEDB'} = $value;
}
if (exists($self->{'_CONFIG_OUTGENEDB'})) {
return $self->{'_CONFIG_OUTGENEDB'};
} else {
return undef;
}
}
sub get_transcript_exon_key {
my $transcript = shift;
my $string = $transcript->slice->seq_region_name.":".$transcript->biotype.":".$transcript->seq_region_start.":".$transcript->seq_region_end.":".$transcript->seq_region_strand.":";
my $exons = sort_by_start_end_pos($transcript->get_all_Exons);
foreach my $exon (@{$exons}) {
$string .= ":".$exon->seq_region_start.":".$exon->seq_region_end;
}
return $string;
}
sub sort_by_start_end_pos {
my ($unsorted) = @_;
my @sorted = sort { if ($a->seq_region_start < $b->seq_region_start) {
return -1;
} elsif ($a->seq_region_start == $b->seq_region_start) {
if ($a->seq_region_end < $b->seq_region_end) {
return-1;
} elsif ($a->seq_region_end == $b->seq_region_end) {
return 0;
} elsif ($a->seq_region_end > $b->seq_region_end) {
return 1;
}
return 0;
} elsif ($a->seq_region_start > $b->seq_region_start) {
return 1;
}
} @$unsorted;
return \@sorted;
}
sub get_ref_slice {
my $patch_slice = shift;
my $ref_slice;
print "patch slice is: ".$patch_slice->name."\n";
my @excs = $patch_slice->get_all_AssemblyExceptionFeatures();
if (@excs) {
foreach my $exc (@excs) {
if (@$exc[0]) {
if (@$exc[0]->type() !~ m/REF/) {
$ref_slice = @$exc[0]->alternate_slice();
}
}
}
}
print "reference slice is: ".$ref_slice->name."\n";
return $ref_slice;
}
1;
| kiwiroy/ensembl-analysis | modules/Bio/EnsEMBL/Analysis/RunnableDB/ProjectedTranscriptEvidence.pm | Perl | apache-2.0 | 16,254 |
=head1 LICENSE
Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license.
For license details, please see
http://www.ensembl.org/info/about/code_licence.html
=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
=head1 NAME
Bio::EnsEMBL::DBSQL::StrainSliceAdaptor - adaptor/factory for MappedSlices
representing alternative assemblies
=head1 SYNOPSIS
my $slice =
$slice_adaptor->fetch_by_region( 'chromosome', 14, 900000, 950000 );
my $msc = Bio::EnsEMBL::MappedSliceContainer->new(-SLICE => $slice);
# create a new strain slice adaptor and attach it to the MSC
my $ssa = Bio::EnsEMBL::DBSQL::StrainSliceAdaptor->new($sa->db);
$msc->set_StrainSliceAdaptor($ssa);
# now attach strain
$msc->attach_StrainSlice('Watson');
=head1 DESCRIPTION
NOTE: this code is under development and not fully functional nor tested
yet. Use only for development.
This adaptor is a factory for creating MappedSlices representing
strains and attaching them to a MappedSliceContainer. A mapper will be created
to map between the reference slice and the common container slice coordinate
system.
=head1 METHODS
new
fetch_by_name
=head1 REALTED MODULES
Bio::EnsEMBL::MappedSlice
Bio::EnsEMBL::MappedSliceContainer
Bio::EnsEMBL::AlignStrainSlice
Bio::EnsEMBL::StrainSlice
=cut
package Bio::EnsEMBL::DBSQL::StrainSliceAdaptor;
use strict;
use warnings;
no warnings 'uninitialized';
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use Bio::EnsEMBL::MappedSlice;
use Bio::EnsEMBL::Mapper;
use Bio::EnsEMBL::DBSQL::BaseAdaptor;
our @ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor);
=head2 new
Example : my $strain_slice_adaptor =
Bio::EnsEMBL::DBSQL::StrainSliceAdaptor->new;
Description : Constructor.
Return type : Bio::EnsEMBL::DBSQL::StrainSliceAdaptor
Exceptions : none
Caller : general
Status : At Risk
: under development
=cut
sub new {
my $caller = shift;
my $class = ref($caller) || $caller;
my $self = $class->SUPER::new(@_);
return $self;
}
=head2 fetch_by_name
Arg[1] : Bio::EnsEMBL::MappedSliceContainer $container - the container
to attach MappedSlices to
Arg[2] : String $name - the name of the strain to fetch
Example : my ($mapped_slice) = @{ $msc->fetch_by_name('Watson') };
Description : Creates a MappedSlice representing a version of the container's
reference slice with variant alleles from the named strain
Return type : listref of Bio::EnsEMBL::MappedSlice
Exceptions : thrown on wrong or missing arguments
Caller : general, Bio::EnsEMBL::MappedSliceContainer
Status : At Risk
: under development
=cut
sub fetch_by_name {
my $self = shift;
my $container = shift;
my $name = shift;
# argueent check
unless ($container and ref($container) and
$container->isa('Bio::EnsEMBL::MappedSliceContainer')) {
throw("Need a MappedSliceContainer.");
}
unless ($name) {
throw("Need a strain name.");
}
my $slice = $container->ref_slice;
# get a connection to the variation DB
my $variation_db = $self->db->get_db_adaptor('variation');
unless($variation_db) {
warning("Variation database must be attached to core database to retrieve variation information");
return '';
}
# now get an allele feature adaptor
my $af_adaptor = $variation_db->get_AlleleFeatureAdaptor;
# check we got it
unless(defined $af_adaptor) {
warning("Not possible to retrieve AlleleFeatureAdaptor from variation database");
return '';
}
# now get an individual adaptor
my $ind_adaptor = $variation_db->get_IndividualAdaptor;
# check we got it
unless(defined $ind_adaptor) {
warning("Not possible to retrieve IndividualAdaptor from variation database");
return '';
}
# fetch individual object for this strain name
my $ind = shift @{$ind_adaptor->fetch_all_by_name($name)};
# check we got a result
unless(defined $ind) {
warn("Strain ".$name." not found in the database");
return '';
}
## MAP STRAIN SLICE TO REF SLICE
################################
# create a mapper
my $mapper = Bio::EnsEMBL::Mapper->new('mapped_slice', 'ref_slice');
# create a mapped_slice object
my $mapped_slice = Bio::EnsEMBL::MappedSlice->new(
-ADAPTOR => $self,
-CONTAINER => $container,
-NAME => $slice->name."\#strain_$name",
);
# get the strain slice
my $strain_slice = $slice->get_by_strain($ind->name);
# get all allele features for this slice and individual
#my @afs = sort {$a->start() <=> $b->start()} @{$af_adaptor->fetch_all_by_Slice($slice, $ind)};
# get allele features with coverage info
my $afs = $strain_slice->get_all_AlleleFeatures_Slice(1);
# check we got some data
#warning("No strain genotype data available for slice ".$slice->name." and strain ".$ind->name) if ! defined $afs[0];
my $start_slice = $slice->start;
my $start_strain = 1;
my $sr_name = $slice->seq_region_name;
#my $sr_name = 'ref_slice';
my ($end_slice, $end_strain, $allele_length);
my $indel_flag = 0;
my $total_length_diff = 0;
# check for AFs
if(defined($afs) && scalar @$afs) {
# go through each AF
foreach my $af(@$afs) {
# find out if it changes the length
if($af->length_diff != 0) {
$indel_flag = 1;
$total_length_diff += $af->length_diff;
# get the allele length
$allele_length = $af->length + $af->length_diff();
$end_slice = $slice->start + $af->start() - 2;
if ($end_slice >= $start_slice){
$end_strain = $end_slice - $start_slice + $start_strain;
#add the sequence that maps
$mapper->add_map_coordinates('mapped_slice', $start_strain, $end_strain, 1, $sr_name, $start_slice, $end_slice);
#add the indel
$mapper->add_indel_coordinates('mapped_slice', $end_strain+1, $end_strain+$allele_length, 1, $sr_name,$end_slice+1,$end_slice + $af->length);
$start_strain = $end_strain + $allele_length + 1;
}
else{
#add the indel
$mapper->add_indel_coordinates('mapped_slice', $end_strain+1,$end_strain + $allele_length, 1, $sr_name,$end_slice+1,$end_slice + $af->length);
$start_strain += $allele_length;
}
$start_slice = $end_slice + $af->length+ 1;
}
}
}
# add the remaining coordinates (or the whole length if no indels found)
$mapper->add_map_coordinates('mapped_slice', $start_strain, $start_strain + ($slice->end - $start_slice), 1, $sr_name, $start_slice, $slice->end);
# add the slice/mapper pair
$mapped_slice->add_Slice_Mapper_pair($strain_slice, $mapper);
## MAP REF_SLICE TO CONTAINER SLICE
###################################
if($total_length_diff > 0) {
# create a new mapper
my $new_mapper = Bio::EnsEMBL::Mapper->new('ref_slice', 'container');
# get existing pairs
my @existing_pairs = $container->mapper->list_pairs('container', 1, $container->container_slice->length, 'container');
my @new_pairs = $mapper->list_pairs('mapped_slice', 1, $strain_slice->length(), 'mapped_slice');
# we need a list of indels (specifically inserts)
my @indels;
# go through existing first
foreach my $pair(@existing_pairs) {
if($pair->from->end - $pair->from->start != $pair->to->end - $pair->to->start) {
my $indel;
$indel->{'length_diff'} = ($pair->to->end - $pair->to->start) - ($pair->from->end - $pair->from->start);
# we're only interested in inserts here, not deletions
next unless $indel->{'length_diff'} > 0;
$indel->{'ref_start'} = $pair->from->start;
$indel->{'ref_end'} = $pair->from->end;
$indel->{'length'} = $pair->to->end - $pair->to->start;
push @indels, $indel;
}
}
# now new ones
foreach my $pair(@new_pairs) {
if($pair->from->end - $pair->from->start != $pair->to->end - $pair->to->start) {
my $indel;
$indel->{'length_diff'} = ($pair->from->end - $pair->from->start) - ($pair->to->end - $pair->to->start);
# we're only interested in inserts here, not deletions
next unless $indel->{'length_diff'} > 0;
$indel->{'ref_start'} = $pair->to->start;
$indel->{'ref_end'} = $pair->to->end;
$indel->{'length'} = $pair->from->end - $pair->from->start;
push @indels, $indel;
}
}
# sort them
@indels = sort {
$a->{'ref_start'} <=> $b->{'ref_start'} || # by position
$b->{'length_diff'} <=> $a->{'length_diff'} # then by length diff so we only keep the longest
} @indels;
# clean them
my @new_indels = ();
my $p = $indels[0];
push @new_indels, $indels[0] if scalar @indels;
for my $i(1..$#indels) {
my $c = $indels[$i];
if($c->{'ref_start'} != $p->{'ref_start'} && $c->{'ref_end'} != $p->{'ref_end'}) {
push @new_indels, $c;
$p = $c;
}
}
$start_slice = $slice->start;
$start_strain = 1;
$sr_name = $slice->seq_region_name;
#$sr_name = 'ref_slice';
foreach my $indel(@new_indels) {
$end_slice = $indel->{'ref_end'};
$end_strain = $start_strain + ($end_slice - $start_slice);
$allele_length = $indel->{'length'} + $indel->{'length_diff'};
$new_mapper->add_map_coordinates($sr_name, $start_slice, $end_slice, 1, 'container', $start_strain, $end_strain);
$new_mapper->add_indel_coordinates($sr_name,$end_slice+1,$end_slice + $indel->{'length'}, 1, 'container', $end_strain+1, $end_strain+$allele_length);
$start_strain = $end_strain + $allele_length + 1;
$start_slice = $end_slice + $indel->{'length'} + 1;
}
$new_mapper->add_map_coordinates($sr_name, $start_slice, $slice->end, 1, 'container', $start_strain, $start_strain + ($slice->end - $start_slice));
# replace the mapper with the new mapper
$container->mapper($new_mapper);
# change the container slice's length according to length diff
$container->container_slice($container->container_slice->expand(undef, $total_length_diff, 1));
}
return [$mapped_slice];
}
1;
| adamsardar/perl-libs-custom | EnsemblAPI/ensembl/modules/Bio/EnsEMBL/DBSQL/StrainSliceAdaptor.pm | Perl | apache-2.0 | 10,858 |
=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.
=head1 NAME
Bio::EnsEMBL::Production::Search::GenomeFetcher
=head1 SYNOPSIS
my $fetcher = Bio::EnsEMBL::Production::Search::GenomeFetcher->new();
my $genome = $fetcher->fetch_genome("homo_sapiens");
=head1 DESCRIPTION
Module for rendering a genomic metadata object as a hash
=cut
package Bio::EnsEMBL::Production::Search::MarkerFetcher;
use base qw/Bio::EnsEMBL::Production::Search::BaseFetcher/;
use strict;
use warnings;
use Log::Log4perl qw/get_logger/;
use Carp qw/croak/;
use Bio::EnsEMBL::Registry;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
my $logger = get_logger();
sub new {
my ( $class, @args ) = @_;
my $self = bless( {}, ref($class) || $class );
return $self;
}
sub fetch_markers {
my ( $self, $name ) = @_;
$logger->debug("Fetching DBA for $name");
my $dba = Bio::EnsEMBL::Registry->get_DBAdaptor( $name, 'core' );
croak "Could not find database adaptor for $name" unless defined $dba;
return $self->fetch_markers_for_dba($dba);
}
sub fetch_markers_for_dba {
my ( $self, $dba ) = @_;
my $markers = {};
$dba->dbc()->sql_helper()->execute_no_return(
-SQL => qq/
SELECT m.marker_id, ms2.name, ms1.name, sr.name, mf.seq_region_start, mf.seq_region_end
FROM marker_synonym ms1
JOIN marker m USING (marker_id)
JOIN marker_feature mf USING (marker_id)
JOIN seq_region sr USING (seq_region_id)
JOIN coord_system cs USING (coord_system_id)
LEFT JOIN marker_synonym ms2 USING (marker_synonym_id)
WHERE cs.species_id=?/,
-PARAMS => [ $dba->species_id() ],
-CALLBACK => sub {
my ( $id, $name, $synonym, $seq, $start, $end ) =
@{ shift @_ };
my $marker = $markers->{$id};
if ( !defined $marker ) {
$marker = { id => $id,
name => $name,
seq_region => $seq,
start => $start,
end => $end,
synonyms => [] };
$markers->{$id} = $marker;
}
push @{ $marker->{synonyms} }, $synonym
if defined $synonym && $synonym ne $marker->{name};
return;
} );
return [ values %$markers ];
} ## end sub fetch_markers_for_dba
1;
| Ensembl/ensembl-production | modules/Bio/EnsEMBL/Production/Search/MarkerFetcher.pm | Perl | apache-2.0 | 2,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
=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::SplicingTranscriptPair - Object representing an alternative splicing transcript pair
=head1 SYNOPSIS
my $ase = Bio::EnsEMBL::SplicingTranscriptPair->new(
-START => 123,
-END => 1045,
-TRANSCRIPT_ID_1 => $tran1->dbID,
-TRANSCRIPT_ID_2 => %tran2->dbID
);
=head1 DESCRIPTION
A representation of an Alternative Splicing Transcrript Pair within the Ensembl system.
=head1 METHODS
=cut
package Bio::EnsEMBL::SplicingTranscriptPair;
use strict;
use POSIX;
use Bio::EnsEMBL::Feature;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(throw warning deprecate);
use vars qw(@ISA);
@ISA = qw(Bio::EnsEMBL::Feature);
sub transcript_id_1{
my $self = shift;
$self->{'transcript_id_1'} = shift if (@_);
if (defined $self->{'transcript_id_1'}) {
return $self->{'transcript_id_1'};
}
return undef;
}
sub transcript_id_2{
my $self = shift;
$self->{'transcript_id_2'} = shift if (@_);
if (defined $self->{'transcript_id_2'}) {
return $self->{'transcript_id_2'};
}
return undef;
}
sub start{
my $self = shift;
$self->{'start'} = shift if (@_);
if (defined $self->{'start'}) {
return $self->{'start'};
}
return undef;
}
sub end{
my $self = shift;
$self->{'end'} = shift if (@_);
if (defined $self->{'end'}) {
return $self->{'end'};
}
return undef;
}
1;
| willmclaren/ensembl | modules/Bio/EnsEMBL/SplicingTranscriptPair.pm | Perl | apache-2.0 | 2,309 |
package VMOMI::VirtualMachineBootOptionsBootableEthernetDevice;
use parent 'VMOMI::VirtualMachineBootOptionsBootableDevice';
use strict;
use warnings;
our @class_ancestors = (
'VirtualMachineBootOptionsBootableDevice',
'DynamicData',
);
our @class_members = (
['deviceKey', undef, 0, ],
);
sub get_class_ancestors {
return @class_ancestors;
}
sub get_class_members {
my $class = shift;
my @super_members = $class->SUPER::get_class_members();
return (@super_members, @class_members);
}
1;
| stumpr/p5-vmomi | lib/VMOMI/VirtualMachineBootOptionsBootableEthernetDevice.pm | Perl | apache-2.0 | 524 |
=head1 LICENSE
Copyright [1999-2016] 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
=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::FormatTranscriber::Callback::Echo
=head1 SYNOPSIS
use Bio::FormatTranscriber::Callback::Echo;
$callback_obj = Bio::FormatTranscriber::Callback::Echo->new($init_params);
$callback_obj->run($params);
=head1 DESCRIPTION
A generic callback object meant for testing purposes. It simply dumps any parameters given
to it in the initialization and run call.
=cut
package Bio::FormatTranscriber::Callback::Echo;
use strict;
use warnings;
use Carp;
use Data::Dumper;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(throw);
sub new {
my $class = shift;
my $self = {};
print STDERR "Recieved init parameters:\n";
warn Dumper @_;
return bless $self, $class;
}
sub run {
my $self = shift;
my $params = shift;
print STDERR "Params received:";
warn Dumper $params;
my $value = 'unknown';
if(ref $params eq 'HASH') {
$value = $params->{value}
if($params->{value});
} elsif(ref $params eq 'ARRAY') {
$value = shift @$params;
} else {
$value = $params
if($params);
}
return '__' . $value . '__';
}
1;
| FAANG/faang-format-transcriber | lib/Bio/FormatTranscriber/Callback/Echo.pm | Perl | apache-2.0 | 2,036 |
package OpenXPKI::Server::Workflow::Activity::Tools::SearchWorkflow;
use strict;
use base qw( OpenXPKI::Server::Workflow::Activity );
use OpenXPKI::Server::Context qw( CTX );
use OpenXPKI::Exception;
use OpenXPKI::Debug;
use OpenXPKI::Serialization::Simple;
use Data::Dumper;
use Workflow::Exception qw(configuration_error);
sub execute {
my $self = shift;
my $workflow = shift;
my $context = $workflow->context();
my $target_key = $self->param('target_key') || 'search_result';
my $query;
if ($self->param('wf_type')) {
$query->{type} = $self->param('wf_type');
}
if ($self->param('wf_state')) {
$query->{state} = $self->param('wf_state');
}
if ($self->param('realm')) {
##! 16: 'Adding realm ' . $self->param('realm')
$query->{pki_realm} = $self->param('realm');
}
my $attr;
if ($self->param('wf_creator')) {
$attr->{'creator'} = ~~ $self->param('wf_creator');
}
foreach my $key ($self->param()) {
##! 16: 'Param key ' . $key
next unless $key =~ /attr_(\w+)/;
$attr->{$1} = ~~ $self->param($key);
}
$query->{attribute} = $attr;
##! 16: 'Query ' . Dumper $query
my $result = CTX('api2')->search_workflow_instances( %$query );
##! 64: 'Result ' . Dumper $result
my @ids = map { ($_->{'workflow_id'} != $workflow->id()) ? ($_->{'workflow_id'}) : () } @{$result};
##! 32: 'Ids ' . Dumper \@ids
# check if self was the only match so its empty now
if (!scalar @ids) {
$context->param( $target_key => undef );
} elsif ($self->param('mode') eq 'list') {
$context->param( $target_key => OpenXPKI::Serialization::Simple->new()->serialize(\@ids) );
} else {
if (scalar @ids > 1) {
configuration_error('Ambigous configuration - more than one result found');
} else {
$context->param( $target_key => $ids[0] );
}
}
return 1;
}
1;
__END__;
=head1 Name
OpenXPKI::Server::Workflow::Activity::Tools::SearchWorkflow
=head1 Description
Search the workflow table based on given conditions. The default is to
search for a single workflow and get its ID back. If you want to search
for multiple workflows or need extra information you can pass the I<mode>
parameter. The running workflow is always removed from the result.
If no result is found, the targer_key is set to undef.
Also check the documentation of the search_workflow_instances API method.
=head2 Search Modes
=over
=item id
Expect a single (or no) result from the query. If the given query returns
more than one item, the search fails with a configuration error.
=item list
Return the ids of the workflows as list.
=back
=head2 Activity Parameter
=over
=item mode
One of I<id, list>, see description.
=item realm
The realm to search in, the default is the current realm. You can use the
special word I<_any> to search in all realms. Use this with caution!
=item target_key
Context key to write the search result to, default is search_result.
=item wf_type, wf_state, wf_creator
Values are passed as arguments for the respective workflow properties.
=item attr_*
Any parameter starting with the prefix I<attr_> is used as query condition
to the workflow attributes table, the prefixed is stripped, the remainder
is used as attribute key. Values are passed as full text match.
=back
| oliwel/openxpki | core/server/OpenXPKI/Server/Workflow/Activity/Tools/SearchWorkflow.pm | Perl | apache-2.0 | 3,416 |
=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
=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>.
=head1 NAME
Bio::EnsEMBL::Compara::RunnableDB::PairAligner::ImportNets
=head1 DESCRIPTION
Reads a Net file and imports the data into a compara database, saving the results in the
genomic_align_block and genomic_align tables with a given method_link_species_set_id. Needs the
presence of the corresponding Chain data already in the database.
Download from:
http://hgdownload.cse.ucsc.edu/downloads.html
Choose reference species
Choose Pairwise Alignments
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg19/vsSelf/hg19.hg19.net.gz
=cut
package Bio::EnsEMBL::Compara::RunnableDB::PairAligner::ImportNets;
use strict;
use Bio::EnsEMBL::Compara::RunnableDB::PairAligner::AlignmentNets;
use Bio::EnsEMBL::Analysis::Runnable::AlignmentNets;
use Bio::EnsEMBL::Compara::MethodLinkSpeciesSet;
use Bio::EnsEMBL::DnaDnaAlignFeature;
use Bio::EnsEMBL::Utils::Exception qw(throw warning);
use base ('Bio::EnsEMBL::Compara::RunnableDB::BaseRunnable');
our @ISA = qw(Bio::EnsEMBL::Compara::RunnableDB::PairAligner::AlignmentProcessing);
############################################################
=head2 fetch_input
Title : fetch_input
Usage : $self->fetch_input
Returns : nothing
Args : none
=cut
sub fetch_input {
my( $self) = @_;
$self->SUPER::fetch_input;
my $fake_analysis = Bio::EnsEMBL::Analysis->new;
$self->compara_dba->dbc->disconnect_when_inactive(0);
my $mlssa = $self->compara_dba->get_MethodLinkSpeciesSetAdaptor;
my $dafa = $self->compara_dba->get_DnaAlignFeatureAdaptor;
my $gaba = $self->compara_dba->get_GenomicAlignBlockAdaptor;
my $genome_dba = $self->compara_dba->get_GenomeDBAdaptor;
my $ref_dnafrag;
if(defined($self->param('dnafrag_id'))) {
$ref_dnafrag = $self->compara_dba->get_DnaFragAdaptor->fetch_by_dbID($self->param('dnafrag_id'));
}
################################################################
# get the compara data: MethodLinkSpeciesSet, reference DnaFrag,
# and GenomicAlignBlocks
################################################################
#get ref species
my $ref_gdb = $genome_dba->fetch_by_name_assembly($self->param('ref_species'));
#get non-ref species. If self alignment, set non-ref species to be the same as ref-species
my $non_ref_gdb;
if (!$self->param('non_ref_species')) {
$self->param('non_ref_species', $self->param('ref_species'));
}
$non_ref_gdb = $genome_dba->fetch_by_name_assembly($self->param('non_ref_species'));
#get method_link_species_set of Chains, defined by input_method_link_type
my $mlss;
if ($ref_gdb->dbID == $non_ref_gdb->dbID) {
#self alignments
$mlss = $mlssa->fetch_by_method_link_type_GenomeDBs($self->param('input_method_link_type'), [$ref_gdb]);
} else {
$mlss = $mlssa->fetch_by_method_link_type_GenomeDBs($self->param('input_method_link_type'), [$ref_gdb, $non_ref_gdb]);
}
throw("No MethodLinkSpeciesSet for method_link_type". $self->param('input_method_link_type') . " and species " . $ref_gdb->name . " and " . $non_ref_gdb->name)
if not $mlss;
#Check if doing self_alignment where the species_set will contain only one
#entry
my $self_alignment = 0;
if (@{$mlss->species_set_obj->genome_dbs} == 1) {
$self_alignment = 1;
}
#get Net method_link_species_set_id.
my $out_mlss = $mlssa->fetch_by_dbID($self->param('output_mlss_id'));
throw("No MethodLinkSpeciesSet for method_link_species_set_id".$self->param('output_mlss_id'))
if not $out_mlss;
######## needed for output####################
$self->param('output_MethodLinkSpeciesSet', $out_mlss);
#Check if need to delete alignments. This shouldn't be needed if using transactions
if ($self->input_job->retry_count > 0) {
$self->warning("Deleting alignments as it is a rerun");
$self->delete_alignments($out_mlss,
$ref_dnafrag,
$self->param('start'),
$self->param('end'));
}
#Get Chain GenomicAlignBlocks associated with reference dnafrag and start and end
my $gabs = $gaba->fetch_all_by_MethodLinkSpeciesSet_DnaFrag($mlss,
$ref_dnafrag,
$self->param('start'),
$self->param('end'));
###################################################################
# get the target slices and bin the GenomicAlignBlocks by group id
###################################################################
my (%features_by_group, %query_lengths, %target_lengths);
my $self_gabs;
while (my $gab = shift @{$gabs}) {
#Find reference genomic_align by seeing which has the visible field set (reference has visible=1 for chains)
my $ga1 = $gab->genomic_align_array->[0];
my $ga2 = $gab->genomic_align_array->[1];
my $ref_ga;
my $non_ref_ga;
#visible is true on the reference genomic_align
if ($ga1->visible) {
$ref_ga = $ga1;
$non_ref_ga = $ga2;
} else {
$ref_ga = $ga2;
$non_ref_ga = $ga1;
}
#Check the ref_ga dnafrag_id is valid for this job. Since the gabs were fetched using fetch_all_by_MethodLinkSpeciesSet_Dnafrag, the $gab->reference_genomic_align->dnafrag_id needs to be the same as the visible genomic_align_id else this isn't the reference genomic_align and we need to skip it)
next if ($ref_ga->dnafrag_id != $gab->reference_genomic_align->dnafrag_id);
#Set the gab reference ga
$gab->reference_genomic_align($ref_ga);
if (not exists($self->param('query_DnaFrag_hash')->{$ref_ga->dnafrag->name})) {
######### needed for output ######################################
$self->param('query_DnaFrag_hash')->{$ref_ga->dnafrag->name} = $ref_ga->dnafrag;
}
if (not exists($self->param('target_DnaFrag_hash')->{$non_ref_ga->dnafrag->name})) {
######### needed for output #######################################
$self->param('target_DnaFrag_hash')->{$non_ref_ga->dnafrag->name} = $non_ref_ga->dnafrag;
}
my $group_id = $gab->group_id();
push @{$features_by_group{$group_id}}, $gab;
}
foreach my $group_id (keys %features_by_group) {
$features_by_group{$group_id} = [ sort {$a->reference_genomic_align->dnafrag_start <=> $b->reference_genomic_align->dnafrag_start} @{$features_by_group{$group_id}} ];
}
foreach my $nm (keys %{$self->param('query_DnaFrag_hash')}) {
$query_lengths{$nm} = $self->param('query_DnaFrag_hash')->{$nm}->length;
}
foreach my $nm (keys %{$self->param('target_DnaFrag_hash')}) {
$target_lengths{$nm} = $self->param('target_DnaFrag_hash')->{$nm}->length;
}
#Must store chains in array indexed by [group_id-1] so that the AlignmentNets code uses the correct genomic_align_block chain
my $features_array;
foreach my $group_id (keys %features_by_group) {
$features_array->[$group_id-1] = $features_by_group{$group_id};
}
if (!defined $features_array) {
print "No features found for " . $ref_dnafrag->name . "\n";
return;
}
my %parameters = (-analysis => $fake_analysis,
-query_lengths => \%query_lengths,
-target_lengths => \%target_lengths,
-chains => $features_array,
-chains_sorted => 1,
-chainNet => "",
-workdir => $self->worker_temp_directory,
-min_chain_score => $self->param('min_chain_score'));
my $runnable = Bio::EnsEMBL::Analysis::Runnable::AlignmentNets->new(%parameters);
#Store runnable in param
$self->param('runnable', $runnable);
##################################
# read the net file
##################################
my $fh;
open $fh, $self->param('net_file') or throw("Could not open net file '" . $self-param('net_file') . "' for reading\n");
my $res_chains = $runnable->parse_Net_file($fh);
close($fh);
$runnable->output($res_chains);
}
sub run {
my $self = shift;
#print "RUNNING \n";
if ($self->param('runnable')) {
my $runnable = $self->param('runnable');
$self->cleanse_output($runnable->output);
$self->param('chains', $runnable->output);
} else {
#Set to empty if no features found
$self->param('chains', []);
}
}
sub write_output {
my $self = shift;
my $disconnect_when_inactive_default = $self->compara_dba->dbc->disconnect_when_inactive;
$self->compara_dba->dbc->disconnect_when_inactive(0);
$self->SUPER::write_output;
$self->compara_dba->dbc->disconnect_when_inactive($disconnect_when_inactive_default);
}
1;
| dbolser-ebi/ensembl-compara | modules/Bio/EnsEMBL/Compara/RunnableDB/PairAligner/ImportNets.pm | Perl | apache-2.0 | 9,556 |
use strict;
package Net::API::RPX::Exception::Service;
BEGIN {
$Net::API::RPX::Exception::Service::AUTHORITY = 'cpan:KONOBI';
}
{
$Net::API::RPX::Exception::Service::VERSION = '0.04';
}
# ABSTRACT: A Class of exceptions for delivering problems from the RPX service.
use warnings;
use Moose;
use namespace::autoclean;
extends 'Net::API::RPX::Exception';
my $rpx_errors = {
-1 => 'Service Temporarily Unavailable',
0 => 'Missing parameter',
1 => 'Invalid parameter',
2 => 'Data not found',
3 => 'Authentication error',
4 => 'Facebook Error',
5 => 'Mapping exists',
};
has 'data' => ( isa => 'Any', is => 'ro', required => 1 );
has 'status' => ( isa => 'Any', is => 'ro', required => 1 );
has 'rpx_error' => ( isa => 'Any', is => 'ro', required => 1 );
has 'rpx_error_code' => ( isa => 'Any', is => 'ro', required => 1 );
has 'rpx_error_message' => ( isa => 'Any', is => 'ro', required => 1 );
has
'rpx_error_code_description' =>
( isa => 'Any', is => 'ro', required => 1, lazy => 1, ),
, builder => '_build_rpx_error_code_description';
sub _build_rpx_error_code_description {
my ($self) = shift;
return $rpx_errors->{ $self->rpx_error_code };
}
__PACKAGE__->_immutable();
1;
__END__
=pod
=head1 NAME
Net::API::RPX::Exception::Service - A Class of exceptions for delivering problems from the RPX service.
=head1 VERSION
version 0.04
=head1 NAME
=head1 AUTHORS
=over 4
=item *
Scott McWhirter <konobi@cpan.org>
=item *
Kent Fredric <kentnl@cpan.org>
=back
=head1 COPYRIGHT AND LICENSE
This software is Copyright (c) 2012 by Cloudtone Studios.
This is free software, licensed under:
The (three-clause) BSD License
=cut
| gitpan/Net-API-RPX | lib/Net/API/RPX/Exception/Service.pm | Perl | bsd-3-clause | 1,730 |
use strict;
use warnings;
package Dist::Zilla::Plugin::CPAN::Mini::Inject::REST;
our $VERSION = '0.005';
use Moose;
use Data::Dump;
extends 'CPAN::Mini::Inject::REST::Client::API';
with 'Dist::Zilla::Role::Releaser';
has '+port' => ( default => 80 );
has '+protocol' => ( default => 'http' );
sub release {
my ($self, $archive) = @_;
if($ENV{ALREADY_UPLOADED_PRETEND_THIS_HAPPENED_ALREADY})
{
# sometimes the CPAN::Mini::Inject::REST reports an error
# despite successfully uploading and indexing a distribution.
# this leaves us in an awkward state as we can't re-upload it
# and we need this step to pass to get the rest of the release
# tasks accomplished.
# NOTE: this often a 504 because the timeouts on the frontend
# nginx are too low. Since the server does the whole indexing
# during the processing of the REST call itself this can take a
# while.
$self->log("Pretending we succesfully uploaded $archive");
return;
}
if($self->host =~ qr|//|)
{
# stop a common goof that was being reported as a 500.
# despite not actually reaching a server.
$self->log_fatal(sprintf "host looks like a url (%s), please change it to a hostname.", $self->host);
}
$self->log_debug(sprintf "Sending %s to %s://%s:%d", $archive, $self->protocol, $self->host, $self->port);
my ($code, $result) = $self->post(
qq(repository/$archive) => {
file => ["$archive"]
}
);
if ($code >= 500) {
# FIXME - does it give us info?
$self->log_fatal("$code: Server error");
}
elsif ($code >= 400) {
my $error = ref $result ? $result->{error} : $result;
$error = pp $error if ref $error;
$self->log_fatal("$code: Client error: $error");
}
elsif ($code >= 300) {
$self->log_fatal("Unexpected $code that wasn't followed");
}
else {
$self->log("Successfully indexed $archive");
}
}
1;
__END__
=encoding utf-8
=head1 NAME
Dist::Zilla::Plugin::CPAN::Mini::Inject::REST - Uploads to a
L<CPAN::Mini::Inject> mirror using L<CPAN::Mini::Inject::REST>
=head1 DESCRIPTION
Like L<Dist::Zilla::Plugin::Inject>, this plugin is a release-stage plugin that
uploads to a L<CPAN::Mini> mirror. This one expects that the remote is a
L<CPAN::Mini::Inject::REST> server, since it uses
L<CPAN::Mini::Inject::REST::Client::API> to do it.
=head1 ATTRIBUTES
This plugin extends L<CPAN::Mini::Inject::REST::Client::API> and therefore all of its properties can be provided. A summary:
=over
=item host - Required - without the protocol.
=item protocol - Optional. Defaults to C<http>. This differs from the parent class, where it is required.
=item port - Optional. Defaults to C<80>. This differs from the parent class, where it is required.
=item username - Optional. Username for HTTP basic auth.
=item password - Optional. Password for HTTP basic auth.
=back
| Altreus/Dist-Zilla-Plugin-CPAN-Mini-Inject-REST | lib/Dist/Zilla/Plugin/CPAN/Mini/Inject/REST.pm | Perl | bsd-3-clause | 3,005 |
#!/usr/bin/perl -w
#
# Copyright (c) 2013, Carnegie Mellon University.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. Neither the name of the University nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
# WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# $cmuPDL: eval_response_time_mutation_identification.pl,v 1.13 2010/05/03 20:34:22 rajas Exp $ #
##
# @author Raja Sambasivan
#
# Given the Spectroscope results and a mutated node just before which a
# response-time mutation was induced, this code will evaluate the quality of the
# spectroscope results. Specifically, it will determine:
#
# Note that virtual categories and requests exist because the combined ranked
# results file splits categories into virtual categories if they contain both
# structural mutations *and* response-time mutations.
#
# 7)Total number of categories containing the mutated node
# 8)Total number of requests containing the mutated node
#
# As output, it will yield as info about the combined ranked results file:
# * Number of false-positive virtual categories
# "" requests
# * Number of virtual categories identified as response-time mutations, but
# for which the relevant mutated edge was not identified
# "" requests
# * Total number of virtual categories
# "" requests
# * NCDG value
# It will also yield coverage information:
# * Percent of total categories identified correctly
# "" requests
#
# And information about the mutated edge:
# * Avg. S0 latency of mutated edge
# * Avg. S1 latency of mutated edge.
##
#### Package declarations ################
use strict;
use warnings;
use diagnostics;
use Test::Harness::Assert;
use Getopt::Long;
use lib '../lib/';
use ParseDot::DotHelper qw[parse_nodes_from_file];
use List::Util qw(sum);
#### Global variables ####################
#####
# The input files
#####
my $g_combined_ranked_results_file;
my $g_originating_clusters_file;
my $g_not_interesting_clusters_file;
# The node before which the response-time mutation was induced
my $g_mutation_node;
# Another before which the response-time mutation can be induced
my $g_mutation_node_2;
######
# General accounting information about each cluster
######
my %g_already_seen_clusters;
my $g_total_s1_reqs = 0;
my $g_num_categories_with_mutated_node = 0;
my $g_num_requests_with_mutated_node = 0;
my $g_avg_s0_edge_latency = 0;
my $g_avg_s1_edge_latency = 0;
my $g_num_s0_edges_found = 0;
my $g_num_s1_edges_found = 0;
my $g_avg_s0_edge_var = 0;
my $g_avg_s1_edge_var = 0;
my $g_avg_edge_p_value = 0;
my $g_num_p_values = 0;
my $g_s0_response_time = 0;
my $g_s1_response_time = 0;
#####
# These variables are computed when analyzing the combined
# ranked results file.
#####
my $g_num_virtual_requests = 0;
my %g_num_virtual_categories_false_positives = ( RESPONSE_TIME => 0, STRUCTURAL => 0);
my %g_num_virtual_requests_false_positives = ( RESPONSE_TIME => 0, STRUCTURAL => 0);
my $g_num_virtual_relevant_categories = 0;
my $g_num_virtual_relevant_requests = 0;
my $g_num_virtual_categories_edge_not_identified = 0;
my $g_num_virtual_requests_edge_not_identified = 0;
my @g_combined_ranked_results_bitmap;
###### Private functions #######
##
# Prints input options
##
sub print_options {
print "perl eval_response_time_mutation_identification.pl\n";
print "\tcombined_ranked_results_file: File containing combined ranked results\n";
print "\toriginators_file: File containing the originators\n";
print "\tnot_interesting_file: File containing not interesting clusters\n";
print "\tmutation_node: The name of the node before which the response-time mutation was induced\n";
print "\tmutation_node_2: The name of the second node before which the response-time mutation was induced\n";
}
##
# Get input options
##
sub get_options {
GetOptions("combined_ranked_results_file=s" => \$g_combined_ranked_results_file,,
"originators_file=s" => \$g_originating_clusters_file,
"not_interesting_file=s" => \$g_not_interesting_clusters_file,
"mutation_node=s" => \$g_mutation_node,
"mutation_node_2=s" => \$g_mutation_node_2);
if(!defined $g_combined_ranked_results_file ||
!defined $g_originating_clusters_file ||
!defined $g_not_interesting_clusters_file ||
!defined $g_mutation_node) {
print_options();
exit(-1);
}
}
##
# Calculate base2 logarithm
#
# @param val: Will calculate log2(val)
# @return: log2(val)
##
sub log2 {
assert(scalar(@_) == 1);
my ($val) = @_;
return log($val)/log(2);
}
##
# Parses the edges of a cluster representative to find instances where the
# mutation node is the destination node. Checks to see if these edges are marked
# as response-time mutations.
#
# @param fh: The filehandle of the file that contains the cluster rep
# @param node_name_hash: Hash containing IDs to node names.
#
# @return: A pointer to a hash with elements:
# NODE_FOUND: 1 if the node was found as a destination edge
# IS_MUTATION: 1 if the dest edge was identified as a mutation
# S0_LATENCIES: if NODE_FOUND is 1, this contains a reference
# to a pointer containing the array of s0 edge latencies for the dest edge
# S1_LATENCIES: if NODE_COUNT is 1, this contains a reference
# to a pointer containing th earray of s1 edge latencies for the dest edge
##
sub find_edge_mutation {
my ($fh, $node_name_hash) = @_;
my $found = 0;
my $is_mutation = 0;
my @s0_edge_latencies;
my @s1_edge_latencies;
my @s0_edge_variances;
my @s1_edge_variances;
my @p_values;
while (<$fh>) {
if(/(\d+)\.(\d+) \-> (\d+)\.(\d+) \[color=\"\w+\" label=\"p:([-0-9\.]+)\\n.*a: ([-0-9\.]+)us \/ ([-0-9\.]+)us.*s: ([-0-9\.]+)us \/ ([0-9\.]+)us/) {
my $src_node_id = "$1.$2";
my $dest_node_id = "$3.$4";
my $p = $5;
my $s0_edge_latency = $6;
my $s1_edge_latency = $7;
my $s0_stddev = $8;
my $s1_stddev = $9;
my $src_node_name = $node_name_hash->{$src_node_id};
my $dest_node_name = $node_name_hash->{$dest_node_id};
if ($dest_node_name =~ /$g_mutation_node/) {#|| $dest_node_name =~ /$g_mutation_node_2/) {
$found = 1;
print "Relevant edge found: $s0_edge_latency $s1_edge_latency\n";
if ($s0_edge_latency > 0) { push(@s0_edge_latencies, $s0_edge_latency);}
if ($s1_edge_latency > 0) { push(@s1_edge_latencies, $s1_edge_latency);}
if ($s0_edge_latency > 0) {push(@s0_edge_variances, $s0_stddev*$s0_stddev)};
if ($s1_edge_latency > 0) {push(@s1_edge_variances, $s1_stddev*$s1_stddev)};
if ($p < 0.05 && $p >= 0) {
$is_mutation = 1;
}
if($p >= 0) {
push(@p_values, $p);
}
}
} else {
last;
}
}
return ({NODE_FOUND => $found, IS_MUTATION => $is_mutation,
S0_LATENCIES => \@s0_edge_latencies, S1_LATENCIES => \@s1_edge_latencies,
S0_VARIANCES => \@s0_edge_variances, S1_VARIANCES => \@s1_edge_variances,
P_VALUES => \@p_values});
}
##
# Updates accounting information about the number of categories and requests
# that contain the mutation node. Should be called once per category.
#
# @param s1_reqs: The number of requests from s1 in the category
# @param mutation_info: Information about whether the category contains requests that
# contain the mutation node.
##
sub update_mutation_accounting_info {
assert(scalar(@_) == 4);
my ($s1_reqs, $mutation_info, $s0_response_time, $s1_response_time) = @_;
my $s0_edge_latencies = $mutation_info->{S0_LATENCIES};
my $s1_edge_latencies = $mutation_info->{S1_LATENCIES};
my $s0_edge_variances = $mutation_info->{S0_VARIANCES};
my $s1_edge_variances = $mutation_info->{S1_VARIANCES};
my $p_values = $mutation_info->{P_VALUES};
if (scalar(@{$s0_edge_latencies}) > 0) {
$g_avg_s0_edge_latency = ($g_avg_s0_edge_latency * $g_num_s0_edges_found + sum(0, @{$s0_edge_latencies}))/
($g_num_s0_edges_found + scalar(@{$s0_edge_latencies}));
$g_num_s0_edges_found += scalar(@{$s0_edge_latencies});
}
if (scalar(@{$s0_edge_variances}) > 0) {
$g_avg_s0_edge_var = ($g_avg_s0_edge_var * $g_num_s0_edges_found + sum(0, @{$s0_edge_variances}))/
($g_num_s0_edges_found + scalar(@{$s0_edge_variances}));
}
if (scalar(@{$s1_edge_latencies}) > 0) {
$g_avg_s1_edge_latency = ($g_avg_s1_edge_latency * $g_num_s1_edges_found + sum(0, @{$s1_edge_latencies}))/
($g_num_s1_edges_found + scalar(@${s1_edge_latencies}));
$g_num_s1_edges_found += scalar(@{$s1_edge_latencies});
}
if (scalar(@{$s1_edge_variances}) > 0) {
$g_avg_s1_edge_var = ($g_avg_s1_edge_var * $g_num_s1_edges_found + sum(0, @{$s1_edge_variances}))/
($g_num_s1_edges_found + scalar(@${s1_edge_variances}));
}
if (scalar(@{$p_values}) > 0) {
$g_avg_edge_p_value = ($g_avg_edge_p_value * $g_num_p_values + sum(0, @{$p_values}))/
($g_num_p_values + scalar(@${p_values}));
$g_num_p_values += scalar(@{$p_values});
}
$g_s0_response_time += $s0_response_time;
$g_s1_response_time += $s1_response_time;
$g_num_categories_with_mutated_node++;
$g_num_requests_with_mutated_node += $s1_reqs;
}
##
# Parses the combined ranked results file and extracts information
# necessary to extract the number of relevant virtual categories and
# requests, the number of false-positives, and the NDCG value.
#
# @param cluster_id: The cluster_id
# @param mutation_type: The specific mutation of this result
# @param cost: The cost of this virtual mutation category
# @param overall_mutation_type: The overall mutation category type
# @param p_value: The p-value of ths virtual mutation category
# @param s1_reqs: The number of requests from s1 in this virtual
# @param mutation_info: Information about whether this virtual category contains
# requests that contain the mutation node
##
sub compute_combined_ranked_results_stats {
assert(scalar(@_) == 7);
my ($cluster_id, $mutation_type,
$cost, $overall_mutation_type,
$p_value, $s1_reqs, $mutated_info) = @_;
# Determine if this is a response-time mutation
my $is_response_time_mutation = ($mutation_type =~ /Response/i);
# Increment the number of 'virtual requests'
$g_num_virtual_requests += $s1_reqs;
# Case where we have a structural mutation --- this is a false positive
if ($is_response_time_mutation == 0) {
$g_num_virtual_categories_false_positives{STRUCTURAL}++;
$g_num_virtual_requests_false_positives{STRUCTURAL} += $s1_reqs;
push(@g_combined_ranked_results_bitmap, -1);
return;
}
# Virtual category contains response-time mutations
if ($mutated_info->{NODE_FOUND} == 0) {
# Case where we have identified a response-time mutation, but it does
# not contain the mutated node
$g_num_virtual_categories_false_positives{RESPONSE_TIME}++;
$g_num_virtual_requests_false_positives{RESPONSE_TIME} += $s1_reqs;
push(@g_combined_ranked_results_bitmap, 0);
} elsif ($mutated_info->{NODE_FOUND} == 1 &&
$mutated_info->{IS_MUTATION} == 0) {
# Weird case where a category containing the mutated node
# is identified as a response-time mutation, but the specific
# edge we care about is not
$g_num_virtual_categories_edge_not_identified++;
$g_num_virtual_requests_edge_not_identified += $s1_reqs;
push(@g_combined_ranked_results_bitmap, 0);
} elsif($mutated_info->{NODE_FOUND} == 1 &&
$mutated_info->{IS_MUTATION} == 1) {
# Case where the category is identified as a response-time
# mutation,
$g_num_virtual_relevant_categories++;
$g_num_virtual_relevant_requests += $s1_reqs;
push(@g_combined_ranked_results_bitmap, 1);
}
}
##
# Parses categories in the input file
#
# @param file: The file to process
# @param is_combined_ranked_results_file: is this the combined ranked results file?
##
sub handle_requests {
assert(scalar(@_) == 2);
my ($file, $is_combined_ranked_results_file) = @_;
open(my $input_fh, "<$file") or
die("Could not open $file");
while (<$input_fh>) {
my $cluster_id;
my $mutation_type;
my $cost;
my $overall_mutation_type;
my $p_value;
my $s1_reqs;
my $s0_avg_time;
my $s1_avg_time;
my %node_name_hash;
if(/Cluster ID: (\d+).+Specific Mutation Type: ([\w\s]+).+Cost: ([-0-9\.]+)\\nOverall Mutation Type: ([\w\s]+).*Avg\. response times: (\d+) us ; (\d+) us.+P-value: ([-0-9\.+]).*requests: \d+ ; (\d+)/) {
$cluster_id = $1;
$mutation_type = $2;
$cost = $3;
$overall_mutation_type = $4;
$s0_avg_time = $5;
$s1_avg_time = $6;
$p_value = $7;
$s1_reqs = $8;
my %node_name_hash;
if ($is_combined_ranked_results_file && $cost <= 0) {
next;
}
DotHelper::parse_nodes_from_file($input_fh, 1, \%node_name_hash);
my $mutation_info = find_edge_mutation($input_fh, \%node_name_hash);
if($is_combined_ranked_results_file) {
compute_combined_ranked_results_stats($cluster_id, $mutation_type,
$cost, $overall_mutation_type,
$p_value, $s1_reqs, $mutation_info);
}
# If this cluster was never seen before, add to s1 totals
if (!defined $g_already_seen_clusters{$cluster_id}) {
if ($mutation_info->{NODE_FOUND} == 1) {
update_mutation_accounting_info($s1_reqs, $mutation_info, $s0_avg_time, $s1_avg_time);
}
$g_total_s1_reqs += $s1_reqs;
}
$g_already_seen_clusters{$cluster_id} = 1;
}
else {
if(/Cluster ID: (\d+)/) {
print "PROBLEM: $_\n";
}
next;
}
}
# Close current input file
close($input_fh);
}
##
# computes the DCG value. It is computed as:
# rel_p = rel_0 + sum(1, p, rel_i/log(i+1))
#
# @param results_bitmap: Pointer to an array of 1s and 0s indicating whether the
# corresponding position in the ranked results file was relevant
##
sub compute_dcg {
assert(scalar(@_) == 1);
my ($results_bitmap) = @_;
my $score = $results_bitmap->[0];
for(my $i = 1; $i < scalar(@{$results_bitmap}); $i++) {
my $contrib = ($results_bitmap->[$i] == 1)? 1: 0;
$score += $contrib/log2($i+1);
}
return $score;
}
##### Functions to print out results ####
##
# Prints category-level statistics
##
sub print_category_level_info {
my $num_categories = keys %g_already_seen_clusters;
my $num_virtual_categories = scalar(@g_combined_ranked_results_bitmap);
### Category-level information ####
print "Category-level information\n";
print "Total Number of categories: $num_categories\n";
print "Total Number of Virtual categories: $num_virtual_categories\n";
# Precision info
my $false_positive_categories = $g_num_virtual_categories_false_positives{STRUCTURAL} +
$g_num_virtual_categories_false_positives{RESPONSE_TIME};
printf "Number/Fraction of categories in the ranked results that are false-positives: %d (%3.2f)\n",
$false_positive_categories,
$false_positive_categories/$num_virtual_categories;
printf "Fraction of structural mutation categories in the ranked results that are false-positives: %d, (%3.2f)\n",
$g_num_virtual_categories_false_positives{STRUCTURAL},
$g_num_virtual_categories_false_positives{STRUCTURAL}/$num_virtual_categories;
printf "Fraction of response-time mutation categories in the ranked results that are false-positives: %d, (%3.2f)\n",
$g_num_virtual_categories_false_positives{RESPONSE_TIME},
$g_num_virtual_categories_false_positives{RESPONSE_TIME}/$num_virtual_categories;
printf "Number/fraction of categories in the ranked results that were identified as\n" .
" Response-time mutations, but for which the edge was not identified: %d (%3.2f)\n",
$g_num_virtual_categories_edge_not_identified,
$g_num_virtual_categories_edge_not_identified/$num_virtual_categories;
# Compute dcg
my $dcg = compute_dcg(\@g_combined_ranked_results_bitmap);
my @best_results = sort {$b <=> $a} @g_combined_ranked_results_bitmap;
my $normalizer = compute_dcg(\@best_results);
if ($normalizer == 0) {
printf "The nDCG is zero: $dcg, $normalizer\n";
} else {
printf "The NDCG value: %3.3f\n", $dcg/$normalizer;
}
# Coverage info:
printf "Total number of categories that contain mutated node: %d\n",
$g_num_categories_with_mutated_node;
printf "Total number of categories with mutated node identified as a response-time mutations: %3.2f\n\n",
$g_num_virtual_relevant_categories/$g_num_categories_with_mutated_node;
printf "Average response time of categories with mutated node: %3.2f, %3.2f",
$g_s0_response_time/$g_num_categories_with_mutated_node, $g_s1_response_time/$g_num_categories_with_mutated_node;
print "Ranked-results bitmap\n";
print @g_combined_ranked_results_bitmap;
print "\n\n";
}
##
# Prints request-level statistics
##
sub print_request_level_info {
### Request-level information ####
print "Request-level information\n";
printf "Total number of s1 requests: %d\n",
$g_total_s1_reqs;
my $num_virtual_requests =
$g_num_virtual_requests_false_positives{STRUCTURAL} +
$g_num_virtual_requests_false_positives{RESPONSE_TIME} +
$g_num_virtual_relevant_requests +
$g_num_virtual_requests_edge_not_identified;
printf "Total number of virtual requests identified: %d\n",
$num_virtual_requests;
### Precision info
my $false_positives = $g_num_virtual_requests_false_positives{STRUCTURAL} +
$g_num_virtual_requests_false_positives{RESPONSE_TIME};
printf "Number/fraction of results identified that are false-positives: %d (%3.2f)\n",
$false_positives,
($false_positives/$num_virtual_requests);
printf "Number/fraction of structural mutation requests that are false positives: %d (%3.2f)\n",
$g_num_virtual_requests_false_positives{STRUCTURAL},
$g_num_virtual_requests_false_positives{STRUCTURAL}/$num_virtual_requests;
printf "Number/fraction of response-time mutation requests that are false positives: %d (%3.2f)\n",
$g_num_virtual_requests_false_positives{RESPONSE_TIME},
$g_num_virtual_requests_false_positives{RESPONSE_TIME}/$num_virtual_requests;
printf "Number/fraction of requests contained in the results, that were identified\n" .
" as response-time mutations, for for which the right edge was not identified: %d (%3.2f)\n",
$g_num_virtual_requests_edge_not_identified,
($g_num_virtual_requests_edge_not_identified/$num_virtual_requests);
printf "Total number of requests that contain the mutated node: %d\n",
$g_num_requests_with_mutated_node;
### Coverage info:
printf "Fraction of requests with mutated node identified as a response-time mutation: %3.2f\n\n",
$g_num_virtual_relevant_requests/$g_num_requests_with_mutated_node;
}
##
# Print edge-level info
##
sub print_edge_level_info {
### Edge information
print "Edge-level information\n";
printf "Average s0 latency of edges containing the mutation node: %3.2f\n",
$g_avg_s0_edge_latency;
printf "Average s1 latency of edges containing the mutation node: %3.2f\n\n",
$g_avg_s1_edge_latency;
printf "Average variance of edges containing the mutation node in s0: %3.2f\n",
$g_avg_s0_edge_var;
printf "Average variance of edges containing the mutation node in s1: %3.2f\n",
$g_avg_s1_edge_var;
printf "Average p-value of edges containing the mutation node: %3.2f\n",
$g_avg_edge_p_value;
}
##### Main routine ######
get_options();
handle_requests($g_combined_ranked_results_file, 1);
handle_requests($g_originating_clusters_file, 0);
handle_requests($g_not_interesting_clusters_file, 0);
print_category_level_info();
print_request_level_info();
print_edge_level_info();
| RS1999ent/spectroscope | source/eval/eval_response_time_mutation_identification.pl | Perl | bsd-3-clause | 22,369 |
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% Example code from the book "Natural Language Processing in Prolog" %
% published by Addison Wesley %
% Copyright (c) 1989, Gerald Gazdar & Christopher Mellish. %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
%
% tdchart1.pl [Chapter 6] A top-down chart parser
%
?- reconsult('examples.pl').
?- reconsult('lexicon.pl').
?- consult('psgrules.pl').
?- reconsult('library.pl').
?- reconsult('chrtlib1.pl').
%
parse(V0,Vn,String) :-
start_chart(V0,Vn,String),
initial(Symbol),
start_active(V0,Symbol).
%
% Add active edges of type Category at vertex V0 by looking up
% the rules which expand Category in the grammar
%
start_active(V0,Category) :-
foreach(rule(Category,Categories),
add_edge(V0,V0,Category,Categories,[Category])).
%
add_edge(V1,V2,Category,Categories,Parse) :-
edge(V1,V2,Category,Categories,Parse),!.
add_edge(V1,V2,Category1,[],Parse) :-
assert_edge(V1,V2,Category1,[],Parse),
foreach(edge(V0,V1,Category2,[Category1|Categories],Parses),
add_edge(V0,V2,Category2,Categories,[Parse|Parses])).
add_edge(V1,V2,Category1,[Category2|Categories],Parses) :-
assert_edge(V1,V2,Category1,[Category2|Categories],Parses),
foreach(edge(V2,V3,Category2,[],Parse),
add_edge(V1,V3,Category1,Categories,[Parse|Parses])),
start_active(V2,Category2).
%
| TeamSPoon/logicmoo_workspace | packs_sys/logicmoo_nlu/ext/nlp_book/tdchart1.pl | Perl | mit | 1,513 |
###########################################################################
#
# This file is partially auto-generated by the DateTime::Locale generator
# tools (v0.10). This code generator comes with the DateTime::Locale
# distribution in the tools/ directory, and is called generate-modules.
#
# This file was generated from the CLDR JSON locale data. See the LICENSE.cldr
# file included in this distribution for license details.
#
# Do not edit this file directly unless you are sure the part you are editing
# is not created by the generator.
#
###########################################################################
=pod
=encoding UTF-8
=head1 NAME
DateTime::Locale::ca_ES - Locale data examples for the ca-ES locale.
=head1 DESCRIPTION
This pod file contains examples of the locale data available for the
Catalan Spain locale.
=head2 Days
=head3 Wide (format)
dilluns
dimarts
dimecres
dijous
divendres
dissabte
diumenge
=head3 Abbreviated (format)
dl.
dt.
dc.
dj.
dv.
ds.
dg.
=head3 Narrow (format)
dl
dt
dc
dj
dv
ds
dg
=head3 Wide (stand-alone)
dilluns
dimarts
dimecres
dijous
divendres
dissabte
diumenge
=head3 Abbreviated (stand-alone)
dl.
dt.
dc.
dj.
dv.
ds.
dg.
=head3 Narrow (stand-alone)
dl
dt
dc
dj
dv
ds
dg
=head2 Months
=head3 Wide (format)
de gener
de febrer
de març
d’abril
de maig
de juny
de juliol
d’agost
de setembre
d’octubre
de novembre
de desembre
=head3 Abbreviated (format)
gen.
febr.
març
abr.
maig
juny
jul.
ag.
set.
oct.
nov.
des.
=head3 Narrow (format)
GN
FB
MÇ
AB
MG
JN
JL
AG
ST
OC
NV
DS
=head3 Wide (stand-alone)
gener
febrer
març
abril
maig
juny
juliol
agost
setembre
octubre
novembre
desembre
=head3 Abbreviated (stand-alone)
gen.
febr.
març
abr.
maig
juny
jul.
ag.
set.
oct.
nov.
des.
=head3 Narrow (stand-alone)
GN
FB
MÇ
AB
MG
JN
JL
AG
ST
OC
NV
DS
=head2 Quarters
=head3 Wide (format)
1r trimestre
2n trimestre
3r trimestre
4t trimestre
=head3 Abbreviated (format)
1T
2T
3T
4T
=head3 Narrow (format)
1
2
3
4
=head3 Wide (stand-alone)
1r trimestre
2n trimestre
3r trimestre
4t trimestre
=head3 Abbreviated (stand-alone)
1T
2T
3T
4T
=head3 Narrow (stand-alone)
1
2
3
4
=head2 Eras
=head3 Wide (format)
abans de Crist
després de Crist
=head3 Abbreviated (format)
aC
dC
=head3 Narrow (format)
aC
dC
=head2 Date Formats
=head3 Full
2008-02-05T18:30:30 = dimarts, 5 de febrer de 2008
1995-12-22T09:05:02 = divendres, 22 de desembre de 1995
-0010-09-15T04:44:23 = dissabte, 15 de setembre de -10
=head3 Long
2008-02-05T18:30:30 = 5 de febrer de 2008
1995-12-22T09:05:02 = 22 de desembre de 1995
-0010-09-15T04:44:23 = 15 de setembre de -10
=head3 Medium
2008-02-05T18:30:30 = 5 febr. 2008
1995-12-22T09:05:02 = 22 des. 1995
-0010-09-15T04:44:23 = 15 set. -10
=head3 Short
2008-02-05T18:30:30 = 5/2/08
1995-12-22T09:05:02 = 22/12/95
-0010-09-15T04:44:23 = 15/9/-10
=head2 Time Formats
=head3 Full
2008-02-05T18:30:30 = 18:30:30 UTC
1995-12-22T09:05:02 = 9:05:02 UTC
-0010-09-15T04:44:23 = 4:44:23 UTC
=head3 Long
2008-02-05T18:30:30 = 18:30:30 UTC
1995-12-22T09:05:02 = 9:05:02 UTC
-0010-09-15T04:44:23 = 4:44:23 UTC
=head3 Medium
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 9:05:02
-0010-09-15T04:44:23 = 4:44:23
=head3 Short
2008-02-05T18:30:30 = 18:30
1995-12-22T09:05:02 = 9:05
-0010-09-15T04:44:23 = 4:44
=head2 Datetime Formats
=head3 Full
2008-02-05T18:30:30 = dimarts, 5 de febrer de 2008 a les 18:30:30 UTC
1995-12-22T09:05:02 = divendres, 22 de desembre de 1995 a les 9:05:02 UTC
-0010-09-15T04:44:23 = dissabte, 15 de setembre de -10 a les 4:44:23 UTC
=head3 Long
2008-02-05T18:30:30 = 5 de febrer de 2008, 18:30:30 UTC
1995-12-22T09:05:02 = 22 de desembre de 1995, 9:05:02 UTC
-0010-09-15T04:44:23 = 15 de setembre de -10, 4:44:23 UTC
=head3 Medium
2008-02-05T18:30:30 = 5 febr. 2008, 18:30:30
1995-12-22T09:05:02 = 22 des. 1995, 9:05:02
-0010-09-15T04:44:23 = 15 set. -10, 4:44:23
=head3 Short
2008-02-05T18:30:30 = 5/2/08 18:30
1995-12-22T09:05:02 = 22/12/95 9:05
-0010-09-15T04:44:23 = 15/9/-10 4:44
=head2 Available Formats
=head3 E (ccc)
2008-02-05T18:30:30 = dt.
1995-12-22T09:05:02 = dv.
-0010-09-15T04:44:23 = ds.
=head3 EHm (E H:mm)
2008-02-05T18:30:30 = dt. 18:30
1995-12-22T09:05:02 = dv. 9:05
-0010-09-15T04:44:23 = ds. 4:44
=head3 EHms (E H:mm:ss)
2008-02-05T18:30:30 = dt. 18:30:30
1995-12-22T09:05:02 = dv. 9:05:02
-0010-09-15T04:44:23 = ds. 4:44:23
=head3 Ed (E d)
2008-02-05T18:30:30 = dt. 5
1995-12-22T09:05:02 = dv. 22
-0010-09-15T04:44:23 = ds. 15
=head3 Ehm (E h:mm a)
2008-02-05T18:30:30 = dt. 6:30 p. m.
1995-12-22T09:05:02 = dv. 9:05 a. m.
-0010-09-15T04:44:23 = ds. 4:44 a. m.
=head3 Ehms (E h:mm:ss a)
2008-02-05T18:30:30 = dt. 6:30:30 p. m.
1995-12-22T09:05:02 = dv. 9:05:02 a. m.
-0010-09-15T04:44:23 = ds. 4:44:23 a. m.
=head3 Gy (y G)
2008-02-05T18:30:30 = 2008 dC
1995-12-22T09:05:02 = 1995 dC
-0010-09-15T04:44:23 = -10 aC
=head3 GyMMM (LLL y G)
2008-02-05T18:30:30 = febr. 2008 dC
1995-12-22T09:05:02 = des. 1995 dC
-0010-09-15T04:44:23 = set. -10 aC
=head3 GyMMMEd (E, d MMM y G)
2008-02-05T18:30:30 = dt., 5 febr. 2008 dC
1995-12-22T09:05:02 = dv., 22 des. 1995 dC
-0010-09-15T04:44:23 = ds., 15 set. -10 aC
=head3 GyMMMM (LLLL 'de' y G)
2008-02-05T18:30:30 = febrer de 2008 dC
1995-12-22T09:05:02 = desembre de 1995 dC
-0010-09-15T04:44:23 = setembre de -10 aC
=head3 GyMMMMEd (E, d MMMM 'de' y G)
2008-02-05T18:30:30 = dt., 5 de febrer de 2008 dC
1995-12-22T09:05:02 = dv., 22 de desembre de 1995 dC
-0010-09-15T04:44:23 = ds., 15 de setembre de -10 aC
=head3 GyMMMMd (d MMMM 'de' y G)
2008-02-05T18:30:30 = 5 de febrer de 2008 dC
1995-12-22T09:05:02 = 22 de desembre de 1995 dC
-0010-09-15T04:44:23 = 15 de setembre de -10 aC
=head3 GyMMMd (d MMM y G)
2008-02-05T18:30:30 = 5 febr. 2008 dC
1995-12-22T09:05:02 = 22 des. 1995 dC
-0010-09-15T04:44:23 = 15 set. -10 aC
=head3 H (H)
2008-02-05T18:30:30 = 18
1995-12-22T09:05:02 = 9
-0010-09-15T04:44:23 = 4
=head3 Hm (HH:mm)
2008-02-05T18:30:30 = 18:30
1995-12-22T09:05:02 = 09:05
-0010-09-15T04:44:23 = 04:44
=head3 Hms (HH:mm:ss)
2008-02-05T18:30:30 = 18:30:30
1995-12-22T09:05:02 = 09:05:02
-0010-09-15T04:44:23 = 04:44:23
=head3 Hmsv (HH:mm:ss v)
2008-02-05T18:30:30 = 18:30:30 UTC
1995-12-22T09:05:02 = 09:05:02 UTC
-0010-09-15T04:44:23 = 04:44:23 UTC
=head3 Hmv (HH:mm v)
2008-02-05T18:30:30 = 18:30 UTC
1995-12-22T09:05:02 = 09:05 UTC
-0010-09-15T04:44:23 = 04:44 UTC
=head3 M (L)
2008-02-05T18:30:30 = 2
1995-12-22T09:05:02 = 12
-0010-09-15T04:44:23 = 9
=head3 MEd (E d/M)
2008-02-05T18:30:30 = dt. 5/2
1995-12-22T09:05:02 = dv. 22/12
-0010-09-15T04:44:23 = ds. 15/9
=head3 MMM (LLL)
2008-02-05T18:30:30 = febr.
1995-12-22T09:05:02 = des.
-0010-09-15T04:44:23 = set.
=head3 MMMEd (E, d MMM)
2008-02-05T18:30:30 = dt., 5 febr.
1995-12-22T09:05:02 = dv., 22 des.
-0010-09-15T04:44:23 = ds., 15 set.
=head3 MMMMEd (E, d MMMM)
2008-02-05T18:30:30 = dt., 5 de febrer
1995-12-22T09:05:02 = dv., 22 de desembre
-0010-09-15T04:44:23 = ds., 15 de setembre
=head3 MMMMd (d MMMM)
2008-02-05T18:30:30 = 5 de febrer
1995-12-22T09:05:02 = 22 de desembre
-0010-09-15T04:44:23 = 15 de setembre
=head3 MMMd (d MMM)
2008-02-05T18:30:30 = 5 febr.
1995-12-22T09:05:02 = 22 des.
-0010-09-15T04:44:23 = 15 set.
=head3 Md (d/M)
2008-02-05T18:30:30 = 5/2
1995-12-22T09:05:02 = 22/12
-0010-09-15T04:44:23 = 15/9
=head3 d (d)
2008-02-05T18:30:30 = 5
1995-12-22T09:05:02 = 22
-0010-09-15T04:44:23 = 15
=head3 h (h a)
2008-02-05T18:30:30 = 6 p. m.
1995-12-22T09:05:02 = 9 a. m.
-0010-09-15T04:44:23 = 4 a. m.
=head3 hm (h:mm a)
2008-02-05T18:30:30 = 6:30 p. m.
1995-12-22T09:05:02 = 9:05 a. m.
-0010-09-15T04:44:23 = 4:44 a. m.
=head3 hms (h:mm:ss a)
2008-02-05T18:30:30 = 6:30:30 p. m.
1995-12-22T09:05:02 = 9:05:02 a. m.
-0010-09-15T04:44:23 = 4:44:23 a. m.
=head3 hmsv (h:mm:ss a v)
2008-02-05T18:30:30 = 6:30:30 p. m. UTC
1995-12-22T09:05:02 = 9:05:02 a. m. UTC
-0010-09-15T04:44:23 = 4:44:23 a. m. UTC
=head3 hmv (h:mm a v)
2008-02-05T18:30:30 = 6:30 p. m. UTC
1995-12-22T09:05:02 = 9:05 a. m. UTC
-0010-09-15T04:44:23 = 4:44 a. m. UTC
=head3 ms (mm:ss)
2008-02-05T18:30:30 = 30:30
1995-12-22T09:05:02 = 05:02
-0010-09-15T04:44:23 = 44:23
=head3 y (y)
2008-02-05T18:30:30 = 2008
1995-12-22T09:05:02 = 1995
-0010-09-15T04:44:23 = -10
=head3 yM (M/y)
2008-02-05T18:30:30 = 2/2008
1995-12-22T09:05:02 = 12/1995
-0010-09-15T04:44:23 = 9/-10
=head3 yMEd (E, d/M/y)
2008-02-05T18:30:30 = dt., 5/2/2008
1995-12-22T09:05:02 = dv., 22/12/1995
-0010-09-15T04:44:23 = ds., 15/9/-10
=head3 yMMM (LLL 'de' y)
2008-02-05T18:30:30 = febr. de 2008
1995-12-22T09:05:02 = des. de 1995
-0010-09-15T04:44:23 = set. de -10
=head3 yMMMEd (E, d MMM y)
2008-02-05T18:30:30 = dt., 5 febr. 2008
1995-12-22T09:05:02 = dv., 22 des. 1995
-0010-09-15T04:44:23 = ds., 15 set. -10
=head3 yMMMM (LLLL 'de' y)
2008-02-05T18:30:30 = febrer de 2008
1995-12-22T09:05:02 = desembre de 1995
-0010-09-15T04:44:23 = setembre de -10
=head3 yMMMMEd (E, d MMMM 'de' y)
2008-02-05T18:30:30 = dt., 5 de febrer de 2008
1995-12-22T09:05:02 = dv., 22 de desembre de 1995
-0010-09-15T04:44:23 = ds., 15 de setembre de -10
=head3 yMMMMd (d MMMM 'de' y)
2008-02-05T18:30:30 = 5 de febrer de 2008
1995-12-22T09:05:02 = 22 de desembre de 1995
-0010-09-15T04:44:23 = 15 de setembre de -10
=head3 yMMMd (d MMM y)
2008-02-05T18:30:30 = 5 febr. 2008
1995-12-22T09:05:02 = 22 des. 1995
-0010-09-15T04:44:23 = 15 set. -10
=head3 yMd (d/M/y)
2008-02-05T18:30:30 = 5/2/2008
1995-12-22T09:05:02 = 22/12/1995
-0010-09-15T04:44:23 = 15/9/-10
=head3 yQQQ (QQQ y)
2008-02-05T18:30:30 = 1T 2008
1995-12-22T09:05:02 = 4T 1995
-0010-09-15T04:44:23 = 3T -10
=head3 yQQQQ (QQQQ y)
2008-02-05T18:30:30 = 1r trimestre 2008
1995-12-22T09:05:02 = 4t trimestre 1995
-0010-09-15T04:44:23 = 3r trimestre -10
=head2 Miscellaneous
=head3 Prefers 24 hour time?
Yes
=head3 Local first day of the week
1 (dilluns)
=head1 SUPPORT
See L<DateTime::Locale>.
=cut
| jkb78/extrajnm | local/lib/perl5/DateTime/Locale/ca_ES.pod | Perl | mit | 10,740 |
package Google::Ads::AdWords::v201406::UserListConversionType;
use strict;
use warnings;
__PACKAGE__->_set_element_form_qualified(1);
sub get_xmlns { 'https://adwords.google.com/api/adwords/rm/v201406' };
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 %id_of :ATTR(:get<id>);
my %name_of :ATTR(:get<name>);
my %category_of :ATTR(:get<category>);
__PACKAGE__->_factory(
[ qw( id
name
category
) ],
{
'id' => \%id_of,
'name' => \%name_of,
'category' => \%category_of,
},
{
'id' => 'SOAP::WSDL::XSD::Typelib::Builtin::long',
'name' => 'SOAP::WSDL::XSD::Typelib::Builtin::string',
'category' => 'Google::Ads::AdWords::v201406::UserListConversionType::Category',
},
{
'id' => 'id',
'name' => 'name',
'category' => 'category',
}
);
} # end BLOCK
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201406::UserListConversionType
=head1 DESCRIPTION
Perl data type class for the XML Schema defined complexType
UserListConversionType from the namespace https://adwords.google.com/api/adwords/rm/v201406.
Represents a conversion type used for building remarketing user lists.
=head2 PROPERTIES
The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:
=over
=item * id
=item * name
=item * category
=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/v201406/UserListConversionType.pm | Perl | apache-2.0 | 1,734 |
package Google::Ads::AdWords::v201409::CampaignAdExtensionService::mutate;
use strict;
use warnings;
{ # BLOCK to scope variables
sub get_xmlns { 'https://adwords.google.com/api/adwords/cm/v201409' }
__PACKAGE__->__set_name('mutate');
__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 %operations_of :ATTR(:get<operations>);
__PACKAGE__->_factory(
[ qw( operations
) ],
{
'operations' => \%operations_of,
},
{
'operations' => 'Google::Ads::AdWords::v201409::CampaignAdExtensionOperation',
},
{
'operations' => 'operations',
}
);
} # end BLOCK
} # end of BLOCK
1;
=pod
=head1 NAME
Google::Ads::AdWords::v201409::CampaignAdExtensionService::mutate
=head1 DESCRIPTION
Perl data type class for the XML Schema defined element
mutate from the namespace https://adwords.google.com/api/adwords/cm/v201409.
Applies the list of mutate operations. @param operations The operations to apply. The same {@link CampaignAdExtension} cannot be specified in more than one operation. @return The changed {@link CampaignAdExtension}s.
=head1 PROPERTIES
The following properties may be accessed using get_PROPERTY / set_PROPERTY
methods:
=over
=item * operations
$element->set_operations($data);
$element->get_operations();
=back
=head1 METHODS
=head2 new
my $element = Google::Ads::AdWords::v201409::CampaignAdExtensionService::mutate->new($data);
Constructor. The following data structure may be passed to new():
{
operations => $a_reference_to, # see Google::Ads::AdWords::v201409::CampaignAdExtensionOperation
},
=head1 AUTHOR
Generated by SOAP::WSDL
=cut
| gitpan/GOOGLE-ADWORDS-PERL-CLIENT | lib/Google/Ads/AdWords/v201409/CampaignAdExtensionService/mutate.pm | Perl | apache-2.0 | 2,087 |
package GUID;
# ************************************************************
# Description : Generate GUID's for VC7 projects and workspaces
# Author : Chad Elliott
# Create Date : 5/14/2002
# ************************************************************
# ************************************************************
# Pragmas
# ************************************************************
use strict;
# ************************************************************
# Subroutine Section
# ************************************************************
sub generate {
my($out, $in, $cwd) = @_;
my $chash = GUID::hash($cwd);
my $nhash = GUID::hash($out);
my $ihash = GUID::hash($in);
my $val = 0xfeca1bad;
return sprintf("%08X-%04X-%04X-%04X-%04X%08X",
$nhash & 0xffffffff, ($val >> 16) & 0xffff,
($val & 0xffff), ($ihash >> 16) & 0xffff,
$ihash & 0xffff, $chash & 0xffffffff);
}
sub hash {
my $str = shift;
my $value = 0;
if (defined $str) {
my $length = length($str);
for(my $i = 0; $i < $length; $i++) {
$value = (($value << 4) & 0xffffffff) ^ ($value >> 28)
^ ord(substr($str, $i, 1));
}
}
return $value;
}
1;
| wfnex/openbras | src/ace/ACE_wrappers/MPC/modules/GUID.pm | Perl | bsd-3-clause | 1,234 |
package FlowPDF::Exception::EntityAlreadyExists;
use base qw/FlowPDF::Exception/;
use strict;
use warnings;
sub exceptionCode {
return 'CBF0007EAE';
}
sub render {
my ($self, $params) = @_;
my $message = 'Entity already exists.';
if (!ref $params) {
$params ||= $message;
return $params;
}
my $tempMessage = '';
if ($params->{entity}) {
$tempMessage = "Entity '$params->{entity}' already exists";
}
else {
$tempMessage = $message;
$tempMessage =~ s/\.+$//;
}
if ($params->{in}) {
$tempMessage .= " in '$params->{in}'";
}
if ($params->{function}) {
$tempMessage .= " in function $params->{function}";
}
$tempMessage .= '.';
$message = $tempMessage;
return $message;
}
=head1 NAME
FlowPDF::Exception::EntityAlreadyExists
=head1 AUTHOR
CloudBees
=head1 DESCRIPTION
An exception that represents a situation when something already exists, but it should not. Like user with the same email in the database.
=head1 USAGE
This exception could be created using new() method in one of the following ways:
=over
=item No parameters
Exception with default message will be created.
=item Custom scalar parameter
Exception with custom message will be created.
=item hashref with the following fields as parameter:
B<Note:> you may not use all of these arguments at once. It is allowed to omit some of them.
=over 4
=item entity
An entity, that already exists.
=item in
A place, where entity already exists.
=item function
A name of the function in context of which entity already exists.
=back
=back
%%%LANG%%%
FlowPDF::Exception::EntityAlreadyExists->new({
entity => 'key email',
in => 'users array',
function => 'newUser'
})->throw();
%%%LANG%%%
=cut
1;
| electric-cloud/EC-JBoss | src/main/resources/project/pdk/FlowPDF/Exception/EntityAlreadyExists.pm | Perl | apache-2.0 | 1,814 |
#------------------------------------------------------------------------------
# File: es.pm
#
# Description: ExifTool Spanish language translations
#
# Notes: This file generated automatically by Image::ExifTool::TagInfoXML
#------------------------------------------------------------------------------
package Image::ExifTool::Lang::es;
use strict;
use vars qw($VERSION);
$VERSION = '1.16';
%Image::ExifTool::Lang::es::Translate = (
'AEAperture' => 'Aperture AE',
'AELock' => 'Bloqueo AE',
'AELockButton' => {
Description => 'Botón Bloqueo AE',
PrintConv => {
'None' => 'Ninguno',
},
},
'AELockButtonPlusDials' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'AEMaxAperture2' => 'Apertura máxima AE 2',
'AEMinAperture' => 'Apertura mínima AE',
'AEProgramMode' => {
PrintConv => {
'Landscape' => 'Paisaje',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
},
},
'AESetting' => {
PrintConv => {
'AE Lock' => 'Bloqueo AE',
'Exposure Compensation' => 'Compensación Exposición',
},
},
'AFAperture' => 'Apertura AF',
'AFAreaHeight' => 'AF Alto Área',
'AFAreaHeights' => 'AF Alto Área',
'AFAreaIllumination' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AFAreaMode' => {
Description => 'AF Modo Área',
PrintConv => {
'Face Detect AF' => 'Detección Caras AF',
'Multi-point AF or AI AF' => 'Multipunto AF o AI AF',
'Off (Manual Focus)' => 'Desactivado (Enfoque Manual)',
'Single-point AF' => 'Punto único AF)',
'Zone AF' => 'Zona AF',
},
},
'AFAreaWidth' => 'AF Ancho Área',
'AFAreaWidths' => 'AF Ancho Área',
'AFAssist' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AFImageHeight' => 'AF Alto Imágen',
'AFImageWidth' => 'AF Ancho Imágen',
'AFMode' => 'Modo AF',
'AFPoint' => {
Description => 'Punto AF',
PrintConv => {
'Center' => 'Centro',
'Face Detect' => 'Detección Caras',
'Left' => 'Izquierda',
'None' => 'Ninguno',
'None (MF)' => 'Ninguno (MF)',
'Right' => 'Derecha',
},
},
'AFPointActivationArea' => {
Description => 'Area de Activación Punto AF',
PrintConv => {
'Standard' => 'Estándar',
},
},
'AFPointAreaExpansion' => {
Description => 'Area Expansion Punto AF',
PrintConv => {
'Disable' => 'Desactivado',
},
},
'AFPointAutoSelection' => 'Autoselección Punto AF',
'AFPointBrightness' => {
Description => 'Brillo Punto AF',
PrintConv => {
'Brighter' => 'Brillante',
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'AFPointDisplayDuringFocus' => {
Description => 'Mostrar Punto AF durante el enfoque',
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AFPointIllumination' => {
Description => 'Iluminación de Punto AF',
PrintConv => {
'Brighter' => 'Brillante',
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AFPointMode' => 'Modo Punto AF',
'AFPointPosition' => 'Posición Punto AF',
'AFPointRegistration' => 'Registro de Puntos AF',
'AFPointSelected' => {
Description => 'Punto AF Seleccionado',
PrintConv => {
'None' => 'Ninguno',
},
},
'AFPointSelected2' => 'Punto AF Seleccionado 2 ',
'AFPointSelection' => 'Selección de Punto AF',
'AFPointSelectionMethod' => 'Método Selección Punto AF',
'AFPoints' => 'Punto AF',
'AFPointsInFocus' => {
Description => 'Puntos AF en foco',
PrintConv => {
'All' => 'Todo',
'None' => 'Ninguno',
},
},
'AFPointsInFocus1D' => 'Puntos AF en foco',
'AFPointsInFocus5D' => {
Description => 'Puntos AF en foco 5D',
PrintConv => {
'Bottom' => 'Abajo',
'Center' => 'Centro',
'Left' => 'Izquierda',
'Lower-left' => 'Inferior izquierda',
'Lower-right' => 'Inferior derecha',
'Right' => 'Derecha',
'Top' => 'Arriba',
'Upper-left' => 'Superior izquierda',
'Upper-right' => 'Superior derecha',
},
},
'AFPointsSelected' => 'Puntos AF seleccionados',
'AFPointsUnknown1' => {
PrintConv => {
'All' => 'Todo',
},
},
'AFPointsUsed' => 'Puntos AF utilizados',
'AIServoTrackingSensitivity' => {
PrintConv => {
'Fast' => 'Rápido',
'Standard' => 'Estándar',
},
},
'APEVersion' => 'Versión APE',
'ARMIdentifier' => 'Identificador ARM',
'ARMVersion' => 'Versión ARM',
'AToB0' => 'A a B0',
'AToB1' => 'A a B1',
'AToB2' => 'A a B2',
'ActionAdvised' => {
Description => 'Acción Aconsejada',
PrintConv => {
'Object Append' => 'Añadir Objeto',
'Object Kill' => 'Destruir Objecto',
'Object Reference' => 'Referencia Objecto',
'Object Replace' => 'Reemplazar Objecto',
'Ojbect Append' => 'Añadir Objeto',
},
},
'ActiveArea' => 'Área Activa',
'ActiveD-Lighting' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ActiveD-LightingMode' => {
PrintConv => {
'High' => 'Alto',
'Off' => 'Desactivado',
},
},
'AddAspectRatioInfo' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'AddOriginalDecisionData' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AdjustmentMode' => 'Modo Ajuste',
'AdvancedRaw' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AdvancedSceneMode' => {
PrintConv => {
'Monochrome' => 'Monocromo',
'Soft' => 'Suave',
},
},
'Album' => 'Álbum',
'AlphaByteCount' => 'Número Byte Alfa',
'AlphaDataDiscard' => {
Description => 'Datos Alfa Descartados',
PrintConv => {
'Flexbits Discarded' => 'FlexBits Descartado',
'Full Resolution' => 'Resolución Total',
'HighPass Frequency Data Discarded' => 'Datos Frecuencia High-Pass Descartados',
'Highpass and LowPass Frequency Data Discarded' => 'Dato Frecuencia High-Pass y Low-Pass Descartados',
},
},
'AlphaOffset' => 'Offset Alfa',
'AmbienceSelection' => {
PrintConv => {
'Brighter' => 'Brillante',
'Cool' => 'Frío',
'Darker' => 'Oscuro',
'Intense' => 'Intenso',
'Monochrome' => 'Monocromo',
'Soft' => 'Suave',
'Standard' => 'Estándar',
'Vivid' => 'Vívido',
'Warm' => 'Cálido',
},
},
'AnalogBalance' => 'Balance Analógico',
'Annotation' => 'Anotación',
'Annotations' => 'Anotaciones',
'Anti-Blur' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'AntiAliasStrength' => 'Potencia Relativa del Filtro Antialiasing',
'Aperture' => 'Apertura',
'ApertureRange' => 'Rango Apertura',
'ApertureSetting' => 'Ajustes Apertura',
'ApertureValue' => 'Apertura',
'ApplicationRecordVersion' => 'Versión Registro Aplicación',
'ArtMode' => {
PrintConv => {
'Monochrome' => 'Monocromo',
'Panorama' => 'Panoramica',
},
},
'Artist' => 'Autor',
'AsShotICCProfile' => 'Perfil ICC Captura',
'AsShotNeutral' => 'Captura Neutral',
'AsShotPreProfileMatrix' => 'Matriz Pre Perfil Captura',
'AsShotProfileName' => 'Nombre Perfil Captura',
'AsShotWhiteXY' => 'Captura Blanco X-Y',
'Audio' => {
PrintConv => {
'Yes' => 'Si',
},
},
'AudioChannelType' => {
PrintConv => {
'Other' => 'Otro',
},
},
'AudioChannels' => 'Canales Audio',
'AudioCodecID' => {
PrintConv => {
'Unknown -' => 'Desconocido -',
},
},
'AudioDuration' => 'Duración Audio',
'AudioOutcue' => 'Cola Audio',
'AudioSampleType' => {
PrintConv => {
'Other' => 'Otro',
},
},
'AudioSamplingRate' => 'Ratio Muestreo Audio',
'AudioSamplingResolution' => 'Resolución Muestreo Audio',
'AudioType' => {
Description => 'Tipo Audio',
PrintConv => {
'Mono Actuality' => 'Actualidad (audio mono (1 canal))',
'Mono Music' => 'Música transmitida por si misma (audio mono (1 canal))',
'Mono Question and Answer Session' => 'Sesión pregunta y respuesta (audio mono (1 canal))',
'Mono Raw Sound' => 'Sonido bruto (audio mono (1 canal))',
'Mono Response to a Question' => 'Respuesta a una pregunta (audio mono (1 canal))',
'Mono Scener' => 'Escena (audio mono (1 canal))',
'Mono Voicer' => 'Voz (audio mono (1 canal))',
'Mono Wrap' => 'Envolvente (audio mono (1 canal))',
'Stereo Actuality' => 'Actualidad (audio estéreo (2 canales))',
'Stereo Music' => 'Música transmitida por si misma (audio estéreo (2 canales))',
'Stereo Question and Answer Session' => 'Sesión pregunta y respuesta (audio estéreo (2 canales))',
'Stereo Raw Sound' => 'Sonido bruto (audio estéreo (2 canales))',
'Stereo Response to a Question' => 'Respuesta a una pregunta (audio estéreo (2 canales))',
'Stereo Scener' => 'Escena (audio estéreo (2 canales))',
'Stereo Voicer' => 'Voz (audio estéreo (2 canales))',
'Stereo Wrap' => 'Envolvente (audio estéreo (2 canales))',
'Text Only' => 'Solo texto (sin dato de objeto)',
},
},
'Author' => 'Autor',
'AuthorsPosition' => 'Posición del Autor',
'AutoAperture' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AutoBracket' => 'Auto-horquillado',
'AutoExposureBracketing' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AutoFP' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AutoLightingOptimizer' => {
PrintConv => {
'Low' => 'Bajo',
'Off' => 'Desactivado',
'Standard' => 'Estándar',
'Strong' => 'Fuerte',
},
},
'AutoLightingOptimizerOn' => {
PrintConv => {
'Yes' => 'Si',
},
},
'AutoRedEye' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'AutoRotate' => {
PrintConv => {
'None' => 'Ninguno',
'Rotate 180' => 'Girado 180°',
'Rotate 270 CW' => 'Girado 270° sentido reloj',
'Rotate 90 CW' => 'Girado 90° sentido reloj',
},
},
'AverageLevel' => 'Nivel Medio',
'BToA0' => 'B a A0',
'BToA1' => 'B a A1',
'BToA2' => 'B a A2',
'BackgroundColorIndicator' => 'Indicador Color Fondo',
'BackgroundColorValue' => 'Valor Color Fondo',
'BackgroundTiling' => {
PrintConv => {
'Yes' => 'Si',
},
},
'BadFaxLines' => 'Líneas Fax Malas',
'BannerImageType' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'BaselineExposure' => 'Exposición Base',
'BaselineNoise' => 'Ruido Base',
'BaselineSharpness' => 'Nitidez Base',
'BatteryLevel' => 'Nivel Batería',
'BatteryState' => {
PrintConv => {
'Low' => 'Bajo',
},
},
'BayerGreenSplit' => 'Mosaico Bayer Verde',
'Beep' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'BeepPitch' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'BestQualityScale' => 'Escala Mayor Calidad',
'BestShotMode' => {
PrintConv => {
'Beach' => 'Playa',
'Fireworks' => 'Fuegos Artificiales',
'Food' => 'Comida',
'Monochrome' => 'Monocromo',
'Portrait' => 'Retrato',
'Snow' => 'Nieve',
'Underwater' => 'Subacuatica',
},
},
'BitsPerComponent' => 'Bits Por Componente',
'BitsPerExtendedRunLength' => 'Bits Por "Run Length" Extendido',
'BitsPerRunLength' => 'Bits Por "Run Length"',
'BitsPerSample' => 'Número de Bits Por Muestra',
'BlackLevel' => 'Nivel Negro',
'BlackLevelDeltaH' => 'Nivel Negro Delta H',
'BlackLevelDeltaV' => 'Nivel Negro Delta V',
'BlackLevelRepeatDim' => 'Dimensión Repetición Nivel Negro',
'BleachBypassToning' => {
PrintConv => {
'Green' => 'Verde',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'BlocksPerFrame' => 'Bloques por Imagen',
'BlueBalance' => 'Balance de azules',
'BlueMatrixColumn' => 'Columna Matriz Azul',
'BlueTRC' => 'Curva Reproducción Tono Azul',
'BlurControl' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'BlurWarning' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'BodyFirmwareVersion' => 'Versión Firmware del cuerpo de la cámara',
'BracketMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'Brightness' => 'Brillo',
'BrightnessValue' => 'Luminosidad',
'By-line' => 'Creador',
'By-lineTitle' => 'Puesto del Creador',
'CFALayout' => {
Description => 'Distribución CFA',
PrintConv => {
'Even columns offset down 1/2 row' => 'Distribución escalonada A: columnas pares son movidas hacia abajo 1/2 fila',
'Even columns offset up 1/2 row' => 'Distribución escalonada B: columnas pares son movidas hacia arriba 1/2 fila',
'Even rows offset left 1/2 column' => 'Distribución escalonada D: filas pares son movidas a la izquierda 1/2 columna',
'Even rows offset right 1/2 column' => 'Distribución escalonada C: filas pares son movidas a la derecha 1/2 columna',
'Rectangular' => 'Distribución Rectangular (o cuadrada)',
},
},
'CFAPattern' => 'Patrón CFA',
'CFAPattern2' => 'Patrón CFA 2',
'CFAPlaneColor' => 'Color Plano CFA',
'CFARepeatPatternDim' => 'Dimensión Patrón Repetición CFA',
'CMMFlags' => 'Banderas CMM',
'CMYKEquivalent' => 'CMYK Equivalente',
'CPUType' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'CalibrationDateTime' => 'Fecha y Hora Calibración',
'CalibrationIlluminant1' => {
Description => 'Calibración Iluminación 1',
PrintConv => {
'Cloudy' => 'Tiempo Nublado',
'Cool White Fluorescent' => 'Fluorescente blanco cálido (W 3800 - 4500K)',
'Day White Fluorescent' => 'Fluorescente blanco día (N 4600 - 5500K)',
'Daylight' => 'Luz del día',
'Daylight Fluorescent' => 'Fluorescente luz de día (D 5700 - 7100K)',
'Fine Weather' => 'Buen tiempo',
'Fluorescent' => 'Fluorescente',
'ISO Studio Tungsten' => 'Tungsteno estudio ISO',
'Other' => 'Otras Fuentes Luz',
'Shade' => 'Sombrío',
'Standard Light A' => 'Luz Estándar A',
'Standard Light B' => 'Luz Estándar B',
'Standard Light C' => 'Luz Estándar C',
'Tungsten (Incandescent)' => 'Tungsteno (luz incandescente)',
'Unknown' => 'Desconocido',
'Warm White Fluorescent' => 'Fluorescente blanco cálido (L 2600 - 3250K)',
'White Fluorescent' => 'Fluorescente blanco (WW 3250 - 3800K)',
},
},
'CalibrationIlluminant2' => {
Description => 'Calibración Iluminación 2',
PrintConv => {
'Cloudy' => 'Tiempo Nublado',
'Cool White Fluorescent' => 'Fluorescente blanco cálido (W 3800 - 4500K)',
'Day White Fluorescent' => 'Fluorescente blanco día (N 4600 - 5500K)',
'Daylight' => 'Luz del día',
'Daylight Fluorescent' => 'Fluorescente luz de día (D 5700 - 7100K)',
'Fine Weather' => 'Buen tiempo',
'Fluorescent' => 'Fluorescente',
'ISO Studio Tungsten' => 'Tungsteno estudio ISO',
'Other' => 'Otras Fuentes Luz',
'Shade' => 'Sombrío',
'Standard Light A' => 'Luz Estándar A',
'Standard Light B' => 'Luz Estándar B',
'Standard Light C' => 'Luz Estándar C',
'Tungsten (Incandescent)' => 'Tungsteno (luz incandescente)',
'Unknown' => 'Desconocido',
'Warm White Fluorescent' => 'Fluorescente blanco cálido (L 2600 - 3250K)',
'White Fluorescent' => 'Fluorescente blanco (WW 3250 - 3800K)',
},
},
'CameraCalibration1' => 'Calibración Cámara 1',
'CameraCalibration2' => 'Calibración Cámara 2',
'CameraCalibrationSig' => 'Firma Calibración Cámara',
'CameraISO' => 'Camara-ISO',
'CameraOrientation' => {
Description => 'Orientación Cámara',
PrintConv => {
'Rotate 270 CW' => 'Girado 270° sentido reloj',
'Rotate 90 CW' => 'Girado 90° sentido reloj',
},
},
'CameraSerialNumber' => 'Número Serie Cámara',
'CameraTemperature' => 'Temperatura Cámara',
'CameraType' => 'Tipo Cámara',
'CameraType2' => 'Tipo Cámara',
'CanonFileLength' => 'Tamaño Archivo',
'CanonFlashMode' => {
PrintConv => {
'Auto' => 'Automático',
'External flash' => 'Flash Externo',
'Off' => 'Desactivado',
'On' => 'Activado',
'Red-eye reduction' => 'Réducción ojos rojos',
'Red-eye reduction (Auto)' => 'Réducción ojos rojos (Automático)',
'Red-eye reduction (On)' => 'Réducción ojos rojos (Activado)',
},
},
'CanonImageSize' => {
PrintConv => {
'1280x720 Movie' => 'Película 1280x720',
'1920x1080 Movie' => 'Película 1920x1080',
'640x480 Movie' => 'Película 640x480',
'Large' => 'Ancho',
'Medium' => 'Medio',
'Medium 1' => 'Medio 1',
'Medium 2' => 'Medio 2',
'Medium 3' => 'Medio 3',
'Small' => 'Pequeño',
'Small 1' => 'Pequeño 1',
'Small 2' => 'Pequeño 2',
'Small 3' => 'Pequeño 3',
'Small Movie' => 'Película Pequeña',
},
},
'Caption-Abstract' => 'Título/Descripción',
'CaptionWriter' => 'Autor del Pie de Foto',
'Categories' => 'Categorías',
'Category' => 'Categoría',
'CellLength' => 'Alto Celda',
'CellWidth' => 'Ancho Celda',
'Certificate' => 'Certificado',
'Channels' => 'Canales',
'CharTarget' => 'Objetivo Caracter',
'CharacterSet' => 'Conjunto de Caracteres',
'ChromaBlurRadius' => 'Radio Mezcla Croma',
'ChromaticAdaptation' => 'Adaptación Cromática',
'Chromaticity' => 'Cromaticidad',
'ChrominanceNR_TIFF_JPEG' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
},
},
'ChrominanceNoiseReduction' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
},
},
'City' => 'Ciudad',
'ClassifyState' => 'Clasificar Estado',
'CleanFaxData' => 'Datos Fax Claro',
'ClipPath' => 'Camino Fragmento',
'CodedCharacterSet' => 'Juego Caracteres Codificado',
'ColorAberrationControl' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ColorAdjustment' => 'Ajuste Color',
'ColorAdjustmentMode' => {
Description => 'Modo Ajuste Color',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'ColorBalanceAdj' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ColorBooster' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ColorCalibrationMatrix' => 'Tabla Matriz Calibración Color',
'ColorCharacterization' => 'Caracterización Color',
'ColorComponents' => 'Componentes de Color',
'ColorEffect' => {
PrintConv => {
'Cool' => 'Frío',
'Warm' => 'Cálido',
},
},
'ColorFilter' => {
Description => 'Filtro de Color',
PrintConv => {
'Green' => 'Verde',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'ColorMap' => 'Mapa Color',
'ColorMatrix' => 'Matriz de Color',
'ColorMatrix1' => 'Matriz Color 1',
'ColorMatrix2' => 'Matriz Color 2',
'ColorMatrixA' => 'Matriz de Color A',
'ColorMatrixAdobeRGB' => 'Matriz de Color Adobe RGB',
'ColorMatrixB' => 'Matriz de Color B',
'ColorMatrixNumber' => 'Número de Matriz de Color',
'ColorMatrixSRGB' => 'Matriz de Color SRGB',
'ColorMode' => {
Description => 'Modo de Color',
PrintConv => {
'Autumn Leaves' => 'Hojas de otoño',
'B&W' => 'ByN',
'Clear' => 'Claro',
'Deep' => 'Profundo',
'Evening' => 'Tarde',
'Landscape' => 'Paisaje',
'Light' => 'Luz',
'Neutral' => 'Neutro',
'Night View' => 'Vista nocturna',
'Night View/Portrait' => 'Retrato noct.',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
'Sunset' => 'Puesta sol',
'Vivid' => 'Vívido',
},
},
'ColorMoireReduction' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ColorMoireReductionMode' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
},
},
'ColorPalette' => 'Paleta Color',
'ColorRepresentation' => {
Description => 'Representación Color',
PrintConv => {
'3 Components, Frame Sequential in Multiple Objects' => 'Tres componentes, Marco secuencial en múltiples objectos',
'3 Components, Frame Sequential in One Object' => 'Tres componentes, Marco secuencial en un único objeto',
'3 Components, Line Sequential' => 'Tres componentes, Línea secuencial',
'3 Components, Pixel Sequential' => 'Tres componentes, Pixel secuencial',
'3 Components, Single Frame' => 'Tres componentes, Marco simple',
'3 Components, Special Interleaving' => 'Tres componentes, Entrelazado especial',
'4 Components, Frame Sequential in Multiple Objects' => 'Cuatro componentes, Marco secuencial en múltiples objectos',
'4 Components, Frame Sequential in One Object' => 'Cuatro componentes, Marco secuencial en un único objeto',
'4 Components, Line Sequential' => 'Cuatro componentes, Línea secuencial',
'4 Components, Pixel Sequential' => 'Cuatro componentes, Pixel secuencial',
'4 Components, Single Frame' => 'Cuatro componentes, Marco simple',
'4 Components, Special Interleaving' => 'Cuatro componentes, Entrelazado especial',
'Monochrome, Single Frame' => 'Monocromo, Marco simple',
'No Image, Single Frame' => 'Sin imagen, Marco simple',
},
},
'ColorResponseUnit' => 'Unidad Respuesta Color',
'ColorSequence' => 'Representación de Color',
'ColorSpace' => {
Description => 'Espacio Color',
PrintConv => {
'ICC Profile' => 'Perfil ICC',
'Monochrome' => 'Monocromo',
'Uncalibrated' => 'Sin calibrar',
'Wide Gamut RGB' => 'Gamut RVB Grande',
},
},
'ColorSpaceData' => 'Espacio Color Datos',
'ColorTable' => 'Tabla Color',
'ColorTempAuto' => 'Temperatura Color Automática',
'ColorTempCloudy' => 'Temperatura Color Nublado',
'ColorTempCustom' => 'Temperatura Color Personalizada',
'ColorTempCustom1' => 'Temperatura Color Personalizada 1',
'ColorTempCustom2' => 'Temperatura Color Personalizada 2',
'ColorTempDaylight' => 'Temperatura Color Luz de Día',
'ColorTempFlash' => 'Temperatura Color Flash',
'ColorTempFluorescent' => 'Temperatura Color Fluorescente',
'ColorTempKelvin' => 'Temperatura Color Kelvin',
'ColorTempMeasured' => 'Temperatura Color Medida',
'ColorTempShade' => 'Temperatura Color Sombrío',
'ColorTempTungsten' => 'Temperatura Color Tungsteno',
'ColorTempUnknown' => 'Temperatura de Color Desconocida',
'ColorTempUnknown10' => 'Temperatura de Color Desconocida 10',
'ColorTempUnknown11' => 'Temperatura de Color Desconocida 11',
'ColorTempUnknown12' => 'Temperatura de Color Desconocida 12',
'ColorTempUnknown13' => 'Temperatura de Color Desconocida 13',
'ColorTempUnknown14' => 'Temperatura de Color Desconocida 14',
'ColorTempUnknown15' => 'Temperatura de Color Desconocida 15',
'ColorTempUnknown16' => 'Temperatura de Color Desconocida 16',
'ColorTempUnknown17' => 'Temperatura de Color Desconocida 17',
'ColorTempUnknown18' => 'Temperatura de Color Desconocida 18',
'ColorTempUnknown19' => 'Temperatura de Color Desconocida 19',
'ColorTempUnknown2' => 'Temperatura de Color Desconocida 2',
'ColorTempUnknown20' => 'Temperatura de Color Desconocida 20',
'ColorTempUnknown3' => 'Temperatura de Color Desconocida 3',
'ColorTempUnknown4' => 'Temperatura de Color Desconocida 4',
'ColorTempUnknown5' => 'Temperatura de Color Desconocida 5',
'ColorTempUnknown6' => 'Temperatura de Color Desconocida 6',
'ColorTempUnknown7' => 'Temperatura de Color Desconocida 7',
'ColorTempUnknown8' => 'Temperatura de Color Desconocida 8',
'ColorTempUnknown9' => 'Temperatura de Color Desconocida 9',
'ColorTemperature' => 'Temperatura de Color',
'ColorTone' => {
Description => 'Tono de Color',
PrintConv => {
'Normal' => 'Estándar',
},
},
'ColorantOrder' => 'Orden Colorante',
'ColorantTable' => 'Tabla Colorante',
'ColorimetricReference' => 'Referencia Colorimétrica',
'CommandDialsChangeMainSub' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'CommandDialsMenuAndPlayback' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'CommandDialsReverseRotation' => {
PrintConv => {
'Yes' => 'Si',
},
},
'CommanderGroupAMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'CommanderGroupBMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'CommanderInternalFlash' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'Comment' => 'Comentario',
'Compatibility' => 'Compatibilidad',
'Compilation' => {
PrintConv => {
'Yes' => 'Si',
},
},
'ComponentsConfiguration' => 'Configuración de Componentes',
'Composer' => 'Compositor',
'CompressedBitsPerPixel' => 'Modo Compresión Imagen',
'CompressedSize' => 'Tamaño Comprimido',
'Compression' => {
Description => 'Compresión',
PrintConv => {
'JPEG' => 'Compresión JPEG',
'JPEG (old-style)' => 'JPEG (estilo antiguo)',
'Kodak DCR Compressed' => 'Compresión Kodak DCR',
'Kodak KDC Compressed' => 'Compresión Kodak KDC',
'Next' => 'Codificación NeXT 2-bit',
'Nikon NEF Compressed' => 'Compresión Nikon NEF',
'None' => 'Ninguno',
'Pentax PEF Compressed' => 'Compresión Pentax PEF',
'SGILog' => 'Codificación Log Luminancia SGI 32-bit',
'SGILog24' => 'Codificación Log Luminancia SGI 24-bit',
'Sony ARW Compressed' => 'Compresión Sony ARW',
'Thunderscan' => 'Codificación ThunderScan 4-bit',
'Uncompressed' => 'Sin comprimir',
},
},
'CompressionFactor' => 'Factor de compresión',
'CompressionLevel' => 'Nivel Compresión',
'CompressionType' => {
Description => 'Tipo Compresión',
PrintConv => {
'None' => 'Ninguno',
},
},
'CompressorName' => 'Nombre Compresor',
'Conductor' => 'Director',
'Conductors' => 'Directores',
'ConnectionSpaceIlluminant' => 'Iluminación Espacio Conexión',
'ConsecutiveBadFaxLines' => 'Líneas Fax Malas Consecutivas',
'Contact' => 'Contacto',
'ContentLocationCode' => 'Código Localización Contenido',
'ContentLocationName' => 'Nombre Localización Contenido',
'ContinuousBracketing' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'ContinuousDrive' => {
PrintConv => {
'Continuous' => 'Continuo',
'Continuous, High' => 'Continuo, Alto',
'Continuous, Low' => 'Continuo, Bajo',
'Continuous, Speed Priority' => 'Continuo, Prioridad Velocidad',
'Movie' => 'Película',
'Single' => 'Simple',
},
},
'Contrast' => {
Description => 'Contraste',
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Normal' => 'Estándar',
},
},
'ContrastMode' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'ContrastSetting' => 'Ajustes de Contraste',
'Copyright' => 'Copyright Perfil',
'CopyrightNotice' => 'Aviso Copyright',
'Country' => 'País',
'Country-PrimaryLocationCode' => 'Código País ISO',
'Country-PrimaryLocationName' => 'País',
'CountryCode' => 'Código País',
'CreateDate' => 'Fecha y Hora de Datos Digital',
'CreationDate' => 'Fecha Creación',
'CreativeStyle' => {
PrintConv => {
'Autumn Leaves' => 'Hojas de otoño',
'B&W' => 'ByN',
'Clear' => 'Claro',
'Deep' => 'Profundo',
'Landscape' => 'Paisaje',
'Light' => 'Luz',
'Neutral' => 'Neutro',
'Night View/Portrait' => 'Retrato noct.',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
'Sunset' => 'Puesta sol',
'Vivid' => 'Vívido',
},
},
'CreativeStyleSetting' => {
PrintConv => {
'Landscape' => 'Paisaje',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
'Vivid' => 'Vívido',
},
},
'Creator' => 'Creador',
'CreatorAddress' => 'Creador - Dirección',
'CreatorCity' => 'Creador - Ciudad',
'CreatorContactInfo' => 'Contacto Creador',
'CreatorCountry' => 'Creador - País',
'CreatorPostalCode' => 'Creador - Código Postal',
'CreatorRegion' => 'Creador - Estado/Provincia',
'CreatorWorkEmail' => 'Creador - Email(s)',
'CreatorWorkTelephone' => 'Creador - Teléfono(s)',
'CreatorWorkURL' => 'Creador - Website(s)',
'Credit' => 'Proveedor',
'CropActive' => {
PrintConv => {
'Yes' => 'Si',
},
},
'CropHeight' => 'Recorte Altura',
'CropLeft' => 'Recorte Izquierda',
'CropTop' => 'Recorte Arriba',
'CropWidth' => 'Recorte Anchura',
'CroppedImageHeight' => 'Alto Imágen Recortada',
'CroppedImageLeft' => 'Izquierda Imágen Recortada',
'CroppedImageTop' => 'Superior Imágen Recortada',
'CroppedImageWidth' => 'Ancho Imágen Recortada',
'CurrentICCProfile' => 'Perfil ICC Actual',
'CurrentPreProfileMatrix' => 'Matriz Pre Perfil Actual',
'Curves' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'CustomRendered' => {
Description => 'Proceso Imagen Personalizado',
PrintConv => {
'Custom' => 'Proceso personalizado',
'Normal' => 'Proceso normal',
},
},
'CustomSaturation' => 'Saturación personalizada',
'D-LightingHQ' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'D-LightingHQSelected' => {
PrintConv => {
'Yes' => 'Si',
},
},
'D-LightingHS' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'DNGBackwardVersion' => 'Versión Antigua DNG',
'DNGLensInfo' => 'Distancia Focal Mínima',
'DNGVersion' => 'Versión DNG',
'DOF' => 'Profundidad de campo',
'Data' => 'Datos',
'DataCompressionMethod' => 'Proveedor/Propietario Algoritmo Compresión Datos',
'DataImprint' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'DataPackets' => ' Paquetes de Datos',
'DataType' => 'Tipo Datos',
'Date' => 'Fecha',
'DateCreated' => 'Fecha Creación',
'DateSent' => 'Fecha Envío',
'DateStampMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'DateTimeDigitized' => 'Fecha y Hora Digital',
'DateTimeOriginal' => 'Fecha y Hora de Datos Original',
'DaylightSavings' => {
PrintConv => {
'Yes' => 'Si',
},
},
'DefaultBlackRender' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'DefaultCropOrigin' => 'Origen Corte Defecto',
'DefaultCropSize' => 'Tamaño Corte Defecto',
'DefaultScale' => 'Escala por Defecto',
'DerivedFromMaskMarkers' => {
PrintConv => {
'All' => 'Todo',
'None' => 'Ninguno',
},
},
'Description' => 'Descripción',
'Destination' => 'Destino',
'DestinationDST' => {
PrintConv => {
'Yes' => 'Si',
},
},
'DeviceAttributes' => 'Atributos Dispositivo',
'DeviceManufacturer' => 'Fabricante Dispositivo',
'DeviceMfgDesc' => 'Descripción Fabricante Dispositivo',
'DeviceModel' => 'Modelo Dispositivo',
'DeviceModelDesc' => 'Descripción Modelo Dispositivo',
'DeviceSettingDescription' => 'Descripción Ajustes Dispositivo',
'DigitalCreationDate' => 'Fecha Creación Digital',
'DigitalCreationTime' => 'Hora Creación Digital',
'DigitalFilter01' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter02' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter03' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter04' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter05' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter06' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter07' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter08' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter09' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter10' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter11' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter12' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter13' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter14' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter15' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter16' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter17' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter18' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter19' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalFilter20' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'DigitalSignature' => 'Firma Digital',
'DigitalZoom' => {
Description => 'Zoom Digital',
PrintConv => {
'None' => 'Ninguno',
'Off' => 'Desactivado',
},
},
'DigitalZoomOn' => {
Description => 'Zoom Digital Encendido',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'DigitalZoomRatio' => 'Ratio Zoom Digital',
'Directory' => 'Ubicación del Fichero',
'DistortionControl' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'DistortionCorrection' => {
Description => 'Corrección Distorsión',
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'DistortionCorrection2' => {
Description => 'Corrección Distorsión 2',
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'DistortionCorrectionOn' => 'Corrección Distorsión Activada',
'DocSecurity' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'DocumentHistory' => 'Historial del Documento',
'DocumentName' => 'Nombre Documento',
'DocumentNotes' => 'Notas del Documento',
'DotRange' => 'Intervalo Puntos',
'DriveMode' => {
Description => 'Modo Entrada',
PrintConv => {
'Off' => 'Desactivado',
},
},
'Duration' => 'Duración',
'DynamicRange' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'DynamicRangeOptimizer' => {
Description => 'Optim.gama diná',
PrintConv => {
'Advanced Auto' => 'Avanzado Autom',
'Advanced Lv1' => 'Avanzado Nvl.1',
'Advanced Lv2' => 'Avanzado Nvl.2',
'Advanced Lv3' => 'Avanzado Nvl.3',
'Advanced Lv4' => 'Avanzado Nvl.4',
'Advanced Lv5' => 'Avanzado Nvl.5',
'Off' => 'Desactivado',
'Standard' => 'Estándar',
},
},
'DynamicRangeOptimizerBracket' => {
PrintConv => {
'Low' => 'Bajo',
},
},
'DynamicRangeOptimizerMode' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'DynamicRangeOptimizerSetting' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'EasyExposureCompensation' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'EasyMode' => {
PrintConv => {
'Beach' => 'Playa',
'Black & White' => 'Blanco y Negro',
'Digital Macro' => 'Macro digital',
'Easy' => 'Fácil',
'Fireworks' => 'Fuegos Artificiales',
'Fisheye Effect' => 'Efecto Ojo de Pez',
'Flash Off' => 'Flash Desactivado',
'Foliage' => 'Follaje',
'Gray Scale' => 'Escala de Grises',
'Indoor' => 'Interior',
'Kids & Pets' => 'Niños y Mascotas',
'Landscape' => 'Paisaje',
'Monochrome' => 'Monocromo',
'Neutral' => 'Neutro',
'Night' => 'Nocturno',
'Night Scene' => 'Escena Nocturna',
'Night Snapshot' => 'Fotografía Nocturna',
'Nostalgic' => 'Nostalgico',
'Portrait' => 'Retrato',
'Smile' => 'Sonrisa',
'Snow' => 'Nieve',
'Sports' => 'Deportes',
'Sunset' => 'Puesta de sol',
'Surface' => 'Superficie',
'Underwater' => 'Subacuatica',
'Vivid' => 'Vívido',
},
},
'EdgeNoiseReduction' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'EditStatus' => 'Estado Edición',
'EditorialUpdate' => {
Description => 'Actualización Editorial',
PrintConv => {
'Additional language' => 'Idioma Adicional',
},
},
'EffectiveMaxAperture' => 'Aperture Máxima Efectiva',
'Emphasis' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'EncodedBy' => 'Codificado por',
'EncodingProcess' => 'Proceso de codificación',
'EncodingSettings' => 'Ajustes de Codificación',
'EncodingTime' => 'Hora de codificación',
'EndPoints' => 'Puntos Finales',
'EnhanceDarkTones' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Enhancement' => {
PrintConv => {
'Green' => 'Verde',
'Red' => 'Rojo',
'Underwater' => 'Subacuatica',
},
},
'EnvelopeNumber' => 'Número Sobre',
'EnvelopePriority' => {
Description => 'Prioridad Sobre',
PrintConv => {
'0 (reserved)' => '0 (reservada para uso futuro)',
'1 (most urgent)' => '1 (más urgente)',
'5 (normal urgency)' => '5 (urgencia normal)',
'8 (least urgent)' => '8 (menos urgente)',
'9 (user-defined priority)' => '9 (prioridad definida por el usuario)',
},
},
'EnvelopeRecordVersion' => 'Versión Registro Sobre',
'EquipmentVersion' => 'Versión Equipo',
'ErrorCorrection' => 'Correción Error',
'ErrorCorrectionType' => 'Tipo Corrección Error',
'ExcursionTolerance' => {
Description => 'Tolerancia Excursión',
PrintConv => {
'Allowed' => 'Puede ocurrir',
'Not Allowed' => 'No Permitido (defecto)',
},
},
'ExifCameraInfo' => 'Información Cámara Exif',
'ExifImageHeight' => 'Alto Imagen',
'ExifImageWidth' => 'Ancho Imagen',
'ExifOffset' => 'Puntero Exif IFD',
'ExifToolVersion' => 'Versión Exiftool',
'ExifVersion' => 'Versión Exif',
'ExpandFilm' => 'Película Expandida',
'ExpandFilterLens' => 'Filtro Objetivo Expandida',
'ExpandFlashLamp' => 'Lampara Flash Expandida',
'ExpandLens' => 'Objetivo Expandido',
'ExpandScanner' => 'Escaner Expandido',
'ExpandSoftware' => 'Software Expandido',
'ExpirationDate' => 'Fecha Expiración',
'ExpirationTime' => 'Hora Expiración',
'ExposureCompensation' => 'Compensación Exposición',
'ExposureDelayMode' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ExposureIndex' => 'Índice Exposición',
'ExposureMode' => {
Description => 'Modo Exposición',
PrintConv => {
'Aperture-priority AE' => 'Prioridad Aberture AE',
'Auto' => 'Exposición automática',
'Auto bracket' => 'Auto-horquillado',
'Beach' => 'Playa',
'Fireworks' => 'Fuegos Artificiales',
'Food' => 'Comida',
'Landscape' => 'Paisaje',
'Manual' => 'Exposición manual',
'Panorama' => 'Panoramica',
'Portrait' => 'Retrato',
'Program AE' => 'Programa AE',
'Shutter speed priority AE' => 'Prioridad velocidad obturador AE',
'Snow' => 'Nieve',
'Underwater' => 'Subacuatica',
},
},
'ExposureProgram' => {
Description => 'Programa Exposición',
PrintConv => {
'Action (High speed)' => 'Programa acción (orientado a velocidad de obturación rápida)',
'Aperture-priority AE' => 'Prioridad Apertura',
'Creative (Slow speed)' => 'Programa creativo (orientado a profundidad de campo)',
'Landscape' => 'Modo paisaje (para fotos de paisaje con el fondo en enfoque)',
'Manual' => 'Exposición manual',
'Not Defined' => 'No definido',
'Portrait' => 'Modo retrato (para fotos de cerca con el fondo fuera de enfoque)',
'Program AE' => 'Programa normal',
'Shutter speed priority AE' => 'Prioridad obturador',
},
},
'ExposureTime' => 'Tiempo de Exposición',
'ExposureTime2' => 'Tiempo de Exposición 2',
'Extender' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'ExternalFlash' => {
Description => 'Flash Externo',
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ExternalFlashBounce' => {
PrintConv => {
'Yes' => 'Si',
},
},
'ExternalFlashMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'ExternalFlashZoom' => 'Zoom Flash Externo',
'ExtraSamples' => 'Muestra Extra',
'FNumber' => 'Número F',
'FOV' => 'Angulo de Visión',
'FaceDetectArea' => 'Area detección caras',
'FaceDetectFrameSize' => 'Tamaño Area detección caras',
'FaceOrientation' => {
PrintConv => {
'Horizontal (normal)' => '0° (arriba/izquierda)',
'Rotate 180' => 'Girado 180°',
'Rotate 270 CW' => 'Girado 270° sentido reloj',
'Rotate 90 CW' => 'Girado 90° sentido reloj',
},
},
'FacesDetected' => 'Caras Detectadas',
'FastSeek' => {
PrintConv => {
'Yes' => 'Si',
},
},
'FaxProfile' => {
PrintConv => {
'Unknown' => 'Desconocido',
},
},
'FaxRecvParams' => 'Parámetros Recepción Fax',
'FaxRecvTime' => 'Hora Recepción Fax',
'FaxSubAddress' => 'Subdirección Fax',
'FileAccessDate' => 'Fecha y Hora de Acceso',
'FileCreateDate' => 'Fecha y Hora de Creación',
'FileFormat' => 'Formato Archivo',
'FileLength' => 'Tamaño Archivo',
'FileModifyDate' => 'Fecha Actualización',
'FileName' => 'Nombre Archivo',
'FileNumberMemory' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'FileNumberSequence' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'FileOwner' => 'Propietario del Archivo',
'FilePermissions' => 'Permisos',
'FileSize' => 'Tamaño Archivo',
'FileSource' => {
Description => 'Fuente Archivo',
PrintConv => {
'Digital Camera' => 'Cámara Digital',
'Film Scanner' => 'Escaner Película',
'Reflection Print Scanner' => 'Escaner de Reflexión',
},
},
'FileType' => 'Tipo Archivo',
'FileVersion' => 'Versión Formato Archivo',
'Filename' => 'Nombre archivo',
'FillOrder' => 'Orden Rellenado',
'FilterEffect' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Off' => 'Desactivado',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'FilterEffectMonochrome' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'FilterEffectUnknown' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'FilterEffectUserDef1' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'FilterEffectUserDef2' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'FilterEffectUserDef3' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'FinderDisplayDuringExposure' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'FirmwareVersion' => 'Versión Firmware',
'FixtureIdentifier' => 'Identificador Marca',
'Flags' => {
PrintConv => {
'Comment' => 'Comentario',
'FileName' => 'Nombre de Archivo',
'Text' => 'Texto',
},
},
'Flash' => {
PrintConv => {
'Auto, Did not fire' => 'Flash no disparado, modo automático',
'Auto, Did not fire, Red-eye reduction' => 'Auto, Flash no disparado, modo reducción ojos rojos',
'Auto, Fired' => 'Flash disparado, modo automático',
'Auto, Fired, Red-eye reduction' => 'Flash disparado, modo automático, modo reducción ojos rojos',
'Auto, Fired, Red-eye reduction, Return detected' => 'Flash disparado, modo automático, retorno luz detectado, modo reducción ojos rojos',
'Auto, Fired, Red-eye reduction, Return not detected' => 'Flash disparado, modo automático, retorno luz no detectado, modo reducción ojos rojos',
'Auto, Fired, Return detected' => 'Flash disparado, modo automático, retorno luz detectado',
'Auto, Fired, Return not detected' => 'Flash disparado, modo automático, retorno luz no detectado',
'Did not fire' => 'No se ha disparado el flash',
'Fired' => 'Flash disparado',
'Fired, Red-eye reduction' => 'Flash disparado, modo reducción ojos rojos',
'Fired, Red-eye reduction, Return detected' => 'Flash disparado, modo reducción ojos rojos, retorno luz detectado',
'Fired, Red-eye reduction, Return not detected' => 'Flash disparado, modo reducción ojos rojos, retorno luz no detectado',
'Fired, Return detected' => 'Luz devuelta en captador detectada',
'Fired, Return not detected' => 'Luz devuelta en captador no detectada',
'No Flash' => 'Flash no disparado',
'No flash function' => 'Sin función flash',
'Off' => 'Desactivado',
'Off, Did not fire' => 'Flash no disparado, modo flash forzado',
'Off, Did not fire, Return not detected' => 'Apagado, flash no disparado, retorno luz no detectado',
'Off, No flash function' => 'Apagado, sin función flash',
'Off, Red-eye reduction' => 'Apagado, modo reducción ojos rojos',
'On' => 'Activado',
'On, Did not fire' => 'Encendido, flash no disparado',
'On, Fired' => 'Flash disparado, modo flash forzardo',
'On, Red-eye reduction' => 'Flash disparado, modo flash forzado, modo reducción ojos rojos',
'On, Red-eye reduction, Return detected' => 'Flash disparado, modo flash forzado, modo reducción ojos rojos, retorno luz detectado',
'On, Red-eye reduction, Return not detected' => 'Flash disparado, modo flash forzado, modo reducción ojos rojos, retorno luz no detectado',
'On, Return detected' => 'Flash disparado, modo flash forzado, retorno luz detectado',
'On, Return not detected' => 'Flash disparado, modo flash forzado, retorno luz no detectado',
},
},
'FlashColorFilter' => {
PrintConv => {
'None' => 'Ninguno',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'FlashCommanderMode' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'FlashControlMode' => {
Description => 'Modo Control Flash',
PrintConv => {
'Off' => 'Desactivado',
'Repeating Flash' => 'Flash Estroboscopico',
},
},
'FlashDevice' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'FlashEnergy' => 'Energía Flash',
'FlashExposureComp' => 'Compensación Exposición Flash',
'FlashExposureLock' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'FlashFired' => {
PrintConv => {
'Yes' => 'Si',
},
},
'FlashFocalLength' => 'Longitud Flash Flash',
'FlashGroupAControlMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'FlashGroupBControlMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'FlashGroupCControlMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'FlashIntensity' => {
Description => 'Intensidad Flash',
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'FlashLevel' => {
PrintConv => {
'Low' => 'Bajo',
},
},
'FlashMeteringMode' => {
PrintConv => {
'External Auto' => 'Externo Automatico',
'External Manual' => 'Externo Manual',
'Off' => 'Desactivado',
},
},
'FlashMode' => {
Description => 'Modo Flash',
PrintConv => {
'Auto' => 'Automático',
'Disabled' => 'Desactivado',
'Force' => 'Forzado',
'Off' => 'Apagado',
'On' => 'Encendido',
'Red eye' => 'Ojos rojos',
},
},
'FlashModel' => {
Description => 'Modelo Flash',
PrintConv => {
'None' => 'Ninguno',
},
},
'FlashOutput' => 'Flash Salida',
'FlashRemoteControl' => 'Control Remote Flash',
'FlashSerialNumber' => 'Número Serie Flash',
'FlashSource' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'FlashStatus' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'FlashType' => {
Description => 'Tipo Flash',
PrintConv => {
'None' => 'Ninguno',
},
},
'FlashWarning' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'FlashpixVersion' => 'Versión Flashpix Soportado',
'FlickerReduce' => {
Description => 'Reducir Parpadeo',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'FlipHorizontal' => {
PrintConv => {
'Yes' => 'Si',
},
},
'FocalLength' => 'Distancia Focal Objetivo',
'FocalLength35efl' => 'Longitud Focal (Conversión a 35 mm)',
'FocalLengthIn35mmFormat' => 'Distancia Focal en Película de 35 mm',
'FocalPlaneResolutionUnit' => {
Description => 'Unidad Resolución Plano Focal',
PrintConv => {
'None' => 'Ninguno',
'inches' => 'Pulgada',
'um' => 'µm (Micrometro)',
},
},
'FocalPlaneXResolution' => 'Resolución X Plano Focal',
'FocalPlaneYResolution' => 'Resolución Y Plano Focal',
'FocusContinuous' => {
PrintConv => {
'Continuous' => 'Continuo',
'Single' => 'Sencillo',
},
},
'FocusMode' => {
Description => 'Modo Enfoque',
PrintConv => {
'Continuous' => 'Continuo',
'Manual Focus (3)' => 'Enfoque Manual (6)',
'Manual Focus (6)' => 'Enfoque Manual (6)',
'Single' => 'Simple',
},
},
'FocusRange' => {
Description => 'Rango de Enfoque',
PrintConv => {
'Close' => 'Próximo',
'Infinity' => 'Infinito',
'Not Known' => 'Desconocido',
'Very Close' => 'Muy Próximo',
},
},
'FocusSetting' => 'Ajuste Enfoque',
'FocusTrackingLockOn' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'ForwardMatrix1' => 'Matriz Avance 1',
'ForwardMatrix2' => 'Matriz Avance 2',
'FrameRate' => 'Velocidad del Fotograma',
'FrameSize' => 'Tamaño del Fotograma',
'FreeByteCounts' => 'Número Bytes Libres',
'FreeOffsets' => 'Offsets Libres',
'FuncButton' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'FuncButtonPlusDials' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'GEModel' => 'Modelo',
'GPSAltitude' => 'Altitud',
'GPSAltitudeRef' => {
Description => 'Referencia Altitud',
PrintConv => {
'Above Sea Level' => 'Nivel del Mar',
'Below Sea Level' => 'Referencia Nivel del Mar (valor negativo)',
},
},
'GPSAreaInformation' => 'Nombre de Zona GPS',
'GPSDOP' => 'Precisión Medición',
'GPSDateStamp' => 'Fecha GPS',
'GPSDateTime' => 'Fecha y Hora GPS',
'GPSDestBearing' => 'Orientación de Destino',
'GPSDestBearingRef' => {
Description => 'Referencia para Orientación de Destino',
PrintConv => {
'Magnetic North' => 'Dirección magnética',
'True North' => 'Dirección real',
},
},
'GPSDestDistance' => 'Distancia a Destino',
'GPSDestDistanceRef' => {
Description => 'Referencia para Distancia a Destino',
PrintConv => {
'Kilometers' => 'Kilómetros',
'Miles' => 'Millas',
'Nautical Miles' => 'Nudos',
},
},
'GPSDestLatitude' => 'Latitud de Destino',
'GPSDestLatitudeRef' => {
Description => 'Referencia para Latitud de Destino',
PrintConv => {
'North' => 'Latitud norte',
'South' => 'Latitud sur',
},
},
'GPSDestLongitude' => 'Longitud de Destino',
'GPSDestLongitudeRef' => {
Description => 'Referencia para Longitud de Destino',
PrintConv => {
'East' => 'Longitud este',
'West' => 'Longitud oeste',
},
},
'GPSDifferential' => {
Description => 'Corrección Diferencial GPS',
PrintConv => {
'Differential Corrected' => 'Corrección diferencial aplicada',
'No Correction' => 'Medición sin corrección diferencial',
},
},
'GPSImgDirection' => 'Dirección de Imagen',
'GPSImgDirectionRef' => {
Description => 'Referencia para Dirección de Imagen',
PrintConv => {
'Magnetic North' => 'Dirección magnética',
'True North' => 'Dirección real',
},
},
'GPSInfo' => 'Puntero IFD de Información GPS',
'GPSLatitude' => 'Latitud',
'GPSLatitudeRef' => {
Description => 'Latitud Norte o Sur',
PrintConv => {
'North' => 'Latitud norte',
'South' => 'Latitud sur',
},
},
'GPSLongitude' => 'Longitud',
'GPSLongitudeRef' => {
Description => 'Longitud Este u Oeste',
PrintConv => {
'East' => 'Longitud Este',
'West' => 'Longitud Oeste',
},
},
'GPSMapDatum' => 'Dato Medición Geodésica Usado',
'GPSMeasureMode' => {
Description => 'Modo Medición GPS',
PrintConv => {
'2-Dimensional Measurement' => 'Medición bidimensional',
'3-Dimensional Measurement' => 'Medición tridimensional',
},
},
'GPSProcessingMethod' => 'Nombre del Método de Procesado GPS',
'GPSSatellites' => 'Satélites GPS Usados para Medida',
'GPSSpeed' => 'Velocidad del Receptor GPS',
'GPSSpeedRef' => {
Description => 'Unidad Velocidad',
PrintConv => {
'km/h' => 'Kilómetros por hora',
'knots' => 'Nudos',
'mph' => 'Millas por hora',
},
},
'GPSStatus' => {
Description => 'Estado Receptor GPS',
PrintConv => {
'Measurement Active' => 'Medición Activa',
'Measurement Void' => 'Medición Vacía',
},
},
'GPSTimeStamp' => 'Hora GPS (reloj atómico)',
'GPSTrack' => 'Dirección de Movimiento',
'GPSTrackRef' => {
Description => 'Referencia de Dirección de Movimiento',
PrintConv => {
'Magnetic North' => 'Dirección magnética',
'True North' => 'Dirección real',
},
},
'GPSVersionID' => 'Versión Etiqueta GPS',
'GainControl' => {
Description => 'Control Ganancia',
PrintConv => {
'High gain down' => 'Atenuación alta',
'High gain up' => 'Ganancia alta',
'Low gain down' => 'Atenuación baja',
'Low gain up' => 'Ganancia debil',
'None' => 'Ninguno',
},
},
'GammaCompensatedValue' => 'Valor Compensado Gamma',
'Gapless' => {
PrintConv => {
'Yes' => 'Si',
},
},
'Genre' => {
Description => 'Género',
PrintConv => {
'None' => 'Ninguno',
'Other' => 'Otro',
},
},
'GenreID' => 'ID Género',
'GeoTiffAsciiParams' => 'Etiqueta Parámetros Ascii Geo',
'GeoTiffDirectory' => 'Etiqueta Directorio Clave Geo',
'GeoTiffDoubleParams' => 'Etiqueta Parámetros Doble Geo',
'Gradation' => 'Luminosidad',
'GrayResponseCurve' => 'Curva Respuesta Gris',
'GrayResponseUnit' => {
Description => 'Unidad Respuesta Gris',
PrintConv => {
'0.0001' => 'Número representa la milésima de una unidad',
'0.001' => 'Número representa la centésima de una unidad',
'0.1' => 'Número representa la décima de una unidad',
'1e-05' => 'Número representa la diezmilésima de una unidad',
'1e-06' => 'Número representa la cienmilésima de una unidad',
},
},
'GrayTRC' => 'Columna Matriz Gris',
'GreenMatrixColumn' => 'Columna Matriz Verde',
'GreenTRC' => 'Curva Reproducción Tono Verde',
'GridDisplay' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'HCUsage' => 'Uso HC',
'HDR' => {
Description => 'Auto HDR',
PrintConv => {
'Off' => 'Desactivado',
},
},
'HDRSmoothing' => {
PrintConv => {
'Low' => 'Bajo',
'Off' => 'Desactivado',
},
},
'HalftoneHints' => 'Indicación Medio Tono',
'HasAttachedImages' => 'Tiene Imagenes Adjuntas',
'HasAudio' => 'Tiene Audio',
'HasImage' => 'Tiene Imagen',
'HasScript' => 'Tiene Script',
'HasVideo' => 'Tiene Video',
'Headline' => 'Titular',
'HeightResolution' => 'Resolución Imagen Vertical',
'HighISONoiseReduction' => {
Description => 'Reducción Ruido ISO Alta',
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
'On' => 'Activado',
'Standard' => 'Estándar',
'Strong' => 'Fuerte',
},
},
'HighISONoiseReduction2' => {
PrintConv => {
'Low' => 'Bajo',
},
},
'Highlight' => 'Realce',
'HighlightColorDistortReduct' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'HighlightTonePriority' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'HometownDST' => {
PrintConv => {
'Yes' => 'Si',
},
},
'HostComputer' => 'Ordenador Principal',
'Hue' => {
Description => 'Tono',
PrintConv => {
'None' => 'Ninguno',
},
},
'HyperfocalDistance' => 'Distancia Hiperfocal',
'ICCProfile' => 'Perfil ICC',
'ICC_Profile' => 'Perfil Color Entrada ICC',
'IDCCreativeStyle' => {
PrintConv => {
'Landscape' => 'Retrato',
'Neutral' => 'Neutro',
'Standard' => 'Estándar',
'Vivid' => 'Vívido',
},
},
'IPTC-NAA' => 'Metadato IPTC-NAA',
'IPTCBitsPerSample' => 'Número de Bits por Muestra',
'IPTCImageHeight' => 'Número de Líneas',
'IPTCImageRotation' => {
Description => 'Rotación Imagen',
PrintConv => {
'0' => 'Sin rotación',
'180' => 'Rotación 180 grados',
'270' => 'Rotación 270 grados',
'90' => 'Rotación 90 grados',
},
},
'IPTCImageWidth' => 'Pixels por Línea',
'IPTCPictureNumber' => 'Número Imagen',
'IPTCPixelHeight' => 'Tamaño Pixel Perpendicular a Dirección Escaneo',
'IPTCPixelWidth' => 'Tamaño Pixel en Dirección Escaneo',
'ISO' => 'Ratio Velocidad ISO',
'ISOAutoParameters' => {
PrintConv => {
'Fast' => 'Rápido',
'Standard' => 'Estándar',
},
},
'ISOExpansion' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'ISOExpansion2' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'ISOSetting' => 'Ajuste ISO',
'ISOSpeedExpansion' => {
PrintConv => {
'Yes' => 'Si',
},
},
'IT8Header' => 'Cabecera IT8',
'Illumination' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Image::ExifTool::AIFF::Comment' => 'Comentario AIFF',
'ImageAuthentication' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'ImageByteCount' => 'Número Byte Imagen',
'ImageColor' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'ImageColorIndicator' => 'Indicador Color Imagen',
'ImageColorValue' => 'Valor Color Imagen',
'ImageDataDiscard' => {
Description => 'Datos Imagen Descartado',
PrintConv => {
'Flexbits Discarded' => 'FlexBits Descartados',
'Full Resolution' => 'Resolución Total',
'HighPass Frequency Data Discarded' => 'Datos Frecuencia High-Pass Descartados',
'Highpass and LowPass Frequency Data Discarded' => 'Dato Frecuencia High-Pass y Low-Pass Descartados',
},
},
'ImageDepth' => 'Ancho Imagen',
'ImageDescription' => 'Título Imagen',
'ImageDustOff' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ImageEditing' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'ImageFileFormatAsDelivered' => {
PrintConv => {
'Other' => 'Otro',
},
},
'ImageHeight' => 'Alto Imagen',
'ImageHistory' => 'Historia Imagen',
'ImageID' => 'ID Imagen',
'ImageInfo' => 'Info Imagen',
'ImageLayer' => 'Capa Imagen',
'ImageLength' => 'Longitud Imagen',
'ImageNumber' => 'Número Imagen',
'ImageOffset' => 'Offset Imagen',
'ImageOrientation' => {
Description => 'Orientación Imagen',
PrintConv => {
'Landscape' => 'Paisaje',
'Portrait' => 'Retrato',
'Square' => 'Cuadro',
},
},
'ImageQuality' => {
PrintConv => {
'High' => 'Alto',
'Standard' => 'Estándar',
},
},
'ImageResourceBlocks' => 'Bloques Recursos Imagen',
'ImageReview' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ImageRotated' => {
PrintConv => {
'Yes' => 'Si',
},
},
'ImageRotation' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'ImageSize' => 'Tamaño de la Imagen',
'ImageSourceData' => 'Datos Fuente Imagen',
'ImageStabilization' => {
Description => 'Estabilización Imagen',
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ImageStabilizationSetting' => 'Ajustes Estabilización Imagen',
'ImageStyle' => {
PrintConv => {
'Landscape' => 'Paisaje',
'Neutral' => 'Neutro',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
'Vivid' => 'Vívido',
},
},
'ImageTone' => {
PrintConv => {
'Landscape' => 'Paisaje',
'Monochrome' => 'Monocromo',
'Portrait' => 'Retrato',
},
},
'ImageType' => {
Description => 'Tipo Imagen',
PrintConv => {
'Other' => 'Otro',
},
},
'ImageUniqueID' => 'ID Único Imagen',
'ImageWidth' => 'Ancho Imagen',
'Index' => 'Índice',
'Indexed' => 'Indizado',
'IngredientsMaskMarkers' => {
PrintConv => {
'All' => 'Todo',
'None' => 'Ninguno',
},
},
'InitialKey' => 'Clave inicial',
'InkNames' => 'Nombres Tinta',
'InkSet' => 'Conjunto Tinta',
'Instructions' => 'Instrucciones',
'IntellectualGenre' => 'Género Intelectual',
'IntelligentContrast' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
'n/a' => 'No Aplica',
},
},
'IntelligentD-Range' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Standard' => 'Estándar',
},
},
'IntelligentExposure' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Standard' => 'Estándar',
},
},
'IntelligentResolution' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Standard' => 'Estándar',
},
},
'IntensityStereo' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'InterchangeColorSpace' => {
PrintConv => {
'CMY (K) Device Dependent' => 'Dispositivo dependiente CMY(K)',
'RGB Device Dependent' => 'Dispositivo dependiente RGB',
},
},
'IntergraphMatrix' => 'Etiqueta Matriz Intergráfica',
'Interlace' => 'Entrelazado',
'InternalFlash' => 'Flash Interno',
'InternalFlashAE1' => 'Flash Interno AE1',
'InternalFlashAE1_0' => 'Flash Interno',
'InternalFlashAE2' => 'Flash Interno AE2',
'InternalFlashAE2_0' => 'Flash Interno AE2',
'InternalFlashMode' => {
Description => 'Modo Flash Interno',
PrintConv => {
'Fired' => 'Activado',
},
},
'InternalFlashTable' => 'Tabla Flash Interno',
'InternalSerialNumber' => 'Número Serie Interno',
'InteropIndex' => {
Description => 'Identificación Interoperabilidad',
PrintConv => {
'R03 - DCF option file (Adobe RGB)' => 'R03: Archivo opción DCF (Adobe RGB)',
'R98 - DCF basic file (sRGB)' => 'R98: Archivo básico DCF (sRGB)',
'THM - DCF thumbnail file' => 'THM: Archivo miniatura DCF',
},
},
'InteropOffset' => 'Etiqueta de Interoperabilidad',
'InteropVersion' => 'Versión Interoperabilidad',
'Is_Protected' => 'Está protegido',
'Is_Trusted' => 'Es de confianza',
'JFIFVersion' => 'Versión JFIF',
'JPEGACTables' => 'Tablas AC JPEG',
'JPEGDCTables' => 'Tablas DC JPEG',
'JPEGLosslessPredictors' => 'Predictores Sin Perdidas JPEG',
'JPEGPointTransforms' => 'Tranformadores Puntos JPEG',
'JPEGProc' => 'Proc JPEG',
'JPEGQTables' => 'Tablas Q JPEG',
'JPEGQuality' => {
Description => 'Calidad',
PrintConv => {
'Extra Fine' => 'Extrafina',
'Fine' => 'Fina',
'Standard' => 'Calidad estándar',
},
},
'JPEGRestartInterval' => 'Intervalo Reinicio JPEG',
'JPEGTables' => 'Tablas JPEG',
'JobID' => 'ID del Trabajo',
'JobTitle' => 'Cargo',
'Keyword' => 'Palabras Clave',
'Keywords' => 'Clave',
'LCDIllumination' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'LCDIlluminationDuringBulb' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'LCHEditor' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Language' => 'Idioma',
'LanguageCode' => {
PrintConv => {
'Neutral' => 'Neutro',
},
},
'LanguageIdentifier' => 'Identificador Idioma',
'LanguageList' => 'Lista de Idiomas',
'LeafData' => 'Datos Hoja',
'Lens' => 'Objetivo',
'LensApertureRange' => 'Intervalo Apertura Objetivo',
'LensFirmwareVersion' => 'Versión Firmware Objetivo',
'LensID' => 'ID Objetivo',
'LensIDNumber' => 'Número ID Objetivo',
'LensInfo' => 'Información del Objetivo',
'LensModel' => 'Modelo Objetivo',
'LensProperties' => 'Propiedades Objetivo',
'LensSerialNumber' => 'Número Serie Objetivo',
'LensType' => {
Description => 'Tipo Objetivo',
PrintConv => {
'None' => 'Ninguno',
},
},
'LightSource' => {
Description => 'Fuente Luz',
PrintConv => {
'Cloudy' => 'Tiempo Nublado',
'Cool White Fluorescent' => 'Fluorescente blanco cálido (W 3800 - 4500K)',
'Day White Fluorescent' => 'Fluorescente blanco día (N 4600 - 5500K)',
'Daylight' => 'Luz del día',
'Daylight Fluorescent' => 'Fluorescente luz de día (D 5700 - 7100K)',
'Fine Weather' => 'Buen tiempo',
'Fluorescent' => 'Fluorescente',
'ISO Studio Tungsten' => 'Tungsteno estudio ISO',
'Other' => 'Otras Fuentes Luz',
'Shade' => 'Sombrío',
'Standard Light A' => 'Luz Estándar A',
'Standard Light B' => 'Luz Estándar B',
'Standard Light C' => 'Luz Estándar C',
'Tungsten (Incandescent)' => 'Tungsteno (luz incandescente)',
'Unknown' => 'Desconocido',
'Warm White Fluorescent' => 'Fluorescente blanco cálido (L 2600 - 3250K)',
'White Fluorescent' => 'Fluorescente blanco (WW 3250 - 3800K)',
},
},
'LightSourceSpecial' => {
Description => 'Fuente Luz Especial',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'Lightness' => 'Luminosidad',
'LinearResponseLimit' => 'Límite Respuesta Lineal',
'LinearizationTable' => 'Tabla Linearización',
'Lit' => {
PrintConv => {
'Yes' => 'Si',
},
},
'LiveViewShooting' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'LocalizedCameraModel' => 'Modelo Cámara Traducido',
'Location' => 'Localización',
'LongExposureNoiseReduction' => {
Description => 'RR Exp.Larga',
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'LookupTable' => 'Tabla de Consulta',
'Luminance' => 'Luminancia',
'LuminanceNoiseReduction' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
},
},
'Lyrics' => 'Letras',
'Lyrics_Synchronised' => 'Letras Sincronizadas',
'MSStereo' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Macro' => {
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
'View' => 'Vista',
},
},
'MacroMode' => 'Modo Macro',
'MainDialExposureComp' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Make' => 'Marca',
'MakeAndModel' => 'Marca y Modelo',
'MakerNote' => 'Dato Privado DNG',
'MakerNoteOffset' => 'Offset Maker Note',
'MakerNoteSafety' => {
Description => 'Seguridad Maker Note',
PrintConv => {
'Safe' => 'Seguro',
'Unsafe' => 'No Seguro',
},
},
'MakerNoteType' => 'Tipo Maker Note',
'MakerNoteVersion' => 'Versión nota Fabricante',
'MakerNotes' => 'Notas del Fabricante',
'ManagedFromMaskMarkers' => {
PrintConv => {
'All' => 'Todo',
'None' => 'Ninguno',
},
},
'ManifestReferenceMaskMarkers' => {
PrintConv => {
'All' => 'Todo',
'None' => 'Ninguno',
},
},
'ManometerPressure' => 'Presión Manometrica',
'ManometerReading' => 'Lectura Manometrica',
'ManualFlashOutput' => {
PrintConv => {
'Full' => 'Completo',
'Low' => 'Bajo',
'Medium' => 'Medio',
'n/a' => 'No Aplica',
},
},
'ManualFocusDistance' => 'Distancia Enfoque Manual',
'Marker' => 'Marcador',
'MaskedAreas' => 'Área Oculta',
'MasterDocumentID' => 'ID de Documento Maestro',
'Matteing' => 'Mate',
'MaxAperture' => 'Máxima Apertura del Objetivo',
'MaxApertureAtMaxFocal' => 'Apertura máxima a focal máxima',
'MaxApertureAtMinFocal' => 'Apertura máxima a focal mínima',
'MaxApertureValue' => 'Apertura Lente Máxima',
'MaxFaces' => 'Máximo caras',
'MaxFocalLength' => 'Longitud focal máxima',
'MaxPacketSize' => 'Tamaño Máximo Paquete',
'MaxSampleValue' => 'Valor Muestra Max',
'MaximumDensityRange' => 'Rango Densidad Maxima',
'Measurement' => 'Observador de Medida',
'MeasurementBacking' => 'Apoyo de Medida',
'MeasurementFlare' => 'Llama de Medida',
'MeasurementGeometry' => {
Description => 'Geometría de Medida',
PrintConv => {
'0/45 or 45/0' => '0/45 o 45/0',
'0/d or d/0' => '0/d o d/0',
},
},
'MeasurementIlluminant' => 'Iluminación de Medida',
'MeasurementObserver' => 'Observador de Medida',
'MediaBlackPoint' => 'Punto Negro Medio',
'MediaWhitePoint' => 'Punto Blanco Medio',
'MeteringMode' => {
Description => 'Modo Medición',
PrintConv => {
'Average' => 'Promedio',
'Center-weighted average' => 'Media ponderada al centro',
'Multi-segment' => 'Multi-segmento',
'Multi-spot' => 'Multi-puntual',
'Other' => 'Otro',
'Partial' => 'Parcial',
'Spot' => 'Puntual',
'Unknown' => 'Desconocido',
},
},
'MinAperture' => 'Apertura mínima',
'MinFocalLength' => 'Longitud focal mínima',
'MinPacketSize' => 'Tamaño Mínimo Paquete',
'MinSampleValue' => 'Valor Muestra Min',
'MinoltaQuality' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'ModeDialPosition' => {
PrintConv => {
'Panorama' => 'Panoramica',
},
},
'Model' => 'Modelo',
'Model2' => 'Modelo Equipamiento Entrada Imagen (2)',
'ModelReleaseStatus' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'ModelTiePoint' => 'Etiqueta Modelo Punto Lazo',
'ModelTransform' => 'Etiqueta Modelo Transformación',
'ModelingFlash' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ModifiedBy' => 'Modificado por',
'ModifiedPictureStyle' => {
PrintConv => {
'High Saturation' => 'Saturación Alta',
'Landscape' => 'Paisaje',
'Low Saturation' => 'Saturación Baja',
'Monochrome' => 'Monocromo',
'Neutral' => 'Neutro',
'None' => 'Ninguno',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
},
},
'ModifiedSharpnessFreq' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Standard' => 'Estándar',
},
},
'ModifiedToneCurve' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'ModifiedWhiteBalance' => {
PrintConv => {
'Underwater' => 'Subacuatica',
},
},
'ModifyDate' => 'Fecha y Hora de Cambio del Archivo',
'MoireFilter' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'MonochromeFilterEffect' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'MonochromeLinear' => {
PrintConv => {
'Yes' => 'Si',
},
},
'MonochromeToning' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'MonochromeToningEffect' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
},
},
'MultiExposureAutoGain' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'MultiExposureMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'MultiFrameNoiseReduction' => {
Description => 'Reduc. ruido varios fotogr.',
PrintConv => {
'None' => 'Ninguno',
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'MultipleExposureMode' => 'Modo Exposición Múltiple',
'MultipleExposureSet' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Mute' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'MyColorMode' => {
PrintConv => {
'Neutral' => 'Neutro',
'Off' => 'Desactivado',
'Vivid' => 'Vívido',
},
},
'NDFilter' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'NSC_Description' => 'Descripción NSC',
'Name' => 'Nombre',
'NamedColor2' => 'Color Llamado 2',
'NativeDisplayInfo' => 'Información Pantalla Nativa',
'NewsPhotoVersion' => 'Versión Registro Foto Noticias',
'Noise' => 'Ruido',
'NoiseFilter' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
'Standard' => 'Estándar',
},
},
'NoiseReduction' => {
Description => 'Reducción Ruido',
PrintConv => {
'Low' => 'Bajo',
'Off' => 'Desactivado',
'Standard' => 'Estándar',
},
},
'NoiseReductionApplied' => 'Reducción Ruido Aplicada',
'NominalMaxAperture' => 'Apertura máxima nominal',
'NominalMinAperture' => 'Apertura mínima nominal',
'NumAFPoints' => 'Número de Puntos AF',
'NumChannels' => 'Número Canales',
'NumColors' => 'Número de colores',
'NumImportantColors' => 'Número Colores Importantes',
'NumIndexEntries' => 'Número de Entradas de Índice',
'NumSampleFrames' => 'Número de fotogramas',
'NumberOfFrames' => 'Número de imágenes',
'NumberofInks' => 'Número de Tintas',
'OPIProxy' => 'Proxy OPI',
'ObjectAttributeReference' => 'Género Intelectual',
'ObjectCycle' => {
Description => 'Ciclo Objecto',
PrintConv => {
'Both Morning and Evening' => 'Ambos',
'Evening' => 'Tarde',
'Morning' => 'Mañana',
},
},
'ObjectFileType' => {
PrintConv => {
'None' => 'Ninguno',
'Unknown' => 'Desconocido',
},
},
'ObjectName' => 'Título',
'ObjectPreviewData' => 'Datos Previos del Objecto',
'ObjectPreviewFileFormat' => 'Formato Archivo Previo de Objecto',
'ObjectPreviewFileVersion' => 'Versión Formato Archivo Previo del Objecto',
'ObjectTypeReference' => 'Referencia Tipo Objeto',
'OffsetSchema' => 'Offset Esquema',
'OperatingSystem' => {
Description => 'Sistema Operativo',
PrintConv => {
'unknown' => 'desconocido',
},
},
'OpticalZoomMode' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'OpticalZoomOn' => {
Description => 'Zoom Óptico Encendido',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'Opto-ElectricConvFactor' => 'Factor Conversión Optoeléctrico',
'Orientation' => {
Description => 'Orientación de Imagen',
PrintConv => {
'Horizontal (normal)' => '0° (arriba/izquierda)',
'Mirror horizontal' => 'Invertir horizontal',
'Mirror horizontal and rotate 270 CW' => 'Invertir horizontal y rotar 270° sentido reloj',
'Mirror horizontal and rotate 90 CW' => 'Invertir horizontal y rotar 90° sentido reloj',
'Mirror vertical' => 'Invertir vertical',
'Rotate 180' => 'Girado 180°',
'Rotate 270 CW' => 'Girado 270° sentido reloj',
'Rotate 90 CW' => 'Girado 90° sentido reloj',
},
},
'OriginPlatform' => {
PrintConv => {
'Other' => 'Otro',
},
},
'OriginalAlbumTitle' => 'Título Original Album',
'OriginalArtist' => 'Artista original',
'OriginalFileName' => 'Nombre archivo original',
'OriginalLyricist' => 'Letrista Original',
'OriginalRawFileData' => 'Dato Archivo Raw Original',
'OriginalRawFileDigest' => 'Cifrado Archivo Raw Original',
'OriginalRawFileName' => 'Nombre Archivo Raw Original',
'OriginalReleaseYear' => 'Año Versión Original',
'OriginalTransmissionReference' => 'Identificador de Trabajo',
'OriginatingProgram' => 'Programa Originario',
'OutputResponse' => 'Respuesta Salida',
'Owner' => 'Propietario',
'OwnerID' => 'ID del Propietario',
'OwnerName' => 'Nombre del Propietario',
'PF25ColorMatrix' => 'Matriz de Color PF25',
'PackingMethod' => {
PrintConv => {
'Best Compression' => 'Mejor Compresión',
'Fast' => 'Rápido',
'Fastest' => 'Mas Rápido',
'Good Compression' => 'Buena Compresión',
'Stored' => 'Almacenado',
},
},
'Padding' => 'Margen Inferior',
'PageName' => 'Nombre Página',
'PageNumber' => 'Número Página',
'PanoramaSize3D' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'Period' => 'Período',
'PhotoEffect' => {
PrintConv => {
'B&W' => 'Blanco y Negro',
'Custom' => 'Personalizado',
'Neutral' => 'Neutro',
'Off' => 'Desactivado',
'Vivid' => 'Vívido',
},
},
'PhotoEffects' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'PhotoEffectsType' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'PhotometricInterpretation' => {
Description => 'Interpretación Fotométrica',
PrintConv => {
'BlackIsZero' => 'Negro es cero',
'Color Filter Array' => 'CFA (Matriz Filtro Color)',
'Pixar LogL' => 'CIE Log2(L) (Log luminancia)',
'Pixar LogLuv' => 'CIE Log2(L)(u\',v\') (Log luminancia y crominancia)',
'RGB Palette' => 'Paleta Color',
'Transparency Mask' => 'Máscara de transparencia',
'WhiteIsZero' => 'Blanco es cero',
},
},
'PhotoshopAnnotations' => 'Anotaciones Photoshop',
'PhotoshopFormat' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'PictInfo' => 'Info Imagen',
'Picture' => 'Imágen',
'PictureControl' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'PictureControlActive' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'PictureDescription' => 'Descripción Imágen',
'PictureFinish' => {
PrintConv => {
'Monochrome' => 'Monocromo',
'Portrait' => 'Retrato',
},
},
'PictureMode' => {
PrintConv => {
'Beach' => 'Playa',
'Fireworks' => 'Fuegos Artificiales',
'Food' => 'Comida',
'Green' => 'Verde',
'Landscape' => 'Paisaje',
'Panorama' => 'Panoramica',
'Portrait' => 'Retrato',
'Red' => 'Rojo',
'Snow' => 'Nieve',
'Soft' => 'Suave',
'Standard' => 'Estándar',
'Underwater' => 'Subacuatica',
'Vivid' => 'Vívido',
'Yellow' => 'Amarillo',
},
},
'PictureModeBWFilter' => {
PrintConv => {
'Green' => 'Verde',
'Neutral' => 'Neutro',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'PictureModeEffect' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Standard' => 'Estándar',
},
},
'PictureModeTone' => {
PrintConv => {
'Green' => 'Verde',
'Neutral' => 'Neutro',
},
},
'PictureStyle' => {
PrintConv => {
'Faithful' => 'Fiel',
'High Saturation' => 'Saturación Alta',
'Landscape' => 'Paisaje',
'Low Saturation' => 'Saturación Baja',
'Monochrome' => 'Monocromo',
'Neutral' => 'Neutro',
'None' => 'Ninguno',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
},
},
'PictureType' => {
Description => 'Tipo Imágen',
PrintConv => {
'32x32 PNG Icon' => 'Icono PNG 32x32',
'Artist' => 'Artista',
'Back Cover' => 'Cubierta Posterior',
'Composer' => 'Compositor',
'Conductor' => 'Director',
'Front Cover' => 'Cubierta Frontal',
'Illustration' => 'Ilustración',
'Lyricist' => 'Letrista',
'Media' => 'Soporte',
'Other' => 'Otro',
'Other Icon' => 'Otro Icono',
'Performance' => 'Interpretación',
'Recording Session' => 'Sesión Grabación',
},
},
'PictureWizardMode' => {
PrintConv => {
'Cool' => 'Frío',
'Landscape' => 'Paisaje',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
'Vivid' => 'Vívido',
},
},
'PixelFormat' => 'Formato Pixel',
'PixelIntensityRange' => 'Intervalo Intensidad Pixel',
'PixelScale' => 'Etiqueta Escala Pixel Modelo',
'PlanarConfiguration' => {
Description => 'Ajuste Datos Imagen',
PrintConv => {
'Chunky' => 'Formato \'Chunky\' (Entrelazado)',
'Planar' => 'Formato \'Planar\'',
},
},
'Predictor' => {
PrintConv => {
'Horizontal differencing' => 'Diferenciación Horizontal',
'None' => 'No se usa esquema de predicción antes de codificar',
},
},
'Preview0' => 'Previa 0',
'Preview1' => 'Previa 1',
'Preview2' => 'Previa 2',
'PreviewApplicationName' => 'Nombre Aplicación Previa',
'PreviewApplicationVersion' => 'Versión Aplicación Previa',
'PreviewButton' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'PreviewButtonPlusDials' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'PreviewColorSpace' => {
Description => 'Espacio Color Previa',
PrintConv => {
'Unknown' => 'Desconocido',
},
},
'PreviewDateTime' => 'Fecha y Hora Previa',
'PreviewImage' => 'Vista Previa',
'PreviewImageLength' => 'Longitud Imagen Previa',
'PreviewImageSize' => 'Tamaño Imagen Previa',
'PreviewImageStart' => 'Inicio Imagen Previa',
'PreviewImageValid' => {
PrintConv => {
'Yes' => 'Si',
},
},
'PreviewSettingsDigest' => 'Cifrado Configuración Previa',
'PreviewSettingsName' => 'Nombre Configuración Previa',
'PrimaryAFPoint' => 'Punto AF primario',
'PrimaryChromaticities' => 'Cromaticidades de Colores Primarios',
'PrimaryPlatform' => 'Plataforma Primaria',
'ProcessingSoftware' => 'Tratamiendo de Software',
'Producer' => 'Productor',
'ProductID' => 'ID Producto',
'ProfileCMMType' => 'Tipo Perfil CMM',
'ProfileCalibrationSig' => 'Firma Perfil Calibración',
'ProfileClass' => {
Description => 'Clase Perfil',
PrintConv => {
'Abstract Profile' => 'Perfil Abstracto',
'ColorSpace Conversion Profile' => 'Perfil Conversión Espacio Color',
'DeviceLink Profile' => 'Perfil Dispositivo Conexión',
'Display Device Profile' => 'Perfil Dispositivo Pantalla',
'Input Device Profile' => 'Perfil Dispositivo Entrada',
'NamedColor Profile' => 'Perfil Color Nombrado',
'Nikon Input Device Profile (NON-STANDARD!)' => 'Perfil Nikon ("nkpf")',
'Output Device Profile' => 'Perfil Dispositivo Salida',
},
},
'ProfileConnectionSpace' => 'Espacio Conexión Perfil',
'ProfileCopyright' => 'Copyright',
'ProfileCreator' => 'Creador Perfil',
'ProfileDateTime' => 'Fecha y Hora Perfil',
'ProfileDescription' => 'Descripción Perfil',
'ProfileDescriptionML' => 'Descripción Perfil ML',
'ProfileEmbedPolicy' => {
Description => 'Perfil Política Incrustada',
PrintConv => {
'Allow Copying' => 'Permitir copia',
'Embed if Used' => 'Incrustar si se usa',
'Never Embed' => 'Incrustado nunca',
'No Restrictions' => 'Sin restricciones',
},
},
'ProfileFileSignature' => 'Firma Archivo Perfil',
'ProfileHueSatMapData1' => 'Perfil Matiz Sat. Mapa Dato 1',
'ProfileHueSatMapData2' => 'Perfil Matiz Sat. Mapa Dato 2',
'ProfileHueSatMapDims' => 'Divisiones Matiz',
'ProfileID' => 'ID Perfil',
'ProfileLookTableData' => 'Perfil Datos Tabla Consulta',
'ProfileLookTableDims' => 'Divisiones Matiz',
'ProfileName' => 'Nombre Perfil',
'ProfileSequenceDesc' => 'Descripción Secuencia Perfil',
'ProfileToneCurve' => 'Perfil Curva Tono',
'ProfileVersion' => 'Versión Perfil',
'ProgramMode' => {
PrintConv => {
'None' => 'Ninguno',
'Portrait' => 'Retrato',
},
},
'ProgramVersion' => 'Versión Programa',
'Projects' => 'Proyectos',
'PromotionURL' => 'URL Promocional',
'PropertyReleaseStatus' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'Protect' => 'Protección',
'ProtectionType' => 'Tipo Protección',
'Provider' => 'Proveedor',
'ProviderCopyright' => 'Copyright Proveedor',
'Province-State' => 'Provincia/Estado',
'Publisher' => 'Editor',
'Quality' => {
Description => 'Calidad',
PrintConv => {
'Compressed RAW' => 'cRAW',
'Compressed RAW + JPEG' => 'cRAW+JPEG',
'Extra Fine' => 'Extrafina',
'Fine' => 'Fina',
'High' => 'Alto',
'Low' => 'Bajo',
'Normal' => 'Calidad estándar',
'RAW + JPEG' => 'RAW+JPEG',
'Standard' => 'Estándar',
'n/a' => 'no aplica',
},
},
'QuantizationMethod' => {
Description => 'Método Cuantización',
PrintConv => {
'AP Domestic Analogue' => 'AP Doméstico Análogo',
'Color Space Specific' => 'Espacio Color Específico',
'Compression Method Specific' => 'Método Compresión Específico',
'Gamma Compensated' => 'Gamma Compensada',
'IPTC Ref B' => 'IPTC ref "B"',
'Linear Density' => 'Densidad lineal',
'Linear Dot Percent' => 'Porcentaje Punto lineal',
'Linear Reflectance/Transmittance' => 'Reflectancia/transmitancia lineal',
},
},
'QuickShot' => {
Description => 'Disparo Rápido',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'RadioStationName' => 'Nombre Emisora Radio',
'RadioStationOwner' => 'Propietario Emisora Radio',
'RasterPadding' => 'Relleno Trama',
'RasterizedCaption' => 'Título Rasterizado',
'Rating' => {
Description => 'Clasificación',
PrintConv => {
'none' => 'Ninguno',
},
},
'RatingPercent' => 'Valoración en Porcentaje',
'RawCustomSaturation' => 'Raw Saturación personalizada',
'RawDataUniqueID' => 'ID Único Dato Raw',
'RawDevAutoGradation' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'RawDevNoiseReduction' => {
PrintConv => {
'Noise Filter' => 'Filtro ruido',
'Noise Filter (ISO Boost)' => 'Filtro ruido (ISO Boost)',
'Noise Reduction' => 'Reducción ruido',
},
},
'RawDevPMPictureTone' => {
PrintConv => {
'Green' => 'Verde',
'Neutral' => 'Neutro',
},
},
'RawDevPM_BWFilter' => {
PrintConv => {
'Green' => 'Verde',
'Neutral' => 'Neutro',
'Orange' => 'Naranja',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'RawDevPictureMode' => {
PrintConv => {
'Vivid' => 'Vívido',
},
},
'RawDevSettings' => {
PrintConv => {
'Noise Reduction' => 'Reducción ruido',
},
},
'RawImageDigest' => 'Cifrado Imagen RAW',
'RawJpgSize' => {
PrintConv => {
'Medium' => 'Medio',
'Medium 1' => 'Medio 1 ',
'Medium 2' => 'Medio 2',
'Medium 3' => 'Medio 3',
'Postcard' => 'Tarjeta Postal',
'Small 1' => 'Pequeño 1',
'Small 2' => 'Pequeño 21',
'Small 3' => 'Pequeño 3',
},
},
'RecordMode' => 'Modo de Grabación',
'RecordShutterRelease' => {
Description => 'Soltar Obturador Grabación',
PrintConv => {
'Press start, press stop' => 'Pulsa para iniciar, pulsa para parar',
'Record while down' => 'Grabar mientras se pulsa',
},
},
'RecordedTrackNumber' => 'Número Pista grabada',
'RecordingMode' => {
PrintConv => {
'Panorama' => 'Panoramica',
'Portrait' => 'Retrato',
},
},
'RedEyeCorrection' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'RedEyeReduction' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'RedMatrixColumn' => 'Columna Matriz Rojo',
'RedTRC' => 'Curva Reproducción Tono Rojo',
'ReductionMatrix1' => 'Matriz Reducción 1',
'ReductionMatrix2' => 'Matriz Reducción 2',
'ReferenceBlackWhite' => 'Par de Valores de Referencia Blanco y Negro',
'ReferenceDate' => 'Fecha Referencia',
'ReferenceNumber' => 'Número Referencia',
'ReferenceService' => 'Servicio Referencia',
'RelatedImageFileFormat' => 'Formato Archivo Imagen Relacionado',
'RelatedImageHeight' => 'Alto Imagen Relacionada',
'RelatedImageWidth' => 'Ancho Imagen Relacionada',
'RelatedSoundFile' => 'Archivo Audio Relacionado',
'ReleaseButtonToUseDial' => {
PrintConv => {
'Yes' => 'Si',
},
},
'ReleaseDate' => 'Fecha Lanzamiento',
'ReleaseTime' => 'Hora Lanzamiento',
'RenderingIntent' => {
Description => 'Intento Interpretación',
PrintConv => {
'ICC-Absolute Colorimetric' => 'Colorimétrica Absoluta',
'Media-Relative Colorimetric' => 'Colorimétrica Relativa',
'Saturation' => 'Saturación',
},
},
'RenditionOfMaskMarkers' => {
PrintConv => {
'All' => 'Todo',
'None' => 'Ninguno',
},
},
'ResampleParamsQuality' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'Resaved' => {
Description => 'Regrabado',
PrintConv => {
'Yes' => 'Si',
},
},
'Reserved1' => 'Reservado 1',
'Resolution' => 'Resolución',
'ResolutionMode' => 'Modo Resolución',
'ResolutionUnit' => {
Description => 'Unidad de Resolución de X e Y',
PrintConv => {
'None' => 'Ninguno',
'cm' => 'Píxeles/cm',
'inches' => 'Pulgada',
},
},
'RetouchHistory' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'RevisionNumber' => 'Número Revisión',
'Rotation' => {
Description => 'Rotación',
PrintConv => {
'Rotate 180' => 'Girado 180°',
'Rotate 270 CW' => 'Girado 270° sentido reloj',
'Rotate 90 CW' => 'Girado 90° sentido reloj',
'Rotated 180' => 'Girado 180°',
'Rotated 270 CW' => 'Girado 270° sentido reloj',
'Rotated 90 CW' => 'Girado 90° sentido reloj',
},
},
'RowInterleaveFactor' => 'Factor Interpolar Fila',
'RowsPerStrip' => 'Número de Filas por Tira',
'SMaxSampleValue' => 'Valor Muestra Max S',
'SMinSampleValue' => 'Valor Muestra Min S',
'SRAWQuality' => {
PrintConv => {
'n/a' => 'No Aplica',
},
},
'SRActive' => {
PrintConv => {
'Yes' => 'Si',
},
},
'SampleFormat' => 'Formato Muestra',
'SampleRate' => 'Frecuencia muestreo',
'SampleSize' => 'Tamaño muestra',
'SampleStructure' => {
Description => 'Estructura Muestreo',
PrintConv => {
'CompressionDependent' => 'Definido dentro del proceso de compresión',
'Orthogonal4-2-2Sampling' => 'Ortogonal con las frecuencias de muestreo en el ratio de 4:2:2:(4)',
'OrthogonalConstangSampling' => 'Ortogonal con la mismas frecuencias de muestreo relativo en cada componente',
},
},
'SamplesPerPixel' => 'Número de Componentes',
'SanyoQuality' => {
Description => 'Calidad Sanyo',
PrintConv => {
'Fine/High' => 'Fino/Alto',
'Fine/Low' => 'Fino/Bajo',
'Fine/Medium' => 'Fino/Medio',
'Fine/Medium High' => 'Fino/Medio Alto',
'Fine/Medium Low' => 'Fino/Medio bajo',
'Fine/Super High' => 'Fino/Super Alto',
'Fine/Very High' => 'Fino/Muy Alto',
'Fine/Very Low' => 'Fino/Muy bajo',
'Normal/High' => 'Normal/Alto',
'Normal/Low' => 'Normal/Bajo',
'Normal/Medium' => 'Normal/Medio',
'Normal/Medium High' => 'Normal/Medio Alto',
'Normal/Medium Low' => 'Normal/Medio bajo',
'Normal/Super High' => 'Normal/Super Alto',
'Normal/Very High' => 'Normal/Muy Alto',
'Normal/Very Low' => 'Normal/Muy bajo',
'Super Fine/High' => 'Super Fino/Alto',
'Super Fine/Low' => 'Super Fino/Bajo',
'Super Fine/Medium' => 'Super Fino/Medio',
'Super Fine/Medium High' => 'Super Fino/Medio Alto',
'Super Fine/Medium Low' => 'Super Fino/Medio Bajo',
'Super Fine/Super High' => 'Super Fino/Super Alto',
'Super Fine/Very High' => 'Super Fino/Muy Alto',
'Super Fine/Very Low' => 'Super Fino/Muy Bajo',
},
},
'SanyoThumbnail' => 'Miniatura Sanyo',
'Saturation' => {
Description => 'Saturación',
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'None' => 'Ninguno',
'None (B&W)' => 'Ninguna (N&B)',
'Normal' => 'Estándar',
'Vivid' => 'Vívido',
},
},
'ScanImageEnhancer' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ScanningDirection' => {
Description => 'Dirección Escaneo',
PrintConv => {
'Bottom-Top, L-R' => 'Abajo a arriba, izquierda a derecha',
'Bottom-Top, R-L' => 'Abajo a arriba, derecha a izquierda',
'L-R, Bottom-Top' => 'Izquierda a derecha, abajo a arriba',
'L-R, Top-Bottom' => 'Izquierda a derecha, arriba a abajo',
'R-L, Bottom-Top' => 'Derecha a izquierda, abajo a arriba',
'R-L, Top-Bottom' => 'Derecha a izquierda, arriba a abajo',
'Top-Bottom, L-R' => 'Arriba a abajo, izquierda a derecha',
'Top-Bottom, R-L' => 'Arriba a abajo, derecha a izquierda',
},
},
'Scene' => 'Escena',
'SceneCaptureType' => {
Description => 'Tipo Captura Escena',
PrintConv => {
'Landscape' => 'Paisaje',
'Night' => 'Escena nocturna',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
},
},
'SceneMode' => {
Description => 'Selección de escena',
PrintConv => {
'3D Sweep Panorama' => '3D',
'Anti Motion Blur' => 'Anti movimiento',
'Beach' => 'Playa',
'Cont. Priority AE' => 'AE prioridad cont.',
'Fireworks' => 'Fuegos Artificiales',
'Food' => 'Comida',
'Handheld Night Shot' => 'Toma noct. manual',
'Indoor' => 'Interior',
'Landscape' => 'Paisaje',
'Night Portrait' => 'Retrato noct.',
'Night Scene' => 'Vista nocturna',
'Night View/Portrait' => 'Vista/retrato nocturno',
'Off' => 'Desactivado',
'Panorama' => 'Panoramica',
'Portrait' => 'Retrato',
'Snow' => 'Nieve',
'Sports' => 'Acción deportiva',
'Standard' => 'Estándar',
'Sunset' => 'Puesta sol',
'Sweep Panorama' => 'Barrido panorámico',
'Underwater' => 'Subacuatica',
'Vivid' => 'Vívido',
},
},
'SceneModeUsed' => {
PrintConv => {
'Beach' => 'Playa',
'Fireworks' => 'Fuegos Artificiales',
'Landscape' => 'Paisaje',
'Panorama' => 'Panoramica',
'Portrait' => 'Retrato',
'Snow' => 'Nieve',
},
},
'SceneSelect' => {
Description => 'Selección Escena',
PrintConv => {
'Lamp' => 'Lámpara',
'Night' => 'Noche',
'Off' => 'Apagado',
'Sport' => 'Deporte',
'User 1' => 'Usuario 1',
'User 2' => 'Usuario 2',
},
},
'SceneType' => {
Description => 'Tipo Escena',
PrintConv => {
'Directly photographed' => 'Imagen fotografiada directamente',
},
},
'Security' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'SecurityClassification' => {
Description => 'Clasificación Seguridad',
PrintConv => {
'Confidential' => 'Confidencial',
'Restricted' => 'Restringida',
'Secret' => 'Secreta',
'Top Secret' => 'Alto secreto',
'Unclassified' => 'Sin clasificar',
},
},
'SelectableAFPoint' => 'Punto AF seleccionable',
'SelfTimer' => {
Description => 'Temporizador Automático',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'SelfTimerMode' => 'Modo Automático',
'SensingMethod' => {
Description => 'Método Sensor',
PrintConv => {
'Color sequential area' => 'Sensor de color secuencial',
'Color sequential linear' => 'Sensor lineal de color secuencial',
'Monochrome area' => 'Sensor monocromo',
'Monochrome linear' => 'Sensor lineal monocromo',
'Not defined' => 'No definido',
'One-chip color area' => 'Sensor monochip de color',
'Three-chip color area' => 'Sensor tres chips de color',
'Trilinear' => 'Sensor trilineal',
'Two-chip color area' => 'Sensor bichip de color',
},
},
'SensitivityType' => {
PrintConv => {
'Unknown' => 'Desconocido',
},
},
'SequenceShotInterval' => {
Description => 'Intervalo Disparo Secuencial',
PrintConv => {
'10 frames/s' => '10 cuadros/s',
'15 frames/s' => '15 cuadros/s',
'20 frames/s' => '20 cuadros/s',
'5 frames/s' => '5 cuadros/s',
},
},
'SequentialShot' => {
Description => 'Disparo Secuencial',
PrintConv => {
'Adjust Exposure' => 'Ajustar Exposición',
'Best' => 'Mejor',
'None' => 'Ninguno',
'Standard' => 'Estándar',
},
},
'SerialNumber' => 'Número Serie',
'ServiceIdentifier' => 'Identificador Servicio',
'ShadingCompensation' => 'Compensación de Sombreado',
'ShadingCompensation2' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Shadow' => 'Sombrío',
'ShadowScale' => 'Escala Sombrío',
'ShakeReduction' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Sharpening' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'Sharpness' => {
Description => 'Nitidez',
PrintConv => {
'Hard' => 'Fuerte',
'Normal' => 'Estándar',
'Sharp' => 'Nitido',
'Soft' => 'Suave',
},
},
'SharpnessFrequency' => {
PrintConv => {
'High' => 'Alto',
'Highest' => 'Muy Alto',
'Low' => 'Bajo',
'Lowest' => 'Mas bajo',
'Standard' => 'Estándar',
'n/a' => 'No Aplica',
},
},
'ShootingMode' => {
Description => 'Modo de Disparo',
PrintConv => {
'Beach' => 'Playa',
'Fireworks' => 'Fuegos Artificiales',
'Food' => 'Comida',
'Portrait' => 'Retrato',
'Snow' => 'Nieve',
'Underwater' => 'Subacuatica',
},
},
'ShortDocumentID' => 'ID Corta del Documento',
'Shutter-AELock' => 'Disparador Bloqueo AE',
'ShutterCount' => 'Contador de disparos',
'ShutterReleaseButtonAE-L' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ShutterReleaseNoCFCard' => {
PrintConv => {
'Yes' => 'Si',
},
},
'ShutterSpeed' => 'Tiempo de Exposición',
'ShutterSpeedValue' => 'Velocidad Obturación',
'Signature_Name' => 'Firma',
'SimilarityIndex' => 'Índice de Similitudes',
'SingleFrameBracketing' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'Site' => 'Sitio',
'SlideShow' => {
PrintConv => {
'Yes' => 'Si',
},
},
'SlowShutter' => {
PrintConv => {
'None' => 'Ninguno',
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'SoftSkinEffect' => {
PrintConv => {
'Low' => 'Bajo',
},
},
'Software' => 'Programa Utilizado',
'SoftwareVersion' => 'Versión Software',
'SonyImageSize' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'SonyQuality' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'Source' => 'Fuente',
'SpatialFrequencyResponse' => 'Respuesta Frecuencia Espacial',
'SpecialEffectsOpticalFilter' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'SpecialInstructions' => 'Instrucciones',
'SpecialMode' => 'Modo Especial',
'SpectralSensitivity' => 'Sensibilidad Espectral',
'Speed' => {
PrintConv => {
'Fast' => 'Rápido',
},
},
'SpotMeteringMode' => {
PrintConv => {
'AF Point' => 'Punto AF',
'Center' => 'Centro',
},
},
'State' => 'Estado',
'StreamColor' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'StreamType' => {
PrintConv => {
'Binary' => 'Binario',
'File Transfer' => 'Transferencia Archivo',
},
},
'StripByteCounts' => 'Bytes por Tira Comprimida',
'StripOffsets' => 'Localización Datos Imagen',
'Sub-location' => 'Localización',
'SubSecTime' => 'Subsegundos DateTime',
'SubSecTimeDigitized' => 'Subsegundos DateTimeDigitized',
'SubSecTimeOriginal' => 'Subsegundos DateTimeOriginal',
'SubTileBlockSize' => 'Tamaño Bloque Submosaico',
'SubfileType' => 'Nuevo Tipo Subarchivo',
'SubimageColor' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'Subject' => 'Sujeto',
'SubjectArea' => 'Zona Sujeto',
'SubjectDistance' => 'Distancia Sujeto',
'SubjectDistanceRange' => {
Description => 'Intervalo Distancia Sujeto',
PrintConv => {
'Close' => 'Vista cercana',
'Distant' => 'Vista alejada',
'Unknown' => 'Desconocido',
},
},
'SubjectLocation' => 'Localización Sujeto',
'SubjectProgram' => {
PrintConv => {
'None' => 'Ninguno',
'Portrait' => 'Retrato',
},
},
'SubjectReference' => 'Código Sujeto',
'Subsystem' => {
PrintConv => {
'Unknown' => 'Desconocido',
},
},
'Subtitle' => 'Subtitulo',
'SubtitleDescription' => 'Descripción Subtitulo',
'SuperimposedDisplay' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'SupplementalCategories' => 'Categoría Suplementaria',
'SupplementalType' => {
Description => 'Tipo Suplemento',
PrintConv => {
'Main Image' => 'No Definido',
'Rasterized Caption' => 'Título Rasterizado',
'Reduced Resolution Image' => 'Imagen resolución reducida',
},
},
'SweepPanoramaSize' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'SwitchToRegisteredAFPoint' => 'Conmutación de Punto AF registrado',
'SynchronizedLyricsType' => {
PrintConv => {
'Other' => 'Otro',
},
},
'T4Options' => 'Opciones T4',
'T6Options' => 'Opciones T6',
'TIFF-EPStandardID' => 'ID Estándar TIFF/EP',
'Tagged' => {
PrintConv => {
'Yes' => 'Si',
},
},
'TargetPrinter' => 'Impresora Objetivo',
'Technology' => {
Description => 'Tecnología',
PrintConv => {
'Active Matrix Display' => 'Pantalla Matriz Activa',
'Cathode Ray Tube Display' => 'Pantalla Tubo Rayos Catódicos',
'Digital Camera' => 'Cámara Digital',
'Dye Sublimation Printer' => 'Impresora Sublimación',
'Electrophotographic Printer' => 'Impresora Electrofotográfica (Laser)',
'Electrostatic Printer' => 'Impresora Electrostática',
'Film Scanner' => 'Escaner Película',
'Film Writer' => 'Impresora Película',
'Flexography' => 'Flexografía',
'Gravure' => 'Grabado',
'Ink Jet Printer' => 'Impresora Inyección Tinta',
'Offset Lithography' => 'Litografía Offset',
'Passive Matrix Display' => 'Pantalla Matriz Pasiva',
'Photo Image Setter' => 'Marco Foto',
'Photographic Paper Printer' => 'Impresora Papel Fotográfico',
'Projection Television' => 'Televisión Proyección',
'Reflective Scanner' => 'Escaner Reflectivo',
'Silkscreen' => 'Pantalla Sedosa',
'Thermal Wax Printer' => 'Impresora Cera Termal',
'Video Camera' => 'Videocámara',
'Video Monitor' => 'Monitor Video',
},
},
'Teleconverter' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'Text' => 'Texto',
'TextStamp' => {
PrintConv => {
'On' => 'Activado',
},
},
'Thresholding' => 'Umbral',
'ThumbnailImage' => 'Miniatura',
'ThumbnailImageSize' => 'Tamaño de la Vista en Miniatura',
'TileByteCounts' => 'Número Byte Elemento',
'TileDepth' => 'Ancho Elemento',
'TileLength' => 'Largo Elemento',
'TileOffsets' => 'Offsets Elemento',
'TileWidth' => 'Ancho Elemento',
'TimeCreated' => 'Hora Creación',
'TimeScaleParamsQuality' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'TimeSent' => 'Hora Envío',
'TimeSignature' => {
PrintConv => {
'other' => 'Otro',
},
},
'TimeStamp' => 'Marca de Tiempo',
'TimeStamp1' => 'Marca de Tiempo 1',
'TimeZoneOffset' => 'Offset Zona Horaria',
'Title' => 'Título',
'ToneCurve' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'ToneCurveActive' => {
PrintConv => {
'Yes' => 'Si',
},
},
'ToningEffect' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'ToningEffectMonochrome' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
},
},
'ToningEffectUnknown' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
},
},
'ToningEffectUserDef1' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
},
},
'ToningEffectUserDef2' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
},
},
'ToningEffectUserDef3' => {
PrintConv => {
'Green' => 'Verde',
'None' => 'Ninguno',
},
},
'ToolName' => 'Nombre Herramienta',
'ToolVersion' => 'Versión Herramienta',
'TotalFrames' => 'Total Imagenes',
'Track' => 'Pista',
'TrackCreateDate' => 'Fecha creación Track',
'TrackDefault' => 'Pista Defecto',
'TrackForced' => 'Pista Forzada',
'TrackHeaderVersion' => 'Versión cabecera Pista',
'TrackID' => 'ID Pista',
'TrackName' => 'Nombre Pista',
'TrackNumber' => 'Número Pista',
'TrackType' => 'Tipo Pista',
'TrackUsed' => 'Pista utilizada',
'Tracks' => 'Pistas',
'TransferFunction' => 'Función Transferencia',
'TransferRange' => 'Intervalo Transferencia',
'Transformation' => {
Description => 'Transformación',
PrintConv => {
'Mirror horizontal' => 'Invertir horizontal',
'Mirror horizontal and rotate 270 CW' => 'Invertir horizontal y rotar 270° sentido reloj',
'Mirror horizontal and rotate 90 CW' => 'Invertir horizontal y rotar 90° sentido reloj',
'Mirror vertical' => 'Invertir vertical',
'Rotate 180' => 'Girado 180°',
'Rotate 270 CW' => 'Girado 270° sentido reloj',
'Rotate 90 CW' => 'Girado 90° sentido reloj',
},
},
'TransmissionReference' => 'Referencia de Transmisión',
'TransparencyIndicator' => 'Indicador Transparencia',
'TrapIndicator' => 'Indicador Tampa',
'Type' => 'Tipo',
'Uncompressed' => {
Description => 'Sin Comprimir',
PrintConv => {
'Yes' => 'Si',
},
},
'UncompressedSize' => 'Tamaño Descomprimido',
'UniqueCameraModel' => 'Modelo Cámara Unico',
'UniqueDocumentID' => 'ID de Documento Única',
'UniqueFileIdentifier' => 'Identificador Unico Archivo',
'UniqueObjectName' => 'Nombre Único de Objeto',
'Unknown' => 'Desconocido',
'Unsharp1Color' => {
PrintConv => {
'Green' => 'Verde',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'Unsharp2Color' => {
PrintConv => {
'Green' => 'Verde',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'Unsharp3Color' => {
PrintConv => {
'Green' => 'Verde',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'Unsharp4Color' => {
PrintConv => {
'Green' => 'Verde',
'Red' => 'Rojo',
'Yellow' => 'Amarillo',
},
},
'UnsharpMask' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'Urgency' => {
Description => 'Urgencia',
PrintConv => {
'0 (reserved)' => '0 (reservado para futuro uso)',
'1 (most urgent)' => '1 (más urgente)',
'5 (normal urgency)' => '5 (urgencia normal)',
'8 (least urgent)' => '8 (menos urgente)',
'9 (user-defined priority)' => '9 (reservado para futuro uso)',
},
},
'UserComment' => 'Comentarios Usuario',
'UserDef1PictureStyle' => {
PrintConv => {
'Landscape' => 'Paisaje',
'Monochrome' => 'Monocromo',
'Neutral' => 'Neutro',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
},
},
'UserDef2PictureStyle' => {
PrintConv => {
'Landscape' => 'Paisaje',
'Monochrome' => 'Monocromo',
'Neutral' => 'Neutro',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
},
},
'UserDef3PictureStyle' => {
PrintConv => {
'Landscape' => 'Paisaje',
'Monochrome' => 'Monocromo',
'Neutral' => 'Neutro',
'Portrait' => 'Retrato',
'Standard' => 'Estándar',
},
},
'VR_0x66' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'ValidAFPoints' => 'Puntos AF validos',
'Version' => 'Versión PrintIM',
'VersionYear' => 'Año versión',
'VibrationReduction' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'VideoAlphaMode' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'VideoCardGamma' => 'Tarjeta Video Gamma',
'VideoCompressor' => 'Video Compresor',
'VideoFieldOrder' => {
PrintConv => {
'Lower' => 'Inferior',
'Progressive' => 'Progresivo',
'Upper' => 'Superior',
},
},
'VideoHeight' => 'Altura Video',
'VideoPixelDepth' => {
PrintConv => {
'16-bit integer' => 'Entero 16-bits',
'24-bit integer' => 'Entero 24-bits',
'32-bit float' => 'Flotante 32-bits',
'32-bit integer' => 'Entero 32-bits',
'8-bit integer' => 'Entero 8-bits',
'Other' => 'Otro',
},
},
'VideoQuality' => {
PrintConv => {
'Low' => 'Bajo',
'Standard' => 'Estándar',
},
},
'VideoWidth' => 'Ancho Video',
'ViewCompressionFactor' => 'Ver Factor de compresión',
'ViewfinderWarning' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ViewfinderWarnings' => {
PrintConv => {
'Monochrome' => 'Monocromo',
},
},
'ViewingCondDesc' => 'Descripción en Condiciones de Visión',
'ViewingCondIlluminant' => 'Iluminación en Condiciones de Visión',
'ViewingCondIlluminantType' => 'Tipo Iluminación en Condiciones de Visión',
'ViewingCondSurround' => 'Entorno en Condiciones de Visión',
'ViewingConditions' => 'Iluminación en Condiciones de Visión',
'VignetteControl' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'VoiceMemo' => {
Description => 'Notas Voz',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'WBAdjLighting' => {
PrintConv => {
'None' => 'Ninguno',
},
},
'WBBracketMode' => {
PrintConv => {
'Off' => 'Desactivado',
},
},
'WBFineTuneActive' => {
PrintConv => {
'Yes' => 'Si',
},
},
'WCSProfiles' => 'Perfil Sistema Color Windows',
'WhiteBalance' => {
Description => 'Balance de Blancos',
PrintConv => {
'Auto' => 'Automático',
'Black & White' => 'Monocromo',
'Cloudy' => 'Nublado',
'Color Temperature/Color Filter' => 'Temperatura de color / Filtro de color',
'Cool White Fluorescent' => 'Fluorescente blanco frío',
'Custom' => 'Personalizado',
'Custom 1' => 'Personalizado 1',
'Custom 2' => 'Personalizado 2',
'Custom 3' => 'Personalizado 3',
'Custom 4' => 'Personalizado 4',
'Day White Fluorescent' => 'Fluorescente blanco de día',
'Daylight' => 'Luz de día',
'Daylight Fluorescent' => 'Fluorescente luz de día',
'Fluorescent' => 'Flourescente',
'Manual' => 'Equilibrio del blanco manual',
'Manual Temperature (Kelvin)' => 'Temperatura Manual (Kelvin)',
'Shade' => 'Sombrío',
'Tungsten' => 'Tungsteno',
'Underwater' => 'Subacuatica',
'Unknown' => 'Desconocido',
'Warm White Fluorescent' => 'Fluorescente blanco cálido',
'White Fluorescent' => 'Fluorescente blanco',
},
},
'WhiteBalanceAdj' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'WhiteBalanceBracketing' => {
PrintConv => {
'High' => 'Alto',
'Low' => 'Bajo',
},
},
'WhiteLevel' => 'Nivel Blanco',
'WhitePoint' => 'Cromaticidad Punto Blanco',
'WideRange' => {
Description => 'Intervalo Extendido',
PrintConv => {
'Off' => 'Apagado',
'On' => 'Encendido',
},
},
'WidthResolution' => 'Resolución Imagen Horizontal',
'Writer' => 'Escritor',
'Writer-Editor' => 'Título/Descripción Escritor',
'X3FillLight' => 'Luz Relleno X3',
'XClipPathUnits' => 'Unidades Camino Fragmento X',
'XMP' => 'Metadatos XMP',
'XPosition' => 'Posición X',
'XResolution' => 'Resolución Imagen Horizontal',
'YCbCrCoefficients' => 'Coeficientes de Matriz de Tranformación de Espacio de Color',
'YCbCrPositioning' => {
Description => 'Posicionamiento Y y C',
PrintConv => {
'Centered' => 'Centrado',
'Co-sited' => 'Vecino',
},
},
'YCbCrSubSampling' => 'Ratio Submuestreo de Y a C',
'YClipPathUnits' => 'Unidades Camino Fragmento Y',
'YPosition' => 'Posición Y',
'YResolution' => 'Resolución Imagen Vertical',
'Year' => 'Año',
'YearCreated' => 'Año Creación',
'ZipCompressedSize' => 'Zip Tamaño Comprimido',
'ZipCompression' => {
Description => 'Compresión Zip',
PrintConv => {
'None' => 'Ninguno',
'Reduced with compression factor 1' => 'Reducido con factor de compresión 1',
'Reduced with compression factor 2' => 'Reducido con factor de compresión 2',
'Reduced with compression factor 3' => 'Reducido con factor de compresión 3',
'Reduced with compression factor 4' => 'Reducido con factor de compresión 4',
},
},
'ZipUncompressedSize' => 'Zip Tamaño Descomprimido',
'ZoneMatching' => {
Description => 'Zone matching',
PrintConv => {
'High Key' => 'Alto',
'ISO Setting Used' => 'Desactivado',
'Low Key' => 'Bajo',
},
},
'ZoneMatchingMode' => {
PrintConv => {
'Standard' => 'Estándar',
},
},
'ZoneMatchingOn' => {
PrintConv => {
'Off' => 'Desactivado',
'On' => 'Activado',
},
},
'ZoomPos' => 'Posición Zoom',
);
1; # end
__END__
=head1 NAME
Image::ExifTool::Lang::es.pm - ExifTool Spanish language translations
=head1 DESCRIPTION
This file is used by Image::ExifTool to generate localized tag descriptions
and values.
=head1 AUTHOR
Copyright 2003-2020, Phil Harvey (philharvey66 at gmail.com)
This library is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 ACKNOWLEDGEMENTS
Thanks to Jens Duttke, Santiago del BrE<iacute>o GonzE<aacute>lez and Emilio
Sancha for providing this translation.
=head1 SEE ALSO
L<Image::ExifTool(3pm)|Image::ExifTool>,
L<Image::ExifTool::TagInfoXML(3pm)|Image::ExifTool::TagInfoXML>
=cut
| mkjanke/Focus-Points | focuspoints.lrdevplugin/bin/exiftool/lib/Image/ExifTool/Lang/es.pm | Perl | apache-2.0 | 123,012 |
package Net::Netconf::Manager;
use Carp;
our $VERSION ='1.02';
# This instantiates a Junoscript or a Netconf device depending on the 'server'
# specified. Default is Netconf.
sub new
{
my($class, %args) = @_;
my $self = { %args };
my $device = undef;
# Junoscript session
if (defined $self->{'server'} && $self->{'server'} eq 'junoscript') {
eval 'require JUNOS::Device';
if ($@) {
croak 'Error: ' . $@;
}
$device = new JUNOS::Device(%args);
} else { # Netconf session
eval 'require Net::Netconf::Device';
if ($@) {
croak 'Error: ' . $@;
}
$device = new Net::Netconf::Device(%args);
}
$device;
}
1;
__END__
=head1 NAME
Net::Netconf::Manager
=head1 SYNOPSIS
The Net::Netconf::Manager module instantiates a JUNOSCript device or a Netconf
device based on which 'server' is requested. Default is 'netconf'.
=head1 DESCRIPTION
The Net::Netconf::Manager module instantiates and returns a JUNOScript device or
a Netconf device based on which 'server; is requested for. The 'server' can take
the values 'junoscript' or 'netconf'. The default value is 'netconf'.
=head1 EXAMPLE
This example connects to a Netconf server, locks the candidate database, updates
the router's configuration, commits the changes and closes the Netconf session.
It also does error handling.
use Net::Netconf::Manager;
# State information constants
use constant STATE_CONNECTED => 0;
use constant STATE_LOCKED => 1;
use constant STATE_EDITED => 2;
# Variables used
my $response;
my %deviceargs = (
'hostname' => 'routername',
'login' => 'loginname',
'password' => 'secret',
'access' => 'ssh',
'server' => 'netconf',
'command' => 'junoscript netconf',
'debug_level' => 1,
'client_capabilities' => [
'urn:ietf:params:xml:ns:netconf:base:1.0',
'urn:ietf:params:xml:ns:netconf:capability:candidate:1.0',
'urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0',
'urn:ietf:params:xml:ns:netconf:capability:validate:1.0',
'urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file',
'http://xml.juniper.net/netconf/junos/1.0',
]
);
my $device = new Net::Netconf::Manager(%deviceargs);
print 'Could not create Netconf device' unless $device;
# Lock the configuration datastore
$response = $device->lock_config(target => 'candidate');
graceful_shutdown($device, STATE_CONNECTED) if ($device->has_error);
# Edit the configuration
my %editargs = (
target => 'candidate',
config => '<config>
<configuration>
<interfaces>
<interface>
<name>fe-0/0/0</name>
<mtu>1200</mtu>
</interface>
</interfaces>
</configuration>
</config>'
);
$response = $device->edit_config(%editargs);
graceful_shutdown($device, STATE_LOCKED) if ($device->has_error);
# Commit the changes
$response = $device->commit();
graceful_shutdown($device, STATE_EDITED) if ($device->has_error);
# Close the session
$response = $device->close_session();
print 'Unable to close the Netconf session' if ($device->has_error);
# Disconnect
$device->disconnect();
sub graceful_shutdown
{
my ($device, $state) = @_;
# Could not commit
if ($state >= STATE_EDITED) {
print "Failed to commit changes..So, discarding the changes...\n";
$device->discard_changes();
}
# Could not edit the config
if ($state >= STATE_LOCKED) {
print "Failed to edit the configuration...\n";
$device->unlock();
}
# Could not lock the candidate config
if ($state >= STATE_CONNECTED) {
print "Failed to lock the candidate datastore...\n";
$device->close_session();
$device->disconnect();
}
exit 0;
}
=head1 CONSTRUCTOR
new(%ARGS)
The constructor accepts a hash table %ARGS. It looks at the 'server' key and
instantiates either:
=over 4
=item JUNOScript device
if the 'server' value is 'junoscript.
=item Netconf device
if the 'server' value is 'netconf'.
=back
=head1 SEE ALSO
=over 4
=item *
Net::Netconf::Device
=item *
Net::Netconf::Access
=item *
Net::Netconf::Access::ssh
=back
=head1 AUTHOR
Juniper Networks Perl Team, send bug reports, hints, tips and suggestions to
netconf-support@juniper.net.
| jackson-tim/netconf-perl | lib/Net/Netconf/Manager.pm | Perl | apache-2.0 | 4,704 |
line0=Opcje konfiguracji,11
view_condition=Wy¶wietlaæ stan na li¶cie regu³?,1,1-Tak,0-Nie
view_comment=Wy¶wietlaæ komentarz na li¶cie regu³?,1,1-Tak,0-Nie
comment_mod=Zapisuj komentarze jako,1,0-# zapis w pliku komentarzy,1---opcja komentarzy
cluster_mode=Aktualizuj klaster serwerów,1,0-Zawsze, gdy wprowadzono zmianê,1-Po zastosowaniu konfiguracji
force_init=Zawsze uruchamiaj firewall ze skryptem inita Debiana,1,1-Tak,0-Nie
before_cmd=Polecenie do uruchomienia przed zmienieniem regu³,3,Brak
after_cmd=Polecenie do uruchomienia po zmienieniu regu³,3,Brak
before_apply_cmd=Polecenie do uruchomienia przed zastosowaniem konfiguracji,3,Brak
after_apply_cmd=Polecenie do uruchomienia po zastosowaniu konfiguracji,3,Brak
line1=Opcje systemu,11
save_file=IPtables zapis pliku do edycji,3,U¿yj systemu operacyjnego lub Webmina
direct=Bezpo¶rednio edytuj regu³y firewalla zamiast zapisywaæ do pliku?,1,1-Tak,0-Nie
| BangL/webmin | firewall/config.info.pl | Perl | bsd-3-clause | 922 |
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!
# This file is machine-generated by lib/unicore/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';
0780 07BF
END
| efortuna/AndroidSDKClone | ndk_experimental/prebuilt/linux-x86_64/lib/perl5/5.16.2/unicore/lib/Blk/Thaana.pl | Perl | apache-2.0 | 433 |
# $Id$
#
#
# This is free software, you may use it and distribute it under the same terms as
# Perl itself.
#
# Copyright 2001-2003 AxKit.com Ltd., 2002-2006 Christian Glahn, 2006-2009 Petr Pajas
#
#
package XML::LibXML;
use strict;
use vars qw($VERSION $ABI_VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS
$skipDTD $skipXMLDeclaration $setTagCompression
$MatchCB $ReadCB $OpenCB $CloseCB %PARSER_FLAGS
$XML_LIBXML_PARSE_DEFAULTS
);
use Carp;
use constant XML_XMLNS_NS => 'http://www.w3.org/2000/xmlns/';
use constant XML_XML_NS => 'http://www.w3.org/XML/1998/namespace';
use XML::LibXML::Error;
use XML::LibXML::NodeList;
use XML::LibXML::XPathContext;
use IO::Handle; # for FH reads called as methods
BEGIN {
$VERSION = "1.98"; # VERSION TEMPLATE: DO NOT CHANGE
$ABI_VERSION = 2;
require Exporter;
require DynaLoader;
@ISA = qw(DynaLoader Exporter);
use vars qw($__PROXY_NODE_REGISTRY $__threads_shared $__PROXY_NODE_REGISTRY_MUTEX $__loaded);
sub VERSION {
my $class = shift;
my ($caller) = caller;
my $req_abi = $ABI_VERSION;
if (UNIVERSAL::can($caller,'REQUIRE_XML_LIBXML_ABI_VERSION')) {
$req_abi = $caller->REQUIRE_XML_LIBXML_ABI_VERSION();
} elsif ($caller eq 'XML::LibXSLT') {
# XML::LibXSLT without REQUIRE_XML_LIBXML_ABI_VERSION is an old and incompatible version
$req_abi = 1;
}
unless ($req_abi == $ABI_VERSION) {
my $ver = @_ ? ' '.$_[0] : '';
die ("This version of $caller requires XML::LibXML$ver (ABI $req_abi), which is incompatible with currently installed XML::LibXML $VERSION (ABI $ABI_VERSION). Please upgrade $caller, XML::LibXML, or both!");
}
return $class->UNIVERSAL::VERSION(@_)
}
#-------------------------------------------------------------------------#
# export information #
#-------------------------------------------------------------------------#
%EXPORT_TAGS = (
all => [qw(
XML_ELEMENT_NODE
XML_ATTRIBUTE_NODE
XML_TEXT_NODE
XML_CDATA_SECTION_NODE
XML_ENTITY_REF_NODE
XML_ENTITY_NODE
XML_PI_NODE
XML_COMMENT_NODE
XML_DOCUMENT_NODE
XML_DOCUMENT_TYPE_NODE
XML_DOCUMENT_FRAG_NODE
XML_NOTATION_NODE
XML_HTML_DOCUMENT_NODE
XML_DTD_NODE
XML_ELEMENT_DECL
XML_ATTRIBUTE_DECL
XML_ENTITY_DECL
XML_NAMESPACE_DECL
XML_XINCLUDE_END
XML_XINCLUDE_START
encodeToUTF8
decodeFromUTF8
XML_XMLNS_NS
XML_XML_NS
)],
libxml => [qw(
XML_ELEMENT_NODE
XML_ATTRIBUTE_NODE
XML_TEXT_NODE
XML_CDATA_SECTION_NODE
XML_ENTITY_REF_NODE
XML_ENTITY_NODE
XML_PI_NODE
XML_COMMENT_NODE
XML_DOCUMENT_NODE
XML_DOCUMENT_TYPE_NODE
XML_DOCUMENT_FRAG_NODE
XML_NOTATION_NODE
XML_HTML_DOCUMENT_NODE
XML_DTD_NODE
XML_ELEMENT_DECL
XML_ATTRIBUTE_DECL
XML_ENTITY_DECL
XML_NAMESPACE_DECL
XML_XINCLUDE_END
XML_XINCLUDE_START
)],
encoding => [qw(
encodeToUTF8
decodeFromUTF8
)],
ns => [qw(
XML_XMLNS_NS
XML_XML_NS
)],
);
@EXPORT_OK = (
@{$EXPORT_TAGS{all}},
);
@EXPORT = (
@{$EXPORT_TAGS{all}},
);
#-------------------------------------------------------------------------#
# initialization of the global variables #
#-------------------------------------------------------------------------#
$skipDTD = 0;
$skipXMLDeclaration = 0;
$setTagCompression = 0;
$MatchCB = undef;
$ReadCB = undef;
$OpenCB = undef;
$CloseCB = undef;
# if ($threads::threads) {
# our $__THREADS_TID = 0;
# eval q{
# use threads::shared;
# our $__PROXY_NODE_REGISTRY_MUTEX :shared = 0;
# };
# die $@ if $@;
# }
#-------------------------------------------------------------------------#
# bootstrapping #
#-------------------------------------------------------------------------#
bootstrap XML::LibXML $VERSION;
undef &AUTOLOAD;
*encodeToUTF8 = \&XML::LibXML::Common::encodeToUTF8;
*decodeFromUTF8 = \&XML::LibXML::Common::decodeFromUTF8;
} # BEGIN
#-------------------------------------------------------------------------#
# libxml2 node names (see also XML::LibXML::Common #
#-------------------------------------------------------------------------#
use constant XML_ELEMENT_NODE => 1;
use constant XML_ATTRIBUTE_NODE => 2;
use constant XML_TEXT_NODE => 3;
use constant XML_CDATA_SECTION_NODE => 4;
use constant XML_ENTITY_REF_NODE => 5;
use constant XML_ENTITY_NODE => 6;
use constant XML_PI_NODE => 7;
use constant XML_COMMENT_NODE => 8;
use constant XML_DOCUMENT_NODE => 9;
use constant XML_DOCUMENT_TYPE_NODE => 10;
use constant XML_DOCUMENT_FRAG_NODE => 11;
use constant XML_NOTATION_NODE => 12;
use constant XML_HTML_DOCUMENT_NODE => 13;
use constant XML_DTD_NODE => 14;
use constant XML_ELEMENT_DECL => 15;
use constant XML_ATTRIBUTE_DECL => 16;
use constant XML_ENTITY_DECL => 17;
use constant XML_NAMESPACE_DECL => 18;
use constant XML_XINCLUDE_START => 19;
use constant XML_XINCLUDE_END => 20;
sub import {
my $package=shift;
if (grep /^:threads_shared$/, @_) {
require threads;
if (!defined($__threads_shared)) {
if (INIT_THREAD_SUPPORT()) {
eval q{
use threads::shared;
share($__PROXY_NODE_REGISTRY_MUTEX);
};
if ($@) { # something went wrong
DISABLE_THREAD_SUPPORT(); # leave the library in a usable state
die $@; # and die
}
$__PROXY_NODE_REGISTRY = XML::LibXML::HashTable->new();
$__threads_shared=1;
} else {
croak("XML::LibXML or Perl compiled without ithread support!");
}
} elsif (!$__threads_shared) {
croak("XML::LibXML already loaded without thread support. Too late to enable thread support!");
}
} elsif (defined $XML::LibXML::__loaded) {
$__threads_shared=0 if not defined $__threads_shared;
}
__PACKAGE__->export_to_level(1,$package,grep !/^:threads(_shared)?$/,@_);
}
sub threads_shared_enabled {
return $__threads_shared ? 1 : 0;
}
# if ($threads::threads) {
# our $__PROXY_NODE_REGISTRY = XML::LibXML::HashTable->new();
# }
#-------------------------------------------------------------------------#
# test exact version (up to patch-level) #
#-------------------------------------------------------------------------#
{
my ($runtime_version) = LIBXML_RUNTIME_VERSION() =~ /^(\d+)/;
if ( $runtime_version < LIBXML_VERSION ) {
warn "Warning: XML::LibXML compiled against libxml2 ".LIBXML_VERSION.
", but runtime libxml2 is older $runtime_version\n";
}
}
#-------------------------------------------------------------------------#
# parser flags #
#-------------------------------------------------------------------------#
# Copied directly from http://xmlsoft.org/html/libxml-parser.html#xmlParserOption
use constant {
XML_PARSE_RECOVER => 1, # recover on errors
XML_PARSE_NOENT => 2, # substitute entities
XML_PARSE_DTDLOAD => 4, # load the external subset
XML_PARSE_DTDATTR => 8, # default DTD attributes
XML_PARSE_DTDVALID => 16, # validate with the DTD
XML_PARSE_NOERROR => 32, # suppress error reports
XML_PARSE_NOWARNING => 64, # suppress warning reports
XML_PARSE_PEDANTIC => 128, # pedantic error reporting
XML_PARSE_NOBLANKS => 256, # remove blank nodes
XML_PARSE_SAX1 => 512, # use the SAX1 interface internally
XML_PARSE_XINCLUDE => 1024, # Implement XInclude substitition
XML_PARSE_NONET => 2048, # Forbid network access
XML_PARSE_NODICT => 4096, # Do not reuse the context dictionnary
XML_PARSE_NSCLEAN => 8192, # remove redundant namespaces declarations
XML_PARSE_NOCDATA => 16384, # merge CDATA as text nodes
XML_PARSE_NOXINCNODE => 32768, # do not generate XINCLUDE START/END nodes
XML_PARSE_COMPACT => 65536, # compact small text nodes; no modification of the tree allowed afterwards
# (will possibly crash if you try to modify the tree)
XML_PARSE_OLD10 => 131072, # parse using XML-1.0 before update 5
XML_PARSE_NOBASEFIX => 262144, # do not fixup XINCLUDE xml#base uris
XML_PARSE_HUGE => 524288, # relax any hardcoded limit from the parser
XML_PARSE_OLDSAX => 1048576, # parse using SAX2 interface from before 2.7.0
};
$XML_LIBXML_PARSE_DEFAULTS = ( XML_PARSE_NODICT | XML_PARSE_HUGE | XML_PARSE_DTDLOAD | XML_PARSE_NOENT );
# this hash is made global so that applications can add names for new
# libxml2 parser flags as temporary workaround
%PARSER_FLAGS = (
recover => XML_PARSE_RECOVER,
expand_entities => XML_PARSE_NOENT,
load_ext_dtd => XML_PARSE_DTDLOAD,
complete_attributes => XML_PARSE_DTDATTR,
validation => XML_PARSE_DTDVALID,
suppress_errors => XML_PARSE_NOERROR,
suppress_warnings => XML_PARSE_NOWARNING,
pedantic_parser => XML_PARSE_PEDANTIC,
no_blanks => XML_PARSE_NOBLANKS,
expand_xinclude => XML_PARSE_XINCLUDE,
xinclude => XML_PARSE_XINCLUDE,
no_network => XML_PARSE_NONET,
clean_namespaces => XML_PARSE_NSCLEAN,
no_cdata => XML_PARSE_NOCDATA,
no_xinclude_nodes => XML_PARSE_NOXINCNODE,
old10 => XML_PARSE_OLD10,
no_base_fix => XML_PARSE_NOBASEFIX,
huge => XML_PARSE_HUGE,
oldsax => XML_PARSE_OLDSAX,
);
my %OUR_FLAGS = (
recover => 'XML_LIBXML_RECOVER',
line_numbers => 'XML_LIBXML_LINENUMBERS',
URI => 'XML_LIBXML_BASE_URI',
base_uri => 'XML_LIBXML_BASE_URI',
gdome => 'XML_LIBXML_GDOME',
ext_ent_handler => 'ext_ent_handler',
);
sub _parser_options {
my ($self, $opts) = @_;
# currently dictionaries break XML::LibXML memory management
my $flags;
if (ref($self)) {
$flags = ($self->{XML_LIBXML_PARSER_OPTIONS}||0);
} else {
$flags = $XML_LIBXML_PARSE_DEFAULTS; # safety precaution
}
my ($key, $value);
while (($key,$value) = each %$opts) {
my $f = $PARSER_FLAGS{ $key };
if (defined $f) {
if ($value) {
$flags |= $f
} else {
$flags &= ~$f;
}
} elsif ($key eq 'set_parser_flags') { # this can be used to pass flags XML::LibXML does not yet know about
$flags |= $value;
} elsif ($key eq 'unset_parser_flags') {
$flags &= ~$value;
}
}
return $flags;
}
my %compatibility_flags = (
XML_LIBXML_VALIDATION => 'validation',
XML_LIBXML_EXPAND_ENTITIES => 'expand_entities',
XML_LIBXML_PEDANTIC => 'pedantic_parser',
XML_LIBXML_NONET => 'no_network',
XML_LIBXML_EXT_DTD => 'load_ext_dtd',
XML_LIBXML_COMPLETE_ATTR => 'complete_attributes',
XML_LIBXML_EXPAND_XINCLUDE => 'expand_xinclude',
XML_LIBXML_NSCLEAN => 'clean_namespaces',
XML_LIBXML_KEEP_BLANKS => 'keep_blanks',
XML_LIBXML_LINENUMBERS => 'line_numbers',
);
#-------------------------------------------------------------------------#
# parser constructor #
#-------------------------------------------------------------------------#
sub new {
my $class = shift;
my $self = bless {
}, $class;
if (@_) {
my %opts = ();
if (ref($_[0]) eq 'HASH') {
%opts = %{$_[0]};
} else {
# old interface
my %args = @_;
%opts=(
map {
(($compatibility_flags{ $_ }||$_) => $args{ $_ })
} keys %args
);
}
# parser flags
$opts{no_blanks} = !$opts{keep_blanks} if exists($opts{keep_blanks}) and !exists($opts{no_blanks});
for (keys %OUR_FLAGS) {
$self->{$OUR_FLAGS{$_}} = delete $opts{$_};
}
$class->load_catalog(delete($opts{catalog})) if $opts{catalog};
$self->{XML_LIBXML_PARSER_OPTIONS} = XML::LibXML->_parser_options(\%opts);
# store remaining unknown options directly in $self
for (keys %opts) {
$self->{$_}=$opts{$_} unless exists $PARSER_FLAGS{$_};
}
} else {
$self->{XML_LIBXML_PARSER_OPTIONS} = $XML_LIBXML_PARSE_DEFAULTS;
}
if ( defined $self->{Handler} ) {
$self->set_handler( $self->{Handler} );
}
$self->{_State_} = 0;
return $self;
}
sub _clone {
my ($self)=@_;
my $new = ref($self)->new({
recover => $self->{XML_LIBXML_RECOVER},
line_nubers => $self->{XML_LIBXML_LINENUMBERS},
base_uri => $self->{XML_LIBXML_BASE_URI},
gdome => $self->{XML_LIBXML_GDOME},
set_parser_flags => $self->{XML_LIBXML_PARSER_OPTIONS},
});
$new->input_callbacks($self->input_callbacks());
return $new;
}
#-------------------------------------------------------------------------#
# Threads support methods #
#-------------------------------------------------------------------------#
# threads doc says CLONE's API may change in future, which would break
# an XS method prototype
sub CLONE {
if ($XML::LibXML::__threads_shared) {
XML::LibXML::_CLONE( $_[0] );
}
}
sub CLONE_SKIP {
return $XML::LibXML::__threads_shared ? 0 : 1;
}
sub __proxy_registry {
my ($class)=caller;
die "This version of $class uses API of XML::LibXML 1.66 which is not compatible with XML::LibXML $VERSION. Please upgrade $class!\n";
}
#-------------------------------------------------------------------------#
# DOM Level 2 document constructor #
#-------------------------------------------------------------------------#
sub createDocument {
my $self = shift;
if (!@_ or $_[0] =~ m/^\d\.\d$/) {
# for backward compatibility
return XML::LibXML::Document->new(@_);
}
else {
# DOM API: createDocument(namespaceURI, qualifiedName, doctype?)
my $doc = XML::LibXML::Document-> new;
my $el = $doc->createElementNS(shift, shift);
$doc->setDocumentElement($el);
$doc->setExternalSubset(shift) if @_;
return $doc;
}
}
#-------------------------------------------------------------------------#
# callback functions #
#-------------------------------------------------------------------------#
sub externalEntityLoader(&)
{
return _externalEntityLoader($_[0]);
}
sub input_callbacks {
my $self = shift;
my $icbclass = shift;
if ( defined $icbclass ) {
$self->{XML_LIBXML_CALLBACK_STACK} = $icbclass;
}
return $self->{XML_LIBXML_CALLBACK_STACK};
}
sub match_callback {
my $self = shift;
if ( ref $self ) {
if ( scalar @_ ) {
$self->{XML_LIBXML_MATCH_CB} = shift;
$self->{XML_LIBXML_CALLBACK_STACK} = undef;
}
return $self->{XML_LIBXML_MATCH_CB};
}
else {
$MatchCB = shift if scalar @_;
return $MatchCB;
}
}
sub read_callback {
my $self = shift;
if ( ref $self ) {
if ( scalar @_ ) {
$self->{XML_LIBXML_READ_CB} = shift;
$self->{XML_LIBXML_CALLBACK_STACK} = undef;
}
return $self->{XML_LIBXML_READ_CB};
}
else {
$ReadCB = shift if scalar @_;
return $ReadCB;
}
}
sub close_callback {
my $self = shift;
if ( ref $self ) {
if ( scalar @_ ) {
$self->{XML_LIBXML_CLOSE_CB} = shift;
$self->{XML_LIBXML_CALLBACK_STACK} = undef;
}
return $self->{XML_LIBXML_CLOSE_CB};
}
else {
$CloseCB = shift if scalar @_;
return $CloseCB;
}
}
sub open_callback {
my $self = shift;
if ( ref $self ) {
if ( scalar @_ ) {
$self->{XML_LIBXML_OPEN_CB} = shift;
$self->{XML_LIBXML_CALLBACK_STACK} = undef;
}
return $self->{XML_LIBXML_OPEN_CB};
}
else {
$OpenCB = shift if scalar @_;
return $OpenCB;
}
}
sub callbacks {
my $self = shift;
if ( ref $self ) {
if (@_) {
my ($match, $open, $read, $close) = @_;
@{$self}{qw(XML_LIBXML_MATCH_CB XML_LIBXML_OPEN_CB XML_LIBXML_READ_CB XML_LIBXML_CLOSE_CB)} = ($match, $open, $read, $close);
$self->{XML_LIBXML_CALLBACK_STACK} = undef;
}
else {
return @{$self}{qw(XML_LIBXML_MATCH_CB XML_LIBXML_OPEN_CB XML_LIBXML_READ_CB XML_LIBXML_CLOSE_CB)};
}
}
else {
if (@_) {
( $MatchCB, $OpenCB, $ReadCB, $CloseCB ) = @_;
}
else {
return ( $MatchCB, $OpenCB, $ReadCB, $CloseCB );
}
}
}
#-------------------------------------------------------------------------#
# internal member variable manipulation #
#-------------------------------------------------------------------------#
sub __parser_option {
my ($self, $opt) = @_;
if (@_>2) {
if ($_[2]) {
$self->{XML_LIBXML_PARSER_OPTIONS} |= $opt;
return 1;
} else {
$self->{XML_LIBXML_PARSER_OPTIONS} &= ~$opt;
return 0;
}
} else {
return ($self->{XML_LIBXML_PARSER_OPTIONS} & $opt) ? 1 : 0;
}
}
sub option_exists {
my ($self,$name)=@_;
return ($PARSER_FLAGS{$name} || $OUR_FLAGS{$name}) ? 1 : 0;
}
sub get_option {
my ($self,$name)=@_;
my $flag = $OUR_FLAGS{$name};
return $self->{$flag} if $flag;
$flag = $PARSER_FLAGS{$name};
return $self->__parser_option($flag) if $flag;
warn "XML::LibXML::get_option: unknown parser option $name\n";
return undef;
}
sub set_option {
my ($self,$name,$value)=@_;
my $flag = $OUR_FLAGS{$name};
return ($self->{$flag}=$value) if $flag;
$flag = $PARSER_FLAGS{$name};
return $self->__parser_option($flag,$value) if $flag;
warn "XML::LibXML::get_option: unknown parser option $name\n";
return undef;
}
sub set_options {
my $self=shift;
my $opts;
if (@_==1 and ref($_[0]) eq 'HASH') {
$opts = $_[0];
} elsif (@_ % 2 == 0) {
$opts={@_};
} else {
croak("Odd number of elements passed to set_options");
}
$self->set_option($_=>$opts->{$_}) foreach keys %$opts;
return;
}
sub validation {
my $self = shift;
return $self->__parser_option(XML_PARSE_DTDVALID,@_);
}
sub recover {
my $self = shift;
if (scalar @_) {
$self->{XML_LIBXML_RECOVER} = $_[0];
$self->__parser_option(XML_PARSE_RECOVER,@_);
}
return $self->{XML_LIBXML_RECOVER};
}
sub recover_silently {
my $self = shift;
my $arg = shift;
(($arg == 1) ? $self->recover(2) : $self->recover($arg)) if defined($arg);
return (($self->recover()||0) == 2) ? 1 : 0;
}
sub expand_entities {
my $self = shift;
if (scalar(@_) and $_[0]) {
return $self->__parser_option(XML_PARSE_NOENT | XML_PARSE_DTDLOAD,1);
}
return $self->__parser_option(XML_PARSE_NOENT,@_);
}
sub keep_blanks {
my $self = shift;
my @args; # we have to negate the argument and return negated value, since
# the actual flag is no_blanks
if (scalar @_) {
@args=($_[0] ? 0 : 1);
}
return $self->__parser_option(XML_PARSE_NOBLANKS,@args) ? 0 : 1;
}
sub pedantic_parser {
my $self = shift;
return $self->__parser_option(XML_PARSE_PEDANTIC,@_);
}
sub line_numbers {
my $self = shift;
$self->{XML_LIBXML_LINENUMBERS} = shift if scalar @_;
return $self->{XML_LIBXML_LINENUMBERS};
}
sub no_network {
my $self = shift;
return $self->__parser_option(XML_PARSE_NONET,@_);
}
sub load_ext_dtd {
my $self = shift;
return $self->__parser_option(XML_PARSE_DTDLOAD,@_);
}
sub complete_attributes {
my $self = shift;
return $self->__parser_option(XML_PARSE_DTDATTR,@_);
}
sub expand_xinclude {
my $self = shift;
return $self->__parser_option(XML_PARSE_XINCLUDE,@_);
}
sub base_uri {
my $self = shift;
$self->{XML_LIBXML_BASE_URI} = shift if scalar @_;
return $self->{XML_LIBXML_BASE_URI};
}
sub gdome_dom {
my $self = shift;
$self->{XML_LIBXML_GDOME} = shift if scalar @_;
return $self->{XML_LIBXML_GDOME};
}
sub clean_namespaces {
my $self = shift;
return $self->__parser_option(XML_PARSE_NSCLEAN,@_);
}
#-------------------------------------------------------------------------#
# set the optional SAX(2) handler #
#-------------------------------------------------------------------------#
sub set_handler {
my $self = shift;
if ( defined $_[0] ) {
$self->{HANDLER} = $_[0];
$self->{SAX_ELSTACK} = [];
$self->{SAX} = {State => 0};
}
else {
# undef SAX handling
$self->{SAX_ELSTACK} = [];
delete $self->{HANDLER};
delete $self->{SAX};
}
}
#-------------------------------------------------------------------------#
# helper functions #
#-------------------------------------------------------------------------#
sub _auto_expand {
my ( $self, $result, $uri ) = @_;
$result->setBaseURI( $uri ) if defined $uri;
if ( $self->expand_xinclude ) {
$self->{_State_} = 1;
eval { $self->processXIncludes($result); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
$self->_cleanup_callbacks();
$result = undef;
croak $err;
}
}
return $result;
}
sub _init_callbacks {
my $self = shift;
my $icb = $self->{XML_LIBXML_CALLBACK_STACK};
unless ( defined $icb ) {
$self->{XML_LIBXML_CALLBACK_STACK} = XML::LibXML::InputCallback->new();
$icb = $self->{XML_LIBXML_CALLBACK_STACK};
}
$icb->init_callbacks($self);
}
sub _cleanup_callbacks {
my $self = shift;
$self->{XML_LIBXML_CALLBACK_STACK}->cleanup_callbacks();
}
sub __read {
read($_[0], $_[1], $_[2]);
}
sub __write {
if ( ref( $_[0] ) ) {
$_[0]->write( $_[1], $_[2] );
}
else {
$_[0]->write( $_[1] );
}
}
sub load_xml {
my $class_or_self = shift;
my %args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my $URI = delete($args{URI});
$URI = "$URI" if defined $URI; # stringify in case it is an URI object
my $parser;
if (ref($class_or_self)) {
$parser = $class_or_self->_clone();
$parser->{XML_LIBXML_PARSER_OPTIONS} = $parser->_parser_options(\%args);
} else {
$parser = $class_or_self->new(\%args);
}
my $dom;
if ( defined $args{location} ) {
$dom = $parser->parse_file( "$args{location}" );
}
elsif ( defined $args{string} ) {
$dom = $parser->parse_string( $args{string}, $URI );
}
elsif ( defined $args{IO} ) {
$dom = $parser->parse_fh( $args{IO}, $URI );
}
else {
croak("XML::LibXML->load: specify location, string, or IO");
}
return $dom;
}
sub load_html {
my ($class_or_self) = shift;
my %args = map { ref($_) eq 'HASH' ? (%$_) : $_ } @_;
my $URI = delete($args{URI});
$URI = "$URI" if defined $URI; # stringify in case it is an URI object
my $parser;
if (ref($class_or_self)) {
$parser = $class_or_self->_clone();
} else {
$parser = $class_or_self->new();
}
my $dom;
if ( defined $args{location} ) {
$dom = $parser->parse_html_file( "$args{location}", \%args );
}
elsif ( defined $args{string} ) {
$dom = $parser->parse_html_string( $args{string}, \%args );
}
elsif ( defined $args{IO} ) {
$dom = $parser->parse_html_fh( $args{IO}, \%args );
}
else {
croak("XML::LibXML->load: specify location, string, or IO");
}
return $dom;
}
#-------------------------------------------------------------------------#
# parsing functions #
#-------------------------------------------------------------------------#
# all parsing functions handle normal as SAX parsing at the same time.
# note that SAX parsing is handled incomplete! use XML::LibXML::SAX for
# complete parsing sequences
#-------------------------------------------------------------------------#
sub parse_string {
my $self = shift;
croak("parse_string is not a class method! Create a parser object with XML::LibXML->new first!") unless ref $self;
croak("parse already in progress") if $self->{_State_};
unless ( defined $_[0] and length $_[0] ) {
croak("Empty String");
}
$self->{_State_} = 1;
my $result;
$self->_init_callbacks();
if ( defined $self->{SAX} ) {
my $string = shift;
$self->{SAX_ELSTACK} = [];
eval { $result = $self->_parse_sax_string($string); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
}
else {
eval { $result = $self->_parse_string( @_ ); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
$result = $self->_auto_expand( $result, $self->{XML_LIBXML_BASE_URI} );
}
$self->_cleanup_callbacks();
return $result;
}
sub parse_fh {
my $self = shift;
croak("parse_fh is not a class method! Create a parser object with XML::LibXML->new first!") unless ref $self;
croak("parse already in progress") if $self->{_State_};
$self->{_State_} = 1;
my $result;
$self->_init_callbacks();
if ( defined $self->{SAX} ) {
$self->{SAX_ELSTACK} = [];
eval { $self->_parse_sax_fh( @_ ); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
}
else {
eval { $result = $self->_parse_fh( @_ ); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
$result = $self->_auto_expand( $result, $self->{XML_LIBXML_BASE_URI} );
}
$self->_cleanup_callbacks();
return $result;
}
sub parse_file {
my $self = shift;
croak("parse_file is not a class method! Create a parser object with XML::LibXML->new first!") unless ref $self;
croak("parse already in progress") if $self->{_State_};
$self->{_State_} = 1;
my $result;
$self->_init_callbacks();
if ( defined $self->{SAX} ) {
$self->{SAX_ELSTACK} = [];
eval { $self->_parse_sax_file( @_ ); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
}
else {
eval { $result = $self->_parse_file(@_); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
$result = $self->_auto_expand( $result );
}
$self->_cleanup_callbacks();
return $result;
}
sub parse_xml_chunk {
my $self = shift;
# max 2 parameter:
# 1: the chunk
# 2: the encoding of the string
croak("parse_xml_chunk is not a class method! Create a parser object with XML::LibXML->new first!") unless ref $self;
croak("parse already in progress") if $self->{_State_}; my $result;
unless ( defined $_[0] and length $_[0] ) {
croak("Empty String");
}
$self->{_State_} = 1;
$self->_init_callbacks();
if ( defined $self->{SAX} ) {
eval {
$self->_parse_sax_xml_chunk( @_ );
# this is required for XML::GenericChunk.
# in normal case is_filter is not defined, an thus the parsing
# will be terminated. in case of a SAX filter the parsing is not
# finished at that state. therefore we must not reset the parsing
unless ( $self->{IS_FILTER} ) {
$result = $self->{HANDLER}->end_document();
}
};
}
else {
eval { $result = $self->_parse_xml_chunk( @_ ); };
}
$self->_cleanup_callbacks();
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
croak $err;
}
return $result;
}
sub parse_balanced_chunk {
my $self = shift;
$self->_init_callbacks();
my $rv;
eval {
$rv = $self->parse_xml_chunk( @_ );
};
my $err = $@;
$self->_cleanup_callbacks();
if ( $err ) {
chomp $err unless ref $err;
croak $err;
}
return $rv
}
# java style
sub processXIncludes {
my $self = shift;
my $doc = shift;
my $opts = shift;
my $options = $self->_parser_options($opts);
if ( $self->{_State_} != 1 ) {
$self->_init_callbacks();
}
my $rv;
eval {
$rv = $self->_processXIncludes($doc || " ", $options);
};
my $err = $@;
if ( $self->{_State_} != 1 ) {
$self->_cleanup_callbacks();
}
if ( $err ) {
chomp $err unless ref $err;
croak $err;
}
return $rv;
}
# perl style
sub process_xincludes {
my $self = shift;
my $doc = shift;
my $opts = shift;
my $options = $self->_parser_options($opts);
my $rv;
$self->_init_callbacks();
eval {
$rv = $self->_processXIncludes($doc || " ", $options);
};
my $err = $@;
$self->_cleanup_callbacks();
if ( $err ) {
chomp $err unless ref $err;
croak $@;
}
return $rv;
}
#-------------------------------------------------------------------------#
# HTML parsing functions #
#-------------------------------------------------------------------------#
sub _html_options {
my ($self,$opts)=@_;
$opts = {} unless ref $opts;
# return (undef,undef) unless ref $opts;
my $flags = 0;
$flags |= 1 if exists $opts->{recover} ? $opts->{recover} : $self->recover;
$flags |= 4 if $opts->{no_defdtd}; # default is ON: injects DTD as needed
$flags |= 32 if exists $opts->{suppress_errors} ? $opts->{suppress_errors} : $self->get_option('suppress_errors');
# This is to fix https://rt.cpan.org/Ticket/Display.html?id=58024 :
# <quote>
# In XML::LibXML, warnings are not suppressed when specifying the recover
# or recover_silently flags as per the following excerpt from the manpage:
# </quote>
if ($self->recover_silently)
{
$flags |= 32;
}
$flags |= 64 if $opts->{suppress_warnings};
$flags |= 128 if exists $opts->{pedantic_parser} ? $opts->{pedantic_parser} : $self->pedantic_parser;
$flags |= 256 if exists $opts->{no_blanks} ? $opts->{no_blanks} : !$self->keep_blanks;
$flags |= 2048 if exists $opts->{no_network} ? $opts->{no_network} : !$self->no_network;
$flags |= 16384 if $opts->{no_cdata};
$flags |= 65536 if $opts->{compact}; # compact small text nodes; no modification
# of the tree allowed afterwards
# (WILL possibly CRASH IF YOU try to MODIFY THE TREE)
$flags |= 524288 if $opts->{huge}; # relax any hardcoded limit from the parser
$flags |= 1048576 if $opts->{oldsax}; # parse using SAX2 interface from before 2.7.0
return ($opts->{URI},$opts->{encoding},$flags);
}
sub parse_html_string {
my ($self,$str,$opts) = @_;
croak("parse_html_string is not a class method! Create a parser object with XML::LibXML->new first!") unless ref $self;
croak("parse already in progress") if $self->{_State_};
unless ( defined $str and length $str ) {
croak("Empty String");
}
$self->{_State_} = 1;
my $result;
$self->_init_callbacks();
eval {
$result = $self->_parse_html_string( $str,
$self->_html_options($opts)
);
};
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
$self->_cleanup_callbacks();
return $result;
}
sub parse_html_file {
my ($self,$file,$opts) = @_;
croak("parse_html_file is not a class method! Create a parser object with XML::LibXML->new first!") unless ref $self;
croak("parse already in progress") if $self->{_State_};
$self->{_State_} = 1;
my $result;
$self->_init_callbacks();
eval { $result = $self->_parse_html_file($file,
$self->_html_options($opts)
); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
$self->_cleanup_callbacks();
return $result;
}
sub parse_html_fh {
my ($self,$fh,$opts) = @_;
croak("parse_html_fh is not a class method! Create a parser object with XML::LibXML->new first!") unless ref $self;
croak("parse already in progress") if $self->{_State_};
$self->{_State_} = 1;
my $result;
$self->_init_callbacks();
eval { $result = $self->_parse_html_fh( $fh,
$self->_html_options($opts)
); };
my $err = $@;
$self->{_State_} = 0;
if ($err) {
chomp $err unless ref $err;
$self->_cleanup_callbacks();
croak $err;
}
$self->_cleanup_callbacks();
return $result;
}
#-------------------------------------------------------------------------#
# push parser interface #
#-------------------------------------------------------------------------#
sub init_push {
my $self = shift;
if ( defined $self->{CONTEXT} ) {
delete $self->{CONTEXT};
}
if ( defined $self->{SAX} ) {
$self->{CONTEXT} = $self->_start_push(1);
}
else {
$self->{CONTEXT} = $self->_start_push(0);
}
}
sub push {
my $self = shift;
$self->_init_callbacks();
if ( not defined $self->{CONTEXT} ) {
$self->init_push();
}
eval {
foreach ( @_ ) {
$self->_push( $self->{CONTEXT}, $_ );
}
};
my $err = $@;
$self->_cleanup_callbacks();
if ( $err ) {
chomp $err unless ref $err;
croak $err;
}
}
# this function should be promoted!
# the reason is because libxml2 uses xmlParseChunk() for this purpose!
sub parse_chunk {
my $self = shift;
my $chunk = shift;
my $terminate = shift;
if ( not defined $self->{CONTEXT} ) {
$self->init_push();
}
if ( defined $chunk and length $chunk ) {
$self->_push( $self->{CONTEXT}, $chunk );
}
if ( $terminate ) {
return $self->finish_push();
}
}
sub finish_push {
my $self = shift;
my $restore = shift || 0;
return undef unless defined $self->{CONTEXT};
my $retval;
if ( defined $self->{SAX} ) {
eval {
$self->_end_sax_push( $self->{CONTEXT} );
$retval = $self->{HANDLER}->end_document( {} );
};
}
else {
eval { $retval = $self->_end_push( $self->{CONTEXT}, $restore ); };
}
my $err = $@;
delete $self->{CONTEXT};
if ( $err ) {
chomp $err unless ref $err;
croak( $err );
}
return $retval;
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Node Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::Node;
sub CLONE_SKIP {
return $XML::LibXML::__threads_shared ? 0 : 1;
}
sub isSupported {
my $self = shift;
my $feature = shift;
return $self->can($feature) ? 1 : 0;
}
sub getChildNodes { my $self = shift; return $self->childNodes(); }
sub childNodes {
my $self = shift;
my @children = $self->_childNodes(0);
return wantarray ? @children : XML::LibXML::NodeList->new_from_ref(\@children , 1);
}
sub nonBlankChildNodes {
my $self = shift;
my @children = $self->_childNodes(1);
return wantarray ? @children : XML::LibXML::NodeList->new_from_ref(\@children , 1);
}
sub attributes {
my $self = shift;
my @attr = $self->_attributes();
return wantarray ? @attr : XML::LibXML::NamedNodeMap->new( @attr );
}
sub findnodes {
my ($node, $xpath) = @_;
my @nodes = $node->_findnodes($xpath);
if (wantarray) {
return @nodes;
}
else {
return XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
}
}
sub exists {
my ($node, $xpath) = @_;
my (undef, $value) = $node->_find($xpath,1);
return $value;
}
sub findvalue {
my ($node, $xpath) = @_;
my $res;
$res = $node->find($xpath);
return $res->to_literal->value;
}
sub findbool {
my ($node, $xpath) = @_;
my ($type, @params) = $node->_find($xpath,1);
if ($type) {
return $type->new(@params);
}
return undef;
}
sub find {
my ($node, $xpath) = @_;
my ($type, @params) = $node->_find($xpath,0);
if ($type) {
return $type->new(@params);
}
return undef;
}
sub setOwnerDocument {
my ( $self, $doc ) = @_;
$doc->adoptNode( $self );
}
sub toStringC14N {
my ($self, $comments, $xpath, $xpc) = @_;
return $self->_toStringC14N( $comments || 0,
(defined $xpath ? $xpath : undef),
0,
undef,
(defined $xpc ? $xpc : undef)
);
}
sub toStringEC14N {
my ($self, $comments, $xpath, $xpc, $inc_prefix_list) = @_;
unless (UNIVERSAL::isa($xpc,'XML::LibXML::XPathContext')) {
if ($inc_prefix_list) {
croak("toStringEC14N: 3rd argument is not an XML::LibXML::XPathContext");
} else {
$inc_prefix_list=$xpc;
$xpc=undef;
}
}
if (defined($inc_prefix_list) and !UNIVERSAL::isa($inc_prefix_list,'ARRAY')) {
croak("toStringEC14N: inclusive_prefix_list must be undefined or ARRAY");
}
return $self->_toStringC14N( $comments || 0,
(defined $xpath ? $xpath : undef),
1,
(defined $inc_prefix_list ? $inc_prefix_list : undef),
(defined $xpc ? $xpc : undef)
);
}
*serialize_c14n = \&toStringC14N;
*serialize_exc_c14n = \&toStringEC14N;
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Document Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::Document;
use vars qw(@ISA);
@ISA = ('XML::LibXML::Node');
sub actualEncoding {
my $doc = shift;
my $enc = $doc->encoding;
return (defined $enc and length $enc) ? $enc : 'UTF-8';
}
sub setDocumentElement {
my $doc = shift;
my $element = shift;
my $oldelem = $doc->documentElement;
if ( defined $oldelem ) {
$doc->removeChild($oldelem);
}
$doc->_setDocumentElement($element);
}
sub toString {
my $self = shift;
my $flag = shift;
my $retval = "";
if ( defined $XML::LibXML::skipXMLDeclaration
and $XML::LibXML::skipXMLDeclaration == 1 ) {
foreach ( $self->childNodes ){
next if $_->nodeType == XML::LibXML::XML_DTD_NODE()
and $XML::LibXML::skipDTD;
$retval .= $_->toString;
}
}
else {
$flag ||= 0 unless defined $flag;
$retval = $self->_toString($flag);
}
return $retval;
}
sub serialize {
my $self = shift;
return $self->toString( @_ );
}
#-------------------------------------------------------------------------#
# bad style xinclude processing #
#-------------------------------------------------------------------------#
sub process_xinclude {
my $self = shift;
my $opts = shift;
XML::LibXML->new->processXIncludes( $self, $opts );
}
sub insertProcessingInstruction {
my $self = shift;
my $target = shift;
my $data = shift;
my $pi = $self->createPI( $target, $data );
my $root = $self->documentElement;
if ( defined $root ) {
# this is actually not correct, but i guess it's what the user
# intends
$self->insertBefore( $pi, $root );
}
else {
# if no documentElement was found we just append the PI
$self->appendChild( $pi );
}
}
sub insertPI {
my $self = shift;
$self->insertProcessingInstruction( @_ );
}
#-------------------------------------------------------------------------#
# DOM L3 Document functions.
# added after robins implicit feature requst
#-------------------------------------------------------------------------#
*getElementsByTagName = \&XML::LibXML::Element::getElementsByTagName;
*getElementsByTagNameNS = \&XML::LibXML::Element::getElementsByTagNameNS;
*getElementsByLocalName = \&XML::LibXML::Element::getElementsByLocalName;
1;
#-------------------------------------------------------------------------#
# XML::LibXML::DocumentFragment Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::DocumentFragment;
use vars qw(@ISA);
@ISA = ('XML::LibXML::Node');
sub toString {
my $self = shift;
my $retval = "";
if ( $self->hasChildNodes() ) {
foreach my $n ( $self->childNodes() ) {
$retval .= $n->toString(@_);
}
}
return $retval;
}
*serialize = \&toString;
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Element Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::Element;
use vars qw(@ISA);
@ISA = ('XML::LibXML::Node');
use XML::LibXML qw(:ns :libxml);
use XML::LibXML::AttributeHash;
use Carp;
use Scalar::Util qw(blessed);
use overload
'%{}' => 'getAttributeHash',
'bool' => sub { 1 },
'eq' => '_isSameNodeLax', '==' => '_isSameNodeLax',
'ne' => '_isNotSameNodeLax', '!=' => '_isNotSameNodeLax',
;
sub _isNotSameNodeLax {
my ($self, $other) = @_;
return ((not $self->_isSameNodeLax($other)) ? 1 : '');
}
sub _isSameNodeLax {
my ($self, $other) = @_;
if (blessed($other) and $other->isa('XML::LibXML::Element'))
{
return ($self->isSameNode($other) ? 1 : '');
}
else
{
return '';
}
}
{
# Note that we could generate a new hashref each time this
# is called. However, that breaks "each %$element" and
# "keys %$element". So instead we consistently return the
# same reference to the same (tied) hash. To do that, we
# need to use a fieldhash. Hash::FieldHash requires at least
# Perl 5.8, but XML-LibXML already dropped support for older
# Perls since XML-LibXML-1.77.
#
# If Hash::FieldHash isn't available we can sort of do the
# same thing by relying upon the stringification of non-scalar
# hash keys, and performing a bit of cleanup in DESTROY.
#
my %tiecache;
BEGIN
{
if (eval { require Hash::FieldHash; 1 })
{
Hash::FieldHash::fieldhashes(\%tiecache);
*__destroy_tiecache = sub {};
}
else
{
*__destroy_tiecache = sub { delete $tiecache{ $_[0] } };
}
};
sub getAttributeHash
{
my $self = shift;
if (!exists $tiecache{ $self }) {
tie my %attr, 'XML::LibXML::AttributeHash', $self, weaken => 1;
$tiecache{ $self } = \%attr;
}
return $tiecache{ $self };
}
sub DESTROY
{
my ($self) = @_;
$self->__destroy_tiecache;
$self->SUPER::DESTROY;
}
}
sub setNamespace {
my $self = shift;
my $n = $self->nodeName;
if ( $self->_setNamespace(@_) ){
if ( scalar @_ < 3 || $_[2] == 1 ){
$self->setNodeName( $n );
}
return 1;
}
return 0;
}
sub getAttribute {
my $self = shift;
my $name = $_[0];
if ( $name =~ /^xmlns(?::|$)/ ) {
# user wants to get a namespace ...
(my $prefix = $name )=~s/^xmlns:?//;
$self->_getNamespaceDeclURI($prefix);
}
else {
$self->_getAttribute(@_);
}
}
sub setAttribute {
my ( $self, $name, $value ) = @_;
if ( $name =~ /^xmlns(?::|$)/ ) {
# user wants to set the special attribute for declaring XML namespace ...
# this is fine but not exactly DOM conformant behavior, btw (according to DOM we should
# probably declare an attribute which looks like XML namespace declaration
# but isn't)
(my $nsprefix = $name )=~s/^xmlns:?//;
my $nn = $self->nodeName;
if ( $nn =~ /^\Q${nsprefix}\E:/ ) {
# the element has the same prefix
$self->setNamespaceDeclURI($nsprefix,$value) ||
$self->setNamespace($value,$nsprefix,1);
##
## We set the namespace here.
## This is helpful, as in:
##
## | $e = XML::LibXML::Element->new('foo:bar');
## | $e->setAttribute('xmlns:foo','http://yoyodine')
##
}
else {
# just modify the namespace
$self->setNamespaceDeclURI($nsprefix, $value) ||
$self->setNamespace($value,$nsprefix,0);
}
}
else {
$self->_setAttribute($name, $value);
}
}
sub getAttributeNS {
my $self = shift;
my ($nsURI, $name) = @_;
croak("invalid attribute name") if !defined($name) or $name eq q{};
if ( defined($nsURI) and $nsURI eq XML_XMLNS_NS ) {
$self->_getNamespaceDeclURI($name eq 'xmlns' ? undef : $name);
}
else {
$self->_getAttributeNS(@_);
}
}
sub setAttributeNS {
my ($self, $nsURI, $qname, $value)=@_;
unless (defined $qname and length $qname) {
croak("bad name");
}
if (defined($nsURI) and $nsURI eq XML_XMLNS_NS) {
if ($qname !~ /^xmlns(?::|$)/) {
croak("NAMESPACE ERROR: Namespace declarations must have the prefix 'xmlns'");
}
$self->setAttribute($qname,$value); # see implementation above
return;
}
if ($qname=~/:/ and not (defined($nsURI) and length($nsURI))) {
croak("NAMESPACE ERROR: Attribute without a prefix cannot be in a namespace");
}
if ($qname=~/^xmlns(?:$|:)/) {
croak("NAMESPACE ERROR: 'xmlns' prefix and qualified-name are reserved for the namespace ".XML_XMLNS_NS);
}
if ($qname=~/^xml:/ and not (defined $nsURI and $nsURI eq XML_XML_NS)) {
croak("NAMESPACE ERROR: 'xml' prefix is reserved for the namespace ".XML_XML_NS);
}
$self->_setAttributeNS( defined $nsURI ? $nsURI : undef, $qname, $value );
}
sub getElementsByTagName {
my ( $node , $name ) = @_;
my $xpath = $name eq '*' ? "descendant::*" : "descendant::*[name()='$name']";
my @nodes = $node->_findnodes($xpath);
return wantarray ? @nodes : XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
}
sub getElementsByTagNameNS {
my ( $node, $nsURI, $name ) = @_;
my $xpath;
if ( $name eq '*' ) {
if ( $nsURI eq '*' ) {
$xpath = "descendant::*";
} else {
$xpath = "descendant::*[namespace-uri()='$nsURI']";
}
} elsif ( $nsURI eq '*' ) {
$xpath = "descendant::*[local-name()='$name']";
} else {
$xpath = "descendant::*[local-name()='$name' and namespace-uri()='$nsURI']";
}
my @nodes = $node->_findnodes($xpath);
return wantarray ? @nodes : XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
}
sub getElementsByLocalName {
my ( $node,$name ) = @_;
my $xpath;
if ($name eq '*') {
$xpath = "descendant::*";
} else {
$xpath = "descendant::*[local-name()='$name']";
}
my @nodes = $node->_findnodes($xpath);
return wantarray ? @nodes : XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
}
sub getChildrenByTagName {
my ( $node, $name ) = @_;
my @nodes;
if ($name eq '*') {
@nodes = grep { $_->nodeType == XML_ELEMENT_NODE() }
$node->childNodes();
} else {
@nodes = grep { $_->nodeName eq $name } $node->childNodes();
}
return wantarray ? @nodes : XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
}
sub getChildrenByLocalName {
my ( $node, $name ) = @_;
# my @nodes;
# if ($name eq '*') {
# @nodes = grep { $_->nodeType == XML_ELEMENT_NODE() }
# $node->childNodes();
# } else {
# @nodes = grep { $_->nodeType == XML_ELEMENT_NODE() and
# $_->localName eq $name } $node->childNodes();
# }
# return wantarray ? @nodes : XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
my @nodes = $node->_getChildrenByTagNameNS('*',$name);
return wantarray ? @nodes : XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
}
sub getChildrenByTagNameNS {
my ( $node, $nsURI, $name ) = @_;
my @nodes = $node->_getChildrenByTagNameNS($nsURI,$name);
return wantarray ? @nodes : XML::LibXML::NodeList->new_from_ref(\@nodes, 1);
}
sub appendWellBalancedChunk {
my ( $self, $chunk ) = @_;
my $local_parser = XML::LibXML->new();
my $frag = $local_parser->parse_xml_chunk( $chunk );
$self->appendChild( $frag );
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Text Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::Text;
use vars qw(@ISA);
@ISA = ('XML::LibXML::Node');
sub attributes { return undef; }
sub deleteDataString {
my ($node, $string, $all) = @_;
return $node->replaceDataString($string, '', $all);
}
sub replaceDataString {
my ( $node, $left_proto, $right,$all ) = @_;
# Assure we exchange the strings and not expressions!
my $left = quotemeta($left_proto);
my $datastr = $node->nodeValue();
if ( $all ) {
$datastr =~ s/$left/$right/g;
}
else{
$datastr =~ s/$left/$right/;
}
$node->setData( $datastr );
}
sub replaceDataRegEx {
my ( $node, $leftre, $rightre, $flags ) = @_;
return unless defined $leftre;
$rightre ||= "";
my $datastr = $node->nodeValue();
my $restr = "s/" . $leftre . "/" . $rightre . "/";
$restr .= $flags if defined $flags;
eval '$datastr =~ '. $restr;
$node->setData( $datastr );
}
1;
package XML::LibXML::Comment;
use vars qw(@ISA);
@ISA = ('XML::LibXML::Text');
1;
package XML::LibXML::CDATASection;
use vars qw(@ISA);
@ISA = ('XML::LibXML::Text');
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Attribute Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::Attr;
use vars qw( @ISA ) ;
@ISA = ('XML::LibXML::Node') ;
sub setNamespace {
my ($self,$href,$prefix) = @_;
my $n = $self->nodeName;
if ( $self->_setNamespace($href,$prefix) ) {
$self->setNodeName($n);
return 1;
}
return 0;
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Dtd Interface #
#-------------------------------------------------------------------------#
# this is still under construction
#
package XML::LibXML::Dtd;
use vars qw( @ISA );
@ISA = ('XML::LibXML::Node');
# at least DESTROY and CLONE_SKIP must be inherited
1;
#-------------------------------------------------------------------------#
# XML::LibXML::PI Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::PI;
use vars qw( @ISA );
@ISA = ('XML::LibXML::Node');
sub setData {
my $pi = shift;
my $string = "";
if ( scalar @_ == 1 ) {
$string = shift;
}
else {
my %h = @_;
$string = join " ", map {$_.'="'.$h{$_}.'"'} keys %h;
}
# the spec says any char but "?>" [17]
$pi->_setData( $string ) unless $string =~ /\?>/;
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Namespace Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::Namespace;
sub CLONE_SKIP { 1 }
# this is infact not a node!
sub prefix { return "xmlns"; }
sub getPrefix { return "xmlns"; }
sub getNamespaceURI { return "http://www.w3.org/2000/xmlns/" };
sub getNamespaces { return (); }
sub nodeName {
my $self = shift;
my $nsP = $self->localname;
return ( defined($nsP) && length($nsP) ) ? "xmlns:$nsP" : "xmlns";
}
sub name { goto &nodeName }
sub getName { goto &nodeName }
sub isEqualNode {
my ( $self, $ref ) = @_;
if ( ref($ref) eq "XML::LibXML::Namespace" ) {
return $self->_isEqual($ref);
}
return 0;
}
sub isSameNode {
my ( $self, $ref ) = @_;
if ( $$self == $$ref ){
return 1;
}
return 0;
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::NamedNodeMap Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::NamedNodeMap;
use XML::LibXML qw(:libxml);
sub CLONE_SKIP {
return $XML::LibXML::__threads_shared ? 0 : 1;
}
sub new {
my $class = shift;
my $self = bless { Nodes => [@_] }, $class;
$self->{NodeMap} = { map { $_->nodeName => $_ } @_ };
return $self;
}
sub length { return scalar( @{$_[0]->{Nodes}} ); }
sub nodes { return $_[0]->{Nodes}; }
sub item { $_[0]->{Nodes}->[$_[1]]; }
sub getNamedItem {
my $self = shift;
my $name = shift;
return $self->{NodeMap}->{$name};
}
sub setNamedItem {
my $self = shift;
my $node = shift;
my $retval;
if ( defined $node ) {
if ( scalar @{$self->{Nodes}} ) {
my $name = $node->nodeName();
if ( $node->nodeType() == XML_NAMESPACE_DECL ) {
return;
}
if ( defined $self->{NodeMap}->{$name} ) {
if ( $node->isSameNode( $self->{NodeMap}->{$name} ) ) {
return;
}
$retval = $self->{NodeMap}->{$name}->replaceNode( $node );
}
else {
$self->{Nodes}->[0]->addSibling($node);
}
$self->{NodeMap}->{$name} = $node;
push @{$self->{Nodes}}, $node;
}
else {
# not done yet
# can this be properly be done???
warn "not done yet\n";
}
}
return $retval;
}
sub removeNamedItem {
my $self = shift;
my $name = shift;
my $retval;
if ( $name =~ /^xmlns/ ) {
warn "not done yet\n";
}
elsif ( exists $self->{NodeMap}->{$name} ) {
$retval = $self->{NodeMap}->{$name};
$retval->unbindNode;
delete $self->{NodeMap}->{$name};
$self->{Nodes} = [grep {not($retval->isSameNode($_))} @{$self->{Nodes}}];
}
return $retval;
}
sub getNamedItemNS {
my $self = shift;
my $nsURI = shift;
my $name = shift;
return undef;
}
sub setNamedItemNS {
my $self = shift;
my $nsURI = shift;
my $node = shift;
return undef;
}
sub removeNamedItemNS {
my $self = shift;
my $nsURI = shift;
my $name = shift;
return undef;
}
1;
package XML::LibXML::_SAXParser;
# this is pseudo class!!! and it will be removed as soon all functions
# moved to XS level
use XML::SAX::Exception;
sub CLONE_SKIP {
return $XML::LibXML::__threads_shared ? 0 : 1;
}
# these functions will use SAX exceptions as soon i know how things really work
sub warning {
my ( $parser, $message, $line, $col ) = @_;
my $error = XML::SAX::Exception::Parse->new( LineNumber => $line,
ColumnNumber => $col,
Message => $message, );
$parser->{HANDLER}->warning( $error );
}
sub error {
my ( $parser, $message, $line, $col ) = @_;
my $error = XML::SAX::Exception::Parse->new( LineNumber => $line,
ColumnNumber => $col,
Message => $message, );
$parser->{HANDLER}->error( $error );
}
sub fatal_error {
my ( $parser, $message, $line, $col ) = @_;
my $error = XML::SAX::Exception::Parse->new( LineNumber => $line,
ColumnNumber => $col,
Message => $message, );
$parser->{HANDLER}->fatal_error( $error );
}
1;
package XML::LibXML::RelaxNG;
sub CLONE_SKIP { 1 }
sub new {
my $class = shift;
my %args = @_;
my $self = undef;
if ( defined $args{location} ) {
$self = $class->parse_location( $args{location} );
}
elsif ( defined $args{string} ) {
$self = $class->parse_buffer( $args{string} );
}
elsif ( defined $args{DOM} ) {
$self = $class->parse_document( $args{DOM} );
}
return $self;
}
1;
package XML::LibXML::Schema;
sub CLONE_SKIP { 1 }
sub new {
my $class = shift;
my %args = @_;
my $self = undef;
if ( defined $args{location} ) {
$self = $class->parse_location( $args{location} );
}
elsif ( defined $args{string} ) {
$self = $class->parse_buffer( $args{string} );
}
return $self;
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::Pattern Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::Pattern;
sub CLONE_SKIP { 1 }
sub new {
my $class = shift;
my ($pattern,$ns_map)=@_;
my $self = undef;
unless (UNIVERSAL::can($class,'_compilePattern')) {
croak("Cannot create XML::LibXML::Pattern - ".
"your libxml2 is compiled without pattern support!");
}
if (ref($ns_map) eq 'HASH') {
# translate prefix=>URL hash to a (URL,prefix) list
$self = $class->_compilePattern($pattern,0,[reverse %$ns_map]);
} else {
$self = $class->_compilePattern($pattern,0);
}
return $self;
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::RegExp Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::RegExp;
sub CLONE_SKIP { 1 }
sub new {
my $class = shift;
my ($regexp)=@_;
unless (UNIVERSAL::can($class,'_compile')) {
croak("Cannot create XML::LibXML::RegExp - ".
"your libxml2 is compiled without regexp support!");
}
return $class->_compile($regexp);
}
1;
#-------------------------------------------------------------------------#
# XML::LibXML::XPathExpression Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::XPathExpression;
sub CLONE_SKIP { 1 }
1;
#-------------------------------------------------------------------------#
# XML::LibXML::InputCallback Interface #
#-------------------------------------------------------------------------#
package XML::LibXML::InputCallback;
use vars qw($_CUR_CB @_GLOBAL_CALLBACKS @_CB_STACK $_CB_NESTED_DEPTH @_CB_NESTED_STACK);
BEGIN {
$_CUR_CB = undef;
@_GLOBAL_CALLBACKS = ();
@_CB_STACK = ();
$_CB_NESTED_DEPTH = 0;
@_CB_NESTED_STACK = ();
}
sub CLONE_SKIP {
return $XML::LibXML::__threads_shared ? 0 : 1;
}
#-------------------------------------------------------------------------#
# global callbacks #
#-------------------------------------------------------------------------#
sub _callback_match {
my $uri = shift;
my $retval = 0;
# loop through the callbacks and and find the first matching
# The callbacks are stored in execution order (reverse stack order)
# any new global callbacks are shifted to the callback stack.
foreach my $cb ( @_GLOBAL_CALLBACKS ) {
# callbacks have to return 1, 0 or undef, while 0 and undef
# are handled the same way.
# in fact, if callbacks return other values, the global match
# assumes silently that the callback failed.
$retval = $cb->[0]->($uri);
if ( defined $retval and $retval == 1 ) {
# make the other callbacks use this callback
$_CUR_CB = $cb;
unshift @_CB_STACK, $cb;
last;
}
}
return $retval;
}
sub _callback_open {
my $uri = shift;
my $retval = undef;
# the open callback has to return a defined value.
# if one works on files this can be a file handle. But
# depending on the needs of the callback it also can be a
# database handle or a integer labeling a certain dataset.
if ( defined $_CUR_CB ) {
$retval = $_CUR_CB->[1]->( $uri );
# reset the callbacks, if one callback cannot open an uri
if ( not defined $retval or $retval == 0 ) {
shift @_CB_STACK;
$_CUR_CB = $_CB_STACK[0];
}
}
return $retval;
}
sub _callback_read {
my $fh = shift;
my $buflen = shift;
my $retval = undef;
if ( defined $_CUR_CB ) {
$retval = $_CUR_CB->[2]->( $fh, $buflen );
}
return $retval;
}
sub _callback_close {
my $fh = shift;
my $retval = 0;
if ( defined $_CUR_CB ) {
$retval = $_CUR_CB->[3]->( $fh );
shift @_CB_STACK;
$_CUR_CB = $_CB_STACK[0];
}
return $retval;
}
#-------------------------------------------------------------------------#
# member functions and methods #
#-------------------------------------------------------------------------#
sub new {
my $CLASS = shift;
return bless {'_CALLBACKS' => []}, $CLASS;
}
# add a callback set to the callback stack
# synopsis: $icb->register_callbacks( [$match_cb, $open_cb, $read_cb, $close_cb] );
sub register_callbacks {
my $self = shift;
my $cbset = shift;
# test if callback set is complete
if ( ref $cbset eq "ARRAY" and scalar( @$cbset ) == 4 ) {
unshift @{$self->{_CALLBACKS}}, $cbset;
}
}
# remove a callback set to the callback stack
# if a callback set is passed, this function will check for the match function
sub unregister_callbacks {
my $self = shift;
my $cbset = shift;
if ( ref $cbset eq "ARRAY" and scalar( @$cbset ) == 4 ) {
$self->{_CALLBACKS} = [grep { $_->[0] != $cbset->[0] } @{$self->{_CALLBACKS}}];
}
else {
shift @{$self->{_CALLBACKS}};
}
}
# make libxml2 use the callbacks
sub init_callbacks {
my $self = shift;
my $parser = shift;
#initialize the libxml2 callbacks unless this is a nested callback
$self->lib_init_callbacks() unless($_CB_NESTED_DEPTH);
#store the callbacks for any outer executing parser instance
$_CB_NESTED_DEPTH++;
push @_CB_NESTED_STACK, [
$_CUR_CB,
[@_CB_STACK],
[@_GLOBAL_CALLBACKS],
];
#initialize the callback variables for the current parser
$_CUR_CB = undef;
@_CB_STACK = ();
@_GLOBAL_CALLBACKS = @{ $self->{_CALLBACKS} };
#attach parser specific callbacks
if($parser) {
my $mcb = $parser->match_callback();
my $ocb = $parser->open_callback();
my $rcb = $parser->read_callback();
my $ccb = $parser->close_callback();
if ( defined $mcb and defined $ocb and defined $rcb and defined $ccb ) {
unshift @_GLOBAL_CALLBACKS, [$mcb, $ocb, $rcb, $ccb];
}
}
#attach global callbacks
if ( defined $XML::LibXML::match_cb and
defined $XML::LibXML::open_cb and
defined $XML::LibXML::read_cb and
defined $XML::LibXML::close_cb ) {
push @_GLOBAL_CALLBACKS, [$XML::LibXML::match_cb,
$XML::LibXML::open_cb,
$XML::LibXML::read_cb,
$XML::LibXML::close_cb];
}
}
# reset libxml2's callbacks
sub cleanup_callbacks {
my $self = shift;
#restore the callbacks for the outer parser instance
$_CB_NESTED_DEPTH--;
my $saved = pop @_CB_NESTED_STACK;
$_CUR_CB = $saved->[0];
@_CB_STACK = (@{$saved->[1]});
@_GLOBAL_CALLBACKS = (@{$saved->[2]});
#clean up the libxml2 callbacks unless there are still outer parsing instances
$self->lib_cleanup_callbacks() unless($_CB_NESTED_DEPTH);
}
$XML::LibXML::__loaded=1;
1;
__END__
| leighpauls/k2cro4 | third_party/perl/perl/vendor/lib/XML/LibXML.pm | Perl | bsd-3-clause | 65,874 |
package IO::Uncompress::AnyUncompress ;
use strict;
use warnings;
use bytes;
use IO::Compress::Base::Common 2.060 ();
use IO::Uncompress::Base 2.060 ;
require Exporter ;
our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, $AnyUncompressError);
$VERSION = '2.060';
$AnyUncompressError = '';
@ISA = qw( Exporter IO::Uncompress::Base );
@EXPORT_OK = qw( $AnyUncompressError anyuncompress ) ;
%EXPORT_TAGS = %IO::Uncompress::Base::DEFLATE_CONSTANTS ;
push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
Exporter::export_ok_tags('all');
# TODO - allow the user to pick a set of the three formats to allow
# or just assume want to auto-detect any of the three formats.
BEGIN
{
eval ' use IO::Uncompress::Adapter::Inflate 2.060 ;';
eval ' use IO::Uncompress::Adapter::Bunzip2 2.060 ;';
eval ' use IO::Uncompress::Adapter::LZO 2.060 ;';
eval ' use IO::Uncompress::Adapter::Lzf 2.060 ;';
eval ' use IO::Uncompress::Adapter::UnLzma 2.060 ;';
eval ' use IO::Uncompress::Adapter::UnXz 2.060 ;';
eval ' use IO::Uncompress::Bunzip2 2.060 ;';
eval ' use IO::Uncompress::UnLzop 2.060 ;';
eval ' use IO::Uncompress::Gunzip 2.060 ;';
eval ' use IO::Uncompress::Inflate 2.060 ;';
eval ' use IO::Uncompress::RawInflate 2.060 ;';
eval ' use IO::Uncompress::Unzip 2.060 ;';
eval ' use IO::Uncompress::UnLzf 2.060 ;';
eval ' use IO::Uncompress::UnLzma 2.060 ;';
eval ' use IO::Uncompress::UnXz 2.060 ;';
}
sub new
{
my $class = shift ;
my $obj = IO::Compress::Base::Common::createSelfTiedObject($class, \$AnyUncompressError);
$obj->_create(undef, 0, @_);
}
sub anyuncompress
{
my $obj = IO::Compress::Base::Common::createSelfTiedObject(undef, \$AnyUncompressError);
return $obj->_inf(@_) ;
}
sub getExtraParams
{
return ( 'rawinflate' => [IO::Compress::Base::Common::Parse_boolean, 0] ,
'unlzma' => [IO::Compress::Base::Common::Parse_boolean, 0] ) ;
}
sub ckParams
{
my $self = shift ;
my $got = shift ;
# any always needs both crc32 and adler32
$got->setValue('crc32' => 1);
$got->setValue('adler32' => 1);
return 1;
}
sub mkUncomp
{
my $self = shift ;
my $got = shift ;
my $magic ;
# try zlib first
if (defined $IO::Uncompress::RawInflate::VERSION )
{
my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject();
return $self->saveErrorString(undef, $errstr, $errno)
if ! defined $obj;
*$self->{Uncomp} = $obj;
my @possible = qw( Inflate Gunzip Unzip );
unshift @possible, 'RawInflate'
if $got->getValue('rawinflate');
$magic = $self->ckMagic( @possible );
if ($magic) {
*$self->{Info} = $self->readHeader($magic)
or return undef ;
return 1;
}
}
if (defined $IO::Uncompress::UnLzma::VERSION && $got->getValue('unlzma'))
{
my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::UnLzma::mkUncompObject();
return $self->saveErrorString(undef, $errstr, $errno)
if ! defined $obj;
*$self->{Uncomp} = $obj;
my @possible = qw( UnLzma );
#unshift @possible, 'RawInflate'
# if $got->getValue('rawinflate');
if ( *$self->{Info} = $self->ckMagic( @possible ))
{
return 1;
}
}
if (defined $IO::Uncompress::UnXz::VERSION and
$magic = $self->ckMagic('UnXz')) {
*$self->{Info} = $self->readHeader($magic)
or return undef ;
my ($obj, $errstr, $errno) =
IO::Uncompress::Adapter::UnXz::mkUncompObject();
return $self->saveErrorString(undef, $errstr, $errno)
if ! defined $obj;
*$self->{Uncomp} = $obj;
return 1;
}
if (defined $IO::Uncompress::Bunzip2::VERSION and
$magic = $self->ckMagic('Bunzip2')) {
*$self->{Info} = $self->readHeader($magic)
or return undef ;
my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Bunzip2::mkUncompObject();
return $self->saveErrorString(undef, $errstr, $errno)
if ! defined $obj;
*$self->{Uncomp} = $obj;
return 1;
}
if (defined $IO::Uncompress::UnLzop::VERSION and
$magic = $self->ckMagic('UnLzop')) {
*$self->{Info} = $self->readHeader($magic)
or return undef ;
my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::LZO::mkUncompObject();
return $self->saveErrorString(undef, $errstr, $errno)
if ! defined $obj;
*$self->{Uncomp} = $obj;
return 1;
}
if (defined $IO::Uncompress::UnLzf::VERSION and
$magic = $self->ckMagic('UnLzf')) {
*$self->{Info} = $self->readHeader($magic)
or return undef ;
my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Lzf::mkUncompObject();
return $self->saveErrorString(undef, $errstr, $errno)
if ! defined $obj;
*$self->{Uncomp} = $obj;
return 1;
}
return 0 ;
}
sub ckMagic
{
my $self = shift;
my @names = @_ ;
my $keep = ref $self ;
for my $class ( map { "IO::Uncompress::$_" } @names)
{
bless $self => $class;
my $magic = $self->ckMagic();
if ($magic)
{
#bless $self => $class;
return $magic ;
}
$self->pushBack(*$self->{HeaderPending}) ;
*$self->{HeaderPending} = '' ;
}
bless $self => $keep;
return undef;
}
1 ;
__END__
=head1 NAME
IO::Uncompress::AnyUncompress - Uncompress gzip, zip, bzip2 or lzop file/buffer
=head1 SYNOPSIS
use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
my $status = anyuncompress $input => $output [,OPTS]
or die "anyuncompress failed: $AnyUncompressError\n";
my $z = new IO::Uncompress::AnyUncompress $input [OPTS]
or die "anyuncompress failed: $AnyUncompressError\n";
$status = $z->read($buffer)
$status = $z->read($buffer, $length)
$status = $z->read($buffer, $length, $offset)
$line = $z->getline()
$char = $z->getc()
$char = $z->ungetc()
$char = $z->opened()
$data = $z->trailingData()
$status = $z->nextStream()
$data = $z->getHeaderInfo()
$z->tell()
$z->seek($position, $whence)
$z->binmode()
$z->fileno()
$z->eof()
$z->close()
$AnyUncompressError ;
# IO::File mode
<$z>
read($z, $buffer);
read($z, $buffer, $length);
read($z, $buffer, $length, $offset);
tell($z)
seek($z, $position, $whence)
binmode($z)
fileno($z)
eof($z)
close($z)
=head1 DESCRIPTION
This module provides a Perl interface that allows the reading of
files/buffers that have been compressed with a variety of compression
libraries.
The formats supported are:
=over 5
=item RFC 1950
=item RFC 1951 (optionally)
=item gzip (RFC 1952)
=item zip
=item bzip2
=item lzop
=item lzf
=item lzma
=item xz
=back
The module will auto-detect which, if any, of the supported
compression formats is being used.
=head1 Functional Interface
A top-level function, C<anyuncompress>, is provided to carry out
"one-shot" uncompression between buffers and/or files. For finer
control over the uncompression process, see the L</"OO Interface">
section.
use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
anyuncompress $input_filename_or_reference => $output_filename_or_reference [,OPTS]
or die "anyuncompress failed: $AnyUncompressError\n";
The functional interface needs Perl5.005 or better.
=head2 anyuncompress $input => $output [, OPTS]
C<anyuncompress> expects at least two parameters,
C<$input_filename_or_reference> and C<$output_filename_or_reference>.
=head3 The C<$input_filename_or_reference> parameter
The parameter, C<$input_filename_or_reference>, is used to define the
source of the compressed data.
It can take one of the following forms:
=over 5
=item A filename
If the <$input_filename_or_reference> parameter is a simple scalar, it is
assumed to be a filename. This file will be opened for reading and the
input data will be read from it.
=item A filehandle
If the C<$input_filename_or_reference> parameter is a filehandle, the input
data will be read from it. The string '-' can be used as an alias for
standard input.
=item A scalar reference
If C<$input_filename_or_reference> is a scalar reference, the input data
will be read from C<$$input_filename_or_reference>.
=item An array reference
If C<$input_filename_or_reference> is an array reference, each element in
the array must be a filename.
The input data will be read from each file in turn.
The complete array will be walked to ensure that it only
contains valid filenames before any data is uncompressed.
=item An Input FileGlob string
If C<$input_filename_or_reference> is a string that is delimited by the
characters "<" and ">" C<anyuncompress> will assume that it is an
I<input fileglob string>. The input is the list of files that match the
fileglob.
See L<File::GlobMapper|File::GlobMapper> for more details.
=back
If the C<$input_filename_or_reference> parameter is any other type,
C<undef> will be returned.
=head3 The C<$output_filename_or_reference> parameter
The parameter C<$output_filename_or_reference> is used to control the
destination of the uncompressed data. This parameter can take one of
these forms.
=over 5
=item A filename
If the C<$output_filename_or_reference> parameter is a simple scalar, it is
assumed to be a filename. This file will be opened for writing and the
uncompressed data will be written to it.
=item A filehandle
If the C<$output_filename_or_reference> parameter is a filehandle, the
uncompressed data will be written to it. The string '-' can be used as
an alias for standard output.
=item A scalar reference
If C<$output_filename_or_reference> is a scalar reference, the
uncompressed data will be stored in C<$$output_filename_or_reference>.
=item An Array Reference
If C<$output_filename_or_reference> is an array reference,
the uncompressed data will be pushed onto the array.
=item An Output FileGlob
If C<$output_filename_or_reference> is a string that is delimited by the
characters "<" and ">" C<anyuncompress> will assume that it is an
I<output fileglob string>. The output is the list of files that match the
fileglob.
When C<$output_filename_or_reference> is an fileglob string,
C<$input_filename_or_reference> must also be a fileglob string. Anything
else is an error.
See L<File::GlobMapper|File::GlobMapper> for more details.
=back
If the C<$output_filename_or_reference> parameter is any other type,
C<undef> will be returned.
=head2 Notes
When C<$input_filename_or_reference> maps to multiple compressed
files/buffers and C<$output_filename_or_reference> is
a single file/buffer, after uncompression C<$output_filename_or_reference> will contain a
concatenation of all the uncompressed data from each of the input
files/buffers.
=head2 Optional Parameters
Unless specified below, the optional parameters for C<anyuncompress>,
C<OPTS>, are the same as those used with the OO interface defined in the
L</"Constructor Options"> section below.
=over 5
=item C<< AutoClose => 0|1 >>
This option applies to any input or output data streams to
C<anyuncompress> that are filehandles.
If C<AutoClose> is specified, and the value is true, it will result in all
input and/or output filehandles being closed once C<anyuncompress> has
completed.
This parameter defaults to 0.
=item C<< BinModeOut => 0|1 >>
When writing to a file or filehandle, set C<binmode> before writing to the
file.
Defaults to 0.
=item C<< Append => 0|1 >>
The behaviour of this option is dependent on the type of output data
stream.
=over 5
=item * A Buffer
If C<Append> is enabled, all uncompressed data will be append to the end of
the output buffer. Otherwise the output buffer will be cleared before any
uncompressed data is written to it.
=item * A Filename
If C<Append> is enabled, the file will be opened in append mode. Otherwise
the contents of the file, if any, will be truncated before any uncompressed
data is written to it.
=item * A Filehandle
If C<Append> is enabled, the filehandle will be positioned to the end of
the file via a call to C<seek> before any uncompressed data is
written to it. Otherwise the file pointer will not be moved.
=back
When C<Append> is specified, and set to true, it will I<append> all uncompressed
data to the output data stream.
So when the output is a filehandle it will carry out a seek to the eof
before writing any uncompressed data. If the output is a filename, it will be opened for
appending. If the output is a buffer, all uncompressed data will be
appended to the existing buffer.
Conversely when C<Append> is not specified, or it is present and is set to
false, it will operate as follows.
When the output is a filename, it will truncate the contents of the file
before writing any uncompressed data. If the output is a filehandle
its position will not be changed. If the output is a buffer, it will be
wiped before any uncompressed data is output.
Defaults to 0.
=item C<< MultiStream => 0|1 >>
If the input file/buffer contains multiple compressed data streams, this
option will uncompress the whole lot as a single data stream.
Defaults to 0.
=item C<< TrailingData => $scalar >>
Returns the data, if any, that is present immediately after the compressed
data stream once uncompression is complete.
This option can be used when there is useful information immediately
following the compressed data stream, and you don't know the length of the
compressed data stream.
If the input is a buffer, C<trailingData> will return everything from the
end of the compressed data stream to the end of the buffer.
If the input is a filehandle, C<trailingData> will return the data that is
left in the filehandle input buffer once the end of the compressed data
stream has been reached. You can then use the filehandle to read the rest
of the input file.
Don't bother using C<trailingData> if the input is a filename.
If you know the length of the compressed data stream before you start
uncompressing, you can avoid having to use C<trailingData> by setting the
C<InputLength> option.
=back
=head2 Examples
To read the contents of the file C<file1.txt.Compressed> and write the
uncompressed data to the file C<file1.txt>.
use strict ;
use warnings ;
use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
my $input = "file1.txt.Compressed";
my $output = "file1.txt";
anyuncompress $input => $output
or die "anyuncompress failed: $AnyUncompressError\n";
To read from an existing Perl filehandle, C<$input>, and write the
uncompressed data to a buffer, C<$buffer>.
use strict ;
use warnings ;
use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
use IO::File ;
my $input = new IO::File "<file1.txt.Compressed"
or die "Cannot open 'file1.txt.Compressed': $!\n" ;
my $buffer ;
anyuncompress $input => \$buffer
or die "anyuncompress failed: $AnyUncompressError\n";
To uncompress all files in the directory "/my/home" that match "*.txt.Compressed" and store the compressed data in the same directory
use strict ;
use warnings ;
use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
anyuncompress '</my/home/*.txt.Compressed>' => '</my/home/#1.txt>'
or die "anyuncompress failed: $AnyUncompressError\n";
and if you want to compress each file one at a time, this will do the trick
use strict ;
use warnings ;
use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
for my $input ( glob "/my/home/*.txt.Compressed" )
{
my $output = $input;
$output =~ s/.Compressed// ;
anyuncompress $input => $output
or die "Error compressing '$input': $AnyUncompressError\n";
}
=head1 OO Interface
=head2 Constructor
The format of the constructor for IO::Uncompress::AnyUncompress is shown below
my $z = new IO::Uncompress::AnyUncompress $input [OPTS]
or die "IO::Uncompress::AnyUncompress failed: $AnyUncompressError\n";
Returns an C<IO::Uncompress::AnyUncompress> object on success and undef on failure.
The variable C<$AnyUncompressError> will contain an error message on failure.
If you are running Perl 5.005 or better the object, C<$z>, returned from
IO::Uncompress::AnyUncompress can be used exactly like an L<IO::File|IO::File> filehandle.
This means that all normal input file operations can be carried out with
C<$z>. For example, to read a line from a compressed file/buffer you can
use either of these forms
$line = $z->getline();
$line = <$z>;
The mandatory parameter C<$input> is used to determine the source of the
compressed data. This parameter can take one of three forms.
=over 5
=item A filename
If the C<$input> parameter is a scalar, it is assumed to be a filename. This
file will be opened for reading and the compressed data will be read from it.
=item A filehandle
If the C<$input> parameter is a filehandle, the compressed data will be
read from it.
The string '-' can be used as an alias for standard input.
=item A scalar reference
If C<$input> is a scalar reference, the compressed data will be read from
C<$$input>.
=back
=head2 Constructor Options
The option names defined below are case insensitive and can be optionally
prefixed by a '-'. So all of the following are valid
-AutoClose
-autoclose
AUTOCLOSE
autoclose
OPTS is a combination of the following options:
=over 5
=item C<< AutoClose => 0|1 >>
This option is only valid when the C<$input> parameter is a filehandle. If
specified, and the value is true, it will result in the file being closed once
either the C<close> method is called or the IO::Uncompress::AnyUncompress object is
destroyed.
This parameter defaults to 0.
=item C<< MultiStream => 0|1 >>
Allows multiple concatenated compressed streams to be treated as a single
compressed stream. Decompression will stop once either the end of the
file/buffer is reached, an error is encountered (premature eof, corrupt
compressed data) or the end of a stream is not immediately followed by the
start of another stream.
This parameter defaults to 0.
=item C<< Prime => $string >>
This option will uncompress the contents of C<$string> before processing the
input file/buffer.
This option can be useful when the compressed data is embedded in another
file/data structure and it is not possible to work out where the compressed
data begins without having to read the first few bytes. If this is the
case, the uncompression can be I<primed> with these bytes using this
option.
=item C<< Transparent => 0|1 >>
If this option is set and the input file/buffer is not compressed data,
the module will allow reading of it anyway.
In addition, if the input file/buffer does contain compressed data and
there is non-compressed data immediately following it, setting this option
will make this module treat the whole file/buffer as a single data stream.
This option defaults to 1.
=item C<< BlockSize => $num >>
When reading the compressed input data, IO::Uncompress::AnyUncompress will read it in
blocks of C<$num> bytes.
This option defaults to 4096.
=item C<< InputLength => $size >>
When present this option will limit the number of compressed bytes read
from the input file/buffer to C<$size>. This option can be used in the
situation where there is useful data directly after the compressed data
stream and you know beforehand the exact length of the compressed data
stream.
This option is mostly used when reading from a filehandle, in which case
the file pointer will be left pointing to the first byte directly after the
compressed data stream.
This option defaults to off.
=item C<< Append => 0|1 >>
This option controls what the C<read> method does with uncompressed data.
If set to 1, all uncompressed data will be appended to the output parameter
of the C<read> method.
If set to 0, the contents of the output parameter of the C<read> method
will be overwritten by the uncompressed data.
Defaults to 0.
=item C<< Strict => 0|1 >>
This option controls whether the extra checks defined below are used when
carrying out the decompression. When Strict is on, the extra tests are
carried out, when Strict is off they are not.
The default for this option is off.
=item C<< RawInflate => 0|1 >>
When auto-detecting the compressed format, try to test for raw-deflate (RFC
1951) content using the C<IO::Uncompress::RawInflate> module.
The reason this is not default behaviour is because RFC 1951 content can
only be detected by attempting to uncompress it. This process is error
prone and can result is false positives.
Defaults to 0.
=item C<< UnLzma => 0|1 >>
When auto-detecting the compressed format, try to test for lzma_alone
content using the C<IO::Uncompress::UnLzma> module.
The reason this is not default behaviour is because lzma_alone content can
only be detected by attempting to uncompress it. This process is error
prone and can result is false positives.
Defaults to 0.
=back
=head2 Examples
TODO
=head1 Methods
=head2 read
Usage is
$status = $z->read($buffer)
Reads a block of compressed data (the size the the compressed block is
determined by the C<Buffer> option in the constructor), uncompresses it and
writes any uncompressed data into C<$buffer>. If the C<Append> parameter is
set in the constructor, the uncompressed data will be appended to the
C<$buffer> parameter. Otherwise C<$buffer> will be overwritten.
Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
or a negative number on error.
=head2 read
Usage is
$status = $z->read($buffer, $length)
$status = $z->read($buffer, $length, $offset)
$status = read($z, $buffer, $length)
$status = read($z, $buffer, $length, $offset)
Attempt to read C<$length> bytes of uncompressed data into C<$buffer>.
The main difference between this form of the C<read> method and the
previous one, is that this one will attempt to return I<exactly> C<$length>
bytes. The only circumstances that this function will not is if end-of-file
or an IO error is encountered.
Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
or a negative number on error.
=head2 getline
Usage is
$line = $z->getline()
$line = <$z>
Reads a single line.
This method fully supports the use of of the variable C<$/> (or
C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to
determine what constitutes an end of line. Paragraph mode, record mode and
file slurp mode are all supported.
=head2 getc
Usage is
$char = $z->getc()
Read a single character.
=head2 ungetc
Usage is
$char = $z->ungetc($string)
=head2 getHeaderInfo
Usage is
$hdr = $z->getHeaderInfo();
@hdrs = $z->getHeaderInfo();
This method returns either a hash reference (in scalar context) or a list
or hash references (in array context) that contains information about each
of the header fields in the compressed data stream(s).
=head2 tell
Usage is
$z->tell()
tell $z
Returns the uncompressed file offset.
=head2 eof
Usage is
$z->eof();
eof($z);
Returns true if the end of the compressed input stream has been reached.
=head2 seek
$z->seek($position, $whence);
seek($z, $position, $whence);
Provides a sub-set of the C<seek> functionality, with the restriction
that it is only legal to seek forward in the input file/buffer.
It is a fatal error to attempt to seek backward.
Note that the implementation of C<seek> in this module does not provide
true random access to a compressed file/buffer. It works by uncompressing
data from the current offset in the file/buffer until it reaches the
ucompressed offset specified in the parameters to C<seek>. For very small
files this may be acceptable behaviour. For large files it may cause an
unacceptable delay.
The C<$whence> parameter takes one the usual values, namely SEEK_SET,
SEEK_CUR or SEEK_END.
Returns 1 on success, 0 on failure.
=head2 binmode
Usage is
$z->binmode
binmode $z ;
This is a noop provided for completeness.
=head2 opened
$z->opened()
Returns true if the object currently refers to a opened file/buffer.
=head2 autoflush
my $prev = $z->autoflush()
my $prev = $z->autoflush(EXPR)
If the C<$z> object is associated with a file or a filehandle, this method
returns the current autoflush setting for the underlying filehandle. If
C<EXPR> is present, and is non-zero, it will enable flushing after every
write/print operation.
If C<$z> is associated with a buffer, this method has no effect and always
returns C<undef>.
B<Note> that the special variable C<$|> B<cannot> be used to set or
retrieve the autoflush setting.
=head2 input_line_number
$z->input_line_number()
$z->input_line_number(EXPR)
Returns the current uncompressed line number. If C<EXPR> is present it has
the effect of setting the line number. Note that setting the line number
does not change the current position within the file/buffer being read.
The contents of C<$/> are used to to determine what constitutes a line
terminator.
=head2 fileno
$z->fileno()
fileno($z)
If the C<$z> object is associated with a file or a filehandle, C<fileno>
will return the underlying file descriptor. Once the C<close> method is
called C<fileno> will return C<undef>.
If the C<$z> object is associated with a buffer, this method will return
C<undef>.
=head2 close
$z->close() ;
close $z ;
Closes the output file/buffer.
For most versions of Perl this method will be automatically invoked if
the IO::Uncompress::AnyUncompress object is destroyed (either explicitly or by the
variable with the reference to the object going out of scope). The
exceptions are Perl versions 5.005 through 5.00504 and 5.8.0. In
these cases, the C<close> method will be called automatically, but
not until global destruction of all live objects when the program is
terminating.
Therefore, if you want your scripts to be able to run on all versions
of Perl, you should call C<close> explicitly and not rely on automatic
closing.
Returns true on success, otherwise 0.
If the C<AutoClose> option has been enabled when the IO::Uncompress::AnyUncompress
object was created, and the object is associated with a file, the
underlying file will also be closed.
=head2 nextStream
Usage is
my $status = $z->nextStream();
Skips to the next compressed data stream in the input file/buffer. If a new
compressed data stream is found, the eof marker will be cleared and C<$.>
will be reset to 0.
Returns 1 if a new stream was found, 0 if none was found, and -1 if an
error was encountered.
=head2 trailingData
Usage is
my $data = $z->trailingData();
Returns the data, if any, that is present immediately after the compressed
data stream once uncompression is complete. It only makes sense to call
this method once the end of the compressed data stream has been
encountered.
This option can be used when there is useful information immediately
following the compressed data stream, and you don't know the length of the
compressed data stream.
If the input is a buffer, C<trailingData> will return everything from the
end of the compressed data stream to the end of the buffer.
If the input is a filehandle, C<trailingData> will return the data that is
left in the filehandle input buffer once the end of the compressed data
stream has been reached. You can then use the filehandle to read the rest
of the input file.
Don't bother using C<trailingData> if the input is a filename.
If you know the length of the compressed data stream before you start
uncompressing, you can avoid having to use C<trailingData> by setting the
C<InputLength> option in the constructor.
=head1 Importing
No symbolic constants are required by this IO::Uncompress::AnyUncompress at present.
=over 5
=item :all
Imports C<anyuncompress> and C<$AnyUncompressError>.
Same as doing this
use IO::Uncompress::AnyUncompress qw(anyuncompress $AnyUncompressError) ;
=back
=head1 EXAMPLES
=head1 SEE ALSO
L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Uncompress::RawInflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzma>, L<IO::Uncompress::UnLzma>, L<IO::Compress::Xz>, L<IO::Uncompress::UnXz>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>
L<IO::Compress::FAQ|IO::Compress::FAQ>
L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>,
L<Archive::Tar|Archive::Tar>,
L<IO::Zlib|IO::Zlib>
=head1 AUTHOR
This module was written by Paul Marquess, F<pmqs@cpan.org>.
=head1 MODIFICATION HISTORY
See the Changes file.
=head1 COPYRIGHT AND LICENSE
Copyright (c) 2005-2013 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
| Dokaponteam/ITF_Project | xampp/perl/lib/IO/Uncompress/AnyUncompress.pm | Perl | mit | 29,391 |
#! /usr/bin/env perl
# Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved.
#
# Licensed under the OpenSSL license (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
# https://www.openssl.org/source/license.html
######################################################################
## Constant-time SSSE3 AES core implementation.
## version 0.1
##
## By Mike Hamburg (Stanford University), 2009
## Public domain.
##
## For details see http://shiftleft.org/papers/vector_aes/ and
## http://crypto.stanford.edu/vpaes/.
######################################################################
# September 2011.
#
# Port vpaes-x86_64.pl as 32-bit "almost" drop-in replacement for
# aes-586.pl. "Almost" refers to the fact that AES_cbc_encrypt
# doesn't handle partial vectors (doesn't have to if called from
# EVP only). "Drop-in" implies that this module doesn't share key
# schedule structure with the original nor does it make assumption
# about its alignment...
#
# Performance summary. aes-586.pl column lists large-block CBC
# encrypt/decrypt/with-hyper-threading-off(*) results in cycles per
# byte processed with 128-bit key, and vpaes-x86.pl column - [also
# large-block CBC] encrypt/decrypt.
#
# aes-586.pl vpaes-x86.pl
#
# Core 2(**) 28.1/41.4/18.3 21.9/25.2(***)
# Nehalem 27.9/40.4/18.1 10.2/11.9
# Atom 70.7/92.1/60.1 61.1/75.4(***)
# Silvermont 45.4/62.9/24.1 49.2/61.1(***)
#
# (*) "Hyper-threading" in the context refers rather to cache shared
# among multiple cores, than to specifically Intel HTT. As vast
# majority of contemporary cores share cache, slower code path
# is common place. In other words "with-hyper-threading-off"
# results are presented mostly for reference purposes.
#
# (**) "Core 2" refers to initial 65nm design, a.k.a. Conroe.
#
# (***) Less impressive improvement on Core 2 and Atom is due to slow
# pshufb, yet it's respectable +28%/64% improvement on Core 2
# and +15% on Atom (as implied, over "hyper-threading-safe"
# code path).
#
# <appro@openssl.org>
$0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1;
push(@INC,"${dir}","${dir}../../perlasm");
require "x86asm.pl";
$output = pop;
open OUT,">$output";
*STDOUT=*OUT;
&asm_init($ARGV[0],"vpaes-x86.pl",$x86only = $ARGV[$#ARGV] eq "386");
$PREFIX="vpaes";
my ($round, $base, $magic, $key, $const, $inp, $out)=
("eax", "ebx", "ecx", "edx","ebp", "esi","edi");
&static_label("_vpaes_consts");
&static_label("_vpaes_schedule_low_round");
&set_label("_vpaes_consts",64);
$k_inv=-0x30; # inv, inva
&data_word(0x0D080180,0x0E05060F,0x0A0B0C02,0x04070309);
&data_word(0x0F0B0780,0x01040A06,0x02050809,0x030D0E0C);
$k_s0F=-0x10; # s0F
&data_word(0x0F0F0F0F,0x0F0F0F0F,0x0F0F0F0F,0x0F0F0F0F);
$k_ipt=0x00; # input transform (lo, hi)
&data_word(0x5A2A7000,0xC2B2E898,0x52227808,0xCABAE090);
&data_word(0x317C4D00,0x4C01307D,0xB0FDCC81,0xCD80B1FC);
$k_sb1=0x20; # sb1u, sb1t
&data_word(0xCB503E00,0xB19BE18F,0x142AF544,0xA5DF7A6E);
&data_word(0xFAE22300,0x3618D415,0x0D2ED9EF,0x3BF7CCC1);
$k_sb2=0x40; # sb2u, sb2t
&data_word(0x0B712400,0xE27A93C6,0xBC982FCD,0x5EB7E955);
&data_word(0x0AE12900,0x69EB8840,0xAB82234A,0xC2A163C8);
$k_sbo=0x60; # sbou, sbot
&data_word(0x6FBDC700,0xD0D26D17,0xC502A878,0x15AABF7A);
&data_word(0x5FBB6A00,0xCFE474A5,0x412B35FA,0x8E1E90D1);
$k_mc_forward=0x80; # mc_forward
&data_word(0x00030201,0x04070605,0x080B0A09,0x0C0F0E0D);
&data_word(0x04070605,0x080B0A09,0x0C0F0E0D,0x00030201);
&data_word(0x080B0A09,0x0C0F0E0D,0x00030201,0x04070605);
&data_word(0x0C0F0E0D,0x00030201,0x04070605,0x080B0A09);
$k_mc_backward=0xc0; # mc_backward
&data_word(0x02010003,0x06050407,0x0A09080B,0x0E0D0C0F);
&data_word(0x0E0D0C0F,0x02010003,0x06050407,0x0A09080B);
&data_word(0x0A09080B,0x0E0D0C0F,0x02010003,0x06050407);
&data_word(0x06050407,0x0A09080B,0x0E0D0C0F,0x02010003);
$k_sr=0x100; # sr
&data_word(0x03020100,0x07060504,0x0B0A0908,0x0F0E0D0C);
&data_word(0x0F0A0500,0x030E0904,0x07020D08,0x0B06010C);
&data_word(0x0B020900,0x0F060D04,0x030A0108,0x070E050C);
&data_word(0x070A0D00,0x0B0E0104,0x0F020508,0x0306090C);
$k_rcon=0x140; # rcon
&data_word(0xAF9DEEB6,0x1F8391B9,0x4D7C7D81,0x702A9808);
$k_s63=0x150; # s63: all equal to 0x63 transformed
&data_word(0x5B5B5B5B,0x5B5B5B5B,0x5B5B5B5B,0x5B5B5B5B);
$k_opt=0x160; # output transform
&data_word(0xD6B66000,0xFF9F4929,0xDEBE6808,0xF7974121);
&data_word(0x50BCEC00,0x01EDBD51,0xB05C0CE0,0xE10D5DB1);
$k_deskew=0x180; # deskew tables: inverts the sbox's "skew"
&data_word(0x47A4E300,0x07E4A340,0x5DBEF91A,0x1DFEB95A);
&data_word(0x83EA6900,0x5F36B5DC,0xF49D1E77,0x2841C2AB);
##
## Decryption stuff
## Key schedule constants
##
$k_dksd=0x1a0; # decryption key schedule: invskew x*D
&data_word(0xA3E44700,0xFEB91A5D,0x5A1DBEF9,0x0740E3A4);
&data_word(0xB5368300,0x41C277F4,0xAB289D1E,0x5FDC69EA);
$k_dksb=0x1c0; # decryption key schedule: invskew x*B
&data_word(0x8550D500,0x9A4FCA1F,0x1CC94C99,0x03D65386);
&data_word(0xB6FC4A00,0x115BEDA7,0x7E3482C8,0xD993256F);
$k_dkse=0x1e0; # decryption key schedule: invskew x*E + 0x63
&data_word(0x1FC9D600,0xD5031CCA,0x994F5086,0x53859A4C);
&data_word(0x4FDC7BE8,0xA2319605,0x20B31487,0xCD5EF96A);
$k_dks9=0x200; # decryption key schedule: invskew x*9
&data_word(0x7ED9A700,0xB6116FC8,0x82255BFC,0x4AED9334);
&data_word(0x27143300,0x45765162,0xE9DAFDCE,0x8BB89FAC);
##
## Decryption stuff
## Round function constants
##
$k_dipt=0x220; # decryption input transform
&data_word(0x0B545F00,0x0F505B04,0x114E451A,0x154A411E);
&data_word(0x60056500,0x86E383E6,0xF491F194,0x12771772);
$k_dsb9=0x240; # decryption sbox output *9*u, *9*t
&data_word(0x9A86D600,0x851C0353,0x4F994CC9,0xCAD51F50);
&data_word(0xECD74900,0xC03B1789,0xB2FBA565,0x725E2C9E);
$k_dsbd=0x260; # decryption sbox output *D*u, *D*t
&data_word(0xE6B1A200,0x7D57CCDF,0x882A4439,0xF56E9B13);
&data_word(0x24C6CB00,0x3CE2FAF7,0x15DEEFD3,0x2931180D);
$k_dsbb=0x280; # decryption sbox output *B*u, *B*t
&data_word(0x96B44200,0xD0226492,0xB0F2D404,0x602646F6);
&data_word(0xCD596700,0xC19498A6,0x3255AA6B,0xF3FF0C3E);
$k_dsbe=0x2a0; # decryption sbox output *E*u, *E*t
&data_word(0x26D4D000,0x46F29296,0x64B4F6B0,0x22426004);
&data_word(0xFFAAC100,0x0C55A6CD,0x98593E32,0x9467F36B);
$k_dsbo=0x2c0; # decryption sbox final output
&data_word(0x7EF94000,0x1387EA53,0xD4943E2D,0xC7AA6DB9);
&data_word(0x93441D00,0x12D7560F,0xD8C58E9C,0xCA4B8159);
&asciz ("Vector Permutation AES for x86/SSSE3, Mike Hamburg (Stanford University)");
&align (64);
&function_begin_B("_vpaes_preheat");
&add ($const,&DWP(0,"esp"));
&movdqa ("xmm7",&QWP($k_inv,$const));
&movdqa ("xmm6",&QWP($k_s0F,$const));
&ret ();
&function_end_B("_vpaes_preheat");
##
## _aes_encrypt_core
##
## AES-encrypt %xmm0.
##
## Inputs:
## %xmm0 = input
## %xmm6-%xmm7 as in _vpaes_preheat
## (%edx) = scheduled keys
##
## Output in %xmm0
## Clobbers %xmm1-%xmm5, %eax, %ebx, %ecx, %edx
##
##
&function_begin_B("_vpaes_encrypt_core");
&mov ($magic,16);
&mov ($round,&DWP(240,$key));
&movdqa ("xmm1","xmm6")
&movdqa ("xmm2",&QWP($k_ipt,$const));
&pandn ("xmm1","xmm0");
&pand ("xmm0","xmm6");
&movdqu ("xmm5",&QWP(0,$key));
&pshufb ("xmm2","xmm0");
&movdqa ("xmm0",&QWP($k_ipt+16,$const));
&pxor ("xmm2","xmm5");
&psrld ("xmm1",4);
&add ($key,16);
&pshufb ("xmm0","xmm1");
&lea ($base,&DWP($k_mc_backward,$const));
&pxor ("xmm0","xmm2");
&jmp (&label("enc_entry"));
&set_label("enc_loop",16);
# middle of middle round
&movdqa ("xmm4",&QWP($k_sb1,$const)); # 4 : sb1u
&movdqa ("xmm0",&QWP($k_sb1+16,$const));# 0 : sb1t
&pshufb ("xmm4","xmm2"); # 4 = sb1u
&pshufb ("xmm0","xmm3"); # 0 = sb1t
&pxor ("xmm4","xmm5"); # 4 = sb1u + k
&movdqa ("xmm5",&QWP($k_sb2,$const)); # 4 : sb2u
&pxor ("xmm0","xmm4"); # 0 = A
&movdqa ("xmm1",&QWP(-0x40,$base,$magic));# .Lk_mc_forward[]
&pshufb ("xmm5","xmm2"); # 4 = sb2u
&movdqa ("xmm2",&QWP($k_sb2+16,$const));# 2 : sb2t
&movdqa ("xmm4",&QWP(0,$base,$magic)); # .Lk_mc_backward[]
&pshufb ("xmm2","xmm3"); # 2 = sb2t
&movdqa ("xmm3","xmm0"); # 3 = A
&pxor ("xmm2","xmm5"); # 2 = 2A
&pshufb ("xmm0","xmm1"); # 0 = B
&add ($key,16); # next key
&pxor ("xmm0","xmm2"); # 0 = 2A+B
&pshufb ("xmm3","xmm4"); # 3 = D
&add ($magic,16); # next mc
&pxor ("xmm3","xmm0"); # 3 = 2A+B+D
&pshufb ("xmm0","xmm1"); # 0 = 2B+C
&and ($magic,0x30); # ... mod 4
&sub ($round,1); # nr--
&pxor ("xmm0","xmm3"); # 0 = 2A+3B+C+D
&set_label("enc_entry");
# top of round
&movdqa ("xmm1","xmm6"); # 1 : i
&movdqa ("xmm5",&QWP($k_inv+16,$const));# 2 : a/k
&pandn ("xmm1","xmm0"); # 1 = i<<4
&psrld ("xmm1",4); # 1 = i
&pand ("xmm0","xmm6"); # 0 = k
&pshufb ("xmm5","xmm0"); # 2 = a/k
&movdqa ("xmm3","xmm7"); # 3 : 1/i
&pxor ("xmm0","xmm1"); # 0 = j
&pshufb ("xmm3","xmm1"); # 3 = 1/i
&movdqa ("xmm4","xmm7"); # 4 : 1/j
&pxor ("xmm3","xmm5"); # 3 = iak = 1/i + a/k
&pshufb ("xmm4","xmm0"); # 4 = 1/j
&movdqa ("xmm2","xmm7"); # 2 : 1/iak
&pxor ("xmm4","xmm5"); # 4 = jak = 1/j + a/k
&pshufb ("xmm2","xmm3"); # 2 = 1/iak
&movdqa ("xmm3","xmm7"); # 3 : 1/jak
&pxor ("xmm2","xmm0"); # 2 = io
&pshufb ("xmm3","xmm4"); # 3 = 1/jak
&movdqu ("xmm5",&QWP(0,$key));
&pxor ("xmm3","xmm1"); # 3 = jo
&jnz (&label("enc_loop"));
# middle of last round
&movdqa ("xmm4",&QWP($k_sbo,$const)); # 3 : sbou .Lk_sbo
&movdqa ("xmm0",&QWP($k_sbo+16,$const));# 3 : sbot .Lk_sbo+16
&pshufb ("xmm4","xmm2"); # 4 = sbou
&pxor ("xmm4","xmm5"); # 4 = sb1u + k
&pshufb ("xmm0","xmm3"); # 0 = sb1t
&movdqa ("xmm1",&QWP(0x40,$base,$magic));# .Lk_sr[]
&pxor ("xmm0","xmm4"); # 0 = A
&pshufb ("xmm0","xmm1");
&ret ();
&function_end_B("_vpaes_encrypt_core");
##
## Decryption core
##
## Same API as encryption core.
##
&function_begin_B("_vpaes_decrypt_core");
&lea ($base,&DWP($k_dsbd,$const));
&mov ($round,&DWP(240,$key));
&movdqa ("xmm1","xmm6");
&movdqa ("xmm2",&QWP($k_dipt-$k_dsbd,$base));
&pandn ("xmm1","xmm0");
&mov ($magic,$round);
&psrld ("xmm1",4)
&movdqu ("xmm5",&QWP(0,$key));
&shl ($magic,4);
&pand ("xmm0","xmm6");
&pshufb ("xmm2","xmm0");
&movdqa ("xmm0",&QWP($k_dipt-$k_dsbd+16,$base));
&xor ($magic,0x30);
&pshufb ("xmm0","xmm1");
&and ($magic,0x30);
&pxor ("xmm2","xmm5");
&movdqa ("xmm5",&QWP($k_mc_forward+48,$const));
&pxor ("xmm0","xmm2");
&add ($key,16);
&lea ($magic,&DWP($k_sr-$k_dsbd,$base,$magic));
&jmp (&label("dec_entry"));
&set_label("dec_loop",16);
##
## Inverse mix columns
##
&movdqa ("xmm4",&QWP(-0x20,$base)); # 4 : sb9u
&movdqa ("xmm1",&QWP(-0x10,$base)); # 0 : sb9t
&pshufb ("xmm4","xmm2"); # 4 = sb9u
&pshufb ("xmm1","xmm3"); # 0 = sb9t
&pxor ("xmm0","xmm4");
&movdqa ("xmm4",&QWP(0,$base)); # 4 : sbdu
&pxor ("xmm0","xmm1"); # 0 = ch
&movdqa ("xmm1",&QWP(0x10,$base)); # 0 : sbdt
&pshufb ("xmm4","xmm2"); # 4 = sbdu
&pshufb ("xmm0","xmm5"); # MC ch
&pshufb ("xmm1","xmm3"); # 0 = sbdt
&pxor ("xmm0","xmm4"); # 4 = ch
&movdqa ("xmm4",&QWP(0x20,$base)); # 4 : sbbu
&pxor ("xmm0","xmm1"); # 0 = ch
&movdqa ("xmm1",&QWP(0x30,$base)); # 0 : sbbt
&pshufb ("xmm4","xmm2"); # 4 = sbbu
&pshufb ("xmm0","xmm5"); # MC ch
&pshufb ("xmm1","xmm3"); # 0 = sbbt
&pxor ("xmm0","xmm4"); # 4 = ch
&movdqa ("xmm4",&QWP(0x40,$base)); # 4 : sbeu
&pxor ("xmm0","xmm1"); # 0 = ch
&movdqa ("xmm1",&QWP(0x50,$base)); # 0 : sbet
&pshufb ("xmm4","xmm2"); # 4 = sbeu
&pshufb ("xmm0","xmm5"); # MC ch
&pshufb ("xmm1","xmm3"); # 0 = sbet
&pxor ("xmm0","xmm4"); # 4 = ch
&add ($key,16); # next round key
&palignr("xmm5","xmm5",12);
&pxor ("xmm0","xmm1"); # 0 = ch
&sub ($round,1); # nr--
&set_label("dec_entry");
# top of round
&movdqa ("xmm1","xmm6"); # 1 : i
&movdqa ("xmm2",&QWP($k_inv+16,$const));# 2 : a/k
&pandn ("xmm1","xmm0"); # 1 = i<<4
&pand ("xmm0","xmm6"); # 0 = k
&psrld ("xmm1",4); # 1 = i
&pshufb ("xmm2","xmm0"); # 2 = a/k
&movdqa ("xmm3","xmm7"); # 3 : 1/i
&pxor ("xmm0","xmm1"); # 0 = j
&pshufb ("xmm3","xmm1"); # 3 = 1/i
&movdqa ("xmm4","xmm7"); # 4 : 1/j
&pxor ("xmm3","xmm2"); # 3 = iak = 1/i + a/k
&pshufb ("xmm4","xmm0"); # 4 = 1/j
&pxor ("xmm4","xmm2"); # 4 = jak = 1/j + a/k
&movdqa ("xmm2","xmm7"); # 2 : 1/iak
&pshufb ("xmm2","xmm3"); # 2 = 1/iak
&movdqa ("xmm3","xmm7"); # 3 : 1/jak
&pxor ("xmm2","xmm0"); # 2 = io
&pshufb ("xmm3","xmm4"); # 3 = 1/jak
&movdqu ("xmm0",&QWP(0,$key));
&pxor ("xmm3","xmm1"); # 3 = jo
&jnz (&label("dec_loop"));
# middle of last round
&movdqa ("xmm4",&QWP(0x60,$base)); # 3 : sbou
&pshufb ("xmm4","xmm2"); # 4 = sbou
&pxor ("xmm4","xmm0"); # 4 = sb1u + k
&movdqa ("xmm0",&QWP(0x70,$base)); # 0 : sbot
&movdqa ("xmm2",&QWP(0,$magic));
&pshufb ("xmm0","xmm3"); # 0 = sb1t
&pxor ("xmm0","xmm4"); # 0 = A
&pshufb ("xmm0","xmm2");
&ret ();
&function_end_B("_vpaes_decrypt_core");
########################################################
## ##
## AES key schedule ##
## ##
########################################################
&function_begin_B("_vpaes_schedule_core");
&add ($const,&DWP(0,"esp"));
&movdqu ("xmm0",&QWP(0,$inp)); # load key (unaligned)
&movdqa ("xmm2",&QWP($k_rcon,$const)); # load rcon
# input transform
&movdqa ("xmm3","xmm0");
&lea ($base,&DWP($k_ipt,$const));
&movdqa (&QWP(4,"esp"),"xmm2"); # xmm8
&call ("_vpaes_schedule_transform");
&movdqa ("xmm7","xmm0");
&test ($out,$out);
&jnz (&label("schedule_am_decrypting"));
# encrypting, output zeroth round key after transform
&movdqu (&QWP(0,$key),"xmm0");
&jmp (&label("schedule_go"));
&set_label("schedule_am_decrypting");
# decrypting, output zeroth round key after shiftrows
&movdqa ("xmm1",&QWP($k_sr,$const,$magic));
&pshufb ("xmm3","xmm1");
&movdqu (&QWP(0,$key),"xmm3");
&xor ($magic,0x30);
&set_label("schedule_go");
&cmp ($round,192);
&ja (&label("schedule_256"));
&je (&label("schedule_192"));
# 128: fall though
##
## .schedule_128
##
## 128-bit specific part of key schedule.
##
## This schedule is really simple, because all its parts
## are accomplished by the subroutines.
##
&set_label("schedule_128");
&mov ($round,10);
&set_label("loop_schedule_128");
&call ("_vpaes_schedule_round");
&dec ($round);
&jz (&label("schedule_mangle_last"));
&call ("_vpaes_schedule_mangle"); # write output
&jmp (&label("loop_schedule_128"));
##
## .aes_schedule_192
##
## 192-bit specific part of key schedule.
##
## The main body of this schedule is the same as the 128-bit
## schedule, but with more smearing. The long, high side is
## stored in %xmm7 as before, and the short, low side is in
## the high bits of %xmm6.
##
## This schedule is somewhat nastier, however, because each
## round produces 192 bits of key material, or 1.5 round keys.
## Therefore, on each cycle we do 2 rounds and produce 3 round
## keys.
##
&set_label("schedule_192",16);
&movdqu ("xmm0",&QWP(8,$inp)); # load key part 2 (very unaligned)
&call ("_vpaes_schedule_transform"); # input transform
&movdqa ("xmm6","xmm0"); # save short part
&pxor ("xmm4","xmm4"); # clear 4
&movhlps("xmm6","xmm4"); # clobber low side with zeros
&mov ($round,4);
&set_label("loop_schedule_192");
&call ("_vpaes_schedule_round");
&palignr("xmm0","xmm6",8);
&call ("_vpaes_schedule_mangle"); # save key n
&call ("_vpaes_schedule_192_smear");
&call ("_vpaes_schedule_mangle"); # save key n+1
&call ("_vpaes_schedule_round");
&dec ($round);
&jz (&label("schedule_mangle_last"));
&call ("_vpaes_schedule_mangle"); # save key n+2
&call ("_vpaes_schedule_192_smear");
&jmp (&label("loop_schedule_192"));
##
## .aes_schedule_256
##
## 256-bit specific part of key schedule.
##
## The structure here is very similar to the 128-bit
## schedule, but with an additional "low side" in
## %xmm6. The low side's rounds are the same as the
## high side's, except no rcon and no rotation.
##
&set_label("schedule_256",16);
&movdqu ("xmm0",&QWP(16,$inp)); # load key part 2 (unaligned)
&call ("_vpaes_schedule_transform"); # input transform
&mov ($round,7);
&set_label("loop_schedule_256");
&call ("_vpaes_schedule_mangle"); # output low result
&movdqa ("xmm6","xmm0"); # save cur_lo in xmm6
# high round
&call ("_vpaes_schedule_round");
&dec ($round);
&jz (&label("schedule_mangle_last"));
&call ("_vpaes_schedule_mangle");
# low round. swap xmm7 and xmm6
&pshufd ("xmm0","xmm0",0xFF);
&movdqa (&QWP(20,"esp"),"xmm7");
&movdqa ("xmm7","xmm6");
&call ("_vpaes_schedule_low_round");
&movdqa ("xmm7",&QWP(20,"esp"));
&jmp (&label("loop_schedule_256"));
##
## .aes_schedule_mangle_last
##
## Mangler for last round of key schedule
## Mangles %xmm0
## when encrypting, outputs out(%xmm0) ^ 63
## when decrypting, outputs unskew(%xmm0)
##
## Always called right before return... jumps to cleanup and exits
##
&set_label("schedule_mangle_last",16);
# schedule last round key from xmm0
&lea ($base,&DWP($k_deskew,$const));
&test ($out,$out);
&jnz (&label("schedule_mangle_last_dec"));
# encrypting
&movdqa ("xmm1",&QWP($k_sr,$const,$magic));
&pshufb ("xmm0","xmm1"); # output permute
&lea ($base,&DWP($k_opt,$const)); # prepare to output transform
&add ($key,32);
&set_label("schedule_mangle_last_dec");
&add ($key,-16);
&pxor ("xmm0",&QWP($k_s63,$const));
&call ("_vpaes_schedule_transform"); # output transform
&movdqu (&QWP(0,$key),"xmm0"); # save last key
# cleanup
&pxor ("xmm0","xmm0");
&pxor ("xmm1","xmm1");
&pxor ("xmm2","xmm2");
&pxor ("xmm3","xmm3");
&pxor ("xmm4","xmm4");
&pxor ("xmm5","xmm5");
&pxor ("xmm6","xmm6");
&pxor ("xmm7","xmm7");
&ret ();
&function_end_B("_vpaes_schedule_core");
##
## .aes_schedule_192_smear
##
## Smear the short, low side in the 192-bit key schedule.
##
## Inputs:
## %xmm7: high side, b a x y
## %xmm6: low side, d c 0 0
## %xmm13: 0
##
## Outputs:
## %xmm6: b+c+d b+c 0 0
## %xmm0: b+c+d b+c b a
##
&function_begin_B("_vpaes_schedule_192_smear");
&pshufd ("xmm1","xmm6",0x80); # d c 0 0 -> c 0 0 0
&pshufd ("xmm0","xmm7",0xFE); # b a _ _ -> b b b a
&pxor ("xmm6","xmm1"); # -> c+d c 0 0
&pxor ("xmm1","xmm1");
&pxor ("xmm6","xmm0"); # -> b+c+d b+c b a
&movdqa ("xmm0","xmm6");
&movhlps("xmm6","xmm1"); # clobber low side with zeros
&ret ();
&function_end_B("_vpaes_schedule_192_smear");
##
## .aes_schedule_round
##
## Runs one main round of the key schedule on %xmm0, %xmm7
##
## Specifically, runs subbytes on the high dword of %xmm0
## then rotates it by one byte and xors into the low dword of
## %xmm7.
##
## Adds rcon from low byte of %xmm8, then rotates %xmm8 for
## next rcon.
##
## Smears the dwords of %xmm7 by xoring the low into the
## second low, result into third, result into highest.
##
## Returns results in %xmm7 = %xmm0.
## Clobbers %xmm1-%xmm5.
##
&function_begin_B("_vpaes_schedule_round");
# extract rcon from xmm8
&movdqa ("xmm2",&QWP(8,"esp")); # xmm8
&pxor ("xmm1","xmm1");
&palignr("xmm1","xmm2",15);
&palignr("xmm2","xmm2",15);
&pxor ("xmm7","xmm1");
# rotate
&pshufd ("xmm0","xmm0",0xFF);
&palignr("xmm0","xmm0",1);
# fall through...
&movdqa (&QWP(8,"esp"),"xmm2"); # xmm8
# low round: same as high round, but no rotation and no rcon.
&set_label("_vpaes_schedule_low_round");
# smear xmm7
&movdqa ("xmm1","xmm7");
&pslldq ("xmm7",4);
&pxor ("xmm7","xmm1");
&movdqa ("xmm1","xmm7");
&pslldq ("xmm7",8);
&pxor ("xmm7","xmm1");
&pxor ("xmm7",&QWP($k_s63,$const));
# subbyte
&movdqa ("xmm4",&QWP($k_s0F,$const));
&movdqa ("xmm5",&QWP($k_inv,$const)); # 4 : 1/j
&movdqa ("xmm1","xmm4");
&pandn ("xmm1","xmm0");
&psrld ("xmm1",4); # 1 = i
&pand ("xmm0","xmm4"); # 0 = k
&movdqa ("xmm2",&QWP($k_inv+16,$const));# 2 : a/k
&pshufb ("xmm2","xmm0"); # 2 = a/k
&pxor ("xmm0","xmm1"); # 0 = j
&movdqa ("xmm3","xmm5"); # 3 : 1/i
&pshufb ("xmm3","xmm1"); # 3 = 1/i
&pxor ("xmm3","xmm2"); # 3 = iak = 1/i + a/k
&movdqa ("xmm4","xmm5"); # 4 : 1/j
&pshufb ("xmm4","xmm0"); # 4 = 1/j
&pxor ("xmm4","xmm2"); # 4 = jak = 1/j + a/k
&movdqa ("xmm2","xmm5"); # 2 : 1/iak
&pshufb ("xmm2","xmm3"); # 2 = 1/iak
&pxor ("xmm2","xmm0"); # 2 = io
&movdqa ("xmm3","xmm5"); # 3 : 1/jak
&pshufb ("xmm3","xmm4"); # 3 = 1/jak
&pxor ("xmm3","xmm1"); # 3 = jo
&movdqa ("xmm4",&QWP($k_sb1,$const)); # 4 : sbou
&pshufb ("xmm4","xmm2"); # 4 = sbou
&movdqa ("xmm0",&QWP($k_sb1+16,$const));# 0 : sbot
&pshufb ("xmm0","xmm3"); # 0 = sb1t
&pxor ("xmm0","xmm4"); # 0 = sbox output
# add in smeared stuff
&pxor ("xmm0","xmm7");
&movdqa ("xmm7","xmm0");
&ret ();
&function_end_B("_vpaes_schedule_round");
##
## .aes_schedule_transform
##
## Linear-transform %xmm0 according to tables at (%ebx)
##
## Output in %xmm0
## Clobbers %xmm1, %xmm2
##
&function_begin_B("_vpaes_schedule_transform");
&movdqa ("xmm2",&QWP($k_s0F,$const));
&movdqa ("xmm1","xmm2");
&pandn ("xmm1","xmm0");
&psrld ("xmm1",4);
&pand ("xmm0","xmm2");
&movdqa ("xmm2",&QWP(0,$base));
&pshufb ("xmm2","xmm0");
&movdqa ("xmm0",&QWP(16,$base));
&pshufb ("xmm0","xmm1");
&pxor ("xmm0","xmm2");
&ret ();
&function_end_B("_vpaes_schedule_transform");
##
## .aes_schedule_mangle
##
## Mangle xmm0 from (basis-transformed) standard version
## to our version.
##
## On encrypt,
## xor with 0x63
## multiply by circulant 0,1,1,1
## apply shiftrows transform
##
## On decrypt,
## xor with 0x63
## multiply by "inverse mixcolumns" circulant E,B,D,9
## deskew
## apply shiftrows transform
##
##
## Writes out to (%edx), and increments or decrements it
## Keeps track of round number mod 4 in %ecx
## Preserves xmm0
## Clobbers xmm1-xmm5
##
&function_begin_B("_vpaes_schedule_mangle");
&movdqa ("xmm4","xmm0"); # save xmm0 for later
&movdqa ("xmm5",&QWP($k_mc_forward,$const));
&test ($out,$out);
&jnz (&label("schedule_mangle_dec"));
# encrypting
&add ($key,16);
&pxor ("xmm4",&QWP($k_s63,$const));
&pshufb ("xmm4","xmm5");
&movdqa ("xmm3","xmm4");
&pshufb ("xmm4","xmm5");
&pxor ("xmm3","xmm4");
&pshufb ("xmm4","xmm5");
&pxor ("xmm3","xmm4");
&jmp (&label("schedule_mangle_both"));
&set_label("schedule_mangle_dec",16);
# inverse mix columns
&movdqa ("xmm2",&QWP($k_s0F,$const));
&lea ($inp,&DWP($k_dksd,$const));
&movdqa ("xmm1","xmm2");
&pandn ("xmm1","xmm4");
&psrld ("xmm1",4); # 1 = hi
&pand ("xmm4","xmm2"); # 4 = lo
&movdqa ("xmm2",&QWP(0,$inp));
&pshufb ("xmm2","xmm4");
&movdqa ("xmm3",&QWP(0x10,$inp));
&pshufb ("xmm3","xmm1");
&pxor ("xmm3","xmm2");
&pshufb ("xmm3","xmm5");
&movdqa ("xmm2",&QWP(0x20,$inp));
&pshufb ("xmm2","xmm4");
&pxor ("xmm2","xmm3");
&movdqa ("xmm3",&QWP(0x30,$inp));
&pshufb ("xmm3","xmm1");
&pxor ("xmm3","xmm2");
&pshufb ("xmm3","xmm5");
&movdqa ("xmm2",&QWP(0x40,$inp));
&pshufb ("xmm2","xmm4");
&pxor ("xmm2","xmm3");
&movdqa ("xmm3",&QWP(0x50,$inp));
&pshufb ("xmm3","xmm1");
&pxor ("xmm3","xmm2");
&pshufb ("xmm3","xmm5");
&movdqa ("xmm2",&QWP(0x60,$inp));
&pshufb ("xmm2","xmm4");
&pxor ("xmm2","xmm3");
&movdqa ("xmm3",&QWP(0x70,$inp));
&pshufb ("xmm3","xmm1");
&pxor ("xmm3","xmm2");
&add ($key,-16);
&set_label("schedule_mangle_both");
&movdqa ("xmm1",&QWP($k_sr,$const,$magic));
&pshufb ("xmm3","xmm1");
&add ($magic,-16);
&and ($magic,0x30);
&movdqu (&QWP(0,$key),"xmm3");
&ret ();
&function_end_B("_vpaes_schedule_mangle");
#
# Interface to OpenSSL
#
&function_begin("${PREFIX}_set_encrypt_key");
&mov ($inp,&wparam(0)); # inp
&lea ($base,&DWP(-56,"esp"));
&mov ($round,&wparam(1)); # bits
&and ($base,-16);
&mov ($key,&wparam(2)); # key
&xchg ($base,"esp"); # alloca
&mov (&DWP(48,"esp"),$base);
&mov ($base,$round);
&shr ($base,5);
&add ($base,5);
&mov (&DWP(240,$key),$base); # AES_KEY->rounds = nbits/32+5;
&mov ($magic,0x30);
&mov ($out,0);
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_schedule_core");
&set_label("pic_point");
&mov ("esp",&DWP(48,"esp"));
&xor ("eax","eax");
&function_end("${PREFIX}_set_encrypt_key");
&function_begin("${PREFIX}_set_decrypt_key");
&mov ($inp,&wparam(0)); # inp
&lea ($base,&DWP(-56,"esp"));
&mov ($round,&wparam(1)); # bits
&and ($base,-16);
&mov ($key,&wparam(2)); # key
&xchg ($base,"esp"); # alloca
&mov (&DWP(48,"esp"),$base);
&mov ($base,$round);
&shr ($base,5);
&add ($base,5);
&mov (&DWP(240,$key),$base); # AES_KEY->rounds = nbits/32+5;
&shl ($base,4);
&lea ($key,&DWP(16,$key,$base));
&mov ($out,1);
&mov ($magic,$round);
&shr ($magic,1);
&and ($magic,32);
&xor ($magic,32); # nbist==192?0:32;
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_schedule_core");
&set_label("pic_point");
&mov ("esp",&DWP(48,"esp"));
&xor ("eax","eax");
&function_end("${PREFIX}_set_decrypt_key");
&function_begin("${PREFIX}_encrypt");
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_preheat");
&set_label("pic_point");
&mov ($inp,&wparam(0)); # inp
&lea ($base,&DWP(-56,"esp"));
&mov ($out,&wparam(1)); # out
&and ($base,-16);
&mov ($key,&wparam(2)); # key
&xchg ($base,"esp"); # alloca
&mov (&DWP(48,"esp"),$base);
&movdqu ("xmm0",&QWP(0,$inp));
&call ("_vpaes_encrypt_core");
&movdqu (&QWP(0,$out),"xmm0");
&mov ("esp",&DWP(48,"esp"));
&function_end("${PREFIX}_encrypt");
&function_begin("${PREFIX}_decrypt");
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_preheat");
&set_label("pic_point");
&mov ($inp,&wparam(0)); # inp
&lea ($base,&DWP(-56,"esp"));
&mov ($out,&wparam(1)); # out
&and ($base,-16);
&mov ($key,&wparam(2)); # key
&xchg ($base,"esp"); # alloca
&mov (&DWP(48,"esp"),$base);
&movdqu ("xmm0",&QWP(0,$inp));
&call ("_vpaes_decrypt_core");
&movdqu (&QWP(0,$out),"xmm0");
&mov ("esp",&DWP(48,"esp"));
&function_end("${PREFIX}_decrypt");
&function_begin("${PREFIX}_cbc_encrypt");
&mov ($inp,&wparam(0)); # inp
&mov ($out,&wparam(1)); # out
&mov ($round,&wparam(2)); # len
&mov ($key,&wparam(3)); # key
&sub ($round,16);
&jc (&label("cbc_abort"));
&lea ($base,&DWP(-56,"esp"));
&mov ($const,&wparam(4)); # ivp
&and ($base,-16);
&mov ($magic,&wparam(5)); # enc
&xchg ($base,"esp"); # alloca
&movdqu ("xmm1",&QWP(0,$const)); # load IV
&sub ($out,$inp);
&mov (&DWP(48,"esp"),$base);
&mov (&DWP(0,"esp"),$out); # save out
&mov (&DWP(4,"esp"),$key) # save key
&mov (&DWP(8,"esp"),$const); # save ivp
&mov ($out,$round); # $out works as $len
&lea ($const,&DWP(&label("_vpaes_consts")."+0x30-".&label("pic_point")));
&call ("_vpaes_preheat");
&set_label("pic_point");
&cmp ($magic,0);
&je (&label("cbc_dec_loop"));
&jmp (&label("cbc_enc_loop"));
&set_label("cbc_enc_loop",16);
&movdqu ("xmm0",&QWP(0,$inp)); # load input
&pxor ("xmm0","xmm1"); # inp^=iv
&call ("_vpaes_encrypt_core");
&mov ($base,&DWP(0,"esp")); # restore out
&mov ($key,&DWP(4,"esp")); # restore key
&movdqa ("xmm1","xmm0");
&movdqu (&QWP(0,$base,$inp),"xmm0"); # write output
&lea ($inp,&DWP(16,$inp));
&sub ($out,16);
&jnc (&label("cbc_enc_loop"));
&jmp (&label("cbc_done"));
&set_label("cbc_dec_loop",16);
&movdqu ("xmm0",&QWP(0,$inp)); # load input
&movdqa (&QWP(16,"esp"),"xmm1"); # save IV
&movdqa (&QWP(32,"esp"),"xmm0"); # save future IV
&call ("_vpaes_decrypt_core");
&mov ($base,&DWP(0,"esp")); # restore out
&mov ($key,&DWP(4,"esp")); # restore key
&pxor ("xmm0",&QWP(16,"esp")); # out^=iv
&movdqa ("xmm1",&QWP(32,"esp")); # load next IV
&movdqu (&QWP(0,$base,$inp),"xmm0"); # write output
&lea ($inp,&DWP(16,$inp));
&sub ($out,16);
&jnc (&label("cbc_dec_loop"));
&set_label("cbc_done");
&mov ($base,&DWP(8,"esp")); # restore ivp
&mov ("esp",&DWP(48,"esp"));
&movdqu (&QWP(0,$base),"xmm1"); # write IV
&set_label("cbc_abort");
&function_end("${PREFIX}_cbc_encrypt");
&asm_finish();
close STDOUT;
| openweave/openweave-core | third_party/openssl/openssl/crypto/aes/asm/vpaes-x86.pl | Perl | apache-2.0 | 28,094 |
package AI::MXNet::IO;
use strict;
use warnings;
use AI::MXNet::Base;
use AI::MXNet::Function::Parameters;
use Scalar::Util qw/blessed/;
=head1 NAME
AI::MXNet::IO - NDArray interface of mxnet.
=cut
# Convert data into canonical form.
method init_data(
AcceptableInput|HashRef[AcceptableInput]|ArrayRef[AcceptableInput]|Undef $data,
Undef|Int :$allow_empty=,
Str :$default_name
)
{
Carp::confess("data must be defined or allow_empty set to true value")
if(not defined $data and not $allow_empty);
$data //= [];
if(ref($data) and ref($data) ne 'ARRAY' and ref($data) ne 'HASH')
{
$data = [$data];
}
Carp::confess("data must not be empty or allow_empty set to true value")
if(ref($data) eq 'ARRAY' and not @{ $data } and not $allow_empty);
my @ret;
if(ref($data) eq 'ARRAY')
{
if(@{ $data } == 1)
{
@ret = ([$default_name, $data->[0]]);
}
else
{
my $i = -1;
@ret = map { $i++; ["_${i}_$default_name", $_] } @{ $data };
}
}
if(ref($data) eq 'HASH')
{
while(my ($k, $v) = each %{ $data })
{
push @ret, [$k, $v];
}
}
for my $d (@ret)
{
if(not (blessed $d->[1] and $d->[1]->isa('AI::MXNet::NDArray')))
{
$d->[1] = AI::MXNet::NDArray->array($d->[1]);
}
}
return \@ret;
}
method DataDesc(@args) { AI::MXNet::DataDesc->new(@args) }
method DataBatch(@args) { AI::MXNet::DataBatch->new(@args) }
package AI::MXNet::DataDesc;
use Mouse;
use overload '""' => \&stringify,
'@{}' => \&to_nameshape;
has 'name' => (is => 'ro', isa => "Str", required => 1);
has 'shape' => (is => 'ro', isa => "Shape", required => 1);
has 'dtype' => (is => 'ro', isa => "Dtype", default => 'float32');
has 'layout' => (is => 'ro', isa => "Str", default => 'NCHW');
around BUILDARGS => sub {
my $orig = shift;
my $class = shift;
if(@_ >= 2 and ref $_[1] eq 'ARRAY')
{
my $name = shift;
my $shape = shift;
return $class->$orig(name => $name, shape => $shape, @_);
}
return $class->$orig(@_);
};
method stringify($other=, $reverse=)
{
sprintf(
"DataDesc[%s,%s,%s,%s]",
$self->name,
join('x', @{ $self->shape }),
$self->dtype,
$self->layout
);
}
method to_nameshape($other=, $reverse=)
{
[$self->name, $self->shape];
}
=head1 NAME
AI::MXNet::DataDesc - A container class for describing the data layout.
=cut
=head2 get_batch_axis
Get the dimension that corresponds to the batch size.
Parameters
----------
layout : str
layout string. For example, "NCHW".
Returns
-------
An axis indicating the batch_size dimension. When data-parallelism is
used, the data will be automatically split and concatenate along the batch_size
dimension. Axis can be -1, which means the whole array will be copied for each
data-parallelism device.
=cut
method get_batch_axis(Str|Undef $layout)
{
return 0 unless defined $layout;
return index($layout, 'N');
}
=head2 get_list
Coverts the input to an array ref AI::MXNet::DataDesc objects.
Parameters
----------
$shapes : HashRef[Shape]
$types= : Maybe[HashRef[Dtype]]
=cut
method get_list(HashRef[Shape] $shapes, Maybe[HashRef[Dtype]] $types=)
{
$types //= {};
return [
map {
AI::MXNet::DataDesc->new(
name => $_,
shape => $shapes->{$_},
(exists $types->{$_} ? (type => $types->{$_}) : ())
)
} keys %{ $shapes }
];
}
package AI::MXNet::DataBatch;
use Mouse;
=head1 NAME
AI::MXNet::DataBatch - A container for a mini-batch of the data and related information.
=cut
=head1 DESCRIPTION
Default object for holding a mini-batch of data and related information.
=cut
has 'data' => (is => 'rw', isa => 'Maybe[ArrayRef[AI::MXNet::NDArray]]', required => 1);
has 'label' => (is => 'rw', isa => 'Maybe[ArrayRef[AI::MXNet::NDArray]]');
has 'pad' => (is => 'rw');
has 'index' => (is => 'rw');
has 'bucket_key' => (is => 'rw');
has 'provide_data' => (is => 'rw');
has 'provide_label' => (is => 'rw');
package AI::MXNet::DataIter;
use Mouse;
use overload '<>' => sub { shift->next },
'@{}' => sub { shift->list };
=head1 NAME
AI::MXNet::DataIter - A parent class for MXNet data iterators.
=cut
has 'batch_size' => (is => 'rw', isa => 'Int', default => 0);
=head2 reset
Reset the iterator.
=cut
method reset(){}
=head2 list
Returns remaining iterator items as an array ref.
=cut
method list()
{
my @ret;
while(<$self>)
{
push @ret, $_;
}
return \@ret;
}
=head2 next
Returns the next data batch from the iterator.
Returns
-------
$data : AI::MXNet::DataBatch
The data of next batch.
=cut
method next()
{
if($self->iter_next())
{
return AI::MXNet::DataBatch->new(
data => $self->getdata,
label => $self->getlabel,
pad => $self->getpad,
index => $self->getindex
);
}
else
{
return undef;
}
}
=head2 iter_next
Iterate to next batch.
Returns
-------
$has_next : Bool
=cut
method iter_next(){}
=head2 get_data
The data of current batch.
Returns
-------
data : AI::MXNet::NDArray
=cut
method get_data(){}
=head2 getlabel
The label of the current batch.
Returns
-------
label : AI::MXNet::NDArray
=cut
method getlabel(){}
=head2 getindex
The index of the current batch.
Returns
-------
$index : PDL
=cut
method getindex(){}
=head2 getpad
The number of padding examples in the current batch.
Returns
-------
$pad : Int
=cut
method getpad(){}
package AI::MXNet::ResizeIter;
use Mouse;
extends 'AI::MXNet::DataIter';
=head1 NAME
AI::MXNet::ResizeIter
=cut
=head1 DESCRIPTION
Resize a DataIter to a given number of batches per epoch.
May produce incomplete batch in the middle of an epoch due
to the padding from internal iterator.
Parameters
----------
data_iter : DataIter
Internal data iterator.
size : number of batches per epoch to resize to.
reset_internal : whether to reset internal iterator on ResizeIter.reset
=cut
has 'data_iter' => (is => 'ro', isa => 'AI::MXnet::DataIter', required => 1);
has 'size' => (is => 'ro', isa => 'Int', required => 1);
has 'reset_internal' => (is => 'rw', isa => 'Int', default => 1);
has 'cur' => (is => 'rw', isa => 'Int', default => 0);
has 'current_batch' => (is => 'rw', isa => 'Maybe[AI::MXNet::DataBatch]');
has [qw/provide_data
default_bucket_key
provide_label
batch_size/] => (is => 'rw', init_arg => undef);
sub BUILD
{
my $self = shift;
$self->provide_data($self->data_iter->provide_data);
$self->provide_label($self->data_iter->provide_label);
$self->batch_size($self->data_iter->batch_size);
if($self->data_iter->can('default_bucket_key'))
{
$self->default_bucket_key($self->data_iter->default_bucket_key);
}
}
method reset()
{
$self->cur(0);
if($self->reset_internal)
{
$self->data_iter->reset;
}
}
method iter_next()
{
return 0 if($self->cur == $self->size);
$self->current_batch($self->data_iter->next);
if(not defined $self->current_batch)
{
$self->data_iter->reset;
$self->current_batch($self->data_iter->next);
}
$self->cur($self->cur + 1);
return 1;
}
method get_data()
{
return $self->current_batch->data;
}
method getlabel()
{
return $self->current_batch->label;
}
method getindex()
{
return $self->current_batch->index;
}
method getpad()
{
return $self->current_batch->pad;
}
package AI::MXNet::NDArrayIter;
use Mouse;
use AI::MXNet::Base;
use List::Util qw(shuffle);
extends 'AI::MXNet::DataIter';
=head1 NAME
AI::MXNet::NDArrayIter - Predefined NDArray iterator.
=cut
=head1 DESCRIPTION
Predefined NDArray iterator. Accepts PDL or AI::MXNet::NDArray object as an input.
Parameters
----------
data: Maybe[AcceptableInput|HashRef[AcceptableInput]|ArrayRef[AcceptableInput]].
NDArrayIter supports single or multiple data and label.
label: Maybe[AcceptableInput|HashRef[AcceptableInput]|ArrayRef[AcceptableInput]].
Same as data, but is not given to the model during testing.
batch_size=1: Int
Batch Size
shuffle=0: Bool
Whether to shuffle the data
last_batch_handle='pad': 'pad', 'discard' or 'roll_over'
How to handle the last batch
Note
----
This iterator will pad, discard or roll over the last batch if
the size of data does not match batch_size. Roll over is intended
for training and can cause problems if used for prediction.
=cut
has 'data' => (is => 'rw', isa => 'Maybe[AcceptableInput|HashRef[AcceptableInput]|ArrayRef[AcceptableInput]]');
has 'data_list' => (is => 'rw', isa => 'ArrayRef[AI::MXNet::NDArray]');
has 'label' => (is => 'rw', isa => 'Maybe[AcceptableInput|HashRef[AcceptableInput]|ArrayRef[AcceptableInput]]');
has 'batch_size' => (is => 'rw', isa => 'Int', default => 1);
has '_shuffle' => (is => 'rw', init_arg => 'shuffle', isa => 'Bool', default => 0);
has 'last_batch_handle' => (is => 'rw', isa => 'Str', default => 'pad');
has 'label_name' => (is => 'rw', isa => 'Str', default => 'softmax_label');
has 'num_source' => (is => 'rw', isa => 'Int');
has 'cursor' => (is => 'rw', isa => 'Int');
has 'num_data' => (is => 'rw', isa => 'Int');
around BUILDARGS => sub {
my $orig = shift;
my $class = shift;
if(@_%2)
{
my $data = shift;
return $class->$orig(data => $data, @_);
}
return $class->$orig(@_);
};
sub BUILD
{
my $self = shift;
my $data = AI::MXNet::IO->init_data($self->data, allow_empty => 0, default_name => 'data');
my $label = AI::MXNet::IO->init_data($self->label, allow_empty => 1, default_name => $self->label_name);
my $num_data = $data->[0][1]->shape->[0];
confess("size of data dimension 0 $num_data < batch_size ${\ $self->batch_size }")
unless($num_data >= $self->batch_size);
if($self->_shuffle)
{
my @idx = shuffle(0..$num_data-1);
$_->[1] = AI::MXNet::NDArray->array(pdl_shuffle($_->[1]->aspdl, \@idx)) for @$data;
$_->[1] = AI::MXNet::NDArray->array(pdl_shuffle($_->[1]->aspdl, \@idx)) for @$label;
}
if($self->last_batch_handle eq 'discard')
{
my $new_n = $num_data - $num_data % $self->batch_size - 1;
$_->[1] = $_->[1]->slice([0, $new_n]) for @$data;
$_->[1] = $_->[1]->slice([0, $new_n]) for @$label;
}
my $data_list = [map { $_->[1] } (@{ $data }, @{ $label })];
my $num_source = @{ $data_list };
my $cursor = -$self->batch_size;
$self->data($data);
$self->data_list($data_list);
$self->label($label);
$self->num_source($num_source);
$self->cursor($cursor);
$self->num_data($num_data);
}
# The name and shape of data provided by this iterator
method provide_data()
{
return [map {
my ($k, $v) = @{ $_ };
my $shape = $v->shape;
$shape->[0] = $self->batch_size;
AI::MXNet::DataDesc->new(name => $k, shape => $shape, dtype => $v->dtype)
} @{ $self->data }];
}
# The name and shape of label provided by this iterator
method provide_label()
{
return [map {
my ($k, $v) = @{ $_ };
my $shape = $v->shape;
$shape->[0] = $self->batch_size;
AI::MXNet::DataDesc->new(name => $k, shape => $shape, dtype => $v->dtype)
} @{ $self->label }];
}
# Ignore roll over data and set to start
method hard_reset()
{
$self->cursor(-$self->batch_size);
}
method reset()
{
if($self->last_batch_handle eq 'roll_over' and $self->cursor > $self->num_data)
{
$self->cursor(-$self->batch_size + ($self->cursor%$self->num_data)%$self->batch_size);
}
else
{
$self->cursor(-$self->batch_size);
}
}
method iter_next()
{
$self->cursor($self->batch_size + $self->cursor);
return $self->cursor < $self->num_data;
}
method next()
{
if($self->iter_next)
{
return AI::MXNet::DataBatch->new(
data => $self->getdata,
label => $self->getlabel,
pad => $self->getpad,
index => undef
);
}
else
{
return undef;
}
}
# Load data from underlying arrays, internal use only
method _getdata($data_source)
{
confess("DataIter needs reset.") unless $self->cursor < $self->num_data;
if(($self->cursor + $self->batch_size) <= $self->num_data)
{
return [
map {
$_->[1]->slice([$self->cursor,$self->cursor+$self->batch_size-1])
} @{ $data_source }
];
}
else
{
my $pad = $self->batch_size - $self->num_data + $self->cursor - 1;
return [
map {
AI::MXNet::NDArray->concatenate(
[
$_->[1]->slice([$self->cursor, -1]),
$_->[1]->slice([0, $pad])
]
)
} @{ $data_source }
];
}
}
method getdata()
{
return $self->_getdata($self->data);
}
method getlabel()
{
return $self->_getdata($self->label);
}
method getpad()
{
if( $self->last_batch_handle eq 'pad'
and
($self->cursor + $self->batch_size) > $self->num_data
)
{
return $self->cursor + $self->batch_size - $self->num_data;
}
else
{
return 0;
}
}
package AI::MXNet::MXDataIter;
use Mouse;
use AI::MXNet::Base;
extends 'AI::MXNet::DataIter';
=head1 NAME
AI::MXNet::MXDataIter - A data iterator pre-built in C++ layer of MXNet.
=cut
has 'handle' => (is => 'ro', isa => 'DataIterHandle', required => 1);
has '_debug_skip_load' => (is => 'rw', isa => 'Int', default => 0);
has '_debug_at_begin' => (is => 'rw', isa => 'Int', default => 0);
has 'data_name' => (is => 'ro', isa => 'Str', default => 'data');
has 'label_name' => (is => 'ro', isa => 'Str', default => 'softmax_label');
has [qw/first_batch
provide_data
provide_label
batch_size/] => (is => 'rw', init_arg => undef);
sub BUILD
{
my $self = shift;
$self->first_batch($self->next);
my $data = $self->first_batch->data->[0];
$self->provide_data([
AI::MXNet::DataDesc->new(
name => $self->data_name,
shape => $data->shape,
dtype => $data->dtype
)
]);
my $label = $self->first_batch->label->[0];
$self->provide_label([
AI::MXNet::DataDesc->new(
name => $self->label_name,
shape => $label->shape,
dtype => $label->dtype
)
]);
$self->batch_size($data->shape->[0]);
}
sub DEMOLISH
{
check_call(AI::MXNetCAPI::DataIterFree(shift->handle));
}
=head2 debug_skip_load
Set the iterator to simply return always first batch.
Notes
-----
This can be used to test the speed of network without taking
the loading delay into account.
=cut
method debug_skip_load()
{
$self->_debug_skip_load(1);
AI::MXNet::Logging->info('Set debug_skip_load to be true, will simply return first batch');
}
method reset()
{
$self->_debug_at_begin(1);
$self->first_batch(undef);
check_call(AI::MXNetCAPI::DataIterBeforeFirst($self->handle));
}
method next()
{
if($self->_debug_skip_load and not $self->_debug_at_begin)
{
return AI::MXNet::DataBatch->new(
data => [$self->getdata],
label => [$self->getlabel],
pad => $self->getpad,
index => $self->getindex
);
}
if(defined $self->first_batch)
{
my $batch = $self->first_batch;
$self->first_batch(undef);
return $batch
}
$self->_debug_at_begin(0);
my $next_res = check_call(AI::MXNetCAPI::DataIterNext($self->handle));
if($next_res)
{
return AI::MXNet::DataBatch->new(
data => [$self->getdata],
label => [$self->getlabel],
pad => $self->getpad,
index => $self->getindex
);
}
else
{
return undef;
}
}
method iter_next()
{
if(defined $self->first_batch)
{
return 1;
}
else
{
return scalar(check_call(AI::MXNetCAPI::DataIterNext($self->handle)));
}
}
method getdata()
{
my $handle = check_call(AI::MXNetCAPI::DataIterGetData($self->handle));
return AI::MXNet::NDArray->new(handle => $handle);
}
method getlabel()
{
my $handle = check_call(AI::MXNetCAPI::DataIterGetLabel($self->handle));
return AI::MXNet::NDArray->new(handle => $handle);
}
method getindex()
{
return pdl(check_call(AI::MXNetCAPI::DataIterGetIndex($self->handle)));
}
method getpad()
{
return scalar(check_call(AI::MXNetCAPI::DataIterGetPadNum($self->handle)));
}
package AI::MXNet::IO;
sub NDArrayIter { shift; return AI::MXNet::NDArrayIter->new(@_); }
my %iter_meta;
method get_iter_meta()
{
return \%iter_meta;
}
# Create an io iterator by handle.
func _make_io_iterator($handle)
{
my ($iter_name, $desc,
$arg_names, $arg_types, $arg_descs
) = @{ check_call(AI::MXNetCAPI::DataIterGetIterInfo($handle)) };
my $param_str = build_param_doc($arg_names, $arg_types, $arg_descs);
my $doc_str = "$desc\n\n"
."$param_str\n"
."name : string, required.\n"
." Name of the resulting data iterator.\n\n"
."Returns\n"
."-------\n"
."iterator: DataIter\n"
." The result iterator.";
my $iter = sub {
my $class = shift;
my (@args, %kwargs);
if(@_ and ref $_[-1] eq 'HASH')
{
%kwargs = %{ pop(@_) };
}
@args = @_;
Carp::confess("$iter_name can only accept keyword arguments")
if @args;
for my $key (keys %kwargs)
{
$kwargs{ $key } = "(" .join(",", @{ $kwargs{ $key } }) .")"
if ref $kwargs{ $key } eq 'ARRAY';
}
my $handle = check_call(
AI::MXNetCAPI::DataIterCreateIter(
$handle,
scalar(keys %kwargs),
\%kwargs
)
);
return AI::MXNet::MXDataIter->new(handle => $handle, %kwargs);
};
$iter_meta{$iter}{__name__} = $iter_name;
$iter_meta{$iter}{__doc__} = $doc_str;
return $iter;
}
# List and add all the data iterators to current module.
method _init_io_module()
{
for my $creator (@{ check_call(AI::MXNetCAPI::ListDataIters()) })
{
my $data_iter = _make_io_iterator($creator);
{
my $name = $iter_meta{ $data_iter }{__name__};
no strict 'refs';
{
*{__PACKAGE__."::$name"} = $data_iter;
}
}
}
}
# Initialize the io in startups
__PACKAGE__->_init_io_module;
1; | likelyzhao/mxnet | perl-package/AI-MXNet/lib/AI/MXNet/IO.pm | Perl | apache-2.0 | 19,472 |
package Imager::ExtUtils;
use strict;
use File::Spec;
use vars qw($VERSION);
$VERSION = "1.002";
=head1 NAME
Imager::ExtUtils - functions handy in writing Imager extensions
=head1 SYNOPSIS
# make Imager easier to use with Inline
# perldoc Imager::Inline
use Inline with => 'Imager';
=head1 DESCRIPTION
=over
=item base_dir
Returns the base directory where Imager is installed.
=cut
# figure out where Imager is installed
sub base_dir {
for my $inc_dir (@INC) {
if (-e "$inc_dir/Imager.pm") {
my $base_dir = $inc_dir;
unless (File::Spec->file_name_is_absolute($base_dir)) {
$base_dir = File::Spec->rel2abs($base_dir);
}
return $base_dir;
}
}
die "Cannot locate an installed Imager!";
}
=item inline_config
Implements Imager's Inline::C C<with> hook.
=cut
sub inline_config {
my ($class) = @_;
my $base = base_dir();
return
{
INC => $class->includes,
TYPEMAPS => $class->typemap,
AUTO_INCLUDE => <<CODE,
/* Inserted by Imager $Imager::VERSION */
#include "imext.h"
#include "imperl.h"
DEFINE_IMAGER_CALLBACKS;
CODE
BOOT => 'PERL_INITIALIZE_IMAGER_CALLBACKS;',
FILTERS => \&_inline_filter,
};
}
my @inline_replace =
qw(
Imager::ImgRaw
Imager::Color::Float
Imager::Color
Imager::IO
);
my %inline_replace =
map { (my $tmp = $_) =~ s/::/__/g; $_ => $tmp } @inline_replace;
my $inline_replace_re = "\\b(" . join('|', @inline_replace) . ")\\b";
sub _inline_filter {
my $code = shift;
$code =~ s/$inline_replace_re/$inline_replace{$1}/g;
$code;
}
=item includes
Returns -I options suitable for use with ExtUtils::MakeMaker's INC
option.
=cut
sub includes {
my $class = shift;
my $base = $class->base_dir();
"-I" . $base . '/Imager/include',
}
=item typemap
Returns the full path to Imager's installed typemap.
=cut
sub typemap {
my $class = shift;
my $base = $class->base_dir();
$base . '/Imager/typemap';
}
1;
__END__
=back
=head1 AUTHOR
Tony Cook <tonyc@cpan.org>
=head1 REVISION
$Revision$
=head1 SEE ALSO
Imager, Imager::API, Imager::Inline, Imager::APIRef.
=cut
| Dokaponteam/ITF_Project | xampp/perl/vendor/lib/Imager/ExtUtils.pm | Perl | mit | 2,122 |
package Encode::MIME::Header;
use strict;
use warnings;
no warnings 'redefine';
our $VERSION = do { my @r = ( q$Revision: 2.5 $ =~ /\d+/g ); sprintf "%d." . "%02d" x $#r, @r };
use Encode qw(find_encoding encode_utf8 decode_utf8);
use MIME::Base64;
use Carp;
my %seed = (
decode_b => '1', # decodes 'B' encoding ?
decode_q => '1', # decodes 'Q' encoding ?
encode => 'B', # encode with 'B' or 'Q' ?
bpl => 75, # bytes per line
);
$Encode::Encoding{'MIME-Header'} =
bless { %seed, Name => 'MIME-Header', } => __PACKAGE__;
$Encode::Encoding{'MIME-B'} = bless {
%seed,
decode_q => 0,
Name => 'MIME-B',
} => __PACKAGE__;
$Encode::Encoding{'MIME-Q'} = bless {
%seed,
decode_q => 1,
encode => 'Q',
Name => 'MIME-Q',
} => __PACKAGE__;
use base qw(Encode::Encoding);
sub needs_lines { 1 }
sub perlio_ok { 0 }
sub decode($$;$) {
use utf8;
my ( $obj, $str, $chk ) = @_;
# zap spaces between encoded words
$str =~ s/\?=\s+=\?/\?==\?/gos;
# multi-line header to single line
$str =~ s/(:?\r|\n|\r\n)[ \t]//gos;
1 while ( $str =~
s/(\=\?[0-9A-Za-z\-_]+\?[Qq]\?)(.*?)\?\=\1(.*?)\?\=/$1$2$3\?\=/ )
; # Concat consecutive QP encoded mime headers
# Fixes breaking inside multi-byte characters
$str =~ s{
=\? # begin encoded word
([0-9A-Za-z\-_]+) # charset (encoding)
(?:\*[A-Za-z]{1,8}(?:-[A-Za-z]{1,8})*)? # language (RFC 2231)
\?([QqBb])\? # delimiter
(.*?) # Base64-encodede contents
\?= # end encoded word
}{
if (uc($2) eq 'B'){
$obj->{decode_b} or croak qq(MIME "B" unsupported);
decode_b($1, $3);
}elsif(uc($2) eq 'Q'){
$obj->{decode_q} or croak qq(MIME "Q" unsupported);
decode_q($1, $3);
}else{
croak qq(MIME "$2" encoding is nonexistent!);
}
}egox;
$_[1] = '' if $chk;
return $str;
}
sub decode_b {
my $enc = shift;
my $d = find_encoding($enc) or croak qq(Unknown encoding "$enc");
my $db64 = decode_base64(shift);
return $d->name eq 'utf8'
? Encode::decode_utf8($db64)
: $d->decode( $db64, Encode::FB_PERLQQ );
}
sub decode_q {
my ( $enc, $q ) = @_;
my $d = find_encoding($enc) or croak qq(Unknown encoding "$enc");
$q =~ s/_/ /go;
$q =~ s/=([0-9A-Fa-f]{2})/pack("C", hex($1))/ego;
return $d->name eq 'utf8'
? Encode::decode_utf8($q)
: $d->decode( $q, Encode::FB_PERLQQ );
}
my $especials =
join( '|' => map { quotemeta( chr($_) ) }
unpack( "C*", qq{()<>@,;:\"\'/[]?.=} ) );
my $re_encoded_word = qr{
(?:
=\? # begin encoded word
(?:[0-9A-Za-z\-_]+) # charset (encoding)
(?:\*\w+(?:-\w+)*)? # language (RFC 2231)
\?(?:[QqBb])\? # delimiter
(?:.*?) # Base64-encodede contents
\?= # end encoded word
)
}xo;
my $re_especials = qr{$re_encoded_word|$especials}xo;
sub encode($$;$) {
my ( $obj, $str, $chk ) = @_;
my @line = ();
for my $line ( split /\r|\n|\r\n/o, $str ) {
my ( @word, @subline );
for my $word ( split /($re_especials)/o, $line ) {
if ( $word =~ /[^\x00-\x7f]/o
or $word =~ /^$re_encoded_word$/o )
{
push @word, $obj->_encode($word);
}
else {
push @word, $word;
}
}
my $subline = '';
for my $word (@word) {
use bytes ();
if ( bytes::length($subline) + bytes::length($word) >
$obj->{bpl} )
{
push @subline, $subline;
$subline = '';
}
$subline .= $word;
}
$subline and push @subline, $subline;
push @line, join( "\n " => @subline );
}
$_[1] = '' if $chk;
return join( "\n", @line );
}
use constant HEAD => '=?UTF-8?';
use constant TAIL => '?=';
use constant SINGLE => { B => \&_encode_b, Q => \&_encode_q, };
sub _encode {
my ( $o, $str ) = @_;
my $enc = $o->{encode};
my $llen = ( $o->{bpl} - length(HEAD) - 2 - length(TAIL) );
# to coerce a floating-point arithmetics, the following contains
# .0 in numbers -- dankogai
$llen *= $enc eq 'B' ? 3.0 / 4.0 : 1.0 / 3.0;
my @result = ();
my $chunk = '';
while ( length( my $chr = substr( $str, 0, 1, '' ) ) ) {
use bytes ();
if ( bytes::length($chunk) + bytes::length($chr) > $llen ) {
push @result, SINGLE->{$enc}($chunk);
$chunk = '';
}
$chunk .= $chr;
}
$chunk and push @result, SINGLE->{$enc}($chunk);
return @result;
}
sub _encode_b {
HEAD . 'B?' . encode_base64( encode_utf8(shift), '' ) . TAIL;
}
sub _encode_q {
my $chunk = shift;
$chunk = encode_utf8($chunk);
$chunk =~ s{
([^0-9A-Za-z])
}{
join("" => map {sprintf "=%02X", $_} unpack("C*", $1))
}egox;
return HEAD . 'Q?' . $chunk . TAIL;
}
1;
__END__
=head1 NAME
Encode::MIME::Header -- MIME 'B' and 'Q' header encoding
=head1 SYNOPSIS
use Encode qw/encode decode/;
$utf8 = decode('MIME-Header', $header);
$header = encode('MIME-Header', $utf8);
=head1 ABSTRACT
This module implements RFC 2047 Mime Header Encoding. There are 3
variant encoding names; C<MIME-Header>, C<MIME-B> and C<MIME-Q>. The
difference is described below
decode() encode()
----------------------------------------------
MIME-Header Both B and Q =?UTF-8?B?....?=
MIME-B B only; Q croaks =?UTF-8?B?....?=
MIME-Q Q only; B croaks =?UTF-8?Q?....?=
=head1 DESCRIPTION
When you decode(=?I<encoding>?I<X>?I<ENCODED WORD>?=), I<ENCODED WORD>
is extracted and decoded for I<X> encoding (B for Base64, Q for
Quoted-Printable). Then the decoded chunk is fed to
decode(I<encoding>). So long as I<encoding> is supported by Encode,
any source encoding is fine.
When you encode, it just encodes UTF-8 string with I<X> encoding then
quoted with =?UTF-8?I<X>?....?= . The parts that RFC 2047 forbids to
encode are left as is and long lines are folded within 76 bytes per
line.
=head1 BUGS
It would be nice to support encoding to non-UTF8, such as =?ISO-2022-JP?
and =?ISO-8859-1?= but that makes the implementation too complicated.
These days major mail agents all support =?UTF-8? so I think it is
just good enough.
Due to popular demand, 'MIME-Header-ISO_2022_JP' was introduced by
Makamaka. Thre are still too many MUAs especially cellular phone
handsets which does not grok UTF-8.
=head1 SEE ALSO
L<Encode>
RFC 2047, L<http://www.faqs.org/rfcs/rfc2047.html> and many other
locations.
=cut
| leighpauls/k2cro4 | third_party/cygwin/lib/perl5/5.10/i686-cygwin/Encode/MIME/Header.pm | Perl | bsd-3-clause | 6,874 |
# src/pl/plperl/text2macro.pl
=head1 NAME
text2macro.pl - convert text files into C string-literal macro definitions
=head1 SYNOPSIS
text2macro [options] file ... > output.h
Options:
--prefix=S - add prefix S to the names of the macros
--name=S - use S as the macro name (assumes only one file)
--strip=S - don't include lines that match perl regex S
=head1 DESCRIPTION
Reads one or more text files and outputs a corresponding series of C
pre-processor macro definitions. Each macro defines a string literal that
contains the contents of the corresponding text file. The basename of the text
file as capitalized and used as the name of the macro, along with an optional prefix.
=cut
use strict;
use warnings;
use Getopt::Long;
GetOptions(
'prefix=s' => \my $opt_prefix,
'name=s' => \my $opt_name,
'strip=s' => \my $opt_strip,
'selftest!' => sub { exit selftest() },
) or exit 1;
die "No text files specified"
unless @ARGV;
print qq{
/*
* DO NOT EDIT - THIS FILE IS AUTOGENERATED - CHANGES WILL BE LOST
* Written by $0 from @ARGV
*/
};
for my $src_file (@ARGV) {
(my $macro = $src_file) =~ s/ .*? (\w+) (?:\.\w+) $/$1/x;
open my $src_fh, $src_file # not 3-arg form
or die "Can't open $src_file: $!";
printf qq{#define %s%s \\\n},
$opt_prefix || '',
($opt_name) ? $opt_name : uc $macro;
while (<$src_fh>) {
chomp;
next if $opt_strip and m/$opt_strip/o;
# escape the text to suite C string literal rules
s/\\/\\\\/g;
s/"/\\"/g;
printf qq{"%s\\n" \\\n}, $_;
}
print qq{""\n\n};
}
print "/* end */\n";
exit 0;
sub selftest {
my $tmp = "text2macro_tmp";
my $string = q{a '' '\\'' "" "\\"" "\\\\" "\\\\n" b};
open my $fh, ">$tmp.pl" or die;
print $fh $string;
close $fh;
system("perl $0 --name=X $tmp.pl > $tmp.c") == 0 or die;
open $fh, ">>$tmp.c";
print $fh "#include <stdio.h>\n";
print $fh "int main() { puts(X); return 0; }\n";
close $fh;
system("cat -n $tmp.c");
system("make $tmp") == 0 or die;
open $fh, "./$tmp |" or die;
my $result = <$fh>;
unlink <$tmp.*>;
warn "Test string: $string\n";
warn "Result : $result";
die "Failed!" if $result ne "$string\n";
}
| rubikloud/gpdb | src/pl/plperl/text2macro.pl | Perl | apache-2.0 | 2,166 |
=pod
=head1 NAME
BIO_s_connect, BIO_new_connect, BIO_set_conn_hostname, BIO_set_conn_port,
BIO_set_conn_ip, BIO_set_conn_int_port, BIO_get_conn_hostname,
BIO_get_conn_port, BIO_get_conn_ip, BIO_get_conn_int_port,
BIO_set_nbio, BIO_do_connect - connect BIO
=head1 SYNOPSIS
#include <openssl/bio.h>
BIO_METHOD * BIO_s_connect(void);
BIO *BIO_new_connect(char *name);
long BIO_set_conn_hostname(BIO *b, char *name);
long BIO_set_conn_port(BIO *b, char *port);
long BIO_set_conn_ip(BIO *b, char *ip);
long BIO_set_conn_int_port(BIO *b, char *port);
char *BIO_get_conn_hostname(BIO *b);
char *BIO_get_conn_port(BIO *b);
char *BIO_get_conn_ip(BIO *b, dummy);
long BIO_get_conn_int_port(BIO *b, int port);
long BIO_set_nbio(BIO *b, long n);
int BIO_do_connect(BIO *b);
=head1 DESCRIPTION
BIO_s_connect() returns the connect BIO method. This is a wrapper
round the platform's TCP/IP socket connection routines.
Using connect BIOs, TCP/IP connections can be made and data
transferred using only BIO routines. In this way any platform
specific operations are hidden by the BIO abstraction.
Read and write operations on a connect BIO will perform I/O
on the underlying connection. If no connection is established
and the port and hostname (see below) is set up properly then
a connection is established first.
Connect BIOs support BIO_puts() but not BIO_gets().
If the close flag is set on a connect BIO then any active
connection is shutdown and the socket closed when the BIO
is freed.
Calling BIO_reset() on a connect BIO will close any active
connection and reset the BIO into a state where it can connect
to the same host again.
BIO_get_fd() places the underlying socket in B<c> if it is not NULL,
it also returns the socket . If B<c> is not NULL it should be of
type (int *).
BIO_set_conn_hostname() uses the string B<name> to set the hostname.
The hostname can be an IP address. The hostname can also include the
port in the form hostname:port . It is also acceptable to use the
form "hostname/any/other/path" or "hostname:port/any/other/path".
BIO_set_conn_port() sets the port to B<port>. B<port> can be the
numerical form or a string such as "http". A string will be looked
up first using getservbyname() on the host platform but if that
fails a standard table of port names will be used. Currently the
list is http, telnet, socks, https, ssl, ftp, gopher and wais.
BIO_set_conn_ip() sets the IP address to B<ip> using binary form,
that is four bytes specifying the IP address in big-endian form.
BIO_set_conn_int_port() sets the port using B<port>. B<port> should
be of type (int *).
BIO_get_conn_hostname() returns the hostname of the connect BIO or
NULL if the BIO is initialized but no hostname is set.
This return value is an internal pointer which should not be modified.
BIO_get_conn_port() returns the port as a string.
BIO_get_conn_ip() returns the IP address in binary form.
BIO_get_conn_int_port() returns the port as an int.
BIO_set_nbio() sets the non blocking I/O flag to B<n>. If B<n> is
zero then blocking I/O is set. If B<n> is 1 then non blocking I/O
is set. Blocking I/O is the default. The call to BIO_set_nbio()
should be made before the connection is established because
non blocking I/O is set during the connect process.
BIO_new_connect() combines BIO_new() and BIO_set_conn_hostname() into
a single call: that is it creates a new connect BIO with B<name>.
BIO_do_connect() attempts to connect the supplied BIO. It returns 1
if the connection was established successfully. A zero or negative
value is returned if the connection could not be established, the
call BIO_should_retry() should be used for non blocking connect BIOs
to determine if the call should be retried.
=head1 NOTES
If blocking I/O is set then a non positive return value from any
I/O call is caused by an error condition, although a zero return
will normally mean that the connection was closed.
If the port name is supplied as part of the host name then this will
override any value set with BIO_set_conn_port(). This may be undesirable
if the application does not wish to allow connection to arbitrary
ports. This can be avoided by checking for the presence of the ':'
character in the passed hostname and either indicating an error or
truncating the string at that point.
The values returned by BIO_get_conn_hostname(), BIO_get_conn_port(),
BIO_get_conn_ip() and BIO_get_conn_int_port() are updated when a
connection attempt is made. Before any connection attempt the values
returned are those set by the application itself.
Applications do not have to call BIO_do_connect() but may wish to do
so to separate the connection process from other I/O processing.
If non blocking I/O is set then retries will be requested as appropriate.
It addition to BIO_should_read() and BIO_should_write() it is also
possible for BIO_should_io_special() to be true during the initial
connection process with the reason BIO_RR_CONNECT. If this is returned
then this is an indication that a connection attempt would block,
the application should then take appropriate action to wait until
the underlying socket has connected and retry the call.
BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_set_conn_ip(),
BIO_set_conn_int_port(), BIO_get_conn_hostname(), BIO_get_conn_port(),
BIO_get_conn_ip(), BIO_get_conn_int_port(), BIO_set_nbio() and
BIO_do_connect() are macros.
=head1 RETURN VALUES
BIO_s_connect() returns the connect BIO method.
BIO_get_fd() returns the socket or -1 if the BIO has not
been initialized.
BIO_set_conn_hostname(), BIO_set_conn_port(), BIO_set_conn_ip() and
BIO_set_conn_int_port() always return 1.
BIO_get_conn_hostname() returns the connected hostname or NULL is
none was set.
BIO_get_conn_port() returns a string representing the connected
port or NULL if not set.
BIO_get_conn_ip() returns a pointer to the connected IP address in
binary form or all zeros if not set.
BIO_get_conn_int_port() returns the connected port or 0 if none was
set.
BIO_set_nbio() always returns 1.
BIO_do_connect() returns 1 if the connection was successfully
established and 0 or -1 if the connection failed.
=head1 EXAMPLE
This is example connects to a webserver on the local host and attempts
to retrieve a page and copy the result to standard output.
BIO *cbio, *out;
int len;
char tmpbuf[1024];
ERR_load_crypto_strings();
cbio = BIO_new_connect("localhost:http");
out = BIO_new_fp(stdout, BIO_NOCLOSE);
if(BIO_do_connect(cbio) <= 0) {
fprintf(stderr, "Error connecting to server\n");
ERR_print_errors_fp(stderr);
/* whatever ... */
}
BIO_puts(cbio, "GET / HTTP/1.0\n\n");
for(;;) {
len = BIO_read(cbio, tmpbuf, 1024);
if(len <= 0) break;
BIO_write(out, tmpbuf, len);
}
BIO_free(cbio);
BIO_free(out);
=head1 SEE ALSO
TBA
| dkoontz/nodegit | vendor/openssl/openssl/doc/crypto/BIO_s_connect.pod | Perl | mit | 6,795 |
#!/usr/bin/perl
use strict;
use warnings;
my $found = 0;
my $COLON_POS = 10;
sub msg {
$found = 1;
my $v = shift;
$v =~ /^\s*([^:]+):(.*)$/;
chomp(my $errtype = $1);
my $rest = $2;
my $padding = ' ' x ($COLON_POS - length $errtype);
print "$padding$errtype:$rest\n";
}
my $C = 0;
if ($ARGV[0] =~ /^-/) {
my $lang = shift @ARGV;
$C = ($lang eq '-C');
}
our %basenames = ();
our %guardnames = ();
for my $fn (@ARGV) {
open(F, "$fn");
my $lastnil = 0;
my $lastline = "";
my $incomment = 0;
my $in_func_head = 0;
my $basename = $fn;
$basename =~ s#.*/##;
if ($basenames{$basename}) {
msg "dup fname:$fn (same as $basenames{$basename}).\n";
} else {
$basenames{$basename} = $fn;
}
my $isheader = ($fn =~ /\.h/);
my $seenguard = 0;
my $guardname = "<none>";
while (<F>) {
## Warn about windows-style newlines.
# (We insist on lines that end with a single LF character, not
# CR LF.)
if (/\r/) {
msg "CR:$fn:$.\n";
}
## Warn about tabs.
# (We only use spaces)
if (/\t/) {
msg "TAB:$fn:$.\n";
}
## Warn about labels that don't have a space in front of them
# (We indent every label at least one space)
if (/^[a-zA-Z_][a-zA-Z_0-9]*:/) {
msg "nosplabel:$fn:$.\n";
}
## Warn about trailing whitespace.
# (We don't allow whitespace at the end of the line; make your
# editor highlight it for you so you can stop adding it in.)
if (/ +$/) {
msg "Space\@EOL:$fn:$.\n";
}
## Warn about control keywords without following space.
# (We put a space after every 'if', 'while', 'for', 'switch', etc)
if ($C && /\s(?:if|while|for|switch)\(/) {
msg "KW(:$fn:$.\n";
}
## Warn about #else #if instead of #elif.
# (We only allow #elif)
if (($lastline =~ /^\# *else/) and ($_ =~ /^\# *if/)) {
msg "#else#if:$fn:$.\n";
}
## Warn about some K&R violations
# (We use K&R-style C, where open braces go on the same line as
# the statement that introduces them. In other words:
# if (a) {
# stuff;
# } else {
# other stuff;
# }
if (/^\s+\{/ and $lastline =~ /^\s*(if|while|for|else if)/ and
$lastline !~ /\{$/) {
msg "non-K&R {:$fn:$.\n";
}
if (/^\s*else/ and $lastline =~ /\}$/) {
msg "}\\nelse:$fn:$.\n";
}
$lastline = $_;
## Warn about unnecessary empty lines.
# (Don't put an empty line before a line that contains nothing
# but a closing brace.)
if ($lastnil && /^\s*}\n/) {
msg "UnnecNL:$fn:$.\n";
}
## Warn about multiple empty lines.
# (At most one blank line in a row.)
if ($lastnil && /^$/) {
msg "DoubleNL:$fn:$.\n";
} elsif (/^$/) {
$lastnil = 1;
} else {
$lastnil = 0;
}
## Terminals are still 80 columns wide in my world. I refuse to
## accept double-line lines.
# (Don't make lines wider than 80 characters, including newline.)
if (/^.{80}/) {
msg "Wide:$fn:$.\n";
}
### Juju to skip over comments and strings, since the tests
### we're about to do are okay there.
if ($C) {
if ($incomment) {
if (m!\*/!) {
s!.*?\*/!!;
$incomment = 0;
} else {
next;
}
}
if ($isheader) {
if ($seenguard == 0) {
if (/ifndef\s+(\S+)/) {
++$seenguard;
$guardname = $1;
}
} elsif ($seenguard == 1) {
if (/^\#define (\S+)/) {
++$seenguard;
if ($1 ne $guardname) {
msg "GUARD:$fn:$.: Header guard macro mismatch.\n";
}
}
}
}
if (m!/\*.*?\*/!) {
s!\s*/\*.*?\*/!!;
} elsif (m!/\*!) {
s!\s*/\*!!;
$incomment = 1;
next;
}
s!"(?:[^\"]+|\\.)*"!"X"!g;
next if /^\#/;
## Skip C++-style comments.
if (m!//!) {
# msg "//:$fn:$.\n";
s!//.*!!;
}
## Warn about unquoted braces preceded by non-space.
# (No character except a space should come before a {)
if (/([^\s'])\{/) {
msg "$1\{:$fn:$.\n";
}
## Warn about double semi-colons at the end of a line.
if (/;;$/) {
msg ";;:$fn:$.\n"
}
## Warn about multiple internal spaces.
#if (/[^\s,:]\s{2,}[^\s\\=]/) {
# msg "X X:$fn:$.\n";
#}
## Warn about { with stuff after.
#s/\s+$//;
#if (/\{[^\}\\]+$/) {
# msg "{X:$fn:$.\n";
#}
## Warn about function calls with space before parens.
# (Don't put a space between the name of a function and its
# arguments.)
if (/(\w+)\s\(([A-Z]*)/) {
if ($1 ne "if" and $1 ne "while" and $1 ne "for" and
$1 ne "switch" and $1 ne "return" and $1 ne "int" and
$1 ne "elsif" and $1 ne "WINAPI" and $2 ne "WINAPI" and
$1 ne "void" and $1 ne "__attribute__" and $1 ne "op" and
$1 ne "size_t" and $1 ne "double" and $1 ne "uint64_t" and
$1 ne "workqueue_reply_t" and $1 ne "bool") {
msg "fn ():$fn:$.\n";
}
}
## Warn about functions not declared at start of line.
# (When you're declaring functions, put "static" and "const"
# and the return type on one line, and the function name at
# the start of a new line.)
if ($in_func_head ||
($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ &&
! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ &&
! /= *\{$/ && ! /;$/)) {
if (/.\{$/){
msg "fn() {:$fn:$.\n";
$in_func_head = 0;
} elsif (/^\S[^\(]* +\**[a-zA-Z0-9_]+\(/) {
$in_func_head = -1; # started with tp fn
} elsif (/;$/) {
$in_func_head = 0;
} elsif (/\{/) {
if ($in_func_head == -1) {
msg "tp fn():$fn:$.\n";
}
$in_func_head = 0;
}
}
## Check for forbidden functions except when they are
# explicitly permitted
if (/\bassert\(/ && not /assert OK/) {
msg "assert:$fn:$. (use tor_assert)\n";
}
if (/\bmemcmp\(/ && not /memcmp OK/) {
msg "memcmp:$fn:$. (use {tor,fast}_mem{eq,neq,cmp}\n";
}
# always forbidden.
if (not /\ OVERRIDE\ /) {
if (/\bstrcat\(/ or /\bstrcpy\(/ or /\bsprintf\(/) {
msg "$&:$fn:$.\n";
}
if (/\bmalloc\(/ or /\bfree\(/ or /\brealloc\(/ or
/\bstrdup\(/ or /\bstrndup\(/ or /\bcalloc\(/) {
msg "$&:$fn:$. (use tor_malloc, tor_free, etc)\n";
}
}
}
}
if ($isheader && $C) {
if ($seenguard < 2) {
msg "noguard:$fn (No #ifndef/#define header guard pair found)\n";
} elsif ($guardnames{$guardname}) {
msg "dupguard:$fn (Guard macro $guardname also used in $guardnames{$guardname})\n";
} else {
$guardnames{$guardname} = $fn;
}
}
close(F);
}
exit $found;
| zcoinofficial/zcoin | src/tor/scripts/maint/checkSpace.pl | Perl | mit | 8,319 |
# Copyright (c) 2004 Peter Marschall <peter@adpm.de>. All rights reserved.
# This program is free software; you can redistribute it and/or
# modify it under the same terms as Perl itself.
package Net::LDAP::Control::PersistentSearch;
use vars qw(@ISA $VERSION);
use Net::LDAP::Control;
@ISA = qw(Net::LDAP::Control);
$VERSION = "0.01";
use Net::LDAP::ASN qw(PersistentSearch);
use strict;
sub init {
my($self) = @_;
delete $self->{asn};
unless (exists $self->{value}) {
$self->{asn} = {
changeTypes => $self->{changeTypes} || '15',
changesOnly => $self->{changesOnly} || '0',
returnECs => $self->{returnECs} || '0',
};
}
$self;
}
sub changeTypes {
my $self = shift;
$self->{asn} ||= $PersistentSearch->decode($self->{value});
if (@_) {
delete $self->{value};
return $self->{asn}{changeTypes} = shift || 0;
}
$self->{asn}{changeTypes};
}
sub changesOnly {
my $self = shift;
$self->{asn} ||= $PersistentSearch->decode($self->{value});
if (@_) {
delete $self->{value};
return $self->{asn}{changesOnly} = shift || 0;
}
$self->{asn}{changesOnly};
}
sub returnECs {
my $self = shift;
$self->{asn} ||= $PersistentSearch->decode($self->{value});
if (@_) {
delete $self->{value};
return $self->{asn}{returnECs} = shift || 0;
}
$self->{asn}{returnECs};
}
sub value {
my $self = shift;
exists $self->{value}
? $self->{value}
: $self->{value} = $PersistentSearch->encode($self->{asn});
}
1;
__END__
=head1 NAME
Net::LDAP::Control::PersistentSearch - LDAPv3 Persistent Search control object
=head1 SYNOPSIS
use Net::LDAP;
use Net::LDAP::Control::PersistentSearch;
$ldap = Net::LDAP->new( "ldap.mydomain.eg" );
$persist = Net::LDAP::Control::PersistentSearch->new( changeTypes => 15,
changesOnly => 1,
returnECs => 1 );
$srch = $ldap->search( base => "cn=People,dc=mydomain,dc=eg",
filter => "(objectClass=person)",
callback => \&process_entry, # call for each entry
control => [ $persist ] );
die "error: ",$srch->code(),": ",$srch->error() if ($srch->code());
sub process_entry {
my $message = shift;
my $entry = shift;
print $entry->dn()."\n";
}
=head1 DESCRIPTION
C<Net::LDAP::Control::PersistentSearch> provides an interface for the creation
and manipulation of objects that represent the C<PersistentSearch> control as
described by draft-smith-psearch-ldap-01.txt.
=head1 CONSTRUCTOR ARGUMENTS
In addition to the constructor arguments described in
L<Net::LDAP::Control> the following are provided.
=over 4
=item changeTypes
An integer value determining the types of changes to look out for.
It is the bitwise OR of the following values (which represent the LDAP
operations indicated next to them):
=over 4
=item 1 = add
=item 2 = delete
=item 4 = modify
=item 8 = modDN
=back
If it is not given it defaults to 15 meaning all changes.
=item changesOnly
A boolean value telling whether the server may return
entries that match the search criteria.
If C<TRUE> the server must not return return any existing
entries that match the search criteria. Entries are only
returned when they are changed (added, modified, deleted, or
subject to a modifyDN operation)
=item returnECs
If C<TRUE>, the server must return an Entry Change Notification
control with each entry returned as the result of changes.
See L<Net::LDAP::Control::EntryChange> for details.
=back
=head1 METHODS
As with L<Net::LDAP::Control> each constructor argument
described above is also available as a method on the object which will
return the current value for the attribute if called without an argument,
and set a new value for the attribute if called with an argument.
=head1 SEE ALSO
L<Net::LDAP>,
L<Net::LDAP::Control>,
L<Net::LDAP::Control::EntryChange>
=head1 AUTHOR
Peter Marschall E<lt>peter@adpm.deE<gt>, based on Net::LDAP::Control::Page
from Graham Barr E<lt>gbarr@pobox.comE<gt> and the preparatory work
of Don Miller E<lt>donm@uidaho.eduE<gt>.
Please report any bugs, or post any suggestions, to the perl-ldap
mailing list E<lt>perl-ldap@perl.orgE<gt>
=head1 COPYRIGHT
Copyright (c) 2004 Peter Marschall. All rights reserved. This program is
free software; you can redistribute it and/or modify it under the same
terms as Perl itself.
=cut
| carlgao/lenga | images/lenny64-peon/usr/share/perl5/Net/LDAP/Control/PersistentSearch.pm | Perl | mit | 4,478 |
use strict;
use warnings;
use List::Util qw( max min );
my $n = int ( <> );
my @a = split ( " ", <> );
my $len = scalar @a;
my $res = $a[-1] - $a[0];
for ( my $i = 1; $i + 1< $len; $i++ ){
my $last = $a[0];
my $mx = 0;
for ( my $j = 1; $j < $len; $j++ ) {
next if $i == $j;
$mx = max $mx, int($a[$j] - $last);
$last = $a[$j];
}
$res = min $res, $mx;
}
print $res."\n";
| ashamza/Perl | Codeforces/Accepted/496A.pl | Perl | mit | 382 |
#BEGIN_HEADER
#
# Copyright (C) 2020 Mahdi Safsafi.
#
# https://github.com/MahdiSafsafi/opcodesDB
#
# See licence file 'LICENCE' for use and distribution rights.
#
#END_HEADER
use strict;
use warnings;
# PF2IW-Packed Floating-Point to Integer Word Conversion with Sign Extend.
ENCODING PF2IW => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x1c',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3NEXT_PF2IW',
};
# PFNACC-Packed Floating-Point Negative Accumulate.
ENCODING PFNACC => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x8a',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3NEXT_PFNACC',
};
# PFPNACC-Packed Floating-Point Mixed Positive-Negative Accumulate.
ENCODING PFPNACC => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x8e',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3NEXT_PFPNACC',
};
# PI2FW-Packed Integer Word to Floating-Point Conversion.
ENCODING PI2FW => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x0c',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3NEXT_PI2FW',
};
# PSWAPD-Packed Swap Doubleword.
ENCODING PSWAPD => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xbb',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3NEXT_PSWAPD',
};
# FEMMS-Faster entry/exit of the MMX or floating-point state.
ENCODING FEMMS => {
diagram => 'MAP=0f OP=0x0e',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
docvars => 'X87_MMX_STATE_W=1',
tags => 'page=D3N_FEMMS',
};
# PAVGUSB-Packed 8-bit Unsigned Integer Averaging.
ENCODING PAVGUSB => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xbf',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PAVGUSB',
};
# PF2ID-Packed Floating-Point to 32-bit Integer.
ENCODING PF2ID => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x1d',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PF2ID',
};
# PFACC-Packed Floating-Point Accumulate.
ENCODING PFACC => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xae',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFACC',
};
# PFADD-Packed Floating-Point Addition.
ENCODING PFADD => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x9e',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFADD',
};
# PFCMPEQ-Packed Floating-Point Comparison, Equal.
ENCODING PFCMPEQ => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xb0',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFCMPEQ',
};
# PFCMPGE-Packed Floating-Point Comparison, Greater or Equal.
ENCODING PFCMPGE => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x90',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFCMPGE',
};
# PFCMPGT-Packed Floating-Point Comparison, Greater.
ENCODING PFCMPGT => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xa0',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFCMPGT',
};
# PFMAX-Packed Floating-Point Maximum.
ENCODING PFMAX => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xa4',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFMAX',
};
# PFMIN-Packed Floating-Point Minimum.
ENCODING PFMIN => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x94',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFMIN',
};
# PFMUL-Packed Floating-Point Multiplication.
ENCODING PFMUL => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xb4',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFMUL',
};
# PFRCP-Packed Floating-Point Reciprocal Approximation.
ENCODING PFRCP => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x96',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFRCP',
};
# PFRCPIT2-Packed Floating-Point Reciprocal/Reciprocal Square Root Second Iteration Step.
ENCODING PFRCPIT2 => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xb6',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFRCPIT2',
};
# PFRSQIT1-Packed Floating-Point Reciprocal Square Root First Iteration Step.
ENCODING PFRSQIT1 => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xa7',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFRSQIT1',
};
# PFSUB-Packed Floating-Point Subtraction.
ENCODING PFSUB => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x9a',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFSUB',
};
# PFSUBR-Packed Floating-Point Reverse Subtraction.
ENCODING PFSUBR => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xaa',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PFSUBR',
};
# PI2FD-Packed 32-bit Integer to Floating-Point Conversion.
ENCODING PI2FD => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x0d',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PI2FD',
};
# PMULHRW-Packed 16-bit Integer Multiply with rounding.
ENCODING PMULHRW => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xb7',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=D3N_PMULHRW',
};
# PREFETCH/PREFETCHW* Prefetch at least a 32-byte line into L1 data cache (Dcache).
ENCODING PREFETCH_mb_1 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x0d REG=0',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=PREFETCH_NOP deprecated=1',
tags => 'page=D3N_PREFETCH',
};
ENCODING PREFETCH_mb_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x0d REG=3',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=PREFETCH_NOP deprecated=1',
tags => 'page=D3N_PREFETCH',
};
ENCODING PREFETCH_mb_3 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x0d REG=4',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=PREFETCH_NOP deprecated=1',
tags => 'page=D3N_PREFETCH',
};
ENCODING PREFETCH_mb_4 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x0d REG=5',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=PREFETCH_NOP deprecated=1',
tags => 'page=D3N_PREFETCH',
};
ENCODING PREFETCH_mb_5 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x0d REG=6',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=PREFETCH_NOP deprecated=1',
tags => 'page=D3N_PREFETCH',
};
ENCODING PREFETCH_mb_6 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x0d REG=7',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=PREFETCH_NOP deprecated=1',
tags => 'page=D3N_PREFETCH',
};
# EMMS-Empty MMX Technology State.
ENCODING EMMS => {
diagram => 'MAP=0f OP=0x77 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD',
metadata => 'isa=PENTIUMMMX',
docvars => 'X87_MMX_STATE_W=1',
tags => 'page=EMMS',
};
# MASKMOVQ-Store Selected Bytes of Quadword.
ENCODING MASKMOVQ => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xf7 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_NOFP2',
categories => 'FPSIMD|DATA_TRANSFER|STORE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MASKMOVQ',
};
# MOVNTQ-Store of Quadword Using Non-Temporal Hint.
ENCODING MOVNTQ => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xe7 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_NOFP2',
categories => 'FPSIMD|DATA_TRANSFER|STORE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MOVNTQ',
};
# MOVQ-Move Quadword.
ENCODING MOVQ_mqrq_1 => {
diagram => 'MAP=0f MODE=64 MR=1 OP=0x7e P66=0 PF2=0 PF3=0 W=1',
extensions => 'MMX',
exceptions => 'MMX_NOFP2',
categories => 'FPSIMD|DATA_TRANSFER|STORE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MOVQ',
};
ENCODING MOVQ_mqrq_3 => {
diagram => 'MAP=0f MR=1 OP=0x7f P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_NOFP2',
categories => 'FPSIMD|DATA_TRANSFER|STORE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MOVQ',
};
ENCODING MOVQ_rqmq_1 => {
diagram => 'MAP=0f MODE=64 MR=1 OP=0x6e P66=0 PF2=0 PF3=0 W=1',
extensions => 'MMX',
exceptions => 'MMX_NOFP2',
categories => 'FPSIMD|DATA_TRANSFER|STORE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MOVQ',
};
ENCODING MOVQ_rqmq_2 => {
diagram => 'MAP=0f MR=1 OP=0x6f P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_NOFP2',
categories => 'FPSIMD|DATA_TRANSFER|STORE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MOVQ',
};
# MOVD/MOVQ-Move Doubleword/Move Quadword.
ENCODING MOVD_mdrd_1 => {
diagram => 'MAP=0f MR=1 OP=0x7e P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'SYSTEM|CONVERSION',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MOVx',
};
ENCODING MOVD_rqmd => {
diagram => 'MAP=0f MR=1 OP=0x6e P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'SYSTEM|CONVERSION',
metadata => 'isa=PENTIUMMMX',
tags => 'page=MOVx',
};
# PACKSSWB/PACKSSDW-Pack with Signed Saturation.
ENCODING PACKSSDW_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x6b P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|MISC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PACKSSxx',
};
ENCODING PACKSSDW_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x6b P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|MISC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PACKSSxx',
};
ENCODING PACKSSWB_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x63 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|MISC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PACKSSxx',
};
ENCODING PACKSSWB_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x63 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|MISC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PACKSSxx',
};
# PACKUSWB-Pack with Unsigned Saturation.
ENCODING PACKUSWB_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x67 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|MISC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PACKUSWB',
};
ENCODING PACKUSWB_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x67 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|MISC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PACKUSWB',
};
# PADDSB/PADDSW-Add Packed Signed Integers with Signed Saturation.
ENCODING PADDSB_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xec P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDSx',
};
ENCODING PADDSW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xed P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDSx',
};
# PADDUSB/PADDUSW-Add Packed Unsigned Integers with Unsigned Saturation.
ENCODING PADDUSB_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xdc P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDUSx',
};
ENCODING PADDUSB_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xdc P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDUSx',
};
ENCODING PADDUSW_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xdd P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDUSx',
};
ENCODING PADDUSW_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xdd P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDUSx',
};
# PADDB/PADDW/PADDD/PADDQ-Add Packed Integers.
ENCODING PADDB_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xfc P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDx',
};
ENCODING PADDD_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xfe P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDx',
};
ENCODING PADDW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xfd P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PADDx',
};
# PAND-Logical AND.
ENCODING PAND_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xdb P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|BITWISE|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PAND',
};
ENCODING PAND_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xdb P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|BITWISE|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PAND',
};
# PANDN-Logical AND NOT.
ENCODING PANDN_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xdf P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|BITWISE|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PANDN',
};
ENCODING PANDN_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xdf P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|BITWISE|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PANDN',
};
# PAVGB/PAVGW-Average Packed Integers.
ENCODING PAVGB_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xe0 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|STAT',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PAVGx',
};
ENCODING PAVGB_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xe0 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|STAT',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PAVGx',
};
ENCODING PAVGW_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xe3 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|STAT',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PAVGx',
};
ENCODING PAVGW_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xe3 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|STAT',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PAVGx',
};
# PCMPEQB/PCMPEQW/PCMPEQD-Compare Packed Data for Equal.
ENCODING PCMPEQB_rqmq => {
diagram => 'MAP=0f MR=1 OP=0x74 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPEQx',
};
ENCODING PCMPEQD_rqmq => {
diagram => 'MAP=0f MR=1 OP=0x76 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|BITWISE|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPEQx',
};
ENCODING PCMPEQW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0x75 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPEQx',
};
# PCMPGTB/PCMPGTW/PCMPGTD-Compare Packed Signed Integers for Greater Than.
ENCODING PCMPGTB_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x64 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPGTx',
};
ENCODING PCMPGTB_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x64 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPGTx',
};
ENCODING PCMPGTD_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x66 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPGTx',
};
ENCODING PCMPGTD_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x66 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPGTx',
};
ENCODING PCMPGTW_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x65 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPGTx',
};
ENCODING PCMPGTW_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x65 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|COMPARISON',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PCMPGTx',
};
# PEXTRW-Extract Word.
ENCODING PEXTRW_rdmqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xc5 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_NOMEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PEXTRW',
};
# PFCPIT1.
ENCODING PFCPIT1 => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0xa6',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=PFCPIT1',
};
# PFSQRT.
ENCODING PFSQRT => {
diagram => 'ENC=3DNOW MAP=0f0f MR=1 OP=0x97',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=AMD3DNOW deprecated=1',
tags => 'page=PFSQRT',
};
# PINSRW-Insert Word.
ENCODING PINSRW_rqmxub => {
diagram => 'MAP=0f MR=1 OP=0xc4 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PINSRW',
};
# PMADDWD-Multiply and Add Packed Integers.
ENCODING PMADDWD_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xf5 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|CARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMADDWD',
};
# PMAXSB/PMAXSW/PMAXSD/PMAXSQ-Maximum of Packed Signed Integers.
ENCODING PMAXSW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xee P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|MATH|MIN_MAX',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMAXSx',
};
# PMAXUB/PMAXUW-Maximum of Packed Unsigned Integers.
ENCODING PMAXUB_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xde P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|MATH|MIN_MAX',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMAXUbw',
};
ENCODING PMAXUB_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xde P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|MATH|MIN_MAX',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMAXUbw',
};
# PMINSB/PMINSW-Minimum of Packed Signed Integers.
ENCODING PMINSW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xea P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|MATH|MIN_MAX',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMINSbw',
};
# PMINUB/PMINUW-Minimum of Packed Unsigned Integers.
ENCODING PMINUB_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xda P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|MATH|MIN_MAX',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMINUbw',
};
ENCODING PMINUB_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xda P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|MATH|MIN_MAX',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMINUbw',
};
# PMOVMSKB-Move Byte Mask.
ENCODING PMOVMSKB_rdmq => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xd7 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_NOMEM',
categories => 'FPSIMD|MISC',
metadata => 'isa=SSE',
tags => 'page=PMOVMSKB',
};
# PMULHUW-Multiply Packed Unsigned Integers and Store High Result.
ENCODING PMULHUW_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xe4 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMULHUW',
};
ENCODING PMULHUW_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xe4 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMULHUW',
};
# PMULHW-Multiply Packed Signed Integers and Store High Result.
ENCODING PMULHW_rqmq_1 => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0xe5 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMULHW',
};
ENCODING PMULHW_rqmq_2 => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0xe5 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMULHW',
};
# PMULLW-Multiply Packed Signed Integers and Store Low Result.
ENCODING PMULLW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xd5 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PMULLW',
};
# POR-Bitwise Logical OR.
ENCODING POR_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xeb P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|BITWISE|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=POR',
};
# PREFETCHW-Prefetch Data into Caches in Anticipation of a Write.
ENCODING PREFETCHW => {
diagram => 'MAP=0f MOD=MEM MR=1 OP=0x0d REG=1',
extensions => 'AMD3DNOW',
categories => 'FPSIMD',
metadata => 'isa=PREFETCH_NOP deprecated=1',
tags => 'page=PREFETCHW',
};
# PSADBW-Compute Sum of Absolute Differences.
ENCODING PSADBW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xf6 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC|MISC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSADBW',
};
# PSHUFW-Shuffle Packed Words.
ENCODING PSHUFW => {
diagram => 'MAP=0f MR=1 OP=0x70 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSHUFW',
};
# PSLLW/PSLLD/PSLLQ-Shift Packed Data Left Logical.
ENCODING PSLLD_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x72 P66=0 PF2=0 PF3=0 REG=6',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_LEFT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSLLx',
};
ENCODING PSLLD_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xf2 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_LEFT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSLLx',
};
ENCODING PSLLQ_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x73 P66=0 PF2=0 PF3=0 REG=6',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_LEFT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSLLx',
};
ENCODING PSLLQ_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xf3 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_LEFT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSLLx',
};
ENCODING PSLLW_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x71 P66=0 PF2=0 PF3=0 REG=6',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_LEFT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSLLx',
};
ENCODING PSLLW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xf1 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_LEFT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSLLx',
};
# PSRAW/PSRAD/PSRAQ-Shift Packed Data Right Arithmetic.
ENCODING PSRAD_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x72 P66=0 PF2=0 PF3=0 REG=4',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRAx',
};
ENCODING PSRAD_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xe2 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRAx',
};
ENCODING PSRAW_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x71 P66=0 PF2=0 PF3=0 REG=4',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRAx',
};
ENCODING PSRAW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xe1 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRAx',
};
# PSRLW/PSRLD/PSRLQ-Shift Packed Data Right Logical.
ENCODING PSRLD_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x72 P66=0 PF2=0 PF3=0 REG=2',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRLx',
};
ENCODING PSRLD_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xd2 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRLx',
};
ENCODING PSRLQ_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x73 P66=0 PF2=0 PF3=0 REG=2',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRLx',
};
ENCODING PSRLQ_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xd3 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRLx',
};
ENCODING PSRLW_mqub => {
diagram => 'MAP=0f MOD=REG MR=1 OP=0x71 P66=0 PF2=0 PF3=0 REG=2',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRLx',
};
ENCODING PSRLW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xd1 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SHIFT_RIGHT|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSRLx',
};
# PSUBSB/PSUBSW-Subtract Packed Signed Integers with Signed Saturation.
ENCODING PSUBSB_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xe8 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSUBSx',
};
ENCODING PSUBSW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xe9 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSUBSx',
};
# PSUBUSB/PSUBUSW-Subtract Packed Unsigned Integers with Unsigned Saturation.
ENCODING PSUBUSB_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xd8 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSUBUSx',
};
ENCODING PSUBUSW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xd9 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSUBUSx',
};
# PSUBB/PSUBW/PSUBD-Subtract Packed Integers.
ENCODING PSUBB_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xf8 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSUBx',
};
ENCODING PSUBD_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xfa P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSUBx',
};
ENCODING PSUBW_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xf9 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|ARITHMETIC',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PSUBx',
};
# PUNPCKHBW/PUNPCKHWD/PUNPCKHDQ/PUNPCKHQDQ-Unpack High Data.
ENCODING PUNPCKHBW_rqmx => {
diagram => 'MAP=0f MR=1 OP=0x68 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PUNPCKHxx',
};
ENCODING PUNPCKHDQ_rqmx => {
diagram => 'MAP=0f MR=1 OP=0x6a P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PUNPCKHxx',
};
ENCODING PUNPCKHWD_rqmx => {
diagram => 'MAP=0f MR=1 OP=0x69 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PUNPCKHxx',
};
# PUNPCKLBW/PUNPCKLWD/PUNPCKLDQ/PUNPCKLQDQ-Unpack Low Data.
ENCODING PUNPCKLBW_rqmd => {
diagram => 'MAP=0f MR=1 OP=0x60 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PUNPCKLxx',
};
ENCODING PUNPCKLDQ_rqmd => {
diagram => 'MAP=0f MR=1 OP=0x62 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PUNPCKLxx',
};
ENCODING PUNPCKLWD_rqmd => {
diagram => 'MAP=0f MR=1 OP=0x61 P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|SWIZZLE',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PUNPCKLxx',
};
# PXOR-Logical Exclusive OR.
ENCODING PXOR_rqmq => {
diagram => 'MAP=0f MR=1 OP=0xef P66=0 PF2=0 PF3=0',
extensions => 'MMX',
exceptions => 'MMX_MEM',
categories => 'FPSIMD|BITWISE|LOGICAL',
metadata => 'isa=PENTIUMMMX',
tags => 'page=PXOR',
};
| MahdiSafsafi/opcodesDB | db/x86/fpsimd/encodings.pl | Perl | mit | 31,758 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.