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
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is machine-generated by lib/unicore/mktables from the Unicode # database, Version 6.2.0. Any changes made here will be lost! # !!!!!!! INTERNAL PERL USE ONLY !!!!!!! # This file is for internal use by core Perl only. The format and even the # name or existence of this file are subject to change without notice. Don't # use it directly. return <<'END'; 1900 191C 1920 192B 1930 193B 1940 1944 194F END
Bjay1435/capstone
rootfs/usr/share/perl/5.18.2/unicore/lib/Sc/Limb.pl
Perl
mit
470
# !!!!!!! 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. return <<'END'; V180 33 34 44 45 46 47 58 60 63 64 894 895 903 904 1417 1418 1475 1476 1548 1549 1563 1564 1567 1568 1748 1749 1792 1803 1804 1805 2040 2042 2096 2111 2142 2143 2404 2406 3674 3676 3848 3849 3853 3859 4170 4172 4961 4969 5741 5743 5867 5870 5941 5943 6100 6103 6106 6107 6146 6150 6152 6154 6468 6470 6824 6828 7002 7004 7005 7008 7227 7232 7294 7296 8252 8254 8263 8266 11822 11823 11836 11837 11841 11842 12289 12291 42238 42240 42509 42512 42739 42744 43126 43128 43214 43216 43311 43312 43463 43466 43613 43616 43743 43744 43760 43762 44011 44012 65104 65107 65108 65112 65281 65282 65292 65293 65294 65295 65306 65308 65311 65312 65377 65378 65380 65381 66463 66464 66512 66513 67671 67672 67871 67872 68182 68184 68336 68342 68410 68416 68505 68509 69703 69710 69822 69826 69953 69956 70085 70087 70093 70094 70110 70112 70200 70205 70313 70314 71106 71110 71113 71128 71233 71235 71484 71487 74864 74869 92782 92784 92917 92918 92983 92986 92996 92997 113823 113824 121479 121483 END
operepo/ope
bin/usr/share/perl5/core_perl/unicore/lib/Term/Y.pl
Perl
mit
1,473
package DDG::Spice::Flights::Route; use DDG::Spice; primary_example_queries "Jetblue Boston to Los Angeles", "Jetblue BOS to LAX"; secondary_example_queries "Newark to Paris United"; description "Flight information using source and destination cities"; name "Flight Info"; source "flightstats"; icon_url "/ip2/www.flightstats.com.ico"; topics "economy_and_finance", "travel", "everyday"; category "time_sensitive"; code_url "https://github.com/duckduckgo/zeroclickinfo-spice/lib/DDG/Spice/Flights/Route.pm"; attribution github => ["https://github.com/tommytommytommy", 'tommytommytommy']; # cache responses for 5 minutes spice proxy_cache_valid => "200 304 5m"; spice from => '(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)'; spice to => 'https://api.flightstats.com/flex/flightstatus/rest/v2/jsonp/route/status/$4/$5/arr/$6/$7/$8?hourOfDay=$9&utc=true&appId={{ENV{DDG_SPICE_FLIGHTS_API_ID}}}&appKey={{ENV{DDG_SPICE_FLIGHTS_APIKEY}}}&callback={{callback}}'; my @triggers = ('airport', 'international', 'national', 'intl', 'regional'); # get the list of cities and their IATA airport codes my (%citiesByName, %citiesByCode); foreach my $line (share('cities.csv')->slurp) { # remove \n and separate line into fields chomp($line); my @line = split(/,/, $line); my $cityName = lc($line[3]); my $airportCode = lc($line[0]); # map city names to their airport codes; if this city name # already exists, append the new airport code to the end if (exists $citiesByName{$cityName}) { push($citiesByName{$cityName}, $airportCode); } else { $citiesByName{$cityName} = [$airportCode]; } # map airport codes to city names $citiesByCode{$airportCode} = $cityName; # store both the city name and airport code as triggers push(@triggers, ($cityName, $airportCode)); # remove common words from the airport name and add as a new key # that maps to the same airport code if the stripped airport name and the city name # are not identical my $strippedAirportName = lc($line[4]); if ($strippedAirportName ne $cityName) { if (exists $citiesByName{$strippedAirportName}) { push($citiesByName{$strippedAirportName}, $airportCode); } else { $citiesByName{$strippedAirportName} = [$airportCode]; } push(@triggers, $strippedAirportName); } } # get the list of airlines and their ICAO codes my %airlines = (); foreach my $line (share('airlines.csv')->slurp) { # remove \n chomp($line); # associate airport name with its code my @line = split(/,/, $line); $airlines{lc($line[1])} = lc($line[0]); } triggers startend => @triggers; # identifyCodes(...) looks at either side of a flight query # and returns the airline and airport code, if found # # inputs: # [0] $query is the combined airline/city query that needs to be split # [1] $leftQuery is a boolean that indicates if $query is the source city # [2] $otherCity is the remainder of the original query on the other side of the # preposition # # outputs: # [0] array, ICAO airline codes # [1] array, originating IATA airport codes # [2] array, destination IATA airport codes # [3] source city # [4] destination city # # ICAO codes are supposed to be unique, while IATA codes do not have to be. # As the ICAO codes are only used internally, mapping airlines to their ICAO codes # makes filtering results easier. However, travelers usually always see an # airport's IATA code (e.g., Los Angeles's IATA code is LAX, and its ICAO code is KLAX), # so we will match airports by IATA. sub identifyCodes { my ($query, $leftQuery, $otherCity) = @_; # split query into individual words # at least two words are required (1 for the airline and 1 for the city) my @query = split(/\s+/, $query); return if scalar(@query) < 2; # an ambiguous airline name may return multiple airline codes # collect all airline names that begin with the user's query my @airlineCodes = (); foreach (0..$#query-1) { # search query word by word; for example, if the query that we need to # parse is "boston to los angeles jetblue", then we check # 1) "los" "angeles jetblue" # 2) "los angeles" "jetblue" my $groupA = join(' ', @query[0..$_]); my $groupB = join(' ', @query[$_+1..($#query)]); for my $airlineName (keys %airlines) { push(@airlineCodes, uc($airlines{$airlineName})) if $leftQuery and index($airlineName, $groupA) == 0 and (exists $citiesByName{$groupB} or exists $citiesByCode{$groupB}); push(@airlineCodes, uc($airlines{$airlineName})) if !$leftQuery and index($airlineName, $groupB) == 0 and (exists $citiesByName{$groupA} or exists $citiesByCode{$groupA}); } # [airline][city][to][city] return (join(",", @airlineCodes), $citiesByName{$groupB}, $citiesByName{$otherCity}, $groupB, $otherCity) if @airlineCodes and $leftQuery and exists $citiesByName{$groupB} and exists $citiesByName{$otherCity}; # [city][to][city][airline] return (join(",", @airlineCodes), $citiesByName{$otherCity}, $citiesByName{$groupA}, $otherCity, $groupA) if @airlineCodes and !$leftQuery and exists $citiesByName{$otherCity} and exists $citiesByName{$groupA}; # [airline][airport code][to][airport code] return (join(",", @airlineCodes), [$groupB], [$otherCity], $groupB, $otherCity) if @airlineCodes and $leftQuery and exists $citiesByCode{$groupB} and exists $citiesByCode{$otherCity}; # [airport code][to][airport code][airline] return (join(",", @airlineCodes), [$otherCity], [$groupA], $otherCity, $groupA) if @airlineCodes and !$leftQuery and exists $citiesByCode{$otherCity} and exists $citiesByCode{$groupA}; # [airline][airport code][to][city] return (join(",", @airlineCodes), [$groupB], $citiesByName{$otherCity}, $groupB, $otherCity) if @airlineCodes and $leftQuery and exists $citiesByCode{$groupB} and exists $citiesByName{$otherCity}; # [airline][city][to][airport code] return (join(",", @airlineCodes), $citiesByName{$groupB}, [$otherCity], $groupB, $otherCity) if @airlineCodes and $leftQuery and exists $citiesByName{$groupB} and exists $citiesByCode{$otherCity}; # [airport code][to][city][airline] return (join(",", @airlineCodes), [$otherCity], $citiesByName{$groupA}, $otherCity, $groupA) if @airlineCodes and !$leftQuery and exists $citiesByCode{$otherCity} and exists $citiesByName{$groupA}; # [city][to][airport code][airline] return (join(",", @airlineCodes), $citiesByName{$otherCity}, [$groupA], $otherCity, $groupA) if @airlineCodes and !$leftQuery and exists $citiesByName{$otherCity} and exists $citiesByCode{$groupA}; } return; } handle query_lc => sub { # clean up input; strip periods and common words, # replace all other non-letters with a space, strip trailing spaces s/\b(airport|national|international|intl|regional)\b//g; s/\.//g; s/[^a-z]+/ /g; s/\s+$//g; # query must be in the form [airline][city][to][city] or [city][to][city][airline] my @query = split(/\s+to\s+/, $_); return if scalar(@query) != 2; # get the current time, minus six hours my ($second, $minute, $hour, $dayOfMonth, $month, $year, $dayOfWeek, $dayOfYear, $daylightSavings) = gmtime(time - 21600); $month += 1; $year += 1900; my @flightCodes = (); # query format: [airline][city or airline code][to][city or airline code] if (exists $citiesByName{$query[1]} or exists $citiesByCode{$query[1]}) { @flightCodes = identifyCodes($query[0], 1, $query[1]); # query format: [city or airport code][to][city or airport code][airline] } elsif (exists $citiesByName{$query[0]} or exists $citiesByCode{$query[0]}) { @flightCodes = identifyCodes($query[1], 0, $query[0]); } return unless @flightCodes; # prepare strings for "more information at" links my $sourceCity = $flightCodes[3]; my $destinationCity = $flightCodes[4]; $sourceCity =~ s/\s+/+/g; $destinationCity =~ s/\s+/+/g; return ($flightCodes[0], join(",", map(uc, @{$flightCodes[1]})), join(",", map(uc, @{$flightCodes[2]})), uc($flightCodes[1][0]), uc($flightCodes[2][0]), $year, $month, $dayOfMonth, $hour, $sourceCity, $destinationCity ); }; 1;
toenu23/zeroclickinfo-spice
lib/DDG/Spice/Flights/Route.pm
Perl
apache-2.0
8,867
package UrlConstants; use warnings; use strict; use Config::General; BEGIN { use Exporter (); use vars qw(@ISA @EXPORT @EXPORT_OK); @ISA = qw(Exporter); @EXPORT_OK = qw(); @EXPORT = qw( $dbDsn $dbUser $dbPass $webPath $orcaPath $orcaUrl $javaUrl $authUrl $webHost $commonPath $commonUrl %CDE_CONFIG $instance_name $ITEM_ACTION_MAP $PASSAGE_ACTION_MAP %_config ); } our @EXPORT; our $instance_name = defined($ENV{instance_name}) ? $ENV{instance_name} : $ENV{PLACK_ENV}; my $conf_file = '/etc/httpd/conf/cde_clients.conf'; my $cge = new Config::General( -ConfigFile => $conf_file, -IncludeRelative => 1, ); my %_config = $cge->getall; our $CDE_CONFIG = $_config{$instance_name}; our $dbDsn = $CDE_CONFIG->{db_dsn}; our $dbUser = $CDE_CONFIG->{db_user}; our $dbPass = $CDE_CONFIG->{db_pass}; our $webHost = $CDE_CONFIG->{web_host}; our $webPath = $CDE_CONFIG->{web_path}; our $javaUrl = $CDE_CONFIG->{java_url}; our $authUrl = $CDE_CONFIG->{auth_url}; our $orcaUrl = $CDE_CONFIG->{orca_url}; our $orcaPath = $webPath . $orcaUrl; our $commonUrl = $CDE_CONFIG->{common_url}; our $commonPath = $webPath . $commonUrl; our $ITEM_ACTION_MAP = $CDE_CONFIG->{item_action_map}; our $PASSAGE_ACTION_MAP = $CDE_CONFIG->{passage_action_map}; 1;
SmarterApp/ItemAuthoring
sbac-iaip/perl/UrlConstants.pm
Perl
apache-2.0
1,323
line1=Opcje konfiguracyjne,11 max_len=Maksymalna d³ugo¶æ polecenia do wy¶wietlenia,3,Nielimitowane max_jobs=Maksymalna liczba zadañ Cron do wy¶wietlenia,3,Nielimitowane show_time=Wy¶wietlaæ harmonogram pracy?,1,1-Tak,0-Nie show_comment=Wy¶wietlaæ komentarze zadañ?,1,1-Tak,0-Nie show_run=Wy¶wietlaæ stan uruchomionych zadañ?,1,2-Tak&#44; i pozwalaj na uruchamianie i zatrzymywanie,1-Tak,0-Nie match_mode=Szukaj proces zadañ przez,1,1-tylko polecenie,0-Polecenie i argumenty match_user=Dopasowaæ nazwy u¿ytkowników, przy szukaniu procesu zadania?,1,1-Tak,0-Nie kill_subs=Zabiæ pod procesy, przy zabijaniu zadañ?,1,1-Tak,0-Nie hourly_only=Pozwalaæ tylko na zadania maksymalnie godzinne?,1,0-Nie,1-Tak add_file=Dodaj nowe zadania do pliku,3,Zwyk³y plik crontab u¿ytkownika line2=Konfiguracja systemu,11 cron_dir=Katalog tablic crona,0 cron_get_command=Polecenie czytania zadañ u¿ytkownika dla crona,0 cron_edit_command=Polecenie modyfikacji zadañ u¿ytkownika dla crona,0 cron_copy_command=Polecenie przyjêcia zadania u¿ytkownika ze standardowego wej¶cia,0 cron_delete_command=Polecenie usuniêcia zadañ u¿ytkownika dla crona,0 cron_input=Cron pozwala na dodawanie zadañ,1,1-Tak,0-Nie cron_allow_file=Plik z list± dopuszczonych u¿ytkowników,0 cron_deny_file=Plik z list± u¿ytkowników bez dostêpu,0 cron_deny_all=Uprawnienia przy braku plików pozwoleñ/zakazu,1,0-Zablokuj dla wszystkich,1-Zablokuj oprócz roota,2-Pozwól wszystkim vixie_cron=Obsluga rozszerzeñ vixie-crona,1,1-Tak,0-Nie system_crontab=Scie¿ka do systemowego pliku zadañ vixie-crona,0 single_file=¦cie¿ka do pliku crontab pojedynczego u¿ytkownika,0 cronfiles_dir=¦cie¿ka do katalogu z dodatkowymi plikami crona,3,Brak run_parts=polecenie run-parts,0
BangL/webmin
cron/config.info.pl
Perl
bsd-3-clause
1,709
package SAM_reader; use strict; use warnings; use Carp; use SAM_entry; sub new { my $packagename = shift; my $filename = shift; unless ($filename) { confess "Error, need SAM filename as parameter"; } my $self = { filename => $filename, _next => undef, _fh => undef, }; bless ($self, $packagename); $self->_init(); return($self); } #### sub _init { my ($self) = @_; if ($self->{filename} =~ /\.bam$/) { open ($self->{_fh}, "samtools view $self->{filename} |") or confess "Error, cannot open file " . $self->{filename}; } elsif ($self->{filename} =~ /\.gz$/) { open ($self->{_fh}, "gunzip -c $self->{filename} | ") or confess "Error, cannot open file " . $self->{filename}; } else { open ($self->{_fh}, $self->{filename}) or confess "Error, cannot open file " . $self->{filename}; } $self->_advance(); return; } #### sub _advance { my ($self) = @_; my $fh = $self->{_fh}; my $next_line = <$fh>; while (defined ($next_line) && ($next_line =~ /^\@/ || $next_line !~ /\w/)) { ## skip over sam headers $next_line = <$fh>; } if ($next_line) { $self->{_next} = new SAM_entry($next_line); } else { $self->{_next} = undef; } return; } #### sub has_next { my $self = shift; if (defined $self->{_next}) { return(1); } else { return(0); } } #### sub get_next { my $self = shift; my $next_entry = $self->{_next}; $self->_advance(); if (defined $next_entry) { return($next_entry); } else { return(undef); } } #### sub preview_next { my $self = shift; return($self->{_next}); } 1;
jfriend08/STAR-Fusion
lib/SAM_reader.pm
Perl
bsd-3-clause
1,625
#line 1 package Module::Install::Scripts; use strict 'vars'; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.08'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub install_script { my $self = shift; my $args = $self->makemaker_args; my $exe = $args->{EXE_FILES} ||= []; foreach ( @_ ) { if ( -f $_ ) { push @$exe, $_; } elsif ( -d 'script' and -f "script/$_" ) { push @$exe, "script/$_"; } else { die("Cannot find script '$_'"); } } } 1;
gitpan/Text-MultiMarkdown
inc/Module/Install/Scripts.pm
Perl
bsd-3-clause
521
#! /usr/bin/env perl # Copyright 2007-2020 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 # ==================================================================== # Written by Andy Polyakov <appro@openssl.org> for the OpenSSL # project. The module is, however, dual licensed under OpenSSL and # CRYPTOGAMS licenses depending on where you obtain it. For further # details see http://www.openssl.org/~appro/cryptogams/. # ==================================================================== # AES for ARMv4 # January 2007. # # Code uses single 1K S-box and is >2 times faster than code generated # by gcc-3.4.1. This is thanks to unique feature of ARMv4 ISA, which # allows to merge logical or arithmetic operation with shift or rotate # in one instruction and emit combined result every cycle. The module # is endian-neutral. The performance is ~42 cycles/byte for 128-bit # key [on single-issue Xscale PXA250 core]. # May 2007. # # AES_set_[en|de]crypt_key is added. # July 2010. # # Rescheduling for dual-issue pipeline resulted in 12% improvement on # Cortex A8 core and ~25 cycles per byte processed with 128-bit key. # February 2011. # # Profiler-assisted and platform-specific optimization resulted in 16% # improvement on Cortex A8 core and ~21.5 cycles per byte. $flavour = shift; if ($flavour=~/\w[\w\-]*\.\w+$/) { $output=$flavour; undef $flavour; } else { while (($output=shift) && ($output!~/\w[\w\-]*\.\w+$/)) {} } if ($flavour && $flavour ne "void") { $0 =~ m/(.*[\/\\])[^\/\\]+$/; $dir=$1; ( $xlate="${dir}arm-xlate.pl" and -f $xlate ) or ( $xlate="${dir}../../perlasm/arm-xlate.pl" and -f $xlate) or die "can't locate arm-xlate.pl"; open STDOUT,"| \"$^X\" $xlate $flavour $output"; } else { open STDOUT,">$output"; } $s0="r0"; $s1="r1"; $s2="r2"; $s3="r3"; $t1="r4"; $t2="r5"; $t3="r6"; $i1="r7"; $i2="r8"; $i3="r9"; $tbl="r10"; $key="r11"; $rounds="r12"; $code=<<___; #ifndef __KERNEL__ # include "arm_arch.h" #else # define __ARM_ARCH__ __LINUX_ARM_ARCH__ #endif .text #if defined(__thumb2__) && !defined(__APPLE__) .syntax unified .thumb #else .code 32 #undef __thumb2__ #endif .type AES_Te,%object .align 5 AES_Te: .word 0xc66363a5, 0xf87c7c84, 0xee777799, 0xf67b7b8d .word 0xfff2f20d, 0xd66b6bbd, 0xde6f6fb1, 0x91c5c554 .word 0x60303050, 0x02010103, 0xce6767a9, 0x562b2b7d .word 0xe7fefe19, 0xb5d7d762, 0x4dababe6, 0xec76769a .word 0x8fcaca45, 0x1f82829d, 0x89c9c940, 0xfa7d7d87 .word 0xeffafa15, 0xb25959eb, 0x8e4747c9, 0xfbf0f00b .word 0x41adadec, 0xb3d4d467, 0x5fa2a2fd, 0x45afafea .word 0x239c9cbf, 0x53a4a4f7, 0xe4727296, 0x9bc0c05b .word 0x75b7b7c2, 0xe1fdfd1c, 0x3d9393ae, 0x4c26266a .word 0x6c36365a, 0x7e3f3f41, 0xf5f7f702, 0x83cccc4f .word 0x6834345c, 0x51a5a5f4, 0xd1e5e534, 0xf9f1f108 .word 0xe2717193, 0xabd8d873, 0x62313153, 0x2a15153f .word 0x0804040c, 0x95c7c752, 0x46232365, 0x9dc3c35e .word 0x30181828, 0x379696a1, 0x0a05050f, 0x2f9a9ab5 .word 0x0e070709, 0x24121236, 0x1b80809b, 0xdfe2e23d .word 0xcdebeb26, 0x4e272769, 0x7fb2b2cd, 0xea75759f .word 0x1209091b, 0x1d83839e, 0x582c2c74, 0x341a1a2e .word 0x361b1b2d, 0xdc6e6eb2, 0xb45a5aee, 0x5ba0a0fb .word 0xa45252f6, 0x763b3b4d, 0xb7d6d661, 0x7db3b3ce .word 0x5229297b, 0xdde3e33e, 0x5e2f2f71, 0x13848497 .word 0xa65353f5, 0xb9d1d168, 0x00000000, 0xc1eded2c .word 0x40202060, 0xe3fcfc1f, 0x79b1b1c8, 0xb65b5bed .word 0xd46a6abe, 0x8dcbcb46, 0x67bebed9, 0x7239394b .word 0x944a4ade, 0x984c4cd4, 0xb05858e8, 0x85cfcf4a .word 0xbbd0d06b, 0xc5efef2a, 0x4faaaae5, 0xedfbfb16 .word 0x864343c5, 0x9a4d4dd7, 0x66333355, 0x11858594 .word 0x8a4545cf, 0xe9f9f910, 0x04020206, 0xfe7f7f81 .word 0xa05050f0, 0x783c3c44, 0x259f9fba, 0x4ba8a8e3 .word 0xa25151f3, 0x5da3a3fe, 0x804040c0, 0x058f8f8a .word 0x3f9292ad, 0x219d9dbc, 0x70383848, 0xf1f5f504 .word 0x63bcbcdf, 0x77b6b6c1, 0xafdada75, 0x42212163 .word 0x20101030, 0xe5ffff1a, 0xfdf3f30e, 0xbfd2d26d .word 0x81cdcd4c, 0x180c0c14, 0x26131335, 0xc3ecec2f .word 0xbe5f5fe1, 0x359797a2, 0x884444cc, 0x2e171739 .word 0x93c4c457, 0x55a7a7f2, 0xfc7e7e82, 0x7a3d3d47 .word 0xc86464ac, 0xba5d5de7, 0x3219192b, 0xe6737395 .word 0xc06060a0, 0x19818198, 0x9e4f4fd1, 0xa3dcdc7f .word 0x44222266, 0x542a2a7e, 0x3b9090ab, 0x0b888883 .word 0x8c4646ca, 0xc7eeee29, 0x6bb8b8d3, 0x2814143c .word 0xa7dede79, 0xbc5e5ee2, 0x160b0b1d, 0xaddbdb76 .word 0xdbe0e03b, 0x64323256, 0x743a3a4e, 0x140a0a1e .word 0x924949db, 0x0c06060a, 0x4824246c, 0xb85c5ce4 .word 0x9fc2c25d, 0xbdd3d36e, 0x43acacef, 0xc46262a6 .word 0x399191a8, 0x319595a4, 0xd3e4e437, 0xf279798b .word 0xd5e7e732, 0x8bc8c843, 0x6e373759, 0xda6d6db7 .word 0x018d8d8c, 0xb1d5d564, 0x9c4e4ed2, 0x49a9a9e0 .word 0xd86c6cb4, 0xac5656fa, 0xf3f4f407, 0xcfeaea25 .word 0xca6565af, 0xf47a7a8e, 0x47aeaee9, 0x10080818 .word 0x6fbabad5, 0xf0787888, 0x4a25256f, 0x5c2e2e72 .word 0x381c1c24, 0x57a6a6f1, 0x73b4b4c7, 0x97c6c651 .word 0xcbe8e823, 0xa1dddd7c, 0xe874749c, 0x3e1f1f21 .word 0x964b4bdd, 0x61bdbddc, 0x0d8b8b86, 0x0f8a8a85 .word 0xe0707090, 0x7c3e3e42, 0x71b5b5c4, 0xcc6666aa .word 0x904848d8, 0x06030305, 0xf7f6f601, 0x1c0e0e12 .word 0xc26161a3, 0x6a35355f, 0xae5757f9, 0x69b9b9d0 .word 0x17868691, 0x99c1c158, 0x3a1d1d27, 0x279e9eb9 .word 0xd9e1e138, 0xebf8f813, 0x2b9898b3, 0x22111133 .word 0xd26969bb, 0xa9d9d970, 0x078e8e89, 0x339494a7 .word 0x2d9b9bb6, 0x3c1e1e22, 0x15878792, 0xc9e9e920 .word 0x87cece49, 0xaa5555ff, 0x50282878, 0xa5dfdf7a .word 0x038c8c8f, 0x59a1a1f8, 0x09898980, 0x1a0d0d17 .word 0x65bfbfda, 0xd7e6e631, 0x844242c6, 0xd06868b8 .word 0x824141c3, 0x299999b0, 0x5a2d2d77, 0x1e0f0f11 .word 0x7bb0b0cb, 0xa85454fc, 0x6dbbbbd6, 0x2c16163a @ Te4[256] .byte 0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5 .byte 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76 .byte 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0 .byte 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0 .byte 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc .byte 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15 .byte 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a .byte 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75 .byte 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0 .byte 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84 .byte 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b .byte 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf .byte 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85 .byte 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8 .byte 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5 .byte 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2 .byte 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17 .byte 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73 .byte 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88 .byte 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb .byte 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c .byte 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79 .byte 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9 .byte 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08 .byte 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6 .byte 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a .byte 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e .byte 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e .byte 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94 .byte 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf .byte 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68 .byte 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16 @ rcon[] .word 0x01000000, 0x02000000, 0x04000000, 0x08000000 .word 0x10000000, 0x20000000, 0x40000000, 0x80000000 .word 0x1B000000, 0x36000000, 0, 0, 0, 0, 0, 0 .size AES_Te,.-AES_Te @ void AES_encrypt(const unsigned char *in, unsigned char *out, @ const AES_KEY *key) { .global AES_encrypt .type AES_encrypt,%function .align 5 AES_encrypt: #ifndef __thumb2__ sub r3,pc,#8 @ AES_encrypt #else adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} #if defined(__thumb2__) || defined(__APPLE__) adr $tbl,AES_Te #else sub $tbl,r3,#AES_encrypt-AES_Te @ Te #endif mov $rounds,r0 @ inp mov $key,r2 #if __ARM_ARCH__<7 ldrb $s0,[$rounds,#3] @ load input data in endian-neutral ldrb $t1,[$rounds,#2] @ manner... ldrb $t2,[$rounds,#1] ldrb $t3,[$rounds,#0] orr $s0,$s0,$t1,lsl#8 ldrb $s1,[$rounds,#7] orr $s0,$s0,$t2,lsl#16 ldrb $t1,[$rounds,#6] orr $s0,$s0,$t3,lsl#24 ldrb $t2,[$rounds,#5] ldrb $t3,[$rounds,#4] orr $s1,$s1,$t1,lsl#8 ldrb $s2,[$rounds,#11] orr $s1,$s1,$t2,lsl#16 ldrb $t1,[$rounds,#10] orr $s1,$s1,$t3,lsl#24 ldrb $t2,[$rounds,#9] ldrb $t3,[$rounds,#8] orr $s2,$s2,$t1,lsl#8 ldrb $s3,[$rounds,#15] orr $s2,$s2,$t2,lsl#16 ldrb $t1,[$rounds,#14] orr $s2,$s2,$t3,lsl#24 ldrb $t2,[$rounds,#13] ldrb $t3,[$rounds,#12] orr $s3,$s3,$t1,lsl#8 orr $s3,$s3,$t2,lsl#16 orr $s3,$s3,$t3,lsl#24 #else ldr $s0,[$rounds,#0] ldr $s1,[$rounds,#4] ldr $s2,[$rounds,#8] ldr $s3,[$rounds,#12] #ifdef __ARMEL__ rev $s0,$s0 rev $s1,$s1 rev $s2,$s2 rev $s3,$s3 #endif #endif bl _armv4_AES_encrypt ldr $rounds,[sp],#4 @ pop out #if __ARM_ARCH__>=7 #ifdef __ARMEL__ rev $s0,$s0 rev $s1,$s1 rev $s2,$s2 rev $s3,$s3 #endif str $s0,[$rounds,#0] str $s1,[$rounds,#4] str $s2,[$rounds,#8] str $s3,[$rounds,#12] #else mov $t1,$s0,lsr#24 @ write output in endian-neutral mov $t2,$s0,lsr#16 @ manner... mov $t3,$s0,lsr#8 strb $t1,[$rounds,#0] strb $t2,[$rounds,#1] mov $t1,$s1,lsr#24 strb $t3,[$rounds,#2] mov $t2,$s1,lsr#16 strb $s0,[$rounds,#3] mov $t3,$s1,lsr#8 strb $t1,[$rounds,#4] strb $t2,[$rounds,#5] mov $t1,$s2,lsr#24 strb $t3,[$rounds,#6] mov $t2,$s2,lsr#16 strb $s1,[$rounds,#7] mov $t3,$s2,lsr#8 strb $t1,[$rounds,#8] strb $t2,[$rounds,#9] mov $t1,$s3,lsr#24 strb $t3,[$rounds,#10] mov $t2,$s3,lsr#16 strb $s2,[$rounds,#11] mov $t3,$s3,lsr#8 strb $t1,[$rounds,#12] strb $t2,[$rounds,#13] strb $t3,[$rounds,#14] strb $s3,[$rounds,#15] #endif #if __ARM_ARCH__>=5 ldmia sp!,{r4-r12,pc} #else ldmia sp!,{r4-r12,lr} tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet bx lr @ interoperable with Thumb ISA:-) #endif .size AES_encrypt,.-AES_encrypt .type _armv4_AES_encrypt,%function .align 2 _armv4_AES_encrypt: str lr,[sp,#-4]! @ push lr ldmia $key!,{$t1-$i1} eor $s0,$s0,$t1 ldr $rounds,[$key,#240-16] eor $s1,$s1,$t2 eor $s2,$s2,$t3 eor $s3,$s3,$i1 sub $rounds,$rounds,#1 mov lr,#255 and $i1,lr,$s0 and $i2,lr,$s0,lsr#8 and $i3,lr,$s0,lsr#16 mov $s0,$s0,lsr#24 .Lenc_loop: ldr $t1,[$tbl,$i1,lsl#2] @ Te3[s0>>0] and $i1,lr,$s1,lsr#16 @ i0 ldr $t2,[$tbl,$i2,lsl#2] @ Te2[s0>>8] and $i2,lr,$s1 ldr $t3,[$tbl,$i3,lsl#2] @ Te1[s0>>16] and $i3,lr,$s1,lsr#8 ldr $s0,[$tbl,$s0,lsl#2] @ Te0[s0>>24] mov $s1,$s1,lsr#24 ldr $i1,[$tbl,$i1,lsl#2] @ Te1[s1>>16] ldr $i2,[$tbl,$i2,lsl#2] @ Te3[s1>>0] ldr $i3,[$tbl,$i3,lsl#2] @ Te2[s1>>8] eor $s0,$s0,$i1,ror#8 ldr $s1,[$tbl,$s1,lsl#2] @ Te0[s1>>24] and $i1,lr,$s2,lsr#8 @ i0 eor $t2,$t2,$i2,ror#8 and $i2,lr,$s2,lsr#16 @ i1 eor $t3,$t3,$i3,ror#8 and $i3,lr,$s2 ldr $i1,[$tbl,$i1,lsl#2] @ Te2[s2>>8] eor $s1,$s1,$t1,ror#24 ldr $i2,[$tbl,$i2,lsl#2] @ Te1[s2>>16] mov $s2,$s2,lsr#24 ldr $i3,[$tbl,$i3,lsl#2] @ Te3[s2>>0] eor $s0,$s0,$i1,ror#16 ldr $s2,[$tbl,$s2,lsl#2] @ Te0[s2>>24] and $i1,lr,$s3 @ i0 eor $s1,$s1,$i2,ror#8 and $i2,lr,$s3,lsr#8 @ i1 eor $t3,$t3,$i3,ror#16 and $i3,lr,$s3,lsr#16 @ i2 ldr $i1,[$tbl,$i1,lsl#2] @ Te3[s3>>0] eor $s2,$s2,$t2,ror#16 ldr $i2,[$tbl,$i2,lsl#2] @ Te2[s3>>8] mov $s3,$s3,lsr#24 ldr $i3,[$tbl,$i3,lsl#2] @ Te1[s3>>16] eor $s0,$s0,$i1,ror#24 ldr $i1,[$key],#16 eor $s1,$s1,$i2,ror#16 ldr $s3,[$tbl,$s3,lsl#2] @ Te0[s3>>24] eor $s2,$s2,$i3,ror#8 ldr $t1,[$key,#-12] eor $s3,$s3,$t3,ror#8 ldr $t2,[$key,#-8] eor $s0,$s0,$i1 ldr $t3,[$key,#-4] and $i1,lr,$s0 eor $s1,$s1,$t1 and $i2,lr,$s0,lsr#8 eor $s2,$s2,$t2 and $i3,lr,$s0,lsr#16 eor $s3,$s3,$t3 mov $s0,$s0,lsr#24 subs $rounds,$rounds,#1 bne .Lenc_loop add $tbl,$tbl,#2 ldrb $t1,[$tbl,$i1,lsl#2] @ Te4[s0>>0] and $i1,lr,$s1,lsr#16 @ i0 ldrb $t2,[$tbl,$i2,lsl#2] @ Te4[s0>>8] and $i2,lr,$s1 ldrb $t3,[$tbl,$i3,lsl#2] @ Te4[s0>>16] and $i3,lr,$s1,lsr#8 ldrb $s0,[$tbl,$s0,lsl#2] @ Te4[s0>>24] mov $s1,$s1,lsr#24 ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s1>>16] ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s1>>0] ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s1>>8] eor $s0,$i1,$s0,lsl#8 ldrb $s1,[$tbl,$s1,lsl#2] @ Te4[s1>>24] and $i1,lr,$s2,lsr#8 @ i0 eor $t2,$i2,$t2,lsl#8 and $i2,lr,$s2,lsr#16 @ i1 eor $t3,$i3,$t3,lsl#8 and $i3,lr,$s2 ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s2>>8] eor $s1,$t1,$s1,lsl#24 ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s2>>16] mov $s2,$s2,lsr#24 ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s2>>0] eor $s0,$i1,$s0,lsl#8 ldrb $s2,[$tbl,$s2,lsl#2] @ Te4[s2>>24] and $i1,lr,$s3 @ i0 eor $s1,$s1,$i2,lsl#16 and $i2,lr,$s3,lsr#8 @ i1 eor $t3,$i3,$t3,lsl#8 and $i3,lr,$s3,lsr#16 @ i2 ldrb $i1,[$tbl,$i1,lsl#2] @ Te4[s3>>0] eor $s2,$t2,$s2,lsl#24 ldrb $i2,[$tbl,$i2,lsl#2] @ Te4[s3>>8] mov $s3,$s3,lsr#24 ldrb $i3,[$tbl,$i3,lsl#2] @ Te4[s3>>16] eor $s0,$i1,$s0,lsl#8 ldr $i1,[$key,#0] ldrb $s3,[$tbl,$s3,lsl#2] @ Te4[s3>>24] eor $s1,$s1,$i2,lsl#8 ldr $t1,[$key,#4] eor $s2,$s2,$i3,lsl#16 ldr $t2,[$key,#8] eor $s3,$t3,$s3,lsl#24 ldr $t3,[$key,#12] eor $s0,$s0,$i1 eor $s1,$s1,$t1 eor $s2,$s2,$t2 eor $s3,$s3,$t3 sub $tbl,$tbl,#2 ldr pc,[sp],#4 @ pop and return .size _armv4_AES_encrypt,.-_armv4_AES_encrypt .global AES_set_encrypt_key .type AES_set_encrypt_key,%function .align 5 AES_set_encrypt_key: _armv4_AES_set_encrypt_key: #ifndef __thumb2__ sub r3,pc,#8 @ AES_set_encrypt_key #else adr r3,. #endif teq r0,#0 #ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif moveq r0,#-1 beq .Labrt teq r2,#0 #ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif moveq r0,#-1 beq .Labrt teq r1,#128 beq .Lok teq r1,#192 beq .Lok teq r1,#256 #ifdef __thumb2__ itt ne @ Thumb2 thing, sanity check in ARM #endif movne r0,#-1 bne .Labrt .Lok: stmdb sp!,{r4-r12,lr} mov $rounds,r0 @ inp mov lr,r1 @ bits mov $key,r2 @ key #if defined(__thumb2__) || defined(__APPLE__) adr $tbl,AES_Te+1024 @ Te4 #else sub $tbl,r3,#_armv4_AES_set_encrypt_key-AES_Te-1024 @ Te4 #endif #if __ARM_ARCH__<7 ldrb $s0,[$rounds,#3] @ load input data in endian-neutral ldrb $t1,[$rounds,#2] @ manner... ldrb $t2,[$rounds,#1] ldrb $t3,[$rounds,#0] orr $s0,$s0,$t1,lsl#8 ldrb $s1,[$rounds,#7] orr $s0,$s0,$t2,lsl#16 ldrb $t1,[$rounds,#6] orr $s0,$s0,$t3,lsl#24 ldrb $t2,[$rounds,#5] ldrb $t3,[$rounds,#4] orr $s1,$s1,$t1,lsl#8 ldrb $s2,[$rounds,#11] orr $s1,$s1,$t2,lsl#16 ldrb $t1,[$rounds,#10] orr $s1,$s1,$t3,lsl#24 ldrb $t2,[$rounds,#9] ldrb $t3,[$rounds,#8] orr $s2,$s2,$t1,lsl#8 ldrb $s3,[$rounds,#15] orr $s2,$s2,$t2,lsl#16 ldrb $t1,[$rounds,#14] orr $s2,$s2,$t3,lsl#24 ldrb $t2,[$rounds,#13] ldrb $t3,[$rounds,#12] orr $s3,$s3,$t1,lsl#8 str $s0,[$key],#16 orr $s3,$s3,$t2,lsl#16 str $s1,[$key,#-12] orr $s3,$s3,$t3,lsl#24 str $s2,[$key,#-8] str $s3,[$key,#-4] #else ldr $s0,[$rounds,#0] ldr $s1,[$rounds,#4] ldr $s2,[$rounds,#8] ldr $s3,[$rounds,#12] #ifdef __ARMEL__ rev $s0,$s0 rev $s1,$s1 rev $s2,$s2 rev $s3,$s3 #endif str $s0,[$key],#16 str $s1,[$key,#-12] str $s2,[$key,#-8] str $s3,[$key,#-4] #endif teq lr,#128 bne .Lnot128 mov $rounds,#10 str $rounds,[$key,#240-16] add $t3,$tbl,#256 @ rcon mov lr,#255 .L128_loop: and $t2,lr,$s3,lsr#24 and $i1,lr,$s3,lsr#16 ldrb $t2,[$tbl,$t2] and $i2,lr,$s3,lsr#8 ldrb $i1,[$tbl,$i1] and $i3,lr,$s3 ldrb $i2,[$tbl,$i2] orr $t2,$t2,$i1,lsl#24 ldrb $i3,[$tbl,$i3] orr $t2,$t2,$i2,lsl#16 ldr $t1,[$t3],#4 @ rcon[i++] orr $t2,$t2,$i3,lsl#8 eor $t2,$t2,$t1 eor $s0,$s0,$t2 @ rk[4]=rk[0]^... eor $s1,$s1,$s0 @ rk[5]=rk[1]^rk[4] str $s0,[$key],#16 eor $s2,$s2,$s1 @ rk[6]=rk[2]^rk[5] str $s1,[$key,#-12] eor $s3,$s3,$s2 @ rk[7]=rk[3]^rk[6] str $s2,[$key,#-8] subs $rounds,$rounds,#1 str $s3,[$key,#-4] bne .L128_loop sub r2,$key,#176 b .Ldone .Lnot128: #if __ARM_ARCH__<7 ldrb $i2,[$rounds,#19] ldrb $t1,[$rounds,#18] ldrb $t2,[$rounds,#17] ldrb $t3,[$rounds,#16] orr $i2,$i2,$t1,lsl#8 ldrb $i3,[$rounds,#23] orr $i2,$i2,$t2,lsl#16 ldrb $t1,[$rounds,#22] orr $i2,$i2,$t3,lsl#24 ldrb $t2,[$rounds,#21] ldrb $t3,[$rounds,#20] orr $i3,$i3,$t1,lsl#8 orr $i3,$i3,$t2,lsl#16 str $i2,[$key],#8 orr $i3,$i3,$t3,lsl#24 str $i3,[$key,#-4] #else ldr $i2,[$rounds,#16] ldr $i3,[$rounds,#20] #ifdef __ARMEL__ rev $i2,$i2 rev $i3,$i3 #endif str $i2,[$key],#8 str $i3,[$key,#-4] #endif teq lr,#192 bne .Lnot192 mov $rounds,#12 str $rounds,[$key,#240-24] add $t3,$tbl,#256 @ rcon mov lr,#255 mov $rounds,#8 .L192_loop: and $t2,lr,$i3,lsr#24 and $i1,lr,$i3,lsr#16 ldrb $t2,[$tbl,$t2] and $i2,lr,$i3,lsr#8 ldrb $i1,[$tbl,$i1] and $i3,lr,$i3 ldrb $i2,[$tbl,$i2] orr $t2,$t2,$i1,lsl#24 ldrb $i3,[$tbl,$i3] orr $t2,$t2,$i2,lsl#16 ldr $t1,[$t3],#4 @ rcon[i++] orr $t2,$t2,$i3,lsl#8 eor $i3,$t2,$t1 eor $s0,$s0,$i3 @ rk[6]=rk[0]^... eor $s1,$s1,$s0 @ rk[7]=rk[1]^rk[6] str $s0,[$key],#24 eor $s2,$s2,$s1 @ rk[8]=rk[2]^rk[7] str $s1,[$key,#-20] eor $s3,$s3,$s2 @ rk[9]=rk[3]^rk[8] str $s2,[$key,#-16] subs $rounds,$rounds,#1 str $s3,[$key,#-12] #ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif subeq r2,$key,#216 beq .Ldone ldr $i1,[$key,#-32] ldr $i2,[$key,#-28] eor $i1,$i1,$s3 @ rk[10]=rk[4]^rk[9] eor $i3,$i2,$i1 @ rk[11]=rk[5]^rk[10] str $i1,[$key,#-8] str $i3,[$key,#-4] b .L192_loop .Lnot192: #if __ARM_ARCH__<7 ldrb $i2,[$rounds,#27] ldrb $t1,[$rounds,#26] ldrb $t2,[$rounds,#25] ldrb $t3,[$rounds,#24] orr $i2,$i2,$t1,lsl#8 ldrb $i3,[$rounds,#31] orr $i2,$i2,$t2,lsl#16 ldrb $t1,[$rounds,#30] orr $i2,$i2,$t3,lsl#24 ldrb $t2,[$rounds,#29] ldrb $t3,[$rounds,#28] orr $i3,$i3,$t1,lsl#8 orr $i3,$i3,$t2,lsl#16 str $i2,[$key],#8 orr $i3,$i3,$t3,lsl#24 str $i3,[$key,#-4] #else ldr $i2,[$rounds,#24] ldr $i3,[$rounds,#28] #ifdef __ARMEL__ rev $i2,$i2 rev $i3,$i3 #endif str $i2,[$key],#8 str $i3,[$key,#-4] #endif mov $rounds,#14 str $rounds,[$key,#240-32] add $t3,$tbl,#256 @ rcon mov lr,#255 mov $rounds,#7 .L256_loop: and $t2,lr,$i3,lsr#24 and $i1,lr,$i3,lsr#16 ldrb $t2,[$tbl,$t2] and $i2,lr,$i3,lsr#8 ldrb $i1,[$tbl,$i1] and $i3,lr,$i3 ldrb $i2,[$tbl,$i2] orr $t2,$t2,$i1,lsl#24 ldrb $i3,[$tbl,$i3] orr $t2,$t2,$i2,lsl#16 ldr $t1,[$t3],#4 @ rcon[i++] orr $t2,$t2,$i3,lsl#8 eor $i3,$t2,$t1 eor $s0,$s0,$i3 @ rk[8]=rk[0]^... eor $s1,$s1,$s0 @ rk[9]=rk[1]^rk[8] str $s0,[$key],#32 eor $s2,$s2,$s1 @ rk[10]=rk[2]^rk[9] str $s1,[$key,#-28] eor $s3,$s3,$s2 @ rk[11]=rk[3]^rk[10] str $s2,[$key,#-24] subs $rounds,$rounds,#1 str $s3,[$key,#-20] #ifdef __thumb2__ itt eq @ Thumb2 thing, sanity check in ARM #endif subeq r2,$key,#256 beq .Ldone and $t2,lr,$s3 and $i1,lr,$s3,lsr#8 ldrb $t2,[$tbl,$t2] and $i2,lr,$s3,lsr#16 ldrb $i1,[$tbl,$i1] and $i3,lr,$s3,lsr#24 ldrb $i2,[$tbl,$i2] orr $t2,$t2,$i1,lsl#8 ldrb $i3,[$tbl,$i3] orr $t2,$t2,$i2,lsl#16 ldr $t1,[$key,#-48] orr $t2,$t2,$i3,lsl#24 ldr $i1,[$key,#-44] ldr $i2,[$key,#-40] eor $t1,$t1,$t2 @ rk[12]=rk[4]^... ldr $i3,[$key,#-36] eor $i1,$i1,$t1 @ rk[13]=rk[5]^rk[12] str $t1,[$key,#-16] eor $i2,$i2,$i1 @ rk[14]=rk[6]^rk[13] str $i1,[$key,#-12] eor $i3,$i3,$i2 @ rk[15]=rk[7]^rk[14] str $i2,[$key,#-8] str $i3,[$key,#-4] b .L256_loop .align 2 .Ldone: mov r0,#0 ldmia sp!,{r4-r12,lr} .Labrt: #if __ARM_ARCH__>=5 ret @ bx lr #else tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet bx lr @ interoperable with Thumb ISA:-) #endif .size AES_set_encrypt_key,.-AES_set_encrypt_key .global AES_set_decrypt_key .type AES_set_decrypt_key,%function .align 5 AES_set_decrypt_key: str lr,[sp,#-4]! @ push lr bl _armv4_AES_set_encrypt_key teq r0,#0 ldr lr,[sp],#4 @ pop lr bne .Labrt mov r0,r2 @ AES_set_encrypt_key preserves r2, mov r1,r2 @ which is AES_KEY *key b _armv4_AES_set_enc2dec_key .size AES_set_decrypt_key,.-AES_set_decrypt_key @ void AES_set_enc2dec_key(const AES_KEY *inp,AES_KEY *out) .global AES_set_enc2dec_key .type AES_set_enc2dec_key,%function .align 5 AES_set_enc2dec_key: _armv4_AES_set_enc2dec_key: stmdb sp!,{r4-r12,lr} ldr $rounds,[r0,#240] mov $i1,r0 @ input add $i2,r0,$rounds,lsl#4 mov $key,r1 @ output add $tbl,r1,$rounds,lsl#4 str $rounds,[r1,#240] .Linv: ldr $s0,[$i1],#16 ldr $s1,[$i1,#-12] ldr $s2,[$i1,#-8] ldr $s3,[$i1,#-4] ldr $t1,[$i2],#-16 ldr $t2,[$i2,#16+4] ldr $t3,[$i2,#16+8] ldr $i3,[$i2,#16+12] str $s0,[$tbl],#-16 str $s1,[$tbl,#16+4] str $s2,[$tbl,#16+8] str $s3,[$tbl,#16+12] str $t1,[$key],#16 str $t2,[$key,#-12] str $t3,[$key,#-8] str $i3,[$key,#-4] teq $i1,$i2 bne .Linv ldr $s0,[$i1] ldr $s1,[$i1,#4] ldr $s2,[$i1,#8] ldr $s3,[$i1,#12] str $s0,[$key] str $s1,[$key,#4] str $s2,[$key,#8] str $s3,[$key,#12] sub $key,$key,$rounds,lsl#3 ___ $mask80=$i1; $mask1b=$i2; $mask7f=$i3; $code.=<<___; ldr $s0,[$key,#16]! @ prefetch tp1 mov $mask80,#0x80 mov $mask1b,#0x1b orr $mask80,$mask80,#0x8000 orr $mask1b,$mask1b,#0x1b00 orr $mask80,$mask80,$mask80,lsl#16 orr $mask1b,$mask1b,$mask1b,lsl#16 sub $rounds,$rounds,#1 mvn $mask7f,$mask80 mov $rounds,$rounds,lsl#2 @ (rounds-1)*4 .Lmix: and $t1,$s0,$mask80 and $s1,$s0,$mask7f sub $t1,$t1,$t1,lsr#7 and $t1,$t1,$mask1b eor $s1,$t1,$s1,lsl#1 @ tp2 and $t1,$s1,$mask80 and $s2,$s1,$mask7f sub $t1,$t1,$t1,lsr#7 and $t1,$t1,$mask1b eor $s2,$t1,$s2,lsl#1 @ tp4 and $t1,$s2,$mask80 and $s3,$s2,$mask7f sub $t1,$t1,$t1,lsr#7 and $t1,$t1,$mask1b eor $s3,$t1,$s3,lsl#1 @ tp8 eor $t1,$s1,$s2 eor $t2,$s0,$s3 @ tp9 eor $t1,$t1,$s3 @ tpe eor $t1,$t1,$s1,ror#24 eor $t1,$t1,$t2,ror#24 @ ^= ROTATE(tpb=tp9^tp2,8) eor $t1,$t1,$s2,ror#16 eor $t1,$t1,$t2,ror#16 @ ^= ROTATE(tpd=tp9^tp4,16) eor $t1,$t1,$t2,ror#8 @ ^= ROTATE(tp9,24) ldr $s0,[$key,#4] @ prefetch tp1 str $t1,[$key],#4 subs $rounds,$rounds,#1 bne .Lmix mov r0,#0 #if __ARM_ARCH__>=5 ldmia sp!,{r4-r12,pc} #else ldmia sp!,{r4-r12,lr} tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet bx lr @ interoperable with Thumb ISA:-) #endif .size AES_set_enc2dec_key,.-AES_set_enc2dec_key .type AES_Td,%object .align 5 AES_Td: .word 0x51f4a750, 0x7e416553, 0x1a17a4c3, 0x3a275e96 .word 0x3bab6bcb, 0x1f9d45f1, 0xacfa58ab, 0x4be30393 .word 0x2030fa55, 0xad766df6, 0x88cc7691, 0xf5024c25 .word 0x4fe5d7fc, 0xc52acbd7, 0x26354480, 0xb562a38f .word 0xdeb15a49, 0x25ba1b67, 0x45ea0e98, 0x5dfec0e1 .word 0xc32f7502, 0x814cf012, 0x8d4697a3, 0x6bd3f9c6 .word 0x038f5fe7, 0x15929c95, 0xbf6d7aeb, 0x955259da .word 0xd4be832d, 0x587421d3, 0x49e06929, 0x8ec9c844 .word 0x75c2896a, 0xf48e7978, 0x99583e6b, 0x27b971dd .word 0xbee14fb6, 0xf088ad17, 0xc920ac66, 0x7dce3ab4 .word 0x63df4a18, 0xe51a3182, 0x97513360, 0x62537f45 .word 0xb16477e0, 0xbb6bae84, 0xfe81a01c, 0xf9082b94 .word 0x70486858, 0x8f45fd19, 0x94de6c87, 0x527bf8b7 .word 0xab73d323, 0x724b02e2, 0xe31f8f57, 0x6655ab2a .word 0xb2eb2807, 0x2fb5c203, 0x86c57b9a, 0xd33708a5 .word 0x302887f2, 0x23bfa5b2, 0x02036aba, 0xed16825c .word 0x8acf1c2b, 0xa779b492, 0xf307f2f0, 0x4e69e2a1 .word 0x65daf4cd, 0x0605bed5, 0xd134621f, 0xc4a6fe8a .word 0x342e539d, 0xa2f355a0, 0x058ae132, 0xa4f6eb75 .word 0x0b83ec39, 0x4060efaa, 0x5e719f06, 0xbd6e1051 .word 0x3e218af9, 0x96dd063d, 0xdd3e05ae, 0x4de6bd46 .word 0x91548db5, 0x71c45d05, 0x0406d46f, 0x605015ff .word 0x1998fb24, 0xd6bde997, 0x894043cc, 0x67d99e77 .word 0xb0e842bd, 0x07898b88, 0xe7195b38, 0x79c8eedb .word 0xa17c0a47, 0x7c420fe9, 0xf8841ec9, 0x00000000 .word 0x09808683, 0x322bed48, 0x1e1170ac, 0x6c5a724e .word 0xfd0efffb, 0x0f853856, 0x3daed51e, 0x362d3927 .word 0x0a0fd964, 0x685ca621, 0x9b5b54d1, 0x24362e3a .word 0x0c0a67b1, 0x9357e70f, 0xb4ee96d2, 0x1b9b919e .word 0x80c0c54f, 0x61dc20a2, 0x5a774b69, 0x1c121a16 .word 0xe293ba0a, 0xc0a02ae5, 0x3c22e043, 0x121b171d .word 0x0e090d0b, 0xf28bc7ad, 0x2db6a8b9, 0x141ea9c8 .word 0x57f11985, 0xaf75074c, 0xee99ddbb, 0xa37f60fd .word 0xf701269f, 0x5c72f5bc, 0x44663bc5, 0x5bfb7e34 .word 0x8b432976, 0xcb23c6dc, 0xb6edfc68, 0xb8e4f163 .word 0xd731dcca, 0x42638510, 0x13972240, 0x84c61120 .word 0x854a247d, 0xd2bb3df8, 0xaef93211, 0xc729a16d .word 0x1d9e2f4b, 0xdcb230f3, 0x0d8652ec, 0x77c1e3d0 .word 0x2bb3166c, 0xa970b999, 0x119448fa, 0x47e96422 .word 0xa8fc8cc4, 0xa0f03f1a, 0x567d2cd8, 0x223390ef .word 0x87494ec7, 0xd938d1c1, 0x8ccaa2fe, 0x98d40b36 .word 0xa6f581cf, 0xa57ade28, 0xdab78e26, 0x3fadbfa4 .word 0x2c3a9de4, 0x5078920d, 0x6a5fcc9b, 0x547e4662 .word 0xf68d13c2, 0x90d8b8e8, 0x2e39f75e, 0x82c3aff5 .word 0x9f5d80be, 0x69d0937c, 0x6fd52da9, 0xcf2512b3 .word 0xc8ac993b, 0x10187da7, 0xe89c636e, 0xdb3bbb7b .word 0xcd267809, 0x6e5918f4, 0xec9ab701, 0x834f9aa8 .word 0xe6956e65, 0xaaffe67e, 0x21bccf08, 0xef15e8e6 .word 0xbae79bd9, 0x4a6f36ce, 0xea9f09d4, 0x29b07cd6 .word 0x31a4b2af, 0x2a3f2331, 0xc6a59430, 0x35a266c0 .word 0x744ebc37, 0xfc82caa6, 0xe090d0b0, 0x33a7d815 .word 0xf104984a, 0x41ecdaf7, 0x7fcd500e, 0x1791f62f .word 0x764dd68d, 0x43efb04d, 0xccaa4d54, 0xe49604df .word 0x9ed1b5e3, 0x4c6a881b, 0xc12c1fb8, 0x4665517f .word 0x9d5eea04, 0x018c355d, 0xfa877473, 0xfb0b412e .word 0xb3671d5a, 0x92dbd252, 0xe9105633, 0x6dd64713 .word 0x9ad7618c, 0x37a10c7a, 0x59f8148e, 0xeb133c89 .word 0xcea927ee, 0xb761c935, 0xe11ce5ed, 0x7a47b13c .word 0x9cd2df59, 0x55f2733f, 0x1814ce79, 0x73c737bf .word 0x53f7cdea, 0x5ffdaa5b, 0xdf3d6f14, 0x7844db86 .word 0xcaaff381, 0xb968c43e, 0x3824342c, 0xc2a3405f .word 0x161dc372, 0xbce2250c, 0x283c498b, 0xff0d9541 .word 0x39a80171, 0x080cb3de, 0xd8b4e49c, 0x6456c190 .word 0x7bcb8461, 0xd532b670, 0x486c5c74, 0xd0b85742 @ Td4[256] .byte 0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38 .byte 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb .byte 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87 .byte 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb .byte 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d .byte 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e .byte 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2 .byte 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25 .byte 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16 .byte 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92 .byte 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda .byte 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84 .byte 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a .byte 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06 .byte 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02 .byte 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b .byte 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea .byte 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73 .byte 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85 .byte 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e .byte 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89 .byte 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b .byte 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20 .byte 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4 .byte 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31 .byte 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f .byte 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d .byte 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef .byte 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0 .byte 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61 .byte 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26 .byte 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d .size AES_Td,.-AES_Td @ void AES_decrypt(const unsigned char *in, unsigned char *out, @ const AES_KEY *key) { .global AES_decrypt .type AES_decrypt,%function .align 5 AES_decrypt: #ifndef __thumb2__ sub r3,pc,#8 @ AES_decrypt #else adr r3,. #endif stmdb sp!,{r1,r4-r12,lr} #if defined(__thumb2__) || defined(__APPLE__) adr $tbl,AES_Td #else sub $tbl,r3,#AES_decrypt-AES_Td @ Td #endif mov $rounds,r0 @ inp mov $key,r2 #if __ARM_ARCH__<7 ldrb $s0,[$rounds,#3] @ load input data in endian-neutral ldrb $t1,[$rounds,#2] @ manner... ldrb $t2,[$rounds,#1] ldrb $t3,[$rounds,#0] orr $s0,$s0,$t1,lsl#8 ldrb $s1,[$rounds,#7] orr $s0,$s0,$t2,lsl#16 ldrb $t1,[$rounds,#6] orr $s0,$s0,$t3,lsl#24 ldrb $t2,[$rounds,#5] ldrb $t3,[$rounds,#4] orr $s1,$s1,$t1,lsl#8 ldrb $s2,[$rounds,#11] orr $s1,$s1,$t2,lsl#16 ldrb $t1,[$rounds,#10] orr $s1,$s1,$t3,lsl#24 ldrb $t2,[$rounds,#9] ldrb $t3,[$rounds,#8] orr $s2,$s2,$t1,lsl#8 ldrb $s3,[$rounds,#15] orr $s2,$s2,$t2,lsl#16 ldrb $t1,[$rounds,#14] orr $s2,$s2,$t3,lsl#24 ldrb $t2,[$rounds,#13] ldrb $t3,[$rounds,#12] orr $s3,$s3,$t1,lsl#8 orr $s3,$s3,$t2,lsl#16 orr $s3,$s3,$t3,lsl#24 #else ldr $s0,[$rounds,#0] ldr $s1,[$rounds,#4] ldr $s2,[$rounds,#8] ldr $s3,[$rounds,#12] #ifdef __ARMEL__ rev $s0,$s0 rev $s1,$s1 rev $s2,$s2 rev $s3,$s3 #endif #endif bl _armv4_AES_decrypt ldr $rounds,[sp],#4 @ pop out #if __ARM_ARCH__>=7 #ifdef __ARMEL__ rev $s0,$s0 rev $s1,$s1 rev $s2,$s2 rev $s3,$s3 #endif str $s0,[$rounds,#0] str $s1,[$rounds,#4] str $s2,[$rounds,#8] str $s3,[$rounds,#12] #else mov $t1,$s0,lsr#24 @ write output in endian-neutral mov $t2,$s0,lsr#16 @ manner... mov $t3,$s0,lsr#8 strb $t1,[$rounds,#0] strb $t2,[$rounds,#1] mov $t1,$s1,lsr#24 strb $t3,[$rounds,#2] mov $t2,$s1,lsr#16 strb $s0,[$rounds,#3] mov $t3,$s1,lsr#8 strb $t1,[$rounds,#4] strb $t2,[$rounds,#5] mov $t1,$s2,lsr#24 strb $t3,[$rounds,#6] mov $t2,$s2,lsr#16 strb $s1,[$rounds,#7] mov $t3,$s2,lsr#8 strb $t1,[$rounds,#8] strb $t2,[$rounds,#9] mov $t1,$s3,lsr#24 strb $t3,[$rounds,#10] mov $t2,$s3,lsr#16 strb $s2,[$rounds,#11] mov $t3,$s3,lsr#8 strb $t1,[$rounds,#12] strb $t2,[$rounds,#13] strb $t3,[$rounds,#14] strb $s3,[$rounds,#15] #endif #if __ARM_ARCH__>=5 ldmia sp!,{r4-r12,pc} #else ldmia sp!,{r4-r12,lr} tst lr,#1 moveq pc,lr @ be binary compatible with V4, yet bx lr @ interoperable with Thumb ISA:-) #endif .size AES_decrypt,.-AES_decrypt .type _armv4_AES_decrypt,%function .align 2 _armv4_AES_decrypt: str lr,[sp,#-4]! @ push lr ldmia $key!,{$t1-$i1} eor $s0,$s0,$t1 ldr $rounds,[$key,#240-16] eor $s1,$s1,$t2 eor $s2,$s2,$t3 eor $s3,$s3,$i1 sub $rounds,$rounds,#1 mov lr,#255 and $i1,lr,$s0,lsr#16 and $i2,lr,$s0,lsr#8 and $i3,lr,$s0 mov $s0,$s0,lsr#24 .Ldec_loop: ldr $t1,[$tbl,$i1,lsl#2] @ Td1[s0>>16] and $i1,lr,$s1 @ i0 ldr $t2,[$tbl,$i2,lsl#2] @ Td2[s0>>8] and $i2,lr,$s1,lsr#16 ldr $t3,[$tbl,$i3,lsl#2] @ Td3[s0>>0] and $i3,lr,$s1,lsr#8 ldr $s0,[$tbl,$s0,lsl#2] @ Td0[s0>>24] mov $s1,$s1,lsr#24 ldr $i1,[$tbl,$i1,lsl#2] @ Td3[s1>>0] ldr $i2,[$tbl,$i2,lsl#2] @ Td1[s1>>16] ldr $i3,[$tbl,$i3,lsl#2] @ Td2[s1>>8] eor $s0,$s0,$i1,ror#24 ldr $s1,[$tbl,$s1,lsl#2] @ Td0[s1>>24] and $i1,lr,$s2,lsr#8 @ i0 eor $t2,$i2,$t2,ror#8 and $i2,lr,$s2 @ i1 eor $t3,$i3,$t3,ror#8 and $i3,lr,$s2,lsr#16 ldr $i1,[$tbl,$i1,lsl#2] @ Td2[s2>>8] eor $s1,$s1,$t1,ror#8 ldr $i2,[$tbl,$i2,lsl#2] @ Td3[s2>>0] mov $s2,$s2,lsr#24 ldr $i3,[$tbl,$i3,lsl#2] @ Td1[s2>>16] eor $s0,$s0,$i1,ror#16 ldr $s2,[$tbl,$s2,lsl#2] @ Td0[s2>>24] and $i1,lr,$s3,lsr#16 @ i0 eor $s1,$s1,$i2,ror#24 and $i2,lr,$s3,lsr#8 @ i1 eor $t3,$i3,$t3,ror#8 and $i3,lr,$s3 @ i2 ldr $i1,[$tbl,$i1,lsl#2] @ Td1[s3>>16] eor $s2,$s2,$t2,ror#8 ldr $i2,[$tbl,$i2,lsl#2] @ Td2[s3>>8] mov $s3,$s3,lsr#24 ldr $i3,[$tbl,$i3,lsl#2] @ Td3[s3>>0] eor $s0,$s0,$i1,ror#8 ldr $i1,[$key],#16 eor $s1,$s1,$i2,ror#16 ldr $s3,[$tbl,$s3,lsl#2] @ Td0[s3>>24] eor $s2,$s2,$i3,ror#24 ldr $t1,[$key,#-12] eor $s0,$s0,$i1 ldr $t2,[$key,#-8] eor $s3,$s3,$t3,ror#8 ldr $t3,[$key,#-4] and $i1,lr,$s0,lsr#16 eor $s1,$s1,$t1 and $i2,lr,$s0,lsr#8 eor $s2,$s2,$t2 and $i3,lr,$s0 eor $s3,$s3,$t3 mov $s0,$s0,lsr#24 subs $rounds,$rounds,#1 bne .Ldec_loop add $tbl,$tbl,#1024 ldr $t2,[$tbl,#0] @ prefetch Td4 ldr $t3,[$tbl,#32] ldr $t1,[$tbl,#64] ldr $t2,[$tbl,#96] ldr $t3,[$tbl,#128] ldr $t1,[$tbl,#160] ldr $t2,[$tbl,#192] ldr $t3,[$tbl,#224] ldrb $s0,[$tbl,$s0] @ Td4[s0>>24] ldrb $t1,[$tbl,$i1] @ Td4[s0>>16] and $i1,lr,$s1 @ i0 ldrb $t2,[$tbl,$i2] @ Td4[s0>>8] and $i2,lr,$s1,lsr#16 ldrb $t3,[$tbl,$i3] @ Td4[s0>>0] and $i3,lr,$s1,lsr#8 add $s1,$tbl,$s1,lsr#24 ldrb $i1,[$tbl,$i1] @ Td4[s1>>0] ldrb $s1,[$s1] @ Td4[s1>>24] ldrb $i2,[$tbl,$i2] @ Td4[s1>>16] eor $s0,$i1,$s0,lsl#24 ldrb $i3,[$tbl,$i3] @ Td4[s1>>8] eor $s1,$t1,$s1,lsl#8 and $i1,lr,$s2,lsr#8 @ i0 eor $t2,$t2,$i2,lsl#8 and $i2,lr,$s2 @ i1 ldrb $i1,[$tbl,$i1] @ Td4[s2>>8] eor $t3,$t3,$i3,lsl#8 ldrb $i2,[$tbl,$i2] @ Td4[s2>>0] and $i3,lr,$s2,lsr#16 add $s2,$tbl,$s2,lsr#24 ldrb $s2,[$s2] @ Td4[s2>>24] eor $s0,$s0,$i1,lsl#8 ldrb $i3,[$tbl,$i3] @ Td4[s2>>16] eor $s1,$i2,$s1,lsl#16 and $i1,lr,$s3,lsr#16 @ i0 eor $s2,$t2,$s2,lsl#16 and $i2,lr,$s3,lsr#8 @ i1 ldrb $i1,[$tbl,$i1] @ Td4[s3>>16] eor $t3,$t3,$i3,lsl#16 ldrb $i2,[$tbl,$i2] @ Td4[s3>>8] and $i3,lr,$s3 @ i2 add $s3,$tbl,$s3,lsr#24 ldrb $i3,[$tbl,$i3] @ Td4[s3>>0] ldrb $s3,[$s3] @ Td4[s3>>24] eor $s0,$s0,$i1,lsl#16 ldr $i1,[$key,#0] eor $s1,$s1,$i2,lsl#8 ldr $t1,[$key,#4] eor $s2,$i3,$s2,lsl#8 ldr $t2,[$key,#8] eor $s3,$t3,$s3,lsl#24 ldr $t3,[$key,#12] eor $s0,$s0,$i1 eor $s1,$s1,$t1 eor $s2,$s2,$t2 eor $s3,$s3,$t3 sub $tbl,$tbl,#1024 ldr pc,[sp],#4 @ pop and return .size _armv4_AES_decrypt,.-_armv4_AES_decrypt .asciz "AES for ARMv4, CRYPTOGAMS by <appro\@openssl.org>" .align 2 ___ $code =~ s/\bbx\s+lr\b/.word\t0xe12fff1e/gm; # make it possible to compile with -march=armv4 $code =~ s/\bret\b/bx\tlr/gm; open SELF,$0; while(<SELF>) { next if (/^#!/); last if (!s/^#/@/ and !/^$/); print; } close SELF; print $code; close STDOUT or die "error closing STDOUT: $!"; # enforce flush
pmq20/ruby-compiler
vendor/openssl/crypto/aes/asm/aes-armv4.pl
Perl
mit
33,687
# log_parser.pl # Functions for parsing this module's logs do 'sarg-lib.pl'; # parse_webmin_log(user, script, action, type, object, &params) # Converts logged information from this module into human-readable form sub parse_webmin_log { local ($user, $script, $action, $type, $object, $p) = @_; if ($action eq "sched") { return $text{'webmin_log_'.$action.'_'.$object}; } else { return $text{'webmin_log_'.$action}; } }
HasClass0/webmin
sarg/log_parser.pl
Perl
bsd-3-clause
426
# Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. # Copyright (C) 2009, 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # Copyright (C) 2010, 2011 Research In Motion Limited. 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 Apple Computer, Inc. ("Apple") 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 APPLE AND ITS 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 APPLE OR ITS 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 to share code to work with various version control systems. package VCSUtils; use strict; use warnings; use Cwd qw(); # "qw()" prevents warnings about redefining getcwd() with "use POSIX;" use English; # for $POSTMATCH, etc. use File::Basename; use File::Spec; use POSIX; BEGIN { use Exporter (); our ($VERSION, @ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS); $VERSION = 1.00; @ISA = qw(Exporter); @EXPORT = qw( &applyGitBinaryPatchDelta &callSilently &canonicalizePath &changeLogEmailAddress &changeLogName &chdirReturningRelativePath &decodeGitBinaryChunk &decodeGitBinaryPatch &determineSVNRoot &determineVCSRoot &exitStatus &fixChangeLogPatch &gitBranch &gitdiff2svndiff &isGit &isGitSVN &isGitBranchBuild &isGitDirectory &isSVN &isSVNDirectory &isSVNVersion16OrNewer &makeFilePathRelative &mergeChangeLogs &normalizePath &parseFirstEOL &parsePatch &pathRelativeToSVNRepositoryRootForPath &prepareParsedPatch &removeEOL &runPatchCommand &scmMoveOrRenameFile &scmToggleExecutableBit &setChangeLogDateAndReviewer &svnRevisionForDirectory &svnStatus &toWindowsLineEndings ); %EXPORT_TAGS = ( ); @EXPORT_OK = (); } our @EXPORT_OK; my $gitBranch; my $gitRoot; my $isGit; my $isGitSVN; my $isGitBranchBuild; my $isSVN; my $svnVersion; # Project time zone for Cupertino, CA, US my $changeLogTimeZone = "PST8PDT"; my $chunkRangeRegEx = qr#^\@\@ -(\d+),(\d+) \+\d+,(\d+) \@\@$#; # e.g. @@ -2,6 +2,18 @@ my $gitDiffStartRegEx = qr#^diff --git (\w/)?(.+) (\w/)?([^\r\n]+)#; my $svnDiffStartRegEx = qr#^Index: ([^\r\n]+)#; my $svnPropertiesStartRegEx = qr#^Property changes on: ([^\r\n]+)#; # $1 is normally the same as the index path. my $svnPropertyStartRegEx = qr#^(Modified|Name|Added|Deleted): ([^\r\n]+)#; # $2 is the name of the property. my $svnPropertyValueStartRegEx = qr#^ (\+|-|Merged|Reverse-merged) ([^\r\n]+)#; # $2 is the start of the property's value (which may span multiple lines). # This method is for portability. Return the system-appropriate exit # status of a child process. # # Args: pass the child error status returned by the last pipe close, # for example "$?". sub exitStatus($) { my ($returnvalue) = @_; if ($^O eq "MSWin32") { return $returnvalue >> 8; } return WEXITSTATUS($returnvalue); } # Call a function while suppressing STDERR, and return the return values # as an array. sub callSilently($@) { my ($func, @args) = @_; # The following pattern was taken from here: # http://www.sdsc.edu/~moreland/courses/IntroPerl/docs/manual/pod/perlfunc/open.html # # Also see this Perl documentation (search for "open OLDERR"): # http://perldoc.perl.org/functions/open.html open(OLDERR, ">&STDERR"); close(STDERR); my @returnValue = &$func(@args); open(STDERR, ">&OLDERR"); close(OLDERR); return @returnValue; } sub toWindowsLineEndings { my ($text) = @_; $text =~ s/\n/\r\n/g; return $text; } # Note, this method will not error if the file corresponding to the $source path does not exist. sub scmMoveOrRenameFile { my ($source, $destination) = @_; return if ! -e $source; if (isSVN()) { system("svn", "move", $source, $destination); } elsif (isGit()) { system("git", "mv", $source, $destination); } } # Note, this method will not error if the file corresponding to the path does not exist. sub scmToggleExecutableBit { my ($path, $executableBitDelta) = @_; return if ! -e $path; if ($executableBitDelta == 1) { scmAddExecutableBit($path); } elsif ($executableBitDelta == -1) { scmRemoveExecutableBit($path); } } sub scmAddExecutableBit($) { my ($path) = @_; if (isSVN()) { system("svn", "propset", "svn:executable", "on", $path) == 0 or die "Failed to run 'svn propset svn:executable on $path'."; } elsif (isGit()) { chmod(0755, $path); } } sub scmRemoveExecutableBit($) { my ($path) = @_; if (isSVN()) { system("svn", "propdel", "svn:executable", $path) == 0 or die "Failed to run 'svn propdel svn:executable $path'."; } elsif (isGit()) { chmod(0664, $path); } } sub isGitDirectory($) { my ($dir) = @_; return system("cd $dir && git rev-parse > " . File::Spec->devnull() . " 2>&1") == 0; } sub isGit() { return $isGit if defined $isGit; $isGit = isGitDirectory("."); return $isGit; } sub isGitSVN() { return $isGitSVN if defined $isGitSVN; # There doesn't seem to be an officially documented way to determine # if you're in a git-svn checkout. The best suggestions seen so far # all use something like the following: my $output = `git config --get svn-remote.svn.fetch 2>& 1`; $isGitSVN = $output ne ''; return $isGitSVN; } sub gitBranch() { unless (defined $gitBranch) { chomp($gitBranch = `git symbolic-ref -q HEAD`); $gitBranch = "" if exitStatus($?); $gitBranch =~ s#^refs/heads/##; $gitBranch = "" if $gitBranch eq "master"; } return $gitBranch; } sub isGitBranchBuild() { my $branch = gitBranch(); chomp(my $override = `git config --bool branch.$branch.webKitBranchBuild`); return 1 if $override eq "true"; return 0 if $override eq "false"; unless (defined $isGitBranchBuild) { chomp(my $gitBranchBuild = `git config --bool core.webKitBranchBuild`); $isGitBranchBuild = $gitBranchBuild eq "true"; } return $isGitBranchBuild; } sub isSVNDirectory($) { my ($dir) = @_; return -d File::Spec->catdir($dir, ".svn"); } sub isSVN() { return $isSVN if defined $isSVN; $isSVN = isSVNDirectory("."); return $isSVN; } sub svnVersion() { return $svnVersion if defined $svnVersion; if (!isSVN()) { $svnVersion = 0; } else { chomp($svnVersion = `svn --version --quiet`); } return $svnVersion; } sub isSVNVersion16OrNewer() { my $version = svnVersion(); return eval "v$version" ge v1.6; } sub chdirReturningRelativePath($) { my ($directory) = @_; my $previousDirectory = Cwd::getcwd(); chdir $directory; my $newDirectory = Cwd::getcwd(); return "." if $newDirectory eq $previousDirectory; return File::Spec->abs2rel($previousDirectory, $newDirectory); } sub determineGitRoot() { chomp(my $gitDir = `git rev-parse --git-dir`); return dirname($gitDir); } sub determineSVNRoot() { my $last = ''; my $path = '.'; my $parent = '..'; my $repositoryRoot; my $repositoryUUID; while (1) { my $thisRoot; my $thisUUID; # Ignore error messages in case we've run past the root of the checkout. open INFO, "svn info '$path' 2> " . File::Spec->devnull() . " |" or die; while (<INFO>) { if (/^Repository Root: (.+)/) { $thisRoot = $1; } if (/^Repository UUID: (.+)/) { $thisUUID = $1; } if ($thisRoot && $thisUUID) { local $/ = undef; <INFO>; # Consume the rest of the input. } } close INFO; # It's possible (e.g. for developers of some ports) to have a WebKit # checkout in a subdirectory of another checkout. So abort if the # repository root or the repository UUID suddenly changes. last if !$thisUUID; $repositoryUUID = $thisUUID if !$repositoryUUID; last if $thisUUID ne $repositoryUUID; last if !$thisRoot; $repositoryRoot = $thisRoot if !$repositoryRoot; last if $thisRoot ne $repositoryRoot; $last = $path; $path = File::Spec->catdir($parent, $path); } return File::Spec->rel2abs($last); } sub determineVCSRoot() { if (isGit()) { return determineGitRoot(); } if (!isSVN()) { # Some users have a workflow where svn-create-patch, svn-apply and # svn-unapply are used outside of multiple svn working directores, # so warn the user and assume Subversion is being used in this case. warn "Unable to determine VCS root; assuming Subversion"; $isSVN = 1; } return determineSVNRoot(); } sub svnRevisionForDirectory($) { my ($dir) = @_; my $revision; if (isSVNDirectory($dir)) { my $svnInfo = `LC_ALL=C svn info $dir | grep Revision:`; ($revision) = ($svnInfo =~ m/Revision: (\d+).*/g); } elsif (isGitDirectory($dir)) { my $gitLog = `cd $dir && LC_ALL=C git log --grep='git-svn-id: ' -n 1 | grep git-svn-id:`; ($revision) = ($gitLog =~ m/ +git-svn-id: .+@(\d+) /g); } die "Unable to determine current SVN revision in $dir" unless (defined $revision); return $revision; } sub pathRelativeToSVNRepositoryRootForPath($) { my ($file) = @_; my $relativePath = File::Spec->abs2rel($file); my $svnInfo; if (isSVN()) { $svnInfo = `LC_ALL=C svn info $relativePath`; } elsif (isGit()) { $svnInfo = `LC_ALL=C git svn info $relativePath`; } $svnInfo =~ /.*^URL: (.*?)$/m; my $svnURL = $1; $svnInfo =~ /.*^Repository Root: (.*?)$/m; my $repositoryRoot = $1; $svnURL =~ s/$repositoryRoot\///; return $svnURL; } sub makeFilePathRelative($) { my ($path) = @_; return $path unless isGit(); unless (defined $gitRoot) { chomp($gitRoot = `git rev-parse --show-cdup`); } return $gitRoot . $path; } sub normalizePath($) { my ($path) = @_; $path =~ s/\\/\//g; return $path; } sub adjustPathForRecentRenamings($) { my ($fullPath) = @_; if ($fullPath =~ m|^WebCore/| || $fullPath =~ m|^JavaScriptCore/| || $fullPath =~ m|^WebKit/| || $fullPath =~ m|^WebKit2/|) { return "Source/$fullPath"; } return $fullPath; } sub canonicalizePath($) { my ($file) = @_; # Remove extra slashes and '.' directories in path $file = File::Spec->canonpath($file); # Remove '..' directories in path my @dirs = (); foreach my $dir (File::Spec->splitdir($file)) { if ($dir eq '..' && $#dirs >= 0 && $dirs[$#dirs] ne '..') { pop(@dirs); } else { push(@dirs, $dir); } } return ($#dirs >= 0) ? File::Spec->catdir(@dirs) : "."; } sub removeEOL($) { my ($line) = @_; return "" unless $line; $line =~ s/[\r\n]+$//g; return $line; } sub parseFirstEOL($) { my ($fileHandle) = @_; # Make input record separator the new-line character to simplify regex matching below. my $savedInputRecordSeparator = $INPUT_RECORD_SEPARATOR; $INPUT_RECORD_SEPARATOR = "\n"; my $firstLine = <$fileHandle>; $INPUT_RECORD_SEPARATOR = $savedInputRecordSeparator; return unless defined($firstLine); my $eol; if ($firstLine =~ /\r\n/) { $eol = "\r\n"; } elsif ($firstLine =~ /\r/) { $eol = "\r"; } elsif ($firstLine =~ /\n/) { $eol = "\n"; } return $eol; } sub firstEOLInFile($) { my ($file) = @_; my $eol; if (open(FILE, $file)) { $eol = parseFirstEOL(*FILE); close(FILE); } return $eol; } sub svnStatus($) { my ($fullPath) = @_; my $svnStatus; open SVN, "svn status --non-interactive --non-recursive '$fullPath' |" or die; if (-d $fullPath) { # When running "svn stat" on a directory, we can't assume that only one # status will be returned (since any files with a status below the # directory will be returned), and we can't assume that the directory will # be first (since any files with unknown status will be listed first). my $normalizedFullPath = File::Spec->catdir(File::Spec->splitdir($fullPath)); while (<SVN>) { # Input may use a different EOL sequence than $/, so avoid chomp. $_ = removeEOL($_); my $normalizedStatPath = File::Spec->catdir(File::Spec->splitdir(substr($_, 7))); if ($normalizedFullPath eq $normalizedStatPath) { $svnStatus = "$_\n"; last; } } # Read the rest of the svn command output to avoid a broken pipe warning. local $/ = undef; <SVN>; } else { # Files will have only one status returned. $svnStatus = removeEOL(<SVN>) . "\n"; } close SVN; return $svnStatus; } # Return whether the given file mode is executable in the source control # sense. We make this determination based on whether the executable bit # is set for "others" rather than the stronger condition that it be set # for the user, group, and others. This is sufficient for distinguishing # the default behavior in Git and SVN. # # Args: # $fileMode: A number or string representing a file mode in octal notation. sub isExecutable($) { my $fileMode = shift; return $fileMode % 2; } # Parse the next Git diff header from the given file handle, and advance # the handle so the last line read is the first line after the header. # # This subroutine dies if given leading junk. # # Args: # $fileHandle: advanced so the last line read from the handle is the first # line of the header to parse. This should be a line # beginning with "diff --git". # $line: the line last read from $fileHandle # # Returns ($headerHashRef, $lastReadLine): # $headerHashRef: a hash reference representing a diff header, as follows-- # copiedFromPath: the path from which the file was copied or moved if # the diff is a copy or move. # executableBitDelta: the value 1 or -1 if the executable bit was added or # removed, respectively. New and deleted files have # this value only if the file is executable, in which # case the value is 1 and -1, respectively. # indexPath: the path of the target file. # isBinary: the value 1 if the diff is for a binary file. # isDeletion: the value 1 if the diff is a file deletion. # isCopyWithChanges: the value 1 if the file was copied or moved and # the target file was changed in some way after being # copied or moved (e.g. if its contents or executable # bit were changed). # isNew: the value 1 if the diff is for a new file. # shouldDeleteSource: the value 1 if the file was copied or moved and # the source file was deleted -- i.e. if the copy # was actually a move. # svnConvertedText: the header text with some lines converted to SVN # format. Git-specific lines are preserved. # $lastReadLine: the line last read from $fileHandle. sub parseGitDiffHeader($$) { my ($fileHandle, $line) = @_; $_ = $line; my $indexPath; if (/$gitDiffStartRegEx/) { # The first and second paths can differ in the case of copies # and renames. We use the second file path because it is the # destination path. $indexPath = adjustPathForRecentRenamings($4); # Use $POSTMATCH to preserve the end-of-line character. $_ = "Index: $indexPath$POSTMATCH"; # Convert to SVN format. } else { die("Could not parse leading \"diff --git\" line: \"$line\"."); } my $copiedFromPath; my $foundHeaderEnding; my $isBinary; my $isDeletion; my $isNew; my $newExecutableBit = 0; my $oldExecutableBit = 0; my $shouldDeleteSource = 0; my $similarityIndex = 0; my $svnConvertedText; while (1) { # Temporarily strip off any end-of-line characters to simplify # regex matching below. s/([\n\r]+)$//; my $eol = $1; if (/^(deleted file|old) mode (\d+)/) { $oldExecutableBit = (isExecutable($2) ? 1 : 0); $isDeletion = 1 if $1 eq "deleted file"; } elsif (/^new( file)? mode (\d+)/) { $newExecutableBit = (isExecutable($2) ? 1 : 0); $isNew = 1 if $1; } elsif (/^similarity index (\d+)%/) { $similarityIndex = $1; } elsif (/^copy from (\S+)/) { $copiedFromPath = $1; } elsif (/^rename from (\S+)/) { # FIXME: Record this as a move rather than as a copy-and-delete. # This will simplify adding rename support to svn-unapply. # Otherwise, the hash for a deletion would have to know # everything about the file being deleted in order to # support undoing itself. Recording as a move will also # permit us to use "svn move" and "git move". $copiedFromPath = $1; $shouldDeleteSource = 1; } elsif (/^--- \S+/) { $_ = "--- $indexPath"; # Convert to SVN format. } elsif (/^\+\+\+ \S+/) { $_ = "+++ $indexPath"; # Convert to SVN format. $foundHeaderEnding = 1; } elsif (/^GIT binary patch$/ ) { $isBinary = 1; $foundHeaderEnding = 1; # The "git diff" command includes a line of the form "Binary files # <path1> and <path2> differ" if the --binary flag is not used. } elsif (/^Binary files / ) { die("Error: the Git diff contains a binary file without the binary data in ". "line: \"$_\". Be sure to use the --binary flag when invoking \"git diff\" ". "with diffs containing binary files."); } $svnConvertedText .= "$_$eol"; # Also restore end-of-line characters. $_ = <$fileHandle>; # Not defined if end-of-file reached. last if (!defined($_) || /$gitDiffStartRegEx/ || $foundHeaderEnding); } my $executableBitDelta = $newExecutableBit - $oldExecutableBit; my %header; $header{copiedFromPath} = $copiedFromPath if $copiedFromPath; $header{executableBitDelta} = $executableBitDelta if $executableBitDelta; $header{indexPath} = $indexPath; $header{isBinary} = $isBinary if $isBinary; $header{isCopyWithChanges} = 1 if ($copiedFromPath && ($similarityIndex != 100 || $executableBitDelta)); $header{isDeletion} = $isDeletion if $isDeletion; $header{isNew} = $isNew if $isNew; $header{shouldDeleteSource} = $shouldDeleteSource if $shouldDeleteSource; $header{svnConvertedText} = $svnConvertedText; return (\%header, $_); } # Parse the next SVN diff header from the given file handle, and advance # the handle so the last line read is the first line after the header. # # This subroutine dies if given leading junk or if it could not detect # the end of the header block. # # Args: # $fileHandle: advanced so the last line read from the handle is the first # line of the header to parse. This should be a line # beginning with "Index:". # $line: the line last read from $fileHandle # # Returns ($headerHashRef, $lastReadLine): # $headerHashRef: a hash reference representing a diff header, as follows-- # copiedFromPath: the path from which the file was copied if the diff # is a copy. # indexPath: the path of the target file, which is the path found in # the "Index:" line. # isBinary: the value 1 if the diff is for a binary file. # isNew: the value 1 if the diff is for a new file. # sourceRevision: the revision number of the source, if it exists. This # is the same as the revision number the file was copied # from, in the case of a file copy. # svnConvertedText: the header text converted to a header with the paths # in some lines corrected. # $lastReadLine: the line last read from $fileHandle. sub parseSvnDiffHeader($$) { my ($fileHandle, $line) = @_; $_ = $line; my $indexPath; if (/$svnDiffStartRegEx/) { $indexPath = adjustPathForRecentRenamings($1); } else { die("First line of SVN diff does not begin with \"Index \": \"$_\""); } my $copiedFromPath; my $foundHeaderEnding; my $isBinary; my $isNew; my $sourceRevision; my $svnConvertedText; while (1) { # Temporarily strip off any end-of-line characters to simplify # regex matching below. s/([\n\r]+)$//; my $eol = $1; # Fix paths on ""---" and "+++" lines to match the leading # index line. if (s/^--- \S+/--- $indexPath/) { # --- if (/^--- .+\(revision (\d+)\)/) { $sourceRevision = $1; $isNew = 1 if !$sourceRevision; # if revision 0. if (/\(from (\S+):(\d+)\)$/) { # The "from" clause is created by svn-create-patch, in # which case there is always also a "revision" clause. $copiedFromPath = $1; die("Revision number \"$2\" in \"from\" clause does not match " . "source revision number \"$sourceRevision\".") if ($2 != $sourceRevision); } } } elsif (s/^\+\+\+ \S+/+++ $indexPath/) { $foundHeaderEnding = 1; } elsif (/^Cannot display: file marked as a binary type.$/) { $isBinary = 1; $foundHeaderEnding = 1; } $svnConvertedText .= "$_$eol"; # Also restore end-of-line characters. $_ = <$fileHandle>; # Not defined if end-of-file reached. last if (!defined($_) || /$svnDiffStartRegEx/ || $foundHeaderEnding); } if (!$foundHeaderEnding) { die("Did not find end of header block corresponding to index path \"$indexPath\"."); } my %header; $header{copiedFromPath} = $copiedFromPath if $copiedFromPath; $header{indexPath} = $indexPath; $header{isBinary} = $isBinary if $isBinary; $header{isNew} = $isNew if $isNew; $header{sourceRevision} = $sourceRevision if $sourceRevision; $header{svnConvertedText} = $svnConvertedText; return (\%header, $_); } # Parse the next diff header from the given file handle, and advance # the handle so the last line read is the first line after the header. # # This subroutine dies if given leading junk or if it could not detect # the end of the header block. # # Args: # $fileHandle: advanced so the last line read from the handle is the first # line of the header to parse. For SVN-formatted diffs, this # is a line beginning with "Index:". For Git, this is a line # beginning with "diff --git". # $line: the line last read from $fileHandle # # Returns ($headerHashRef, $lastReadLine): # $headerHashRef: a hash reference representing a diff header # copiedFromPath: the path from which the file was copied if the diff # is a copy. # executableBitDelta: the value 1 or -1 if the executable bit was added or # removed, respectively. New and deleted files have # this value only if the file is executable, in which # case the value is 1 and -1, respectively. # indexPath: the path of the target file. # isBinary: the value 1 if the diff is for a binary file. # isGit: the value 1 if the diff is Git-formatted. # isSvn: the value 1 if the diff is SVN-formatted. # sourceRevision: the revision number of the source, if it exists. This # is the same as the revision number the file was copied # from, in the case of a file copy. # svnConvertedText: the header text with some lines converted to SVN # format. Git-specific lines are preserved. # $lastReadLine: the line last read from $fileHandle. sub parseDiffHeader($$) { my ($fileHandle, $line) = @_; my $header; # This is a hash ref. my $isGit; my $isSvn; my $lastReadLine; if ($line =~ $svnDiffStartRegEx) { $isSvn = 1; ($header, $lastReadLine) = parseSvnDiffHeader($fileHandle, $line); } elsif ($line =~ $gitDiffStartRegEx) { $isGit = 1; ($header, $lastReadLine) = parseGitDiffHeader($fileHandle, $line); } else { die("First line of diff does not begin with \"Index:\" or \"diff --git\": \"$line\""); } $header->{isGit} = $isGit if $isGit; $header->{isSvn} = $isSvn if $isSvn; return ($header, $lastReadLine); } # FIXME: The %diffHash "object" should not have an svnConvertedText property. # Instead, the hash object should store its information in a # structured way as properties. This should be done in a way so # that, if necessary, the text of an SVN or Git patch can be # reconstructed from the information in those hash properties. # # A %diffHash is a hash representing a source control diff of a single # file operation (e.g. a file modification, copy, or delete). # # These hashes appear, for example, in the parseDiff(), parsePatch(), # and prepareParsedPatch() subroutines of this package. # # The corresponding values are-- # # copiedFromPath: the path from which the file was copied if the diff # is a copy. # executableBitDelta: the value 1 or -1 if the executable bit was added or # removed from the target file, respectively. # indexPath: the path of the target file. For SVN-formatted diffs, # this is the same as the path in the "Index:" line. # isBinary: the value 1 if the diff is for a binary file. # isDeletion: the value 1 if the diff is known from the header to be a deletion. # isGit: the value 1 if the diff is Git-formatted. # isNew: the value 1 if the dif is known from the header to be a new file. # isSvn: the value 1 if the diff is SVN-formatted. # sourceRevision: the revision number of the source, if it exists. This # is the same as the revision number the file was copied # from, in the case of a file copy. # svnConvertedText: the diff with some lines converted to SVN format. # Git-specific lines are preserved. # Parse one diff from a patch file created by svn-create-patch, and # advance the file handle so the last line read is the first line # of the next header block. # # This subroutine preserves any leading junk encountered before the header. # # Composition of an SVN diff # # There are three parts to an SVN diff: the header, the property change, and # the binary contents, in that order. Either the header or the property change # may be ommitted, but not both. If there are binary changes, then you always # have all three. # # Args: # $fileHandle: a file handle advanced to the first line of the next # header block. Leading junk is okay. # $line: the line last read from $fileHandle. # $optionsHashRef: a hash reference representing optional options to use # when processing a diff. # shouldNotUseIndexPathEOL: whether to use the line endings in the diff instead # instead of the line endings in the target file; the # value of 1 if svnConvertedText should use the line # endings in the diff. # # Returns ($diffHashRefs, $lastReadLine): # $diffHashRefs: A reference to an array of references to %diffHash hashes. # See the %diffHash documentation above. # $lastReadLine: the line last read from $fileHandle sub parseDiff($$;$) { # FIXME: Adjust this method so that it dies if the first line does not # match the start of a diff. This will require a change to # parsePatch() so that parsePatch() skips over leading junk. my ($fileHandle, $line, $optionsHashRef) = @_; my $headerStartRegEx = $svnDiffStartRegEx; # SVN-style header for the default my $headerHashRef; # Last header found, as returned by parseDiffHeader(). my $svnPropertiesHashRef; # Last SVN properties diff found, as returned by parseSvnDiffProperties(). my $svnText; my $indexPathEOL; while (defined($line)) { if (!$headerHashRef && ($line =~ $gitDiffStartRegEx)) { # Then assume all diffs in the patch are Git-formatted. This # block was made to be enterable at most once since we assume # all diffs in the patch are formatted the same (SVN or Git). $headerStartRegEx = $gitDiffStartRegEx; } if ($line =~ $svnPropertiesStartRegEx) { my $propertyPath = $1; if ($svnPropertiesHashRef || $headerHashRef && ($propertyPath ne $headerHashRef->{indexPath})) { # This is the start of the second diff in the while loop, which happens to # be a property diff. If $svnPropertiesHasRef is defined, then this is the # second consecutive property diff, otherwise it's the start of a property # diff for a file that only has property changes. last; } ($svnPropertiesHashRef, $line) = parseSvnDiffProperties($fileHandle, $line); next; } if ($line !~ $headerStartRegEx) { # Then we are in the body of the diff. if ($indexPathEOL && $line !~ /$chunkRangeRegEx/) { # The chunk range is part of the body of the diff, but its line endings should't be # modified or patch(1) will complain. So, we only modify non-chunk range lines. $line =~ s/\r\n|\r|\n/$indexPathEOL/g; } $svnText .= $line; $line = <$fileHandle>; next; } # Otherwise, we found a diff header. if ($svnPropertiesHashRef || $headerHashRef) { # Then either we just processed an SVN property change or this # is the start of the second diff header of this while loop. last; } ($headerHashRef, $line) = parseDiffHeader($fileHandle, $line); if (!$optionsHashRef || !$optionsHashRef->{shouldNotUseIndexPathEOL}) { $indexPathEOL = firstEOLInFile($headerHashRef->{indexPath}) if !$headerHashRef->{isNew} && !$headerHashRef->{isBinary}; } $svnText .= $headerHashRef->{svnConvertedText}; } my @diffHashRefs; if ($headerHashRef->{shouldDeleteSource}) { my %deletionHash; $deletionHash{indexPath} = $headerHashRef->{copiedFromPath}; $deletionHash{isDeletion} = 1; push @diffHashRefs, \%deletionHash; } if ($headerHashRef->{copiedFromPath}) { my %copyHash; $copyHash{copiedFromPath} = $headerHashRef->{copiedFromPath}; $copyHash{indexPath} = $headerHashRef->{indexPath}; $copyHash{sourceRevision} = $headerHashRef->{sourceRevision} if $headerHashRef->{sourceRevision}; if ($headerHashRef->{isSvn}) { $copyHash{executableBitDelta} = $svnPropertiesHashRef->{executableBitDelta} if $svnPropertiesHashRef->{executableBitDelta}; } push @diffHashRefs, \%copyHash; } # Note, the order of evaluation for the following if conditional has been explicitly chosen so that # it evaluates to false when there is no headerHashRef (e.g. a property change diff for a file that # only has property changes). if ($headerHashRef->{isCopyWithChanges} || (%$headerHashRef && !$headerHashRef->{copiedFromPath})) { # Then add the usual file modification. my %diffHash; # FIXME: We should expand this code to support other properties. In the future, # parseSvnDiffProperties may return a hash whose keys are the properties. if ($headerHashRef->{isSvn}) { # SVN records the change to the executable bit in a separate property change diff # that follows the contents of the diff, except for binary diffs. For binary # diffs, the property change diff follows the diff header. $diffHash{executableBitDelta} = $svnPropertiesHashRef->{executableBitDelta} if $svnPropertiesHashRef->{executableBitDelta}; } elsif ($headerHashRef->{isGit}) { # Git records the change to the executable bit in the header of a diff. $diffHash{executableBitDelta} = $headerHashRef->{executableBitDelta} if $headerHashRef->{executableBitDelta}; } $diffHash{indexPath} = $headerHashRef->{indexPath}; $diffHash{isBinary} = $headerHashRef->{isBinary} if $headerHashRef->{isBinary}; $diffHash{isDeletion} = $headerHashRef->{isDeletion} if $headerHashRef->{isDeletion}; $diffHash{isGit} = $headerHashRef->{isGit} if $headerHashRef->{isGit}; $diffHash{isNew} = $headerHashRef->{isNew} if $headerHashRef->{isNew}; $diffHash{isSvn} = $headerHashRef->{isSvn} if $headerHashRef->{isSvn}; if (!$headerHashRef->{copiedFromPath}) { # If the file was copied, then we have already incorporated the # sourceRevision information into the change. $diffHash{sourceRevision} = $headerHashRef->{sourceRevision} if $headerHashRef->{sourceRevision}; } # FIXME: Remove the need for svnConvertedText. See the %diffHash # code comments above for more information. # # Note, we may not always have SVN converted text since we intend # to deprecate it in the future. For example, a property change # diff for a file that only has property changes will not return # any SVN converted text. $diffHash{svnConvertedText} = $svnText if $svnText; push @diffHashRefs, \%diffHash; } if (!%$headerHashRef && $svnPropertiesHashRef) { # A property change diff for a file that only has property changes. my %propertyChangeHash; $propertyChangeHash{executableBitDelta} = $svnPropertiesHashRef->{executableBitDelta} if $svnPropertiesHashRef->{executableBitDelta}; $propertyChangeHash{indexPath} = $svnPropertiesHashRef->{propertyPath}; $propertyChangeHash{isSvn} = 1; push @diffHashRefs, \%propertyChangeHash; } return (\@diffHashRefs, $line); } # Parse an SVN property change diff from the given file handle, and advance # the handle so the last line read is the first line after this diff. # # For the case of an SVN binary diff, the binary contents will follow the # the property changes. # # This subroutine dies if the first line does not begin with "Property changes on" # or if the separator line that follows this line is missing. # # Args: # $fileHandle: advanced so the last line read from the handle is the first # line of the footer to parse. This line begins with # "Property changes on". # $line: the line last read from $fileHandle. # # Returns ($propertyHashRef, $lastReadLine): # $propertyHashRef: a hash reference representing an SVN diff footer. # propertyPath: the path of the target file. # executableBitDelta: the value 1 or -1 if the executable bit was added or # removed from the target file, respectively. # $lastReadLine: the line last read from $fileHandle. sub parseSvnDiffProperties($$) { my ($fileHandle, $line) = @_; $_ = $line; my %footer; if (/$svnPropertiesStartRegEx/) { $footer{propertyPath} = $1; } else { die("Failed to find start of SVN property change, \"Property changes on \": \"$_\""); } # We advance $fileHandle two lines so that the next line that # we process is $svnPropertyStartRegEx in a well-formed footer. # A well-formed footer has the form: # Property changes on: FileA # ___________________________________________________________________ # Added: svn:executable # + * $_ = <$fileHandle>; # Not defined if end-of-file reached. my $separator = "_" x 67; if (defined($_) && /^$separator[\r\n]+$/) { $_ = <$fileHandle>; } else { die("Failed to find separator line: \"$_\"."); } # FIXME: We should expand this to support other SVN properties # (e.g. return a hash of property key-values that represents # all properties). # # Notice, we keep processing until we hit end-of-file or some # line that does not resemble $svnPropertyStartRegEx, such as # the empty line that precedes the start of the binary contents # of a patch, or the start of the next diff (e.g. "Index:"). my $propertyHashRef; while (defined($_) && /$svnPropertyStartRegEx/) { ($propertyHashRef, $_) = parseSvnProperty($fileHandle, $_); if ($propertyHashRef->{name} eq "svn:executable") { # Notice, for SVN properties, propertyChangeDelta is always non-zero # because a property can only be added or removed. $footer{executableBitDelta} = $propertyHashRef->{propertyChangeDelta}; } } return(\%footer, $_); } # Parse the next SVN property from the given file handle, and advance the handle so the last # line read is the first line after the property. # # This subroutine dies if the first line is not a valid start of an SVN property, # or the property is missing a value, or the property change type (e.g. "Added") # does not correspond to the property value type (e.g. "+"). # # Args: # $fileHandle: advanced so the last line read from the handle is the first # line of the property to parse. This should be a line # that matches $svnPropertyStartRegEx. # $line: the line last read from $fileHandle. # # Returns ($propertyHashRef, $lastReadLine): # $propertyHashRef: a hash reference representing a SVN property. # name: the name of the property. # value: the last property value. For instance, suppose the property is "Modified". # Then it has both a '-' and '+' property value in that order. Therefore, # the value of this key is the value of the '+' property by ordering (since # it is the last value). # propertyChangeDelta: the value 1 or -1 if the property was added or # removed, respectively. # $lastReadLine: the line last read from $fileHandle. sub parseSvnProperty($$) { my ($fileHandle, $line) = @_; $_ = $line; my $propertyName; my $propertyChangeType; if (/$svnPropertyStartRegEx/) { $propertyChangeType = $1; $propertyName = $2; } else { die("Failed to find SVN property: \"$_\"."); } $_ = <$fileHandle>; # Not defined if end-of-file reached. # The "svn diff" command neither inserts newline characters between property values # nor between successive properties. # # FIXME: We do not support property values that contain tailing newline characters # as it is difficult to disambiguate these trailing newlines from the empty # line that precedes the contents of a binary patch. my $propertyValue; my $propertyValueType; while (defined($_) && /$svnPropertyValueStartRegEx/) { # Note, a '-' property may be followed by a '+' property in the case of a "Modified" # or "Name" property. We only care about the ending value (i.e. the '+' property) # in such circumstances. So, we take the property value for the property to be its # last parsed property value. # # FIXME: We may want to consider strictly enforcing a '-', '+' property ordering or # add error checking to prevent '+', '+', ..., '+' and other invalid combinations. $propertyValueType = $1; ($propertyValue, $_) = parseSvnPropertyValue($fileHandle, $_); } if (!$propertyValue) { die("Failed to find the property value for the SVN property \"$propertyName\": \"$_\"."); } my $propertyChangeDelta; if ($propertyValueType eq "+" || $propertyValueType eq "Merged") { $propertyChangeDelta = 1; } elsif ($propertyValueType eq "-" || $propertyValueType eq "Reverse-merged") { $propertyChangeDelta = -1; } else { die("Not reached."); } # We perform a simple validation that an "Added" or "Deleted" property # change type corresponds with a "+" and "-" value type, respectively. my $expectedChangeDelta; if ($propertyChangeType eq "Added") { $expectedChangeDelta = 1; } elsif ($propertyChangeType eq "Deleted") { $expectedChangeDelta = -1; } if ($expectedChangeDelta && $propertyChangeDelta != $expectedChangeDelta) { die("The final property value type found \"$propertyValueType\" does not " . "correspond to the property change type found \"$propertyChangeType\"."); } my %propertyHash; $propertyHash{name} = $propertyName; $propertyHash{propertyChangeDelta} = $propertyChangeDelta; $propertyHash{value} = $propertyValue; return (\%propertyHash, $_); } # Parse the value of an SVN property from the given file handle, and advance # the handle so the last line read is the first line after the property value. # # This subroutine dies if the first line is an invalid SVN property value line # (i.e. a line that does not begin with " +" or " -"). # # Args: # $fileHandle: advanced so the last line read from the handle is the first # line of the property value to parse. This should be a line # beginning with " +" or " -". # $line: the line last read from $fileHandle. # # Returns ($propertyValue, $lastReadLine): # $propertyValue: the value of the property. # $lastReadLine: the line last read from $fileHandle. sub parseSvnPropertyValue($$) { my ($fileHandle, $line) = @_; $_ = $line; my $propertyValue; my $eol; if (/$svnPropertyValueStartRegEx/) { $propertyValue = $2; # Does not include the end-of-line character(s). $eol = $POSTMATCH; } else { die("Failed to find property value beginning with '+', '-', 'Merged', or 'Reverse-merged': \"$_\"."); } while (<$fileHandle>) { if (/^[\r\n]+$/ || /$svnPropertyValueStartRegEx/ || /$svnPropertyStartRegEx/) { # Note, we may encounter an empty line before the contents of a binary patch. # Also, we check for $svnPropertyValueStartRegEx because a '-' property may be # followed by a '+' property in the case of a "Modified" or "Name" property. # We check for $svnPropertyStartRegEx because it indicates the start of the # next property to parse. last; } # Temporarily strip off any end-of-line characters. We add the end-of-line characters # from the previously processed line to the start of this line so that the last line # of the property value does not end in end-of-line characters. s/([\n\r]+)$//; $propertyValue .= "$eol$_"; $eol = $1; } return ($propertyValue, $_); } # Parse a patch file created by svn-create-patch. # # Args: # $fileHandle: A file handle to the patch file that has not yet been # read from. # $optionsHashRef: a hash reference representing optional options to use # when processing a diff. # shouldNotUseIndexPathEOL: whether to use the line endings in the diff instead # instead of the line endings in the target file; the # value of 1 if svnConvertedText should use the line # endings in the diff. # # Returns: # @diffHashRefs: an array of diff hash references. # See the %diffHash documentation above. sub parsePatch($;$) { my ($fileHandle, $optionsHashRef) = @_; my $newDiffHashRefs; my @diffHashRefs; # return value my $line = <$fileHandle>; while (defined($line)) { # Otherwise, at EOF. ($newDiffHashRefs, $line) = parseDiff($fileHandle, $line, $optionsHashRef); push @diffHashRefs, @$newDiffHashRefs; } return @diffHashRefs; } # Prepare the results of parsePatch() for use in svn-apply and svn-unapply. # # Args: # $shouldForce: Whether to continue processing if an unexpected # state occurs. # @diffHashRefs: An array of references to %diffHashes. # See the %diffHash documentation above. # # Returns $preparedPatchHashRef: # copyDiffHashRefs: A reference to an array of the $diffHashRefs in # @diffHashRefs that represent file copies. The original # ordering is preserved. # nonCopyDiffHashRefs: A reference to an array of the $diffHashRefs in # @diffHashRefs that do not represent file copies. # The original ordering is preserved. # sourceRevisionHash: A reference to a hash of source path to source # revision number. sub prepareParsedPatch($@) { my ($shouldForce, @diffHashRefs) = @_; my %copiedFiles; # Return values my @copyDiffHashRefs = (); my @nonCopyDiffHashRefs = (); my %sourceRevisionHash = (); for my $diffHashRef (@diffHashRefs) { my $copiedFromPath = $diffHashRef->{copiedFromPath}; my $indexPath = $diffHashRef->{indexPath}; my $sourceRevision = $diffHashRef->{sourceRevision}; my $sourcePath; if (defined($copiedFromPath)) { # Then the diff is a copy operation. $sourcePath = $copiedFromPath; # FIXME: Consider printing a warning or exiting if # exists($copiedFiles{$indexPath}) is true -- i.e. if # $indexPath appears twice as a copy target. $copiedFiles{$indexPath} = $sourcePath; push @copyDiffHashRefs, $diffHashRef; } else { # Then the diff is not a copy operation. $sourcePath = $indexPath; push @nonCopyDiffHashRefs, $diffHashRef; } if (defined($sourceRevision)) { if (exists($sourceRevisionHash{$sourcePath}) && ($sourceRevisionHash{$sourcePath} != $sourceRevision)) { if (!$shouldForce) { die "Two revisions of the same file required as a source:\n". " $sourcePath:$sourceRevisionHash{$sourcePath}\n". " $sourcePath:$sourceRevision"; } } $sourceRevisionHash{$sourcePath} = $sourceRevision; } } my %preparedPatchHash; $preparedPatchHash{copyDiffHashRefs} = \@copyDiffHashRefs; $preparedPatchHash{nonCopyDiffHashRefs} = \@nonCopyDiffHashRefs; $preparedPatchHash{sourceRevisionHash} = \%sourceRevisionHash; return \%preparedPatchHash; } # Return localtime() for the project's time zone, given an integer time as # returned by Perl's time() function. sub localTimeInProjectTimeZone($) { my $epochTime = shift; # Change the time zone temporarily for the localtime() call. my $savedTimeZone = $ENV{'TZ'}; $ENV{'TZ'} = $changeLogTimeZone; my @localTime = localtime($epochTime); if (defined $savedTimeZone) { $ENV{'TZ'} = $savedTimeZone; } else { delete $ENV{'TZ'}; } return @localTime; } # Set the reviewer and date in a ChangeLog patch, and return the new patch. # # Args: # $patch: a ChangeLog patch as a string. # $reviewer: the name of the reviewer, or undef if the reviewer should not be set. # $epochTime: an integer time as returned by Perl's time() function. sub setChangeLogDateAndReviewer($$$) { my ($patch, $reviewer, $epochTime) = @_; my @localTime = localTimeInProjectTimeZone($epochTime); my $newDate = strftime("%Y-%m-%d", @localTime); my $firstChangeLogLineRegEx = qr#(\n\+)\d{4}-[^-]{2}-[^-]{2}( )#; $patch =~ s/$firstChangeLogLineRegEx/$1$newDate$2/; if (defined($reviewer)) { # We include a leading plus ("+") in the regular expression to make # the regular expression less likely to match text in the leading junk # for the patch, if the patch has leading junk. $patch =~ s/(\n\+.*)NOBODY \(OOPS!\)/$1$reviewer/; } return $patch; } # If possible, returns a ChangeLog patch equivalent to the given one, # but with the newest ChangeLog entry inserted at the top of the # file -- i.e. no leading context and all lines starting with "+". # # If given a patch string not representable as a patch with the above # properties, it returns the input back unchanged. # # WARNING: This subroutine can return an inequivalent patch string if # both the beginning of the new ChangeLog file matches the beginning # of the source ChangeLog, and the source beginning was modified. # Otherwise, it is guaranteed to return an equivalent patch string, # if it returns. # # Applying this subroutine to ChangeLog patches allows svn-apply to # insert new ChangeLog entries at the top of the ChangeLog file. # svn-apply uses patch with --fuzz=3 to do this. We need to apply # this subroutine because the diff(1) command is greedy when matching # lines. A new ChangeLog entry with the same date and author as the # previous will match and cause the diff to have lines of starting # context. # # This subroutine has unit tests in VCSUtils_unittest.pl. # # Returns $changeLogHashRef: # $changeLogHashRef: a hash reference representing a change log patch. # patch: a ChangeLog patch equivalent to the given one, but with the # newest ChangeLog entry inserted at the top of the file, if possible. sub fixChangeLogPatch($) { my $patch = shift; # $patch will only contain patch fragments for ChangeLog. $patch =~ /(\r?\n)/; my $lineEnding = $1; my @lines = split(/$lineEnding/, $patch); my $i = 0; # We reuse the same index throughout. # Skip to beginning of first chunk. for (; $i < @lines; ++$i) { if (substr($lines[$i], 0, 1) eq "@") { last; } } my $chunkStartIndex = ++$i; my %changeLogHashRef; # Optimization: do not process if new lines already begin the chunk. if (substr($lines[$i], 0, 1) eq "+") { $changeLogHashRef{patch} = $patch; return \%changeLogHashRef; } # Skip to first line of newly added ChangeLog entry. # For example, +2009-06-03 Eric Seidel <eric@webkit.org> my $dateStartRegEx = '^\+(\d{4}-\d{2}-\d{2})' # leading "+" and date . '\s+(.+)\s+' # name . '<([^<>]+)>$'; # e-mail address for (; $i < @lines; ++$i) { my $line = $lines[$i]; my $firstChar = substr($line, 0, 1); if ($line =~ /$dateStartRegEx/) { last; } elsif ($firstChar eq " " or $firstChar eq "+") { next; } $changeLogHashRef{patch} = $patch; # Do not change if, for example, "-" or "@" found. return \%changeLogHashRef; } if ($i >= @lines) { $changeLogHashRef{patch} = $patch; # Do not change if date not found. return \%changeLogHashRef; } my $dateStartIndex = $i; # Rewrite overlapping lines to lead with " ". my @overlappingLines = (); # These will include a leading "+". for (; $i < @lines; ++$i) { my $line = $lines[$i]; if (substr($line, 0, 1) ne "+") { last; } push(@overlappingLines, $line); $lines[$i] = " " . substr($line, 1); } # Remove excess ending context, if necessary. my $shouldTrimContext = 1; for (; $i < @lines; ++$i) { my $firstChar = substr($lines[$i], 0, 1); if ($firstChar eq " ") { next; } elsif ($firstChar eq "@") { last; } $shouldTrimContext = 0; # For example, if "+" or "-" encountered. last; } my $deletedLineCount = 0; if ($shouldTrimContext) { # Also occurs if end of file reached. splice(@lines, $i - @overlappingLines, @overlappingLines); $deletedLineCount = @overlappingLines; } # Work backwards, shifting overlapping lines towards front # while checking that patch stays equivalent. for ($i = $dateStartIndex - 1; @overlappingLines && $i >= $chunkStartIndex; --$i) { my $line = $lines[$i]; if (substr($line, 0, 1) ne " ") { next; } my $text = substr($line, 1); my $newLine = pop(@overlappingLines); if ($text ne substr($newLine, 1)) { $changeLogHashRef{patch} = $patch; # Unexpected difference. return \%changeLogHashRef; } $lines[$i] = "+$text"; } # If @overlappingLines > 0, this is where we make use of the # assumption that the beginning of the source file was not modified. splice(@lines, $chunkStartIndex, 0, @overlappingLines); # Update the date start index as it may have changed after shifting # the overlapping lines towards the front. for ($i = $chunkStartIndex; $i < $dateStartIndex; ++$i) { $dateStartIndex = $i if $lines[$i] =~ /$dateStartRegEx/; } splice(@lines, $chunkStartIndex, $dateStartIndex - $chunkStartIndex); # Remove context of later entry. $deletedLineCount += $dateStartIndex - $chunkStartIndex; # Update the initial chunk range. if ($lines[$chunkStartIndex - 1] !~ /$chunkRangeRegEx/) { # FIXME: Handle errors differently from ChangeLog files that # are okay but should not be altered. That way we can find out # if improvements to the script ever become necessary. $changeLogHashRef{patch} = $patch; # Error: unexpected patch string format. return \%changeLogHashRef; } my $oldSourceLineCount = $2; my $oldTargetLineCount = $3; my $sourceLineCount = $oldSourceLineCount + @overlappingLines - $deletedLineCount; my $targetLineCount = $oldTargetLineCount + @overlappingLines - $deletedLineCount; $lines[$chunkStartIndex - 1] = "@@ -1,$sourceLineCount +1,$targetLineCount @@"; $changeLogHashRef{patch} = join($lineEnding, @lines) . "\n"; # patch(1) expects an extra trailing newline. return \%changeLogHashRef; } # This is a supporting method for runPatchCommand. # # Arg: the optional $args parameter passed to runPatchCommand (can be undefined). # # Returns ($patchCommand, $isForcing). # # This subroutine has unit tests in VCSUtils_unittest.pl. sub generatePatchCommand($) { my ($passedArgsHashRef) = @_; my $argsHashRef = { # Defaults ensureForce => 0, shouldReverse => 0, options => [] }; # Merges hash references. It's okay here if passed hash reference is undefined. @{$argsHashRef}{keys %{$passedArgsHashRef}} = values %{$passedArgsHashRef}; my $ensureForce = $argsHashRef->{ensureForce}; my $shouldReverse = $argsHashRef->{shouldReverse}; my $options = $argsHashRef->{options}; if (! $options) { $options = []; } else { $options = [@{$options}]; # Copy to avoid side effects. } my $isForcing = 0; if (grep /^--force$/, @{$options}) { $isForcing = 1; } elsif ($ensureForce) { push @{$options}, "--force"; $isForcing = 1; } if ($shouldReverse) { # No check: --reverse should never be passed explicitly. push @{$options}, "--reverse"; } @{$options} = sort(@{$options}); # For easier testing. my $patchCommand = join(" ", "patch -p0", @{$options}); return ($patchCommand, $isForcing); } # Apply the given patch using the patch(1) command. # # On success, return the resulting exit status. Otherwise, exit with the # exit status. If "--force" is passed as an option, however, then never # exit and always return the exit status. # # Args: # $patch: a patch string. # $repositoryRootPath: an absolute path to the repository root. # $pathRelativeToRoot: the path of the file to be patched, relative to the # repository root. This should normally be the path # found in the patch's "Index:" line. It is passed # explicitly rather than reparsed from the patch # string for optimization purposes. # This is used only for error reporting. The # patch command gleans the actual file to patch # from the patch string. # $args: a reference to a hash of optional arguments. The possible # keys are -- # ensureForce: whether to ensure --force is passed (defaults to 0). # shouldReverse: whether to pass --reverse (defaults to 0). # options: a reference to an array of options to pass to the # patch command. The subroutine passes the -p0 option # no matter what. This should not include --reverse. # # This subroutine has unit tests in VCSUtils_unittest.pl. sub runPatchCommand($$$;$) { my ($patch, $repositoryRootPath, $pathRelativeToRoot, $args) = @_; my ($patchCommand, $isForcing) = generatePatchCommand($args); # Temporarily change the working directory since the path found # in the patch's "Index:" line is relative to the repository root # (i.e. the same as $pathRelativeToRoot). my $cwd = Cwd::getcwd(); chdir $repositoryRootPath; open PATCH, "| $patchCommand" or die "Could not call \"$patchCommand\" for file \"$pathRelativeToRoot\": $!"; print PATCH $patch; close PATCH; my $exitStatus = exitStatus($?); chdir $cwd; if ($exitStatus && !$isForcing) { print "Calling \"$patchCommand\" for file \"$pathRelativeToRoot\" returned " . "status $exitStatus. Pass --force to ignore patch failures.\n"; exit $exitStatus; } return $exitStatus; } # Merge ChangeLog patches using a three-file approach. # # This is used by resolve-ChangeLogs when it's operated as a merge driver # and when it's used to merge conflicts after a patch is applied or after # an svn update. # # It's also used for traditional rejected patches. # # Args: # $fileMine: The merged version of the file. Also known in git as the # other branch's version (%B) or "ours". # For traditional patch rejects, this is the *.rej file. # $fileOlder: The base version of the file. Also known in git as the # ancestor version (%O) or "base". # For traditional patch rejects, this is the *.orig file. # $fileNewer: The current version of the file. Also known in git as the # current version (%A) or "theirs". # For traditional patch rejects, this is the original-named # file. # # Returns 1 if merge was successful, else 0. sub mergeChangeLogs($$$) { my ($fileMine, $fileOlder, $fileNewer) = @_; my $traditionalReject = $fileMine =~ /\.rej$/ ? 1 : 0; local $/ = undef; my $patch; if ($traditionalReject) { open(DIFF, "<", $fileMine) or die $!; $patch = <DIFF>; close(DIFF); rename($fileMine, "$fileMine.save"); rename($fileOlder, "$fileOlder.save"); } else { open(DIFF, "-|", qw(diff -u -a --binary), $fileOlder, $fileMine) or die $!; $patch = <DIFF>; close(DIFF); } unlink("${fileNewer}.orig"); unlink("${fileNewer}.rej"); open(PATCH, "| patch --force --fuzz=3 --binary $fileNewer > " . File::Spec->devnull()) or die $!; if ($traditionalReject) { print PATCH $patch; } else { my $changeLogHash = fixChangeLogPatch($patch); print PATCH $changeLogHash->{patch}; } close(PATCH); my $result = !exitStatus($?); # Refuse to merge the patch if it did not apply cleanly if (-e "${fileNewer}.rej") { unlink("${fileNewer}.rej"); if (-f "${fileNewer}.orig") { unlink($fileNewer); rename("${fileNewer}.orig", $fileNewer); } } else { unlink("${fileNewer}.orig"); } if ($traditionalReject) { rename("$fileMine.save", $fileMine); rename("$fileOlder.save", $fileOlder); } return $result; } sub gitConfig($) { return unless $isGit; my ($config) = @_; my $result = `git config $config`; if (($? >> 8)) { $result = `git repo-config $config`; } chomp $result; return $result; } sub changeLogNameError($) { my ($message) = @_; print STDERR "$message\nEither:\n"; print STDERR " set CHANGE_LOG_NAME in your environment\n"; print STDERR " OR pass --name= on the command line\n"; print STDERR " OR set REAL_NAME in your environment"; print STDERR " OR git users can set 'git config user.name'\n"; exit(1); } sub changeLogName() { my $name = $ENV{CHANGE_LOG_NAME} || $ENV{REAL_NAME} || gitConfig("user.name") || (split /\s*,\s*/, (getpwuid $<)[6])[0]; changeLogNameError("Failed to determine ChangeLog name.") unless $name; # getpwuid seems to always succeed on windows, returning the username instead of the full name. This check will catch that case. changeLogNameError("'$name' does not contain a space! ChangeLogs should contain your full name.") unless ($name =~ /\w \w/); return $name; } sub changeLogEmailAddressError($) { my ($message) = @_; print STDERR "$message\nEither:\n"; print STDERR " set CHANGE_LOG_EMAIL_ADDRESS in your environment\n"; print STDERR " OR pass --email= on the command line\n"; print STDERR " OR set EMAIL_ADDRESS in your environment\n"; print STDERR " OR git users can set 'git config user.email'\n"; exit(1); } sub changeLogEmailAddress() { my $emailAddress = $ENV{CHANGE_LOG_EMAIL_ADDRESS} || $ENV{EMAIL_ADDRESS} || gitConfig("user.email"); changeLogEmailAddressError("Failed to determine email address for ChangeLog.") unless $emailAddress; changeLogEmailAddressError("Email address '$emailAddress' does not contain '\@' and is likely invalid.") unless ($emailAddress =~ /\@/); return $emailAddress; } # http://tools.ietf.org/html/rfc1924 sub decodeBase85($) { my ($encoded) = @_; my %table; my @characters = ('0'..'9', 'A'..'Z', 'a'..'z', '!', '#', '$', '%', '&', '(', ')', '*', '+', '-', ';', '<', '=', '>', '?', '@', '^', '_', '`', '{', '|', '}', '~'); for (my $i = 0; $i < 85; $i++) { $table{$characters[$i]} = $i; } my $decoded = ''; my @encodedChars = $encoded =~ /./g; for (my $encodedIter = 0; defined($encodedChars[$encodedIter]);) { my $digit = 0; for (my $i = 0; $i < 5; $i++) { $digit *= 85; my $char = $encodedChars[$encodedIter]; $digit += $table{$char}; $encodedIter++; } for (my $i = 0; $i < 4; $i++) { $decoded .= chr(($digit >> (3 - $i) * 8) & 255); } } return $decoded; } sub decodeGitBinaryChunk($$) { my ($contents, $fullPath) = @_; # Load this module lazily in case the user don't have this module # and won't handle git binary patches. require Compress::Zlib; my $encoded = ""; my $compressedSize = 0; while ($contents =~ /^([A-Za-z])(.*)$/gm) { my $line = $2; next if $line eq ""; die "$fullPath: unexpected size of a line: $&" if length($2) % 5 != 0; my $actualSize = length($2) / 5 * 4; my $encodedExpectedSize = ord($1); my $expectedSize = $encodedExpectedSize <= ord("Z") ? $encodedExpectedSize - ord("A") + 1 : $encodedExpectedSize - ord("a") + 27; die "$fullPath: unexpected size of a line: $&" if int(($expectedSize + 3) / 4) * 4 != $actualSize; $compressedSize += $expectedSize; $encoded .= $line; } my $compressed = decodeBase85($encoded); $compressed = substr($compressed, 0, $compressedSize); return Compress::Zlib::uncompress($compressed); } sub decodeGitBinaryPatch($$) { my ($contents, $fullPath) = @_; # Git binary patch has two chunks. One is for the normal patching # and another is for the reverse patching. # # Each chunk a line which starts from either "literal" or "delta", # followed by a number which specifies decoded size of the chunk. # # Then, content of the chunk comes. To decode the content, we # need decode it with base85 first, and then zlib. my $gitPatchRegExp = '(literal|delta) ([0-9]+)\n([A-Za-z0-9!#$%&()*+-;<=>?@^_`{|}~\\n]*?)\n\n'; if ($contents !~ m"\nGIT binary patch\n$gitPatchRegExp$gitPatchRegExp\Z") { die "$fullPath: unknown git binary patch format" } my $binaryChunkType = $1; my $binaryChunkExpectedSize = $2; my $encodedChunk = $3; my $reverseBinaryChunkType = $4; my $reverseBinaryChunkExpectedSize = $5; my $encodedReverseChunk = $6; my $binaryChunk = decodeGitBinaryChunk($encodedChunk, $fullPath); my $binaryChunkActualSize = length($binaryChunk); my $reverseBinaryChunk = decodeGitBinaryChunk($encodedReverseChunk, $fullPath); my $reverseBinaryChunkActualSize = length($reverseBinaryChunk); die "$fullPath: unexpected size of the first chunk (expected $binaryChunkExpectedSize but was $binaryChunkActualSize" if ($binaryChunkType eq "literal" and $binaryChunkExpectedSize != $binaryChunkActualSize); die "$fullPath: unexpected size of the second chunk (expected $reverseBinaryChunkExpectedSize but was $reverseBinaryChunkActualSize" if ($reverseBinaryChunkType eq "literal" and $reverseBinaryChunkExpectedSize != $reverseBinaryChunkActualSize); return ($binaryChunkType, $binaryChunk, $reverseBinaryChunkType, $reverseBinaryChunk); } sub readByte($$) { my ($data, $location) = @_; # Return the byte at $location in $data as a numeric value. return ord(substr($data, $location, 1)); } # The git binary delta format is undocumented, except in code: # - https://github.com/git/git/blob/master/delta.h:get_delta_hdr_size is the source # of the algorithm in decodeGitBinaryPatchDeltaSize. # - https://github.com/git/git/blob/master/patch-delta.c:patch_delta is the source # of the algorithm in applyGitBinaryPatchDelta. sub decodeGitBinaryPatchDeltaSize($) { my ($binaryChunk) = @_; # Source and destination buffer sizes are stored in 7-bit chunks at the # start of the binary delta patch data. The highest bit in each byte # except the last is set; the remaining 7 bits provide the next # chunk of the size. The chunks are stored in ascending significance # order. my $cmd; my $size = 0; my $shift = 0; for (my $i = 0; $i < length($binaryChunk);) { $cmd = readByte($binaryChunk, $i++); $size |= ($cmd & 0x7f) << $shift; $shift += 7; if (!($cmd & 0x80)) { return ($size, $i); } } } sub applyGitBinaryPatchDelta($$) { my ($binaryChunk, $originalContents) = @_; # Git delta format consists of two headers indicating source buffer size # and result size, then a series of commands. Each command is either # a copy-from-old-version (the 0x80 bit is set) or a copy-from-delta # command. Commands are applied sequentially to generate the result. # # A copy-from-old-version command encodes an offset and size to copy # from in subsequent bits, while a copy-from-delta command consists only # of the number of bytes to copy from the delta. # We don't use these values, but we need to know how big they are so that # we can skip to the diff data. my ($size, $bytesUsed) = decodeGitBinaryPatchDeltaSize($binaryChunk); $binaryChunk = substr($binaryChunk, $bytesUsed); ($size, $bytesUsed) = decodeGitBinaryPatchDeltaSize($binaryChunk); $binaryChunk = substr($binaryChunk, $bytesUsed); my $out = ""; for (my $i = 0; $i < length($binaryChunk); ) { my $cmd = ord(substr($binaryChunk, $i++, 1)); if ($cmd & 0x80) { # Extract an offset and size from the delta data, then copy # $size bytes from $offset in the original data into the output. my $offset = 0; my $size = 0; if ($cmd & 0x01) { $offset = readByte($binaryChunk, $i++); } if ($cmd & 0x02) { $offset |= readByte($binaryChunk, $i++) << 8; } if ($cmd & 0x04) { $offset |= readByte($binaryChunk, $i++) << 16; } if ($cmd & 0x08) { $offset |= readByte($binaryChunk, $i++) << 24; } if ($cmd & 0x10) { $size = readByte($binaryChunk, $i++); } if ($cmd & 0x20) { $size |= readByte($binaryChunk, $i++) << 8; } if ($cmd & 0x40) { $size |= readByte($binaryChunk, $i++) << 16; } if ($size == 0) { $size = 0x10000; } $out .= substr($originalContents, $offset, $size); } elsif ($cmd) { # Copy $cmd bytes from the delta data into the output. $out .= substr($binaryChunk, $i, $cmd); $i += $cmd; } else { die "unexpected delta opcode 0"; } } return $out; } 1;
mogoweb/webkit_for_android5.1
webkit/Tools/Scripts/VCSUtils.pm
Perl
apache-2.0
71,091
package ExtUtils::MM_MacOS; use strict; our $VERSION = 6.44; sub new { die <<'UNSUPPORTED'; MacOS Classic (MacPerl) is no longer supported by MakeMaker. Please use Module::Build instead. UNSUPPORTED } =head1 NAME ExtUtils::MM_MacOS - once produced Makefiles for MacOS Classic =head1 SYNOPSIS # MM_MacOS no longer contains any code. This is just a stub. =head1 DESCRIPTION Once upon a time, MakeMaker could produce an approximation of a correct Makefile on MacOS Classic (MacPerl). Due to a lack of maintainers, this fell out of sync with the rest of MakeMaker and hadn't worked in years. Since there's little chance of it being repaired, MacOS Classic is fading away, and the code was icky to begin with, the code has been deleted to make maintenance easier. Those interested in writing modules for MacPerl should use Module::Build which works better than MakeMaker ever did. Anyone interested in resurrecting this file should pull the old version from the MakeMaker CVS repository and contact makemaker@perl.org, but we really encourage you to work on Module::Build instead. =cut 1;
leighpauls/k2cro4
third_party/cygwin/lib/perl5/5.10/ExtUtils/MM_MacOS.pm
Perl
bsd-3-clause
1,105
#!/usr/bin/env perl # This script tries to find deprecated classes and methods and replace # them with new classes/methods. Please note that it can not fix all # possible problems. However, it should be relatively easy to trace # those problems from compilation errors. use Getopt::Long; if (!GetOptions("language:s" => \$language, "help" => \$help, "update" => \$update, "print-messages" => \$print)) { die; } if (!$language) { $language = "c++"; } if ( !$print && ($#ARGV < 0 || $help) ) { print "Usage: $0 [--language {c++ | tcl | python | java}] ", "[--help] [--print-messages] file1 [file2 ...]\n"; exit; } @cxxmessageids = ( 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\([ ]*\)', 0, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_CHAR\s*,\s*([1-4])\s*\);', 4, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_SHORT\s*,\s*([1-4])\s*\);', 5, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_SHORT\s*,\s*([1-4])\s*\);', 25, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_INT\s*,\s*([1-4])\s*\);', 17, 'vtkScalars\.h', 1, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*\)', 2, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_CHAR\s*,\s*([1-4])\s*\);', 6, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_SHORT\s*,\s*([1-4])\s*\);', 7, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_SHORT\s*,\s*([1-4])\s*\);', 26, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_INT\s*,\s*([1-4])\s*\);', 18, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_INT\s*\);', 19, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_CHAR\s*\);', 20, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_SHORT\s*\);', 21, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_SHORT\s*\);', 27, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_CHAR\s*\);', 22, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_UNSIGNED_SHORT\s*\);', 23, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_SHORT\s*\);', 28, '([a-zA-Z0-9_-]*)\s*=\s*vtkScalars::New\(\s*VTK_INT\s*\);', 24, 'vtkScalars\s*\*\s*([a-zA-Z0-9_-]*)', 3, 'GetScalar\s*\(', 8, 'SetScalar\s*\(', 9, 'InsertScalar\s*\(', 10, 'InsertNextScalar\s*\(', 11, '(GetScalars\s*\(\s*[-a-zA-Z0-9_\*]+\s*\))', 12, 'SetNumberOfScalars\s*\(', 13, 'GetNumberOfScalars\s*\(', 16, 'GetActiveScalars', 14, 'vtkScalars([^a-zA-Z0-9])', 15, 'vtkVectors\s*\*\s*([a-zA-Z0-9_-]*)\s*=[ \t]vtkVectors::New\([ ]*\)\s*;', 100, 'vtkVectors\.h', 1, '([a-zA-Z0-9_-]*)\s*=\s*vtkVectors::New\(\s*\)', 102, 'vtkVectors\s*\*\s*([a-zA-Z0-9_-]*)\s', 3, 'GetVector\s*\(', 108, 'SetVector\s*\(([^,]*),([^\),]*)\)', 109, 'SetVector\s*\(([^,]*),([^,]*),([^,]*),([^\),]*)\)', 115, 'InsertVector\s*\(', 110, 'InsertNextVector\s*\(', 111, '(GetVectors\s*\(\s*[-a-zA-Z0-9_\*]+\s*\))', 12, 'SetNumberOfVectors\s*\(', 113, 'GetNumberOfVectors\s*\(', 16, 'GetActiveVectors', 114, 'vtkVectors([^a-zA-Z0-9])', 15, 'vtkNormals\s*\*\s*([a-zA-Z0-9_-]*)\s*=[ \t]vtkNormals::New\([ ]*\)\s*;', 100, 'vtkNormals\.h', 1, '([a-zA-Z0-9_-]*)\s*=\s*vtkNormals::New\(\s*\)', 102, 'vtkNormals\s*\*\s*([a-zA-Z0-9_-]*)\s', 3, 'GetNormal\s*\(', 108, 'SetNormal\s*\(([^,]*),([^\),]*)\)', 109, 'SetNormal\s*\(([^,]*),([^,]*),([^,]*),([^\),]*)\)', 115, 'InsertNormal\s*\(', 110, 'InsertNextNormal\s*\(', 111, '(GetNormals\s*\(\s*[-a-zA-Z0-9_\*]+\s*\))', 12, 'SetNumberOfNormals\s*\(', 113, 'GetNumberOfNormals\s*\(', 16, 'GetActiveNormals', 214, 'vtkNormals([^a-zA-Z0-9])', 15, 'vtkTCoords\s*\*\s*([a-zA-Z0-9_-]*)\s*=[ \t]vtkTCoords::New\([ ]*\)\s*;', 300, 'vtkTCoords\.h', 1, '([a-zA-Z0-9_-]*)\s*=\s*vtkTCoords::New\(\s*\)', 302, 'vtkTCoords\s*\*\s*([a-zA-Z0-9_-]*)\s', 3, 'GetTCoord\s*\(', 108, 'SetTCoord\s*\(([^,]*),([^\),]*)\)', 109, 'InsertTCoord\s*\(', 110, 'InsertNextTCoord\s*\(', 111, '(GetTCoords\s*\(\s*[-a-zA-Z0-9_\*]+\s*\))', 12, 'SetNumberOfTCoords\s*\(', 113, 'GetNumberOfTCoords\s*\(', 16, 'GetActiveTCoords', 314, 'vtkTCoords([^a-zA-Z0-9])', 15, 'vtkTensors\s*\*\s*([a-zA-Z0-9_-]*)\s*=[ \t]vtkTensors::New\([ ]*\)\s*;', 400, 'vtkTensors\.h', 1, '([a-zA-Z0-9_-]*)\s*=\s*vtkTensors::New\(\s*\)', 402, 'vtkTensors\s*\*\s*([a-zA-Z0-9_-]*)\s', 3, 'GetTensor\s*\(', 108, 'SetTensor\s*\(([^,]*),([^\),]*)\)', 109, 'InsertTensor\s*\(', 110, 'InsertNextTensor\s*\(', 111, '(GetTensors\s*\(\s*[-a-zA-Z0-9_\*]+\s*\))', 12, 'SetNumberOfTensors\s*\(', 113, 'GetNumberOfTensors\s*\(', 16, 'GetActiveTensors', 414, 'vtkTensors([^a-zA-Z0-9])', 15, 'GetPointData\(\)->GetFieldData\(', 1000, 'GetCellData\(\)->GetFieldData\(', 1001, 'SaveImageAsPPM\s*\(', 1002, ); %cxxreps = ( 0 => 'vtkFloatArray \*$1 = vtkFloatArray::New\(\)', 1 => 'vtkFloatArray\.h', 2 => '$1 = vtkFloatArray::New\(\)', 3 => 'vtkDataArray \*$1', 4 => 'vtkUnsignedCharArray \*$1 = vtkUnsignedCharArray::New\(\); $1->SetNumberOfComponents\($2\);', 5 => 'vtkUnsignedShortArray \*$1 = vtkUnsignedShortArray::New\(\); $1->SetNumberOfComponents\($2\);', 6 => '$1 = vtkUnsignedCharArray::New\(\); $1->SetNumberOfComponents\($2\);', 7 => '$1 = vtkUnsignedShortArray::New\(\); $1->SetNumberOfComponents\($2\);', 8 => 'GetTuple1\(', 9 => 'SetTuple1\(', 10 => 'InsertTuple1\(', 11 => 'InsertNextTuple1\(', 12 => '$1 \/\/ Use GetTuples here instead ', 13 => 'SetNumberOfTuples\(', 14 => 'GetScalars', 15 => 'vtkDataArray$1', 16 => 'GetNumberOfTuples\(', 17 => 'vtkIntArray \*$1 = vtkIntArray::New\(\); $1->SetNumberOfComponents\($2\);', 18 => '$1 = vtkIntArray::New\(\); $1->SetNumberOfComponents\($2\);', 19 => 'vtkIntArray \*$1 = vtkIntArray::New\(\);', 20 => 'vtkUnsignedCharArray \*$1 = vtkUnsignedCharArray::New\(\);', 21 => 'vtkUnsignedShortArray \*$1 = vtkUnsignedShortArray::New\(\);', 22 => '$1 = vtkUnsignedCharArray::New\(\);', 23 => '$1 = vtkUnsignedShortArray::New\(\);', 24 => '$1 = vtkIntArray::New\(\);', 25 => 'vtkShortArray \*$1 = vtkShortArray::New\(\); $1->SetNumberOfComponents\($2\);', 26 => '$1 = vtkShortArray::New\(\); $1->SetNumberOfComponents\($2\);', 27 => 'vtkShortArray \*$1 = vtkShortArray::New\(\);', 28 => '$1 = vtkShortArray::New\(\);', 100 => 'vtkFloatArray \*$1 = vtkFloatArray::New\(\); $1->SetNumberOfComponents\(3\);', 102 => '$1 = vtkFloatArray::New\(\); $1->SetNumberOfComponents\(3\)', 108 => 'GetTuple\(', 109 => 'SetTuple\($1,$2\)', 110 => 'InsertTuple\(', 111 => 'InsertNextTuple\(', 113 => 'SetNumberOfTuples\(', 114 => 'GetVectors', 115 => 'SetTuple3\($1,$2,$3,$4\)', 214 => 'GetNormals', 300 => 'vtkFloatArray \*$1 = vtkFloatArray::New\(\); $1->SetNumberOfComponents\(2\);', 302 => '$1 = vtkFloatArray::New\(\); $1->SetNumberOfComponents\(2\)', 314 => 'GetTCoords', 400 => 'vtkFloatArray \*$1 = vtkFloatArray::New\(\); $1->SetNumberOfComponents\(9\);', 402 => '$1 = vtkFloatArray::New\(\); $1->SetNumberOfComponents\(9\)', 414 => 'GetTensors', 1000 => 'GetPointData\(', 1001 => 'GetCellData\(', 1002 => 'SaveImageAsPPM\( \/\/ Use a vtkWindowToImageFilter instead of SaveImageAsPPM', ); @tclmessageids = ( 'vtkScalars\s+([a-zA-Z0-9\$_-]*)', 0, 'SetScalar\s+(\S+)\s*(\S+)', 1, 'InsertScalar\s+', 2, 'InsertNextScalar\s+', 3, 'SetNumberOfScalars\s+', 4, 'GetNumberOfScalars\s+', 5, 'GetActiveScalars\s+', 6, 'vtkVectors\s+([a-zA-Z0-9\$_-]*)', 100, 'SetVector\s+(\S+)\s*(\S+)\s*(\S+)\s*(\S+)', 101, 'InsertVector\s+', 102, 'InsertNextVector\s+', 103, 'SetNumberOfVectors\s+', 4, 'GetNumberOfVectors\s+', 5, 'GetActiveVectors\+', 106, 'vtkNormals\s+([a-zA-Z0-9\$_-]*)', 100, 'SetNormal\s+(\S+)\s*(\S+)\s*(\S+)\s*(\S+)', 101, 'InsertNormal\s+', 102, 'InsertNextNormal\s+', 103, 'SetNumberOfNormals\s+', 4, 'GetNumberOfNormals\s+', 5, 'GetActiveNormals\+', 206, 'vtkTCoords\s+([a-zA-Z0-9\$_-]*)', 300, 'SetTCoord\s+(\S+)\s*(\S+)\s*(\S+)\s*(\S+)', 101, 'InsertTCoord\s+', 102, 'InsertNextTCoord\s+', 103, 'SetNumberOfTCoords\s+', 4, 'GetNumberOfTCoords\s+', 5, 'GetActiveTCoords\s+', 306, 'GetPointData\s*\]\s+GetFieldData\s*\]', 1000, 'GetCellData\s*\]\s+GetFieldData\s*\]', 1001, 'SaveImageAsPPM\s*', 1002, 'GetImageWindow', 1003, 'catch\s*\{\s*load\s*vtktcl\s*\}', 1004, 'source\s*\$VTK_TCL\/vtkInt\.tcl', 1005, 'source\s*\$VTK_TCL\/colors\.tcl', 1006, ); %tclreps = ( 0 => 'vtkFloatArray $1', 1 => 'SetTuple1 $1 $2', 2 => 'InsertTuple1 ', 3 => 'InsertNextTuple1 ', 4 => 'SetNumberOfTuples ', 5 => 'GetNumberOfTuples ', 6 => 'GetScalars ', 100 => 'vtkFloatArray $1; $1 SetNumberOfComponents 3', 101 => 'SetTuple3 $1 $2 $3 $4', 102 => 'InsertTuple3 ', 103 => 'InsertNextTuple3 ', 106 => 'GetVectors ', 206 => 'GetNormals ', 300 => 'vtkFloatArray $1; $1 SetNumberOfComponents 2', 306 => 'GetTCoords ', 1000 => 'GetPointData\]', 1001 => 'GetCellData\]', 1002 => 'SaveImageAsPPM \# Use a vtkWindowToImageFilter instead of SaveImageAsPPM', 1003 => 'GetRenderWindow', 1004 => 'package require vtk', 1005 => 'package require vtkinteraction', 1006 => 'package require vtktesting', ); if ($language eq "c++") { @messageids = @cxxmessageids; %reps = %cxxreps; } elsif($language eq "tcl") { @messageids = @tclmessageids; %reps = %tclreps; } else { die "Unsupported language: $language.\n"; } if ( $print ) { $i = 0; foreach $key (@messages) { print "Message id $i:\n"; print $key, "\n"; $i++; } exit 0; } foreach $filename (@ARGV) { open(FPTR, "<$filename") or die "Could not open file $filename"; open(OPTR, ">$filename.update") or die "Could not open file $filename.update"; $i = 1; while (<FPTR>) { $line = $_; $j = 0; while ($j < $#messageids) { if ( $line =~ m($messageids[$j]) ) { eval "\$line =~ s/$messageids[$j]/$reps{$messageids[$j+1]}/g"; } $j = $j + 2; } print OPTR $line; $i++; } close OPTR; close FPTR; if ( $update ) { print $filename,"\n"; rename("$filename.update","$filename"); } }
sumedhasingla/VTK
Utilities/Upgrading/UpgradeFrom32.pl
Perl
bsd-3-clause
10,827
#!/usr/bin/perl # ******************************************************************** # * COPYRIGHT: # * Copyright (c) 2002-2016, International Business Machines Corporation and # * others. All Rights Reserved. # ******************************************************************** # # regexcst.pl # Compile the regular expression paser state table data into initialized C data. # Usage: # cd icu/source/i18n # perl regexcst.pl < regexcst.txt > regexcst.h # # The output file, regexcst.h, is included by some of the .cpp regex # implementation files. This perl script is NOT run as part # of a normal ICU build. It is run by hand when needed, and the # regexcst.h generated file is put back into cvs. # # See regexcst.txt for a description of the input format for this script. # # This script is derived from rbbicst.pl, which peforms the same function # for the Rule Based Break Iterator Rule Parser. Perhaps they could be # merged? # $num_states = 1; # Always the state number for the line being compiled. $line_num = 0; # The line number in the input file. $states{"pop"} = 255; # Add the "pop" to the list of defined state names. # This prevents any state from being labelled with "pop", # and resolves references to "pop" in the next state field. line_loop: while (<>) { chomp(); $line = $_; @fields = split(); $line_num++; # Remove # comments, which are any fields beginning with a #, plus all # that follow on the line. for ($i=0; $i<@fields; $i++) { if ($fields[$i] =~ /^#/) { @fields = @fields[0 .. $i-1]; last; } } # ignore blank lines, and those with no fields left after stripping comments.. if (@fields == 0) { next; } # # State Label: handling. # Does the first token end with a ":"? If so, it's the name of a state. # Put in a hash, together with the current state number, # so that we can later look up the number from the name. # if (@fields[0] =~ /.*:$/) { $state_name = @fields[0]; $state_name =~ s/://; # strip off the colon from the state name. if ($states{$state_name} != 0) { print " rbbicst: at line $line-num duplicate definition of state $state_name\n"; } $states{$state_name} = $num_states; $stateNames[$num_states] = $state_name; # if the label was the only thing on this line, go on to the next line, # otherwise assume that a state definition is on the same line and fall through. if (@fields == 1) { next line_loop; } shift @fields; # shift off label field in preparation # for handling the rest of the line. } # # State Transition line. # syntax is this, # character [n] target-state [^push-state] [function-name] # where # [something] is an optional something # character is either a single quoted character e.g. '[' # or a name of a character class, e.g. white_space # $state_line_num[$num_states] = $line_num; # remember line number with each state # so we can make better error messages later. # # First field, character class or literal character for this transition. # if ($fields[0] =~ /^'.'$/) { # We've got a quoted literal character. $state_literal_chars[$num_states] = $fields[0]; $state_literal_chars[$num_states] =~ s/'//g; } else { # We've got the name of a character class. $state_char_class[$num_states] = $fields[0]; if ($fields[0] =~ /[\W]/) { print " rbbicsts: at line $line_num, bad character literal or character class name.\n"; print " scanning $fields[0]\n"; exit(-1); } } shift @fields; # # do the 'n' flag # $state_flag[$num_states] = "FALSE"; if ($fields[0] eq "n") { $state_flag[$num_states] = "TRUE"; shift @fields; } # # do the destination state. # $state_dest_state[$num_states] = $fields[0]; if ($fields[0] eq "") { print " rbbicsts: at line $line_num, destination state missing.\n"; exit(-1); } shift @fields; # # do the push state, if present. # if ($fields[0] =~ /^\^/) { $fields[0] =~ s/^\^//; $state_push_state[$num_states] = $fields[0]; if ($fields[0] eq "" ) { print " rbbicsts: at line $line_num, expected state after ^ (no spaces).\n"; exit(-1); } shift @fields; } # # Lastly, do the optional action name. # if ($fields[0] ne "") { $state_func_name[$num_states] = $fields[0]; shift @fields; } # # There should be no fields left on the line at this point. # if (@fields > 0) { print " rbbicsts: at line $line_num, unexpected extra stuff on input line.\n"; print " scanning $fields[0]\n"; } $num_states++; } # # We've read in the whole file, now go back and output the # C source code for the state transition table. # # We read all states first, before writing anything, so that the state numbers # for the destination states are all available to be written. # # # Make hashes for the names of the character classes and # for the names of the actions that appeared. # for ($state=1; $state < $num_states; $state++) { if ($state_char_class[$state] ne "") { if ($charClasses{$state_char_class[$state]} == 0) { $charClasses{$state_char_class[$state]} = 1; } } if ($state_func_name[$state] eq "") { $state_func_name[$state] = "doNOP"; } if ($actions{$state_action_name[$state]} == 0) { $actions{$state_func_name[$state]} = 1; } } # # Check that all of the destination states have been defined # # $states{"exit"} = 0; # Predefined state name, terminates state machine. for ($state=1; $state<$num_states; $state++) { if ($states{$state_dest_state[$state]} == 0 && $state_dest_state[$state] ne "exit") { print "Error at line $state_line_num[$state]: target state \"$state_dest_state[$state]\" is not defined.\n"; $errors++; } if ($state_push_state[$state] ne "" && $states{$state_push_state[$state]} == 0) { print "Error at line $state_line_num[$state]: target state \"$state_push_state[$state]\" is not defined.\n"; $errors++; } } die if ($errors>0); print "//---------------------------------------------------------------------------------\n"; print "//\n"; print "// Generated Header File. Do not edit by hand.\n"; print "// This file contains the state table for the ICU Regular Expression Pattern Parser\n"; print "// It is generated by the Perl script \"regexcst.pl\" from\n"; print "// the rule parser state definitions file \"regexcst.txt\".\n"; print "//\n"; print "// Copyright (C) 2002-2016 International Business Machines Corporation \n"; print "// and others. All rights reserved. \n"; print "//\n"; print "//---------------------------------------------------------------------------------\n"; print "#ifndef RBBIRPT_H\n"; print "#define RBBIRPT_H\n"; print "\n"; print "#include \"unicode/utypes.h\"\n"; print "\n"; print "U_NAMESPACE_BEGIN\n"; # # Emit the constants for indicies of Unicode Sets # Define one constant for each of the character classes encountered. # At the same time, store the index corresponding to the set name back into hash. # print "//\n"; print "// Character classes for regex pattern scanning.\n"; print "//\n"; $i = 128; # State Table values for Unicode char sets range from 128-250. # Sets "default", "quoted", etc. get special handling. # They have no corresponding UnicodeSet object in the state machine, # but are handled by special case code. So we emit no reference # to a UnicodeSet object to them here. foreach $setName (keys %charClasses) { if ($setName eq "default") { $charClasses{$setName} = 255;} elsif ($setName eq "quoted") { $charClasses{$setName} = 254;} elsif ($setName eq "eof") { $charClasses{$setName} = 253;} else { # Normal character class. Fill in array with a ptr to the corresponding UnicodeSet in the state machine. print " static const uint8_t kRuleSet_$setName = $i;\n"; $charClasses{$setName} = $i; $i++; } } print "\n\n"; # # Emit the enum for the actions to be performed. # print "enum Regex_PatternParseAction {\n"; foreach $act (keys %actions) { print " $act,\n"; } print " rbbiLastAction};\n\n"; # # Emit the struct definition for transtion table elements. # print "//-------------------------------------------------------------------------------\n"; print "//\n"; print "// RegexTableEl represents the structure of a row in the transition table\n"; print "// for the pattern parser state machine.\n"; print "//-------------------------------------------------------------------------------\n"; print "struct RegexTableEl {\n"; print " Regex_PatternParseAction fAction;\n"; print " uint8_t fCharClass; // 0-127: an individual ASCII character\n"; print " // 128-255: character class index\n"; print " uint8_t fNextState; // 0-250: normal next-state numbers\n"; print " // 255: pop next-state from stack.\n"; print " uint8_t fPushState;\n"; print " UBool fNextChar;\n"; print "};\n\n"; # # emit the state transition table # print "static const struct RegexTableEl gRuleParseStateTable[] = {\n"; print " {doNOP, 0, 0, 0, TRUE}\n"; # State 0 is a dummy. Real states start with index = 1. for ($state=1; $state < $num_states; $state++) { print " , {$state_func_name[$state],"; if ($state_literal_chars[$state] ne "") { $c = $state_literal_chars[$state]; printf(" %d /* $c */,", ord($c)); # use numeric value, so EBCDIC machines are ok. }else { print " $charClasses{$state_char_class[$state]},"; } print " $states{$state_dest_state[$state]},"; # The push-state field is optional. If omitted, fill field with a zero, which flags # the state machine that there is no push state. if ($state_push_state[$state] eq "") { print "0, "; } else { print " $states{$state_push_state[$state]},"; } print " $state_flag[$state]} "; # Put out a C++ comment showing the number (index) of this state row, # and, if this is the first row of the table for this state, the state name. print " // $state "; if ($stateNames[$state] ne "") { print " $stateNames[$state]"; } print "\n"; }; print " };\n"; # # emit a mapping array from state numbers to state names. # # This array is used for producing debugging output from the pattern parser. # print "static const char * const RegexStateNames[] = {"; for ($state=0; $state<$num_states; $state++) { if ($stateNames[$state] ne "") { print " \"$stateNames[$state]\",\n"; } else { print " 0,\n"; } } print " 0};\n\n"; print "U_NAMESPACE_END\n"; print "#endif\n";
amrnablus/PDF-Writer
libIcu/source/i18n/regexcst.pl
Perl
apache-2.0
11,866
#!/usr/bin/env perl =head1 NAME SpeedUpMatviews.pm =head1 SYNOPSIS mx-run SpeedUpMatviews [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 This patch: - updates the materialized_phenoview and materialized_genoview to reduce indexing and speed up their underlying queries - rebuilds single category and binary materialized views as just views - updates trials view to exclude genotyping project folders - drops deprecated refresh functions and removes single category and binary views from matviews tracking table =head1 AUTHOR Bryan Ellerbrock =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 SpeedUpMatviews; use Moose; extends 'CXGN::Metadata::Dbpatch'; has '+description' => ( default => <<'' ); This patch updates the materialized_phenoview and materialized_genoview to speed up their underlying queries (prevents joining through nd_experiment, drops indexes). Also redefines trials view to exclude genotyping trial folders 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 -- drop and recreate phenoview with single unique index and no joining through nd_experiment DROP MATERIALIZED VIEW IF EXISTS public.materialized_phenoview CASCADE; CREATE MATERIALIZED VIEW public.materialized_phenoview AS SELECT breeding_program.project_id AS breeding_program_id, location.value::int AS location_id, year.value AS year_id, trial.project_id AS trial_id, accession.stock_id AS accession_id, seedlot.stock_id AS seedlot_id, stock.stock_id AS stock_id, phenotype.phenotype_id as phenotype_id, phenotype.cvalue_id as trait_id FROM stock accession LEFT JOIN stock_relationship ON accession.stock_id = stock_relationship.object_id AND stock_relationship.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'plot_of' OR cvterm.name = 'plant_of' OR cvterm.name = 'analysis_of') LEFT JOIN stock ON stock_relationship.subject_id = stock.stock_id AND stock.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'plot' OR cvterm.name = 'plant' OR cvterm.name = 'analysis_instance') LEFT JOIN stock_relationship seedlot_relationship ON stock.stock_id = seedlot_relationship.subject_id AND seedlot_relationship.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'seed transaction') LEFT JOIN stock seedlot ON seedlot_relationship.object_id = seedlot.stock_id AND seedlot.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'seedlot') LEFT JOIN nd_experiment_stock ON(stock.stock_id = nd_experiment_stock.stock_id AND nd_experiment_stock.type_id IN (SELECT cvterm_id from cvterm where cvterm.name IN ('phenotyping_experiment', 'field_layout', 'analysis_experiment'))) LEFT JOIN nd_experiment_project ON nd_experiment_stock.nd_experiment_id = nd_experiment_project.nd_experiment_id FULL OUTER JOIN project trial ON nd_experiment_project.project_id = trial.project_id LEFT JOIN project_relationship ON trial.project_id = project_relationship.subject_project_id AND project_relationship.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'breeding_program_trial_relationship' ) FULL OUTER JOIN project breeding_program ON project_relationship.object_project_id = breeding_program.project_id LEFT JOIN projectprop location ON trial.project_id = location.project_id AND location.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'project location' ) LEFT JOIN projectprop year ON trial.project_id = year.project_id AND year.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'project year' ) LEFT JOIN nd_experiment_phenotype ON(nd_experiment_stock.nd_experiment_id = nd_experiment_phenotype.nd_experiment_id) LEFT JOIN phenotype ON nd_experiment_phenotype.phenotype_id = phenotype.phenotype_id WHERE accession.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'accession') ORDER BY breeding_program_id, location_id, trial_id, accession_id, seedlot_id, stock.stock_id, phenotype_id, trait_id WITH DATA; CREATE UNIQUE INDEX unq_pheno_idx ON public.materialized_phenoview(stock_id,phenotype_id,trait_id) WITH (fillfactor=100); ALTER MATERIALIZED VIEW materialized_phenoview OWNER TO web_usr; -- drop and recreate genoview with single unique index and unions instead of case whens DROP MATERIALIZED VIEW IF EXISTS public.materialized_genoview CASCADE; CREATE MATERIALIZED VIEW public.materialized_genoview AS SELECT stock.stock_id AS accession_id, nd_experiment_protocol.nd_protocol_id AS genotyping_protocol_id, genotype.genotype_id AS genotype_id, stock_type.name AS stock_type FROM stock JOIN cvterm AS stock_type ON (stock_type.cvterm_id = stock.type_id AND stock_type.name = 'accession') JOIN nd_experiment_stock ON stock.stock_id = nd_experiment_stock.stock_id JOIN nd_experiment_protocol ON nd_experiment_stock.nd_experiment_id = nd_experiment_protocol.nd_experiment_id JOIN nd_protocol ON nd_experiment_protocol.nd_protocol_id = nd_protocol.nd_protocol_id JOIN nd_experiment_genotype ON nd_experiment_stock.nd_experiment_id = nd_experiment_genotype.nd_experiment_id JOIN genotype ON genotype.genotype_id = nd_experiment_genotype.genotype_id GROUP BY 1,2,3,4 UNION SELECT accession.stock_id AS accession_id, nd_experiment_protocol.nd_protocol_id AS genotyping_protocol_id, nd_experiment_genotype.genotype_id AS genotype_id, stock_type.name AS stock_type FROM stock AS accession JOIN stock_relationship ON accession.stock_id = stock_relationship.object_id AND stock_relationship.type_id IN (SELECT cvterm_id from cvterm where cvterm.name IN ('tissue_sample_of', 'plant_of', 'plot_of') ) JOIN stock ON stock_relationship.subject_id = stock.stock_id AND stock.type_id IN (SELECT cvterm_id from cvterm where cvterm.name IN ('tissue_sample', 'plant', 'plot') ) JOIN cvterm AS stock_type ON (stock_type.cvterm_id = stock.type_id) JOIN nd_experiment_stock ON stock.stock_id = nd_experiment_stock.stock_id JOIN nd_experiment_protocol ON nd_experiment_stock.nd_experiment_id = nd_experiment_protocol.nd_experiment_id JOIN nd_protocol ON nd_experiment_protocol.nd_protocol_id = nd_protocol.nd_protocol_id JOIN nd_experiment_genotype ON nd_experiment_stock.nd_experiment_id = nd_experiment_genotype.nd_experiment_id GROUP BY 1,2,3,4 ORDER BY 1,2,3; CREATE UNIQUE INDEX unq_geno_idx ON public.materialized_genoview(accession_id,genotype_id) WITH (fillfactor=100); ALTER MATERIALIZED VIEW materialized_genoview OWNER TO web_usr; -- drop and recreate all the single category matviews as just views DROP MATERIALIZED VIEW IF EXISTS public.accessions CASCADE; CREATE VIEW public.accessions AS SELECT stock.stock_id AS accession_id, stock.uniquename AS accession_name FROM stock WHERE stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'accession') AND is_obsolete = 'f' GROUP BY stock.stock_id, stock.uniquename; ALTER VIEW accessions OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.breeding_programs CASCADE; CREATE VIEW public.breeding_programs AS SELECT project.project_id AS breeding_program_id, project.name AS breeding_program_name FROM project join projectprop USING (project_id) WHERE projectprop.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'breeding_program') GROUP BY project.project_id, project.name; ALTER VIEW breeding_programs OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.genotyping_protocols CASCADE; CREATE VIEW public.genotyping_protocols AS SELECT nd_protocol.nd_protocol_id AS genotyping_protocol_id, nd_protocol.name AS genotyping_protocol_name FROM nd_protocol WHERE nd_protocol.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'genotyping_experiment') GROUP BY public.nd_protocol.nd_protocol_id, public.nd_protocol.name; ALTER VIEW genotyping_protocols OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.locations CASCADE; CREATE VIEW public.locations AS SELECT nd_geolocation.nd_geolocation_id AS location_id, nd_geolocation.description AS location_name FROM nd_geolocation GROUP BY public.nd_geolocation.nd_geolocation_id, public.nd_geolocation.description; ALTER VIEW locations OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.plants CASCADE; CREATE VIEW public.plants AS SELECT stock.stock_id AS plant_id, stock.uniquename AS plant_name FROM stock WHERE stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant') AND is_obsolete = 'f' GROUP BY public.stock.stock_id, public.stock.uniquename; ALTER VIEW plants OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.plots CASCADE; CREATE VIEW public.plots AS SELECT stock.stock_id AS plot_id, stock.uniquename AS plot_name FROM stock WHERE stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot') AND is_obsolete = 'f' GROUP BY public.stock.stock_id, public.stock.uniquename; ALTER VIEW plots OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.trait_components CASCADE; CREATE VIEW public.trait_components AS SELECT cvterm.cvterm_id AS trait_component_id, (((cvterm.name::text || '|'::text) || db.name::text) || ':'::text) || dbxref.accession::text AS trait_component_name FROM cv JOIN cvprop ON(cv.cv_id = cvprop.cv_id AND cvprop.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = ANY ('{object_ontology,attribute_ontology,method_ontology,unit_ontology,time_ontology}'))) JOIN cvterm ON(cvprop.cv_id = cvterm.cv_id) JOIN dbxref USING(dbxref_id) JOIN db ON(dbxref.db_id = db.db_id) LEFT JOIN cvterm_relationship is_subject ON cvterm.cvterm_id = is_subject.subject_id LEFT JOIN cvterm_relationship is_object ON cvterm.cvterm_id = is_object.object_id WHERE is_object.object_id IS NULL AND is_subject.subject_id IS NOT NULL GROUP BY 2,1 ORDER BY 2,1; ALTER VIEW trait_components OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.traits CASCADE; CREATE VIEW public.traits AS SELECT cvterm.cvterm_id AS trait_id, (((cvterm.name::text || '|'::text) || db.name::text) || ':'::text) || dbxref.accession::text AS trait_name FROM cv JOIN cvprop ON(cv.cv_id = cvprop.cv_id AND cvprop.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'trait_ontology')) JOIN cvterm ON(cvprop.cv_id = cvterm.cv_id) JOIN dbxref USING(dbxref_id) JOIN db ON(dbxref.db_id = db.db_id) LEFT JOIN cvterm_relationship is_variable ON cvterm.cvterm_id = is_variable.subject_id AND is_variable.type_id = (SELECT cvterm_id FROM cvterm WHERE name = 'VARIABLE_OF') WHERE is_variable.subject_id IS NOT NULL GROUP BY 1,2 UNION SELECT cvterm.cvterm_id AS trait_id, (((cvterm.name::text || '|'::text) || db.name::text) || ':'::text) || dbxref.accession::text AS trait_name FROM cv JOIN cvprop ON(cv.cv_id = cvprop.cv_id AND cvprop.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'composed_trait_ontology')) JOIN cvterm ON(cvprop.cv_id = cvterm.cv_id) JOIN dbxref USING(dbxref_id) JOIN db ON(dbxref.db_id = db.db_id) LEFT JOIN cvterm_relationship is_subject ON cvterm.cvterm_id = is_subject.subject_id WHERE is_subject.subject_id IS NOT NULL GROUP BY 1,2 ORDER BY 2; ALTER VIEW traits OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.trials CASCADE; CREATE VIEW public.trials AS SELECT trial.project_id AS trial_id, trial.name AS trial_name FROM project breeding_program JOIN project_relationship ON(breeding_program.project_id = object_project_id AND project_relationship.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'breeding_program_trial_relationship')) JOIN project trial ON(subject_project_id = trial.project_id) JOIN projectprop on(trial.project_id = projectprop.project_id) WHERE projectprop.type_id NOT IN (SELECT cvterm.cvterm_id FROM cvterm WHERE cvterm.name::text = 'cross'::text OR cvterm.name::text = 'trial_folder'::text OR cvterm.name::text = 'folder_for_trials'::text OR cvterm.name::text = 'folder_for_crosses'::text OR cvterm.name::text = 'folder_for_genotyping_trials'::text) GROUP BY trial.project_id, trial.name; ALTER VIEW trials OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.trial_designs CASCADE; CREATE VIEW public.trial_designs AS SELECT projectprop.value AS trial_design_id, projectprop.value AS trial_design_name FROM projectprop JOIN cvterm ON(projectprop.type_id = cvterm.cvterm_id) WHERE cvterm.name = 'design' GROUP BY projectprop.value; ALTER VIEW trial_designs OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.trial_types CASCADE; CREATE VIEW public.trial_types AS SELECT cvterm.cvterm_id AS trial_type_id, cvterm.name AS trial_type_name FROM cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' GROUP BY cvterm.cvterm_id; ALTER VIEW trial_types OWNER TO web_usr; DROP MATERIALIZED VIEW IF EXISTS public.years CASCADE; CREATE VIEW public.years AS SELECT projectprop.value AS year_id, projectprop.value AS year_name FROM projectprop WHERE projectprop.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'project year') GROUP BY public.projectprop.value; ALTER VIEW years OWNER TO web_usr; -- drop and recreate all the binary matviews as just views CREATE VIEW public.accessionsXseedlots AS SELECT public.materialized_phenoview.accession_id, public.stock.stock_id AS seedlot_id FROM public.materialized_phenoview LEFT JOIN stock_relationship seedlot_relationship ON materialized_phenoview.accession_id = seedlot_relationship.subject_id AND seedlot_relationship.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'collection_of') LEFT JOIN stock ON seedlot_relationship.object_id = stock.stock_id AND stock.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'seedlot') GROUP BY public.materialized_phenoview.accession_id,public.stock.stock_id; ALTER VIEW accessionsXseedlots OWNER TO web_usr; CREATE VIEW public.breeding_programsXseedlots AS SELECT public.materialized_phenoview.breeding_program_id, public.nd_experiment_stock.stock_id AS seedlot_id FROM public.materialized_phenoview LEFT JOIN nd_experiment_project ON materialized_phenoview.breeding_program_id = nd_experiment_project.project_id LEFT JOIN nd_experiment ON nd_experiment_project.nd_experiment_id = nd_experiment.nd_experiment_id AND nd_experiment.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'seedlot_experiment') LEFT JOIN nd_experiment_stock ON nd_experiment.nd_experiment_id = nd_experiment_stock.nd_experiment_id GROUP BY 1,2; ALTER VIEW breeding_programsXseedlots OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXseedlots AS SELECT public.materialized_genoview.genotyping_protocol_id, public.stock.stock_id AS seedlot_id FROM public.materialized_genoview LEFT JOIN stock_relationship seedlot_relationship ON materialized_genoview.accession_id = seedlot_relationship.subject_id AND seedlot_relationship.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'collection_of') LEFT JOIN stock ON seedlot_relationship.object_id = stock.stock_id AND stock.type_id IN (SELECT cvterm_id from cvterm where cvterm.name = 'seedlot') GROUP BY 1,2; ALTER VIEW genotyping_protocolsXseedlots OWNER TO web_usr; CREATE VIEW public.plantsXseedlots AS SELECT public.stock.stock_id AS plant_id, public.materialized_phenoview.seedlot_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY 1,2; ALTER VIEW plantsXseedlots OWNER TO web_usr; CREATE VIEW public.plotsXseedlots AS SELECT public.stock.stock_id AS plot_id, public.materialized_phenoview.seedlot_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY 1,2; ALTER VIEW plotsXseedlots OWNER TO web_usr; CREATE VIEW public.seedlotsXtrait_components AS SELECT public.materialized_phenoview.seedlot_id, trait_component.cvterm_id AS trait_component_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW seedlotsXtrait_components OWNER TO web_usr; CREATE VIEW public.seedlotsXtraits AS SELECT public.materialized_phenoview.seedlot_id, public.materialized_phenoview.trait_id FROM public.materialized_phenoview GROUP BY 1,2; ALTER VIEW seedlotsXtraits OWNER TO web_usr; CREATE VIEW public.seedlotsXtrials AS SELECT public.materialized_phenoview.seedlot_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview GROUP BY 1,2; ALTER VIEW seedlotsXtrials OWNER TO web_usr; CREATE VIEW public.seedlotsXtrial_designs AS SELECT public.materialized_phenoview.seedlot_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY 1,2; ALTER VIEW seedlotsXtrial_designs OWNER TO web_usr; CREATE VIEW public.seedlotsXtrial_types AS SELECT public.materialized_phenoview.seedlot_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY 1,2; ALTER VIEW seedlotsXtrial_types OWNER TO web_usr; CREATE VIEW public.seedlotsXyears AS SELECT public.materialized_phenoview.seedlot_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview GROUP BY 1,2; ALTER VIEW seedlotsXyears OWNER TO web_usr; CREATE VIEW public.accessionsXtraits AS SELECT public.materialized_phenoview.accession_id, public.materialized_phenoview.trait_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.accession_id, public.materialized_phenoview.trait_id; ALTER VIEW accessionsXtraits OWNER TO web_usr; CREATE VIEW public.breeding_programsXtraits AS SELECT public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.trait_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.trait_id; ALTER VIEW breeding_programsXtraits OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXtraits AS SELECT public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.trait_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) GROUP BY public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.trait_id; ALTER VIEW genotyping_protocolsXtraits OWNER TO web_usr; CREATE VIEW public.locationsXtraits AS SELECT public.materialized_phenoview.location_id, public.materialized_phenoview.trait_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.location_id, public.materialized_phenoview.trait_id; ALTER VIEW locationsXtraits OWNER TO web_usr; CREATE VIEW public.plantsXtraits AS SELECT public.stock.stock_id AS plant_id, public.materialized_phenoview.trait_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY public.stock.stock_id, public.materialized_phenoview.trait_id; ALTER VIEW plantsXtraits OWNER TO web_usr; CREATE VIEW public.plotsXtraits AS SELECT public.stock.stock_id AS plot_id, public.materialized_phenoview.trait_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY public.stock.stock_id, public.materialized_phenoview.trait_id; ALTER VIEW plotsXtraits OWNER TO web_usr; CREATE VIEW public.traitsXtrials AS SELECT public.materialized_phenoview.trait_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.trait_id, public.materialized_phenoview.trial_id; ALTER VIEW traitsXtrials OWNER TO web_usr; CREATE VIEW public.traitsXtrial_designs AS SELECT public.materialized_phenoview.trait_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY public.materialized_phenoview.trait_id, trialdesign.value; ALTER VIEW traitsXtrial_designs OWNER TO web_usr; CREATE VIEW public.traitsXtrial_types AS SELECT public.materialized_phenoview.trait_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY public.materialized_phenoview.trait_id, trialterm.cvterm_id; ALTER VIEW traitsXtrial_types OWNER TO web_usr; CREATE VIEW public.traitsXyears AS SELECT public.materialized_phenoview.trait_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.trait_id, public.materialized_phenoview.year_id; ALTER VIEW traitsXyears OWNER TO web_usr; CREATE VIEW public.accessionsXtrait_components AS SELECT public.materialized_phenoview.accession_id, trait_component.cvterm_id AS trait_component_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW accessionsXtrait_components OWNER TO web_usr; CREATE VIEW public.breeding_programsXtrait_components AS SELECT public.materialized_phenoview.breeding_program_id, trait_component.cvterm_id AS trait_component_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW breeding_programsXtrait_components OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXtrait_components AS SELECT public.materialized_genoview.genotyping_protocol_id, trait_component.cvterm_id AS trait_component_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW genotyping_protocolsXtrait_components OWNER TO web_usr; CREATE VIEW public.locationsXtrait_components AS SELECT public.materialized_phenoview.location_id, trait_component.cvterm_id AS trait_component_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW locationsXtrait_components OWNER TO web_usr; CREATE VIEW public.plantsXtrait_components AS SELECT public.stock.stock_id AS plant_id, trait_component.cvterm_id AS trait_component_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW plantsXtrait_components OWNER TO web_usr; CREATE VIEW public.plotsXtrait_components AS SELECT public.stock.stock_id AS plot_id, trait_component.cvterm_id AS trait_component_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW plotsXtrait_components OWNER TO web_usr; CREATE VIEW public.trait_componentsXtrials AS SELECT trait_component.cvterm_id AS trait_component_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW trait_componentsXtrials OWNER TO web_usr; CREATE VIEW public.trait_componentsXtrial_designs AS SELECT trait_component.cvterm_id AS trait_component_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY 1,2; ALTER VIEW trait_componentsXtrial_designs OWNER TO web_usr; CREATE VIEW public.trait_componentsXtrial_types AS SELECT trait_component.cvterm_id AS trait_component_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY 1,2; ALTER VIEW trait_componentsXtrial_types OWNER TO web_usr; CREATE VIEW public.trait_componentsXyears AS SELECT trait_component.cvterm_id AS trait_component_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview JOIN cvterm trait ON(materialized_phenoview.trait_id = trait.cvterm_id) JOIN cvterm_relationship ON(trait.cvterm_id = cvterm_relationship.object_id AND cvterm_relationship.type_id = (SELECT cvterm_id from cvterm where name = 'contains')) JOIN cvterm trait_component ON(cvterm_relationship.subject_id = trait_component.cvterm_id) GROUP BY 1,2; ALTER VIEW trait_componentsXyears OWNER TO web_usr; -- FIX VIEWS FOR PLANTS, PLOTS, TRIAL DESIGNS AND TRIAL TYPES CREATE VIEW public.accessionsXbreeding_programs AS SELECT public.materialized_phenoview.accession_id, public.materialized_phenoview.breeding_program_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.accession_id, public.materialized_phenoview.breeding_program_id; ALTER VIEW accessionsXbreeding_programs OWNER TO web_usr; CREATE VIEW public.accessionsXgenotyping_protocols AS SELECT public.materialized_genoview.accession_id, public.materialized_genoview.genotyping_protocol_id FROM public.materialized_genoview GROUP BY public.materialized_genoview.accession_id, public.materialized_genoview.genotyping_protocol_id; ALTER VIEW accessionsXgenotyping_protocols OWNER TO web_usr; CREATE VIEW public.accessionsXlocations AS SELECT public.materialized_phenoview.accession_id, public.materialized_phenoview.location_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.accession_id, public.materialized_phenoview.location_id; ALTER VIEW accessionsXlocations OWNER TO web_usr; CREATE VIEW public.accessionsXplants AS SELECT public.materialized_phenoview.accession_id, public.stock.stock_id AS plant_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY public.materialized_phenoview.accession_id, public.stock.stock_id; ALTER VIEW accessionsXplants OWNER TO web_usr; CREATE VIEW public.accessionsXplots AS SELECT public.materialized_phenoview.accession_id, public.stock.stock_id AS plot_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY public.materialized_phenoview.accession_id, public.stock.stock_id; ALTER VIEW accessionsXplots OWNER TO web_usr; CREATE VIEW public.accessionsXtrial_designs AS SELECT public.materialized_phenoview.accession_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY public.materialized_phenoview.accession_id, trialdesign.value; ALTER VIEW accessionsXtrial_designs OWNER TO web_usr; CREATE VIEW public.accessionsXtrial_types AS SELECT public.materialized_phenoview.accession_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY public.materialized_phenoview.accession_id, trialterm.cvterm_id; ALTER VIEW accessionsXtrial_types OWNER TO web_usr; CREATE VIEW public.accessionsXtrials AS SELECT public.materialized_phenoview.accession_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.accession_id, public.materialized_phenoview.trial_id; ALTER VIEW accessionsXtrials OWNER TO web_usr; CREATE VIEW public.accessionsXyears AS SELECT public.materialized_phenoview.accession_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.accession_id, public.materialized_phenoview.year_id; ALTER VIEW accessionsXyears OWNER TO web_usr; CREATE VIEW public.breeding_programsXgenotyping_protocols AS SELECT public.materialized_phenoview.breeding_program_id, public.materialized_genoview.genotyping_protocol_id FROM public.materialized_phenoview JOIN public.materialized_genoview USING(accession_id) GROUP BY public.materialized_phenoview.breeding_program_id, public.materialized_genoview.genotyping_protocol_id; ALTER VIEW breeding_programsXgenotyping_protocols OWNER TO web_usr; CREATE VIEW public.breeding_programsXlocations AS SELECT public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.location_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.location_id; ALTER VIEW breeding_programsXlocations OWNER TO web_usr; CREATE VIEW public.breeding_programsXplants AS SELECT public.materialized_phenoview.breeding_program_id, public.stock.stock_id AS plant_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY public.materialized_phenoview.breeding_program_id, public.stock.stock_id; ALTER VIEW breeding_programsXplants OWNER TO web_usr; CREATE VIEW public.breeding_programsXplots AS SELECT public.materialized_phenoview.breeding_program_id, public.stock.stock_id AS plot_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY public.materialized_phenoview.breeding_program_id, public.stock.stock_id; ALTER VIEW breeding_programsXplots OWNER TO web_usr; CREATE VIEW public.breeding_programsXtrial_designs AS SELECT public.materialized_phenoview.breeding_program_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY public.materialized_phenoview.breeding_program_id, trialdesign.value; ALTER VIEW breeding_programsXtrial_designs OWNER TO web_usr; CREATE VIEW public.breeding_programsXtrial_types AS SELECT public.materialized_phenoview.breeding_program_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY public.materialized_phenoview.breeding_program_id, trialterm.cvterm_id; ALTER VIEW breeding_programsXtrial_types OWNER TO web_usr; CREATE VIEW public.breeding_programsXtrials AS SELECT public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.trial_id; ALTER VIEW breeding_programsXtrials OWNER TO web_usr; CREATE VIEW public.breeding_programsXyears AS SELECT public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.breeding_program_id, public.materialized_phenoview.year_id; ALTER VIEW breeding_programsXyears OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXlocations AS SELECT public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.location_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) GROUP BY public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.location_id; ALTER VIEW genotyping_protocolsXlocations OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXplants AS SELECT public.materialized_genoview.genotyping_protocol_id, public.stock.stock_id AS plant_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY public.materialized_genoview.genotyping_protocol_id, public.stock.stock_id; ALTER VIEW genotyping_protocolsXplants OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXplots AS SELECT public.materialized_genoview.genotyping_protocol_id, public.stock.stock_id AS plot_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY public.materialized_genoview.genotyping_protocol_id, public.stock.stock_id; ALTER VIEW genotyping_protocolsXplots OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXtrial_designs AS SELECT public.materialized_genoview.genotyping_protocol_id, trialdesign.value AS trial_design_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY public.materialized_genoview.genotyping_protocol_id, trialdesign.value; ALTER VIEW genotyping_protocolsXtrial_designs OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXtrial_types AS SELECT public.materialized_genoview.genotyping_protocol_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY public.materialized_genoview.genotyping_protocol_id, trialterm.cvterm_id; ALTER VIEW genotyping_protocolsXtrial_types OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXtrials AS SELECT public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.trial_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) GROUP BY public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.trial_id; ALTER VIEW genotyping_protocolsXtrials OWNER TO web_usr; CREATE VIEW public.genotyping_protocolsXyears AS SELECT public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.year_id FROM public.materialized_genoview JOIN public.materialized_phenoview USING(accession_id) GROUP BY public.materialized_genoview.genotyping_protocol_id, public.materialized_phenoview.year_id; ALTER VIEW genotyping_protocolsXyears OWNER TO web_usr; CREATE VIEW public.locationsXplants AS SELECT public.materialized_phenoview.location_id, public.stock.stock_id AS plant_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY public.materialized_phenoview.location_id, public.stock.stock_id; ALTER VIEW locationsXplants OWNER TO web_usr; CREATE VIEW public.locationsXplots AS SELECT public.materialized_phenoview.location_id, public.stock.stock_id AS plot_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY public.materialized_phenoview.location_id, public.stock.stock_id; ALTER VIEW locationsXplots OWNER TO web_usr; CREATE VIEW public.locationsXtrial_designs AS SELECT public.materialized_phenoview.location_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY public.materialized_phenoview.location_id, trialdesign.value; ALTER VIEW locationsXtrial_designs OWNER TO web_usr; CREATE VIEW public.locationsXtrial_types AS SELECT public.materialized_phenoview.location_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY public.materialized_phenoview.location_id, trialterm.cvterm_id; ALTER VIEW locationsXtrial_types OWNER TO web_usr; CREATE VIEW public.locationsXtrials AS SELECT public.materialized_phenoview.location_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.location_id, public.materialized_phenoview.trial_id; ALTER VIEW locationsXtrials OWNER TO web_usr; CREATE VIEW public.locationsXyears AS SELECT public.materialized_phenoview.location_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.location_id, public.materialized_phenoview.year_id; ALTER VIEW locationsXyears OWNER TO web_usr; CREATE VIEW public.plantsXplots AS SELECT plant.stock_id AS plant_id, plot.stock_id AS plot_id FROM public.materialized_phenoview JOIN stock plot ON(public.materialized_phenoview.stock_id = plot.stock_id AND plot.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) JOIN stock_relationship plant_relationship ON plot.stock_id = plant_relationship.subject_id JOIN stock plant ON plant_relationship.object_id = plant.stock_id AND plant.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant') GROUP BY plant.stock_id, plot.stock_id; ALTER VIEW plantsXplots OWNER TO web_usr; CREATE VIEW public.plantsXtrials AS SELECT public.stock.stock_id AS plant_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY public.stock.stock_id, public.materialized_phenoview.trial_id; ALTER VIEW plantsXtrials OWNER TO web_usr; CREATE VIEW public.plantsXtrial_designs AS SELECT public.stock.stock_id AS plant_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY stock.stock_id, trialdesign.value; ALTER VIEW plantsXtrial_designs OWNER TO web_usr; CREATE VIEW public.plantsXtrial_types AS SELECT public.stock.stock_id AS plant_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY public.stock.stock_id, trialterm.cvterm_id; ALTER VIEW plantsXtrial_types OWNER TO web_usr; CREATE VIEW public.plantsXyears AS SELECT public.stock.stock_id AS plant_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plant')) GROUP BY public.stock.stock_id, public.materialized_phenoview.year_id; ALTER VIEW plantsXyears OWNER TO web_usr; CREATE VIEW public.plotsXtrials AS SELECT public.stock.stock_id AS plot_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY public.stock.stock_id, public.materialized_phenoview.trial_id; ALTER VIEW plotsXtrials OWNER TO web_usr; CREATE VIEW public.plotsXtrial_designs AS SELECT public.stock.stock_id AS plot_id, trialdesign.value AS trial_design_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY stock.stock_id, trialdesign.value; ALTER VIEW plotsXtrial_designs OWNER TO web_usr; CREATE VIEW public.plotsXtrial_types AS SELECT public.stock.stock_id AS plot_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY public.stock.stock_id, trialterm.cvterm_id; ALTER VIEW plotsXtrial_types OWNER TO web_usr; CREATE VIEW public.plotsXyears AS SELECT public.stock.stock_id AS plot_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview JOIN public.stock ON(public.materialized_phenoview.stock_id = public.stock.stock_id AND public.stock.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'plot')) GROUP BY public.stock.stock_id, public.materialized_phenoview.year_id; ALTER VIEW plotsXyears OWNER TO web_usr; CREATE VIEW public.trial_designsXtrial_types AS SELECT trialdesign.value AS trial_design_id, trialterm.cvterm_id AS trial_type_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY trialdesign.value, trialterm.cvterm_id; ALTER VIEW trial_designsXtrial_types OWNER TO web_usr; CREATE VIEW public.trial_designsXtrials AS SELECT trialdesign.value AS trial_design_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY trialdesign.value, public.materialized_phenoview.trial_id; ALTER VIEW trial_designsXtrials OWNER TO web_usr; CREATE VIEW public.trial_designsXyears AS SELECT trialdesign.value AS trial_design_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview JOIN public.projectprop trialdesign ON materialized_phenoview.trial_id = trialdesign.project_id AND trialdesign.type_id = (SELECT cvterm_id from cvterm where cvterm.name = 'design' ) GROUP BY trialdesign.value, public.materialized_phenoview.year_id; ALTER VIEW trial_designsXyears OWNER TO web_usr; CREATE VIEW public.trial_typesXtrials AS SELECT trialterm.cvterm_id AS trial_type_id, public.materialized_phenoview.trial_id FROM public.materialized_phenoview JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY trialterm.cvterm_id, public.materialized_phenoview.trial_id; ALTER VIEW trial_typesXtrials OWNER TO web_usr; CREATE VIEW public.trial_typesXyears AS SELECT trialterm.cvterm_id AS trial_type_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview JOIN projectprop trialprop ON materialized_phenoview.trial_id = trialprop.project_id AND trialprop.type_id IN (SELECT cvterm_id from cvterm JOIN cv USING(cv_id) WHERE cv.name = 'project_type' ) JOIN cvterm trialterm ON trialprop.type_id = trialterm.cvterm_id GROUP BY trialterm.cvterm_id, public.materialized_phenoview.year_id; ALTER VIEW trial_typesXyears OWNER TO web_usr; CREATE VIEW public.trialsXyears AS SELECT public.materialized_phenoview.trial_id, public.materialized_phenoview.year_id FROM public.materialized_phenoview GROUP BY public.materialized_phenoview.trial_id, public.materialized_phenoview.year_id; ALTER VIEW trialsXyears OWNER TO web_usr; -- remove rows from matviews tracking table corresponding to single category and binary views DELETE FROM matviews where mv_name ilike '\%x%'; DELETE FROM matviews where mv_name = 'accessions'; DELETE FROM matviews where mv_name = 'breeding_programs'; DELETE FROM matviews where mv_name = 'genotyping_projects'; DELETE FROM matviews where mv_name = 'genotyping_protocols'; DELETE FROM matviews where mv_name = 'locations'; DELETE FROM matviews where mv_name = 'plants'; DELETE FROM matviews where mv_name = 'plots'; DELETE FROM matviews where mv_name = 'seedlots'; DELETE FROM matviews where mv_name = 'trait_components'; DELETE FROM matviews where mv_name = 'traits'; DELETE FROM matviews where mv_name = 'trial_designs'; DELETE FROM matviews where mv_name = 'trial_types'; DELETE FROM matviews where mv_name = 'trials'; DELETE FROM matviews where mv_name = 'years'; -- drop matview refresh functions DROP FUNCTION IF EXISTS refresh_materialized_views; DROP FUNCTION IF EXISTS refresh_materialized_views_concurrently; EOSQL print "You're done!\n"; } #### 1; # ####
solgenomics/sgn
db/00143/SpeedUpMatviews.pm
Perl
mit
52,313
package # Date::Manip::Offset::off097; # 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:44:43 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 ($VERSION); $VERSION='6.52'; END { undef $VERSION; } our ($Offset,%Offset); END { undef $Offset; undef %Offset; } $Offset = '+04:28:12'; %Offset = ( 0 => [ 'asia/karachi', ], ); 1;
jkb78/extrajnm
local/lib/perl5/Date/Manip/Offset/off097.pm
Perl
mit
851
use strict; use warnings; use v5.18; use DBI; use Mojo::DOM; use List::Util qw<any reduce>; use File::Basename qw<basename>; use HTML::Entities; # Config section my $db_file = "dwforums.sqlite"; # Filter selection # Just in case you're debugging and only want to edit part of the data my $WHERE_CLAUSE = ''; # my $WHERE_CLAUSE = "WHERE content LIKE '%<%'"; # my $WHERE_CLAUSE = "WHERE content LIKE '%[link=%' ORDER by pid"; # If you're moving image files to the new site, specify the new path here my $localhosting_image_dir = "/forumimportfiles"; # If you have a lot of links to specific sites, you can upgrade them to HTTPS links by listing the domain here # Yes it's 2017 it should be all sites srsly. my $upgrade_http_domains_regex = join '|', qw< imgur.com deviantart.com imageshack.us imageshack.com gawkerassets.com photobucket.com bungie.net google.com googleusercontent.com gstatic.com staticflickr.com dakkadakka.com blogspot.com wordpress.com static.fimfiction.net tumblr.com xkcd.com daz3d.com nasa.gov facdn.net s3.amazonaws.com wikia.nocookie.net >; ### And that's it ######### Program content ########## my $DECODE_ENTITIES = $ARGV[0] eq '-e'; my $dbh = DBI->connect("dbi:SQLite:dbname=$db_file","",""); my %avail_emoji = (qw< :wink: ;) :angel: :angel: :grin: :D >); $upgrade_http_domains_regex = qr/$upgrade_http_domains_regex/; my $count = $dbh->selectall_arrayref(qq{SELECT count(*) FROM posts $WHERE_CLAUSE})->[0][0]; my $offset = 0; my $interval = 500; my $all_changed_count = 0; while ( $offset < $count ) { my $changecount = 0; my $dball = $dbh->selectall_arrayref(qq{SELECT pid, content, signature FROM posts $WHERE_CLAUSE LIMIT $interval OFFSET $offset}); for (@$dball) { my ($pid, $p, $sig) = @$_; my $orig = $p; my $sigo = $sig; $p = convert_content($p); $sig = convert_content($sig) if defined $sig; if ($p ne $orig or (defined $sigo and $sig ne $sigo)) { $changecount++; $dbh->do("UPDATE posts SET content = ?, signature = ? WHERE pid = ?", undef, $p, $sig, $pid); } } $offset += $interval; say "out of ", scalar @$dball, " we changed $changecount ($offset/$count)"; $all_changed_count += $changecount; } say "Out of all ", $count, " we changed ", $all_changed_count; sub convert_content { my $html = shift; email_tags ( $html ); markup_failure_fix( $html ); my $dom = Mojo::DOM->new( $html ); embed_replace($dom); replace_tags_simple($dom, "em", "i"); replace_tags_simple($dom, "strong", "b"); replace_tags_simple($dom, "span[style=text-decoration: line-through;]", "s"); replace_tags_simple($dom, "span[style=text-decoration: underline]", "u"); list_item($dom, "li", "*"); replace_tags_simple($dom, "ul", "list"); replace_tags_simple($dom, "ol[style=list-style-type: lower-alpha]", "list", "a"); replace_tags_simple($dom, "ol[style=list-style-type: decimal]", "list", "1"); hyperlink_tags($dom); spoiler_tags($dom); code_tags($dom); quote_tags($dom); image_tags($dom); remove_tag($dom, 'tbody'); replace_tags_simple($dom, '.post_content_table tr', 'tr'); replace_tags_simple($dom, '.post_content_table td', 'td'); replace_tags_simple($dom, 'table.post_content_table', 'table'); hr_replace($dom); style_spans($dom); style_spans($dom); align_tags($dom); # need to remove entities here $html = $dom->to_string; $html =~ s/<br>\n*/\n/g; $html = decode_entities($html) if $DECODE_ENTITIES; return $html; } sub email_tags { $_[0] =~ s|<a href="[^"]+"><span class="__cf_email__" data-cfemail="([a-f0-9]+)">\[email protected\]</span><script.*?</script></a>|unmask_email($1)|eg; $_[0] =~ s|<a class="__cf_email__" data-cfemail="([a-f0-9]+)" href="[^"]+">\[email protected\]</a><script.*?</script>|unmask_email($1)|eg; $_[0] =~ s|<span class="__cf_email__" data-cfemail="([a-f0-9]+)">\[email protected\]</span><script.*?</script>|unmask_email($1)|eg; $_[0] =~ s|<a href="/cdn-cgi/l/email-protection#[0-9a-f]+">([^<]+)</a>|$1|g; } sub unmask_email { my @hex_array = map hex, unpack("(A2)*", shift); my $mask = shift @hex_array; return join '', map chr( $_ ^ $mask ), @hex_array; } sub align_tags { my $dom = shift; $dom->find( 'div[align]' )->each( sub { my $d = shift; my $innerHTML = $d->content(); my $alignment = $d->attr('align'); die unless 'align'; $d->replace("[align=$alignment]${innerHTML}[/align]") }); } sub replace_tags_simple { my ($dom, $selector, $bbtag, $param) = @_; $param = defined $param ? "=$param" : ''; $dom->find( $selector )->each( sub { my $d = shift; $d->replace( "[$bbtag$param]" . $d->content . "[/$bbtag]" ); }); } sub remove_tag { my ($dom, $selector) = @_; # Removes the tag, not its content $dom->find( $selector )->each( sub { my $d = shift; $d->replace( $d->content ); }); } sub hr_replace { my $dom = shift; #This one is unitary, so we can't make a pair $dom->find('hr')->each( sub { shift->replace("[hr]"); } ); } sub style_spans { my $dom = shift; $dom->find( 'span[style]' )->sort( sub { $b->ancestors->size <=> $a->ancestors->size } #depth first - paranoia )->each( sub { my $d = shift; # style attribute only return unless scalar keys %$d == 1; my $style = $d->attr('style'); if ($style =~ /^color:\s*([^;]+);?/) { $d->replace("[color=$1]" . $d->content . "[/color]"); } elsif ($style =~ /^font-size: (\d+)(?:px)?%; line-height: normal;?$/) { my $pct = $1; my %sizes = ( 10 => "xx-small", 50 => "x-small", 75 => "small", 100 => "medium", 120 => "large", 140 => "x-large", 180 => "xx-large", 15 => "medium", # because some values were "15px%" :/ 16 => "xx-small", # for calculations 14 => "xx-small", ); # get the exact size, or choose the closest value my $size = $sizes{$pct} // $sizes{ reduce { abs($a - $pct) < abs($b - $pct) ? $a : $b } keys %sizes }; $d->replace("[size=$size]" . $d->content . "[/size]"); } elsif ($style =~ /^font-family: ([^;]+);?$/) { $d->replace("[font=$1]" . $d->content . "[/font]"); } }); } sub list_item { my $dom = shift; $dom->find('ul, ol')->each( sub { my $d = shift; my $x = $d->content; $x =~ s|<li>(.*?)</li>\n*|[*]$1\n|sg; $x =~ s|^\s*|\n|; $d->content( $x ); }); } sub code_tags { my $dom = shift; $dom->find( 'div.codebox' )->each( sub { my $d = shift; my $content = $d->at('code')->content(); $d->replace("[code]${content}[/code]") }); } sub quote_tags { my $dom = shift; $dom->find('blockquote > div > cite')->sort( sub { $b->ancestors->size <=> $a->ancestors->size } #depth first - necessary! )->each( sub { my $d = shift; my $author = $d->text; $author =~ s/\s+wrote:$//; my $bq = $d->parent->parent; $d->remove; my $content = $bq->at('div')->content; $bq->replace("[quote=$author]${content}[/quote]"); }); $dom->find('blockquote.uncited')->each( sub { my $d = shift; $d->replace("[quote]" . $d->at('div')->content . "[/quote]" ); }); } sub spoiler_tags { my $dom = shift; $dom->find( 'dl.codebox' )->each( sub { my $d = shift; my $content = $d->at('dd')->content(); $d->replace("[spoiler]${content}[/spoiler]") }); } sub hyperlink_tags { my $dom = shift; $dom->find( 'a.postlink' )->each( sub { my $d = shift; my $content = $d->content(); my $href= $d->attr('href'); $d->replace("[url=$href]${content}[/url]") }); } sub image_tags { my $dom = shift; $dom->find( 'img' )->each( sub { my $d = shift; my $class = $d->attr('class'); if ($class eq 'postimage') { my $url = $d->attr('src'); $url =~ s/^imageproxy\.php\?url=//; if ($url =~ m|/images.yuku.com/| and $localhosting_image_dir) { $url = $localhosting_image_dir . basename($url); } elsif ($url =~ m|^http://([^\/]+)| ) { $url =~ s/^http:/https:/ if $url =~ $upgrade_http_domains_regex; } $d->replace("[img]" . $url . "[/img]"); } elsif ($class eq 'smilies') { #<img alt=":)" class="smilies" height="0" src="./forum_data/forums.dr/drun/drunkardswalkforums/smilies/92.gif" title="banana dance" width="0"> # only case, so we already know the URL: $d->replace("[img]$localhosting_image_dir/banana-dance.gif[/img]") } elsif ($class eq 'emoji') { my $alt = $d->attr('alt'); if ($avail_emoji{$alt}) { $d->replace( $avail_emoji{$alt} ); } elsif ( $d->attr('src') =~ m|/([0-9a-f]+)\.svg$| ){ # calculate the codepoint $d->replace( chr hex $1 ); } else { # just insert the emoji $d->replace( $alt ); } } else { die "don't know how to deal with class $class."; } }); } sub embed_replace { my $dom = shift; my @supported_videos = qw<youtube vimeo twitch liveleak dailymotion metacafe facebook veoh >; $dom->find('div[data-s9e-mediaembed]')->each( sub { my $d = shift; my $type = $d->attr('data-s9e-mediaembed'); if (any { $type eq $_ } @supported_videos) { $d->replace("[video=$type]" . $d->at('iframe')->attr('src') . "[/video]"); } else { $d->replace("[url]" . $d->at('iframe')->attr('src') . "[/url]"); } }); my %urls_by_site = ( 'tumblr' => 'https://embed.tumblr.com/embed/post/', 'imgur' => 'https://imgur.com/', 'reddit' => 'https://reddit.com/', 'twitter' => 'https://twitter.com/user/status/', 'facebook' => 'https://www.facebook.com/user/posts/', 'instagram' => 'https://instagram.com/p/', ); $dom->find('iframe[data-s9e-mediaembed]')->each( sub { my $d = shift; my $site = $d->attr('data-s9e-mediaembed'); my $src = $d->attr('src'); if ($urls_by_site{$site}) { my $hash = $src =~ s/^.*?#//r; # think window.location.hash $d->replace("[url]$urls_by_site{$site}$hash\[/url]"); } else { $d->replace("[url]$src\[/url]"); } }); } # The black magick part, unfortunately, because this is more about fixing things that weren't included in the HTML like they should be sub markup_failure_fix { $_[0] =~ s|\[link=<a class="postlink" href="([^"]*)">(.*?)</a>\](.*?)\[/link\]| $2 ? "[url=$1]$2\[/url]" : "[url]$1\[/url]"|eg; $_[0] =~ s|\[link\=\<div\ data\-s9e\-mediaembed\=\"amazon\"\ style\=\"display\:inline\-block\;width\:100\%\;max\-width\:120px\"\>\<div\ style\=\"overflow\:hidden\;position\:relative\;padding\-bottom\:200\%\"\>\<iframe\ allowfullscreen\=\"\"\ scrolling\=\"no\"\ src\=\"\/\/ws\-na\.amazon\-adsystem\.com\/widgets\/q\?ServiceVersion\=20070822\&amp\;OneJS\=1\&amp\;Operation\=GetAdHtml\&amp\;MarketPlace\=US\&amp\;ad_type\=product_link\&amp\;tracking_id\=_\&amp\;marketplace\=amazon\&amp\;region\=US\&amp\;asins\=(\w+)\&amp\;show_border\=true\&amp\;link_opens_in_new_window\=true\"\ style\=\"border\:0\;height\:100\%\;left\:0\;position\:absolute\;width\:100\%\"\>\<\/iframe\>\<\/div\>\<\/div\>(.*?)\[\/link\]| $2 ? "[url=https://www.amazon.com/foo/dp/$1/]$2\[/url]" : "[url]https://www.amazon.com/foo/dp/$1/\[/url]"|eg; $_[0] =~ s#\[link\=\<div\ data\-s9e\-mediaembed\=\"(?:flickr|kickstarter|youtube|liveleak|cnn|cnnmoney|liveleak|indiegogo|funnyordie|dailymotion|npr)\"[^>]*>\<div[^>]*\>\<iframe.*?src\=\"([^"]+)\"[^>]*\>\<\/iframe\>\<\/div\>\<\/div\>(.*?)\[\/link\]# $2 ? "[url=$1]$2\[/url]" : "[url]$1\[/url]"#eg; $_[0] =~ s#\[link\=\<iframe allowfullscreen="" data-s9e-mediaembed="steamstore"[^>]*src\=\"//store.steampowered.com/widget/(\d+/?)\"[^>]*\>\<\/iframe\>(.*?)\[\/link\]# $2 ? "[url=//store.steampowered.com/app/$1]$2\[/url]" : "[url]//store.steampowered.com/app/$1\[/url]"#eg; my %urls_by_site = ( 'tumblr' => 'https://embed.tumblr.com/embed/post/', 'imgur' => 'https://imgur.com/', 'reddit' => 'https://reddit.com/', 'twitter' => 'https://twitter.com/user/status/', 'facebook' => 'https://www.facebook.com/user/posts/', 'instagram' => 'https://instagram.com/p/', ); $_[0] =~ s#\[link\=\<iframe allowfullscreen="" data-s9e-mediaembed="(tumblr|imgur|reddit|twitter|facebook|instagram)"[^>]*src\=\"https://s9e.github\.io/[^\#]+\#([^"]+)\"[^>]*\>\<\/iframe\>(.*?)\[\/link\]# $3 ? "[url=$urls_by_site{$1}$2]$3\[/url]" : "[url]$urls_by_site{$1}$2\[/url]"#eg; $_[0] =~ s#\[link\=\<iframe allowfullscreen="" data-s9e-mediaembed="npr"[^>]*src\=\"([^"]+)\"[^>]*\>\<\/iframe\>(.*?)\[\/link\]# $2 ? "[url=$1]$2\[/url]" : "[url]$1\[/url]"#eg; $_[0] =~ s#\[link\=\<div\ data\-s9e\-mediaembed\=\"(?:flickr|kickstarter|youtube|liveleak|cnn|cnnmoney|liveleak|indiegogo|funnyordie|dailymotion|npr)\"[^>]*>\<div[^>]*\>\<iframe.*?src\=\"([^"]+)\"[^>]*\>\<\/iframe\>\<\/div\>\<\/div\>(.*?)\[\/link\]# $2 ? "[url=$1]$2\[/url]" : "[url]$1\[/url]"#eg; # I think this is the result of a bug, but I don't know where... $_[0] =~ s/\[link= \[url= ([^\]]+) \] [^\[\]]+ \[\/url\]\s*\#* \] ([^\[]+) \[\/link\]/\[url=$1\]$2\[\/url]/gx; $_[0] =~ s|\[link(=[^<\[\]\>]+\]\[\w+\][^\<\[\]\>]+\[\/\w+\]\[\/)link\]|[url${1}url]}|g; }
labster/taparip
convert/html2mybb.pl
Perl
mit
14,083
#!/bin/perl # Author: Andrey Dibrov (andry at inbox dot ru) # SaR => Search and Replace. # # Perl version required: 5.6.0 or higher (for "@-"/"@+" regexp variables). # # Format: sar.pl [<Options>] <SearchPattern> [<ReplacePattern>] [<Flags>] # [<RoutineProlog>] [<RoutineEpilog>] # Script searches in standard input text signatures, matches/replaces them by # predefined text with regexp variables (\0, \1, ..., \254, \255) and prints # result dependent on options. # Command arguments: # <Options>: Options, defines basic behaviour of script. # [Optional,Fixed] # Format: [m | s] # m - Forces "match" behaviour, when script prints only matched text without # any substitution. # s - Forces "substitution" behaviour, when script prints result of # substitution. # If no options defined, when script chooses which type of behaviour use by # presence of <ReplacePattern> argument. See "description". # <SearchPattern>: Search pattern string. # [Required,Fixed] # <ReplacePattern>: Replace pattern string. # [Optional,Fixed] # Used only in "substitution" behaviour, but can be used in "match" behaviour # when execution activated by flags 'e' or 'x'. In case of "match" behaviour # execution of replace string internally emulated by substitution. # <Flags>: # [Optional,Fixed] # Format: [i][g][m][e | x] # i - Case flag. Case-insensitive search. # g - Global flag. Continue search after first match/match last. # m - Treat string as multiple lines. Enabling regexp characters - "^" and # "$" match begin and end of each line in string, otherwise these # characters match begin string and EOF. # s - Treat string as single line. Enabling regexp character - "." match any # character in string, even "carrage return" or "line feed", otherwise # match only line characters (any character except "carrage return" and # "line feed"). # e - Execute and substitute flag. Execute <ReplacePattern> and apply # substitution for executed result. # Example #1: # ./sar.pl s '(123)' 'my $A=$1; $A++; print $A; $1;' 'ge' # For each match, prints "124" and replace matched string by result # of execution, e.g. by "$1" ("123"). # After all matches was done, prints input text with applied # replacement(s). # Example #2: # ./sar.pl s '(123)' '$user::A++; print $user::A; $user::A;' 'ge' 'user::$A=$1' # For each match, prints a number beginning from 124 # (123+<number of match>) and replace matched string by result of # execution, e.g. by "user::$A" (where "user" is variable scope). # After all matches was done, prints input text with applied # replacement(s). # If "match" behaviour is on, then have the same behaviour as flag 'x'. # x - Execute only flag. Execute <ReplacePattern> without substitution. # Example #1: # ./sar.pl m '(123)' 'my $A=$1; $A++; print $A' 'gx' # For each match, prints "124". After all matches was done, nothing # prints any more. # Example #2: # ./sar.pl m '(123)' '$user::A++; print $user::A' 'gx' 'user::$A = $1' # For each match, prints a number beginning from 124 # (123+<number of match>) (where "user" is variable scope). # After all matches was done, nothing prints any more. # <RoutineProlog>: # [Optional,Fixed] # Execution routine which executes before all match/substitution if text # matched. Enabled only when defined flag 'e' or flag 'x'. # <RoutineEpilog>: # [Optional,Fixed] # Execution routine which executes after all matches/substitutions if text # matched. Enabled only when defined flag 'e' or flag 'x'. # Argument legend: # "Required" - value required. # "Optional" - value optional. # "Fixed" - position of value in argument list is fixed. # Description: # If required arguments are empty, then prints input string if "substitution" # behaviour is on, otherwise nothing prints. # If replace string is empty and options doesn't defined, then instead # substitution used text match only. # In "match" behaviour if match was successful, matched text is printed and # returns 0, otherwise prints nothing and returns non 0. # When "substitution" behaviour is on, script checks execution flag. # If execution flag not defined, then script prints input text with # applied replacements and returns 0, otherwise prints input text and returns # non 0. # If execution flag is defined, then script executes replace string in each # match, after prints input text with applied replacements (only for flag 'e'), # and returns 0, otherwise prints input text and returns non 0. # use strict; #use warnings; # System variables and functions to be available internally for script. @sys::numVars = (); $sys::breakSearch = 0; sub sys::trim($); sub sys::ltrim($); sub sys::rtrim($); # Perl trim function to remove whitespace from the start and end of the string. sub sys::trim($) { my $string = shift; $string =~ s/^\s+//; $string =~ s/\s+$//; return $string; } # Left trim function to remove leading whitespace. sub sys::ltrim($) { my $string = shift; $string =~ s/^\s+//; return $string; } # Right trim function to remove trailing whitespace sub sys::rtrim($) { my $string = shift; $string =~ s/\s+$//; return $string; } # Beginning of main script. my $buffer = ""; my $subBuffer; #open FILE, "" or die $!; my $isEof = eof(STDIN); my $charsRead = 0; while(!$isEof) { $charsRead = read(STDIN,$subBuffer,65536); if($charsRead < 65536) { $isEof = 1; } $buffer .= $subBuffer; } $subBuffer = ""; #$buffer = "debug string\n"; if(!defined($buffer) || length($buffer) == 0) { exit 1; } my $optionsStr = defined($ARGV[0]) ? $ARGV[0] : ""; my $matchStr = defined($ARGV[1]) ? $ARGV[1] : ""; if(length($matchStr) == 0) { print($buffer); exit 1; } my $replaceStr = defined($ARGV[2]) ? $ARGV[2] : ""; my $flagsStr = defined($ARGV[3]) ? $ARGV[3] : ""; my $execPrologStr = defined($ARGV[4]) ? $ARGV[4] : ""; my $execEpilogStr = defined($ARGV[5]) ? $ARGV[5] : ""; #Use "substitution" behaviour. my $doMatchOnly = 0; if(index($optionsStr,'m') != -1 || index($optionsStr,'s') == -1 && length($replaceStr) == 0) { #Use "match" behaviour. $doMatchOnly = 1; } my $rexFlags = ""; if(index($flagsStr,'i') != -1) { $rexFlags .= 'i'; } if(index($flagsStr,'g') != -1) { $rexFlags .= 'g'; } if(index($flagsStr,'m') != -1) { $rexFlags .= 'm'; } my $doMultiLine2 = 0; if(index($flagsStr,'s') != -1) { $rexFlags .= 's'; } my $doEvaluate = 0; my $doExecuteOnly = 0; if(index($flagsStr,'x') != -1) { $rexFlags .= 'e'; $doExecuteOnly = 1; $doEvaluate = 1; } elsif(index($flagsStr,'e') != -1) { $rexFlags .= 'e'; $doEvaluate = 1; } my $regexpMatched = 0; my $regexpLastOffset = -1; my $regexpMatchOffset = -1; my $regexpNextOffset = 0; =head String escape function for regexp expressions. Returns escaped string. =cut sub escapeString#($str,$escapeChars = "/\$@") { my($str,$escapeChars) = @_; if(!defined($escapeChars)) { $escapeChars = "/\$@"; } my $numeric = "0123456789"; my $strBuffer = ""; my $strLen = length($str); for(my $i = 0; $i < $strLen; $i++) { my $char = substr($str,$i,1); if(!defined($char) || length($char) == 0) { next; } my $escCharOffset = index($escapeChars,$char); if($escCharOffset != -1) { $strBuffer .= "\\"; } $strBuffer .= $char; } return $strBuffer; } =head Numeric variables expand and escape function. Returns expanded and escaped string, otherwise only escaped string. =cut sub expandString#($str,@numVars,$numVarValueLimit = 256) { my($str,@numVars,$numVarValueLimit) = @_; if(!defined($numVarValueLimit) || length($numVarValueLimit) < 1) { $numVarValueLimit = 256; } my $maxNumVarLen = length("".$numVarValueLimit); my $numeric = "0123456789"; my $isEscSeq = 0; my $numVar = ""; my $numVarBuffer = ""; my $strBuffer = ""; my $strLen = length($str); for(my $i = 0; $i < $strLen; $i++) { # Process pending numeric variable. if(length($numVarBuffer) >= $maxNumVarLen) { if($numVarBuffer <= $numVarValueLimit) { # Append not empty value from @numVars. $strBuffer .= $numVars[$numVarBuffer]; } $numVarBuffer = ""; $isEscSeq = 0; } # Processing next character. my $char = substr($str,$i,1); if(!defined($char) || length($char) == 0) { next; } if($char eq '\\') { # Escape sequence character. if(!$isEscSeq) { $isEscSeq = 1; } else { # Process pending numeric variable. if(length($numVarBuffer) > 0) { if($numVarBuffer <= $numVarValueLimit) { # Append not empty value from @numVars. $strBuffer .= $numVars[$numVarBuffer]; } $numVarBuffer = ""; } else { # append escape sequence character as ordinary character. $strBuffer .= "\\"; $isEscSeq = 0; } } next; } my $isNumOffset = index($numeric,$char); if($isNumOffset != -1) { if(!$isEscSeq) { # Not escape character. $strBuffer .= $char; } else { # Read numeric escape sequence until "$maxNumVarLen". $numVarBuffer .= $char; } next; } # Process pending numeric variable. if(length($numVarBuffer) > 0) { if($numVarBuffer <= $numVarValueLimit) { # Append not empty value from @numVars. $strBuffer .= $numVars[$numVarBuffer]; } $numVarBuffer = ""; $isEscSeq = 0; } if($isEscSeq) { $strBuffer .= '\\'; $isEscSeq = 0; } $strBuffer .= $char; } # Process last numeric variable. if(length($numVarBuffer) > 0) { if($numVarBuffer <= $numVarValueLimit) { # Append not empty value from @numVars. $strBuffer .= $numVars[$numVarBuffer]; } $numVarBuffer = ""; $isEscSeq = 0; } return $strBuffer; } =head String match function. Returns array of regexp variables ($0, $1, etc). If string was matched, then result flag returned in $regexpMatched variable, otherwise $regexpMatched would empty. =cut sub matchString#($str,$strMatch,$rexFlags = "") { my($str,$strMatch,$rexFlags) = @_; if(!defined($rexFlags)) { $rexFlags = ""; } if(!defined($str) || length($str) == 0) { return ""; } my $evalFlagOffset = index($rexFlags,'e'); my $filteredRexFlags = $evalFlagOffset != -1 ? substr($rexFlags,0,$evalFlagOffset).substr($rexFlags,$evalFlagOffset+1) : $rexFlags; my $globalFlagOffset = index($rexFlags,'g'); my $sysVarRegexpMatchOffset; my $sysVarRegexpNextOffset; if($globalFlagOffset != -1) { $sysVarRegexpMatchOffset = '$-[$#-]'; $sysVarRegexpNextOffset = '$+[$#+]'; } else { $sysVarRegexpMatchOffset = '$-[0]'; $sysVarRegexpNextOffset = '$+[0]'; } my $numVar0; my $numVar1; my @numVars; my $evalStr = '@numVars = ($str =~ m/$strMatch/'.$filteredRexFlags.');'."\n". '$numVar0 = $&;'."\n". '$numVar1 = $1;'."\n". '$regexpMatchOffset = (defined('.$sysVarRegexpMatchOffset.') ? '.$sysVarRegexpMatchOffset.' : 0);'."\n". '$regexpNextOffset = (defined('.$sysVarRegexpNextOffset.') ? '.$sysVarRegexpNextOffset.' : 0);'."\n"; $regexpLastOffset = $regexpMatchOffset; eval($evalStr); if($#numVars == -1) { $numVars[0] = $numVar0; $regexpMatched = 0; } elsif($#numVars == 0) { if(!defined($numVar1)) { $numVars[0] = $numVar0; } else { unshift(@numVars,$numVar0); } $regexpMatched = 1; } else { unshift(@numVars,$numVar0); $regexpMatched = 1; } return @numVars; } =head Simple string substitution. Returns result of substitution. =cut sub substString#($str,$toSearch,$toReplace,$rexFlags = "") { my($str,$toSearch,$toReplace,$rexFlags) = @_; if(!defined($rexFlags)) { $rexFlags = ""; } if(!defined($str) || length($str) == 0) { return ""; } my $evalStr; my $evalFlagOffset = index($rexFlags,'e'); my $globalFlagOffset = index($rexFlags,'g'); my $sysVarRegexpMatchOffset; if($globalFlagOffset != -1) { $sysVarRegexpMatchOffset = '$-[$#-]'; } else { $sysVarRegexpMatchOffset = '$-[0]'; } if($evalFlagOffset == -1) { $evalStr = '$str =~ s/$toSearch/$toReplace/'.$rexFlags.';'."\n". '$regexpMatchOffset = (defined('.$sysVarRegexpMatchOffset.') ? '.$sysVarRegexpMatchOffset.' : 0);'."\n". '$regexpNextOffset = length($str)-(defined($'."'".') ? length($'."'".') : 0);'."\n"; } else { $evalStr = '$str =~ s/$toSearch/'.$toReplace.'/'.$rexFlags.';'."\n". '$regexpMatchOffset = (defined('.$sysVarRegexpMatchOffset.') ? '.$sysVarRegexpMatchOffset.' : 0);'."\n". '$regexpNextOffset = length($str)-(defined($'."'".') ? length($'."'".') : 0);'."\n"; } $regexpLastOffset = $regexpMatchOffset; eval($evalStr); return $str; } my $searchEscapeChars = "/"; my $replaceEscapeChars = "/"; =head Evaluate search pattern. =cut sub evaluateSearchPattern#($doMatchOnly,$doEvaluate,$doExecuteOnly,$str,$toSearch,$toReplace,$execProlog,$execEpilog,$rexFlags = "") { my($doMatchOnly,$doEvaluate,$doExecuteOnly,$str,$toSearch,$toReplace,$execProlog,$execEpilog,$rexFlags) = @_; if(!defined($rexFlags)) { $rexFlags = ""; } my $evalStr = ""; my $resultStr; my $prevStr = ""; my $nextStr = $str; my $newStr = ""; my $expandStr; my $expandStrLen; my $globalFlagOffset = index($rexFlags,'g'); my $filteredRexFlags = $globalFlagOffset != -1 ? substr($rexFlags,0,$globalFlagOffset).substr($rexFlags,$globalFlagOffset+1) : $rexFlags; if($doMatchOnly) { @sys::numVars = matchString($nextStr,$matchStr,(!$doEvaluate ? $rexFlags : $filteredRexFlags)); if(!defined($regexpMatched) || length($regexpMatched) == 0 || $regexpMatched == 0) { return 2; } $resultStr = $sys::numVars[0]; if(defined($execProlog) && length($execProlog) > 0) { $evalStr .= $execProlog.';'."\n"; } $prevStr = substr($nextStr,0,$regexpMatchOffset); $nextStr = $regexpMatchOffset < length($nextStr) ? substr($nextStr,$regexpMatchOffset) : ""; if(!$doEvaluate) { if(defined($resultStr) && length($resultStr) > 0) { $evalStr .= 'print($resultStr);'."\n"; } } else { if(length($nextStr) > 0) { $evalStr .= 'substString($nextStr,$toSearch,$toReplace,$rexFlags);'."\n"; } if(!$doExecuteOnly) { if(defined($resultStr) && length($resultStr) > 0) { $evalStr .= 'print($resultStr);'."\n"; } } } if(defined($execEpilog) && length($execEpilog) > 0) { $evalStr .= $execEpilog.';'."\n"; } } else { @sys::numVars = matchString($nextStr,$toSearch,$filteredRexFlags); if(!defined($regexpMatched) || length($regexpMatched) == 0 || $regexpMatched == 0) { if(!$doEvaluate || !$doExecuteOnly) { print($str); } return 2; } if(defined($execProlog) && length($execProlog) > 0) { $evalStr .= $execProlog.';'."\n"; } $evalStr .= '$prevStr = substr($nextStr,0,$regexpMatchOffset);'."\n". '$nextStr = $regexpMatchOffset < length($nextStr) ? substr($nextStr,$regexpMatchOffset) : "";'."\n". 'if(!$doEvaluate) {'."\n". ' $expandStr = expandString($toReplace,@sys::numVars);'."\n". '} else {'."\n". ' $expandStr = $toReplace;'."\n". '}'."\n". '$nextStr = substString($nextStr,$toSearch,$expandStr,$filteredRexFlags);'."\n". '$sys::breakSearch = $sys::breakSearch ? 1 : !(defined($nextStr) && length($nextStr) > 0);'."\n". 'while(!$sys::breakSearch) {'."\n". ' $prevStr .= substr($nextStr,0,$regexpNextOffset);'."\n". ' $nextStr = $regexpNextOffset < length($nextStr) ? substr($nextStr,$regexpNextOffset) : "";'."\n". ' @sys::numVars = matchString($nextStr,$toSearch,$filteredRexFlags);'."\n". ' $sys::breakSearch = !(defined($regexpMatched) && length($regexpMatched) != 0 &&'."\n". ' $regexpMatched != 0 && ($regexpLastOffset < $regexpMatchOffset || $regexpMatchOffset < $regexpNextOffset));'."\n". ' if(!$sys::breakSearch) {'."\n". ' $prevStr .= substr($nextStr,0,$regexpMatchOffset);'."\n". ' $nextStr = $regexpMatchOffset < length($nextStr) ? substr($nextStr,$regexpMatchOffset) : "";'."\n". ' if(!$doEvaluate) {'."\n". ' $expandStr = expandString($toReplace,@sys::numVars);'."\n". ' } else {'."\n". ' $expandStr = $toReplace;'."\n". ' }'."\n". ' $nextStr = substString($nextStr,$toSearch,$expandStr,$filteredRexFlags);'."\n". ' $sys::breakSearch = $sys::breakSearch ? 1 : !(defined($nextStr) && length($nextStr) > 0);'."\n". ' }'."\n". '}'."\n". '$newStr = (defined($prevStr) ? $prevStr : "").(defined($nextStr) ? $nextStr : "");'."\n". 'if(!$doExecuteOnly) {'."\n". ' if(length($newStr) > 0) {'."\n". ' print($newStr);'."\n". ' }'."\n". '}'."\n"; if(defined($execEpilog) && length($execEpilog) > 0) { $evalStr = $execEpilog.';'."\n"; } } if(defined($evalStr) && length($evalStr) > 0) { eval($evalStr); } return 0; } my $resultStr; # Escape match string for safer execution. $matchStr = escapeString($matchStr,$searchEscapeChars); if($doEvaluate) { $replaceStr = escapeString($replaceStr,$replaceEscapeChars); } my $resultCode = evaluateSearchPattern($doMatchOnly,$doEvaluate,$doExecuteOnly, $buffer,$matchStr,$replaceStr,$execPrologStr,$execEpilogStr,$rexFlags); exit $resultCode;
andry81/contools
Scripts/Tools/sar.pl
Perl
mit
17,829
package REPORT::IMAGE_ASSOC; use strict; use lib "/backend/lib"; use ZOOVY; # use POGS; require DBINFO; use Data::Dumper; ## ## REPORT: IMAGE_ASSOC ## sub new { my ($class) = @_; my $self = {}; bless $self, $class; return($self); } sub r { return($_[0]->{'*PARENT'}); } sub init { my ($self) = @_; my ($r) = $self->r(); my $meta = $r->meta(); $meta->{'title'} = 'Image Associations Report'; $r->{'@HEAD'} = [ { id=>0, 'name'=>'Image', type=>'CHR', }, { id=>1, 'name'=>'Image Path', type=>'CHR', }, { id=>2, 'name'=>'Image Type', type=>'CHR', }, { id=>3, 'name'=>'PID', type=>'CHR', link=>'/biz/product/index.cgi?VERB=QUICKSEARCH&VALUE=', target=>'_blank' }, { id=>4, 'name'=>'Product Name', type=>'CHR', }, ]; # $self->{'@DASHBOARD'} = [ # { # 'name'=>'By Product Type', # '@HEAD'=>[ # { type=>'CHR', name=>'Product Type', src=>1 }, # { type=>'CNT', name=>'Count', src=>1 }, # ], # 'groupby'=>1, # }, # { # 'name'=>'By Error', # '@HEAD'=>[ # { type=>'CHR', name=>'Error', src=>3 }, # { type=>'CNT', name=>'Count', src=>3 }, # ], # 'groupby'=>3, # }, # # ]; $r->{'@BODY'} = []; return(0); } ################################################################################### ## sub work { my ($self) = @_; my ($r) = $self->r(); my $USERNAME = $r->username(); my $dbh =&DBINFO::db_user_connect($USERNAME); my @info = (); my %prods = &ZOOVY::fetchproducts_by_name($USERNAME); my @PIDS = keys %prods; my $jobs = &ZTOOLKIT::batchify(\@PIDS,250); my $reccount = 0; my $rectotal = scalar(@{$jobs}); foreach my $pidsref (@{$jobs}) { # my $prodrefs = ZOOVY::fetchproducts_into_hashref($USERNAME,$pidsref); my $Prodrefs = &PRODUCT::group_into_hashref($USERNAME,$pidsref); foreach my $P (values %{$Prodrefs}) { my $PID = $P->pid(); my $prod_name = $P->fetch('zoovy:prod_name'); ## check zoovy:prod_image 1-10 for (my $i=1;$i<11;$i++) { my $type = 'zoovy:prod_image'.$i; my $image = $P->fetch($type); next if ($image eq ''); push @info, $PID."|".$image."|".$type."|".$P->fetch('zoovy:prod_name'); } ## check zoovy:prod_thumb if ($P->fetch('zoovy:prod_thumb') ne '') { push @info, $PID."|".$P->fetch('zoovy:prod_thumb')."|zoovy:prod_thumb|".$P->fetch('zoovy:prod_name'); } ## should add check for POG/SOG images foreach my $pog (@{$P->fetch_pogs()}) { next unless ($pog->{'type'} eq 'imgselect' || $pog->{'type'} eq 'imggrid'); foreach my $opt (@{$pog->{'@options'}}) { if ($opt->{'img'}) { push @info, $PID."|".$opt->{'img'}."|imgselect ".$pog->{'id'}.":".$opt->{'v'}."|".$P->fetch('zoovy:prod_name'); } } #foreach my $o (@{$pog->{'options'}}) { # my $metaref = POGS::parse_meta($o->{'m'}); # if ($metaref->{'img'} ne '') { # my $imgselect = $metaref->{'img'}; # push @info, $PID."|".$imgselect."|imgselect ".$pog->{'id'}.":".$o->{'v'}."|".$P->fetch('zoovy:prod_name'); # } # } } } $r->progress(++$reccount,$rectotal,"Loading product batches from database"); } &DBINFO::db_user_close(); my $batchref = &ZTOOLKIT::batchify(\@info,250); my $batch = pop @{$self->{'@JOBS'}}; $reccount = 0; $rectotal = scalar(@{$batchref}); foreach my $batch (@{$batchref}) { foreach my $info (@{$batch}) { my $error = ''; my ($prod,$path,$type,$prod_name) = split(/\|/,$info); my $img_url = &ZOOVY::mediahost_imageurl($USERNAME,$path,50,50,'FFFFFF',0); my $big_img_url = &ZOOVY::mediahost_imageurl($USERNAME,$path,'','','FFFFFF',0); my $image = qq~<a href=javascript:openWindow("$big_img_url")><img src="$img_url" height='50' width='50' border='0'></a>~; my @ROW = ( $image, $path, $type, $prod, $prod_name, ); push @{$r->{'@BODY'}}, \@ROW; } $r->progress(++$reccount,$rectotal,"Creating report"); } $self->{'jobend'} = time()+1; } 1;
CommerceRack/backend
lib/REPORT/IMAGE_ASSOC.pm
Perl
mit
3,935
:- if(current_prolog_flag(xref,true);(prolog_load_context(file,F),prolog_load_context(source,F))). :- module(discord_data,[]). :- endif. :- multifile(tmp:discord_info/3). :- volatile(tmp:discord_info/3). :- dynamic(tmp:discord_info/3). % =========================== % Data Access % =========================== discord_dd(ID,Data):- discord_ddd(ID,hasValue,Data). discord_dd(ID,Prop,Value):- discord_ddd(ID,Prop,Value)*->true;get_discord2(ID,Prop,Value). get_discord2(Type,Prop,Value):- discord_ddd(Type,hasValue,ID),discord_ddd(ID,Prop,Value). get_discord_info(ID,Prop,Data):- discord_ddd(ID,Prop,Data)*-> true; (\+ integer(ID), \+ var(ID), any_to_id(ID,ID2),!, discord_ddd(ID2,Prop,Data)). discord_ddd(guilds, id, X):- default_guild(X). discord_ddd(A,B,C):- tmp:discord_info(A,B,C). discord_ddd(A,B,C):- integer(A), B == timestamp, !, id_to_time(A,C). % =========================== % Persistence % =========================== reload_discord_info:- reconsult(guild_info_file). %load_discord_info:- !. load_discord_info:- exists_file(guild_info_file)->consult(guild_info_file);true. clear_discord_info:- retractall(tmp:discord_info/3). save_discord_info:- setup_call_cleanup(open(guild_info_file,write,O), save_discord_info(O), close(O)). tmp_r(R,TmpR,TmpRG):- functor(R,discord_info,3), TmpR=tmp:R, TmpRG = (TmpR, \+ discord_is_secret(R)). save_discord_info(O):- tmp_r(R,TmpR,TmpRG), functor(R,F,A), Dyn = tmp:F/A, format(O,'~n~q.~n~q.~n~q.~n', [(:- multifile(Dyn)), (:- volatile(Dyn)), (:- dynamic(Dyn))]), forall(TmpRG,format(O,'~q.~n',[TmpR])). show_discord_info:- tmp_r(R,_TmpR,TmpRG), forall(TmpRG,ddbg_always(R)). show_discord_info_raw:- tmp_r(R,_TmpR,TmpRG), forall(TmpRG,ddbg_raw(R)). show_discord_info(Str):- tmp_r(R,_TmpR,TmpRG), forall(TmpRG, ignore(( discord_debug_cvt(R,RD),sformat(S,'~w ~q',[RD,R]), matches_info(S,Str), ddbg_always(RD)))). show_discord_info_raw(Str):- tmp_r(R,_TmpR,TmpRG), forall(TmpRG, ignore(( discord_debug_cvt(R,RD),sformat(S,'~w ~q',[RD,R]), matches_info(S,Str), ddbg_raw(R)))). :- if( \+ prolog_load_context(reloading, true)). :- at_halt(save_discord_info). :- load_discord_info. :- endif. % =========================== % Database % =========================== :- thread_local( t_l:prop_prepend/1). add_id_type(_,Type):- number(Type),!. add_id_type(_,String):- string(String),!. add_id_type(ID,Type):- discord_set_info(ID,instanceOf,Type), discord_set_info(ID,id,ID). %fixed_id("READY",'@me'). %fixed_id("READY",'members'). fixed_id(S,ID):- from_string(S,ID), number(ID). discord_add("TYPING_START",Dict):- from_dict(Dict,[channel_id:ID,user_id:User,timestamp:Time]),!, nop(discord_addd(ID,event,at(typing_start(User),Time))). discord_add("MESSAGE_REACTION_ADD",Data):- is_dict(Data), Data.message_id=MID, ignore((Data.channel_id=CID,discord_addd(MID,channel_id,CID))), discord_addd(MID,reaction,Data). discord_add("MESSAGE_REACTION_REMOVE",Data):- is_dict(Data), Data.message_id=MID, ignore((Data.channel_id=CID,discord_addd(MID,channel_id,CID))), discord_addd(MID,reaction_remove,Data). discord_add(guild_member,Data):- toplevel_prop, Data.user.id = ID, add_id_type(ID,members), discord_add(ID,Data),!. discord_add(member,Data):- toplevel_prop, Data.user.id = ID, add_id_type(ID,memberz), discord_add(ID,Data),!. %discord_add(Prop,List):- discord_grouping(Prop), is_list(List),!, maplist(discord_add(Prop),List). discord_add(ID,Data):- fixed_id(ID,ID2),ID\==ID2,!,discord_add(ID2,Data). discord_add(Type,Pairs):- toplevel_prop, is_list(Pairs),select(KV,Pairs,Rest), once(get_kvd(KV,id,ID);get_kvd(KV,"id",ID)), once((add_id_type(ID,Type),discord_add(ID,Rest))),!. discord_add(Type,Pairs):- toplevel_prop, is_list(Pairs), Pairs\==[], !, maplist(discord_add(Type),Pairs),!. discord_add(Type,KV):- get_kvd(KV,K,V), !,discord_addd(Type,K,V),!. discord_add(Type,Data):- toplevel_prop, is_dict(Data),dict_pairs(Data,_Tag,Pairs),!,discord_add(Type,Pairs),!. discord_add(CREATE,Data):- toplevel_prop, string_appended('_CREATE',CREATE,TypeS),default_guild(ID),discord_addd(ID,TypeS,Data),!. discord_add(UPDATE,Data):- toplevel_prop, string_appended('_UPDATE',UPDATE,TypeS),default_guild(ID),discord_addd(ID,TypeS,Data),!. %discord_add("GUILD_CREATE",{Data,Rest}):- !, discord_add("GUILD_CREATE",Data),discord_add("GUILD_CREATE",{Rest}),!. %discord_add("GUILD_CREATE",{Data}):- !, discord_add("GUILD_CREATE",Data). %discord_add(Type,{Data,Rest}):- !, discord_add(Type,Data),discord_add(Type,{Rest}). discord_add(Type,Data):- %retractall(tmp:discord_info(Type,_,_)), discord_addd(Type,hasValue,Data),!. discord_addd(reconnect,op,7):- discord_reconnect. %discord_addd(user_settings,Prop, Data):- !, discord_add(Prop, Data). discord_addd("READY",Prop, Data):- \+ retain_props(Prop),!, discord_add(Prop, Data). discord_addd(ID,Prop,Data):- fixed_id(ID,ID2),ID\==ID2,!,discord_addd(ID2,Prop,Data). discord_addd(ID,Prop,Data):- from_string(Data,Data2),Data\==Data2,!,discord_addd(ID,Prop,Data2). discord_addd(Guild,presences,[H|List]):- default_guild(Guild), maplist(discord_addd(presence,hasMember),[H|List]),!. discord_addd(ID,mentions,List):- !, discord_addd(ID,recipients,List). discord_addd(ID,recipients,List):- is_list(List),maplist(discord_addd(ID,recipient),List),!. discord_addd(ID,recipient,Dict):- is_dict(Dict),del_dict(id,Dict,UserID,Rest),!,discord_add(UserID,Rest), discord_addd(ID,recipient,UserID). discord_addd(ID,recipient,UserID):- integer(UserID), forall(id_to_name(UserID,Name),discord_addd(ID,recipient_name,Name)), fail. discord_addd(ID,attachments,List):- is_list(List),maplist(discord_addd(ID,attachment),List). discord_addd(ID,attachment_url,URL):- notrace_catch(http_open:http_get(URL,Data,[])), once(discord_addd(ID,attached_content,Data)),fail. discord_addd(ID,content,Data):- Data \== "", add_discord_chat_event(ID,content(Data)),fail. discord_addd(ID,embeds,Data):- Data \== [], add_discord_chat_event(ID,embeds(Data)),fail. discord_addd(ID,attached_content,Data):- Data \== "", add_discord_chat_event(ID,content(Data)),fail. discord_addd(ID,user,Data):- is_dict(Data), once(discord_add(ID,Data)),fail. discord_addd(MID,channel_id,CID):- add_id_type(CID,channels), add_id_type(MID,messages), discord_ddd(MID,author_username,Who), without_ddbg(discord_addd(CID,user_seen,Who)), fail. discord_addd(_CID,last_message_id,MID):- MID\==null, add_id_type(MID,messages),fail. discord_addd(Guild,hasValue,List):- default_guild(Guild),is_list(List),!, maplist(discord_add(Guild),List). discord_addd(presence,hasMember,Dict):- Dict.user.id = ID,!, without_ddbg(discord_add(ID,Dict)). discord_addd(ID,referenced_message,Dict):- is_dict(Dict), Dict.id = MID, !, discord_addd(ID,referenced_message,MID), discord_add(MID, Dict). discord_addd(Guild,Prop,[H|List]):- default_guild(Guild), % discord_grouping(Prop), is_list(List), \+ \+ has_id(H),!, maplist(discord_add(Prop),[H|List]),!. discord_addd(Guild,members,[H|List]):- default_guild(Guild), % discord_grouping(Prop), is_list(List), maplist(discord_add(guild_member),[H|List]),!. discord_addd(_,op,10):- !, discord_identify. discord_addd(ID,Prop,Dict):- atom(Prop), once(t_l:prop_prepend(Pre)), Pre\=='', atomic_list_concat([Pre,Prop],'_',PreProp),!, locally(t_l:prop_prepend(''), discord_addd(ID,PreProp,Dict)). discord_addd(ID,Author,Dict):- maybe_prepend(Author), integer(ID), toplevel_prop, is_dict(Dict),!, dict_pairs(Dict,_,Pairs), locally(t_l:prop_prepend(Author),maplist(discord_add(ID),Pairs)). %discord_addd(ID,user_username,Dict):- !, discord_set_info(ID,name,Dict). %discord_addd(ID,username,Dict):- !, discord_set_info(ID,name,Dict). discord_addd(ID,Prop,Dict):- discord_set_info(ID,Prop,Dict),!. discord_set_info(ID,Prop,Data):- from_string(ID,ID2),ID\==ID2,!,discord_set_info(ID2,Prop,Data). discord_set_info(Data,Prop,ID):- from_string(ID,ID2),number(ID2),ID2>10000,ID\==ID2,!,discord_set_info(Data,Prop,ID2). discord_set_info(ID,Prop,Data):- once(Prop==hasValue ; (number(Data),get_time(Time),Data<Time)), \+ tmp:discord_info(ID,Prop,Data), retractall(tmp:discord_info(ID,Prop,_)),fail. discord_set_info(_,Prop,Data):- default_info(Prop,Data),!. discord_set_info(ID,Prop,Data):- TmpR=tmp:R, R= discord_info(ID,Prop,Data), (\+ \+ call(TmpR) -> (retract(TmpR),asserta(TmpR),nop(ddbg(discord_keep_info(ID,Prop,Data)))) ; (asserta(TmpR),on_new_ddd(ID,Prop,Data))). on_new_ddd(ID,Prop,Data):- ddbg(discord_addd(ID,Prop,Data)), ignore((Data==threads->discord_join_subchannel(ID))). maybe_prepend(author). maybe_prepend(user). maybe_prepend(recipients). maybe_prepend(referenced_message):-!,fail. maybe_prepend(message_reference). %maybe_prepend(Atom):- atom(Atom). default_info(hasValue,[]). default_info(X,_):- nonvar(X), no_default_info(X),!,fail. default_info(flags,0). % probably this doesnt belong default_info(accent_color,null). default_info(attachments,[]). default_info(avatar,null). default_info(banner,null). default_info(banner_color,null). default_info(components,[]). default_info(edited_timestamp,null). default_info(embeds,[]). default_info(guild_id,GuildID):- default_guild(GuildID). default_info(last_message_id,null). default_info(mention_everyone,false). default_info(mention_roles,[]). default_info(mentions,[]). default_info(nsfw,false). default_info(permission_overwrites,[]). default_info(pinned,false). default_info(rate_limit_per_user,0). default_info(rtc_region,null). default_info(tts,false). default_info(type,0). default_info(user_limit,0). default_info(public_flags,0). default_info(email,null). default_info(features,[]). default_info(messages,[]). default_info(owner,false). default_info(X,Y):- default_info_value(Y),!, nop(dmsg(default_info(X,Y))). default_info_value(null). default_info_value(0). default_info_value([]). default_info_value(false). no_default_info(bot). no_default_info(topic). no_default_info(position). no_default_info(parent_id). % no_default_info(s). no_default_info(id). no_default_info(instanceOf). no_default_info(type). no_default_info(hasValue). retain_props(guild_experiments). retain_props(experiments).
swi-to-yap/slack_prolog
prolog/discord/data.pl
Perl
mit
10,507
package WWW::SFDC::Role::Exception; # ABSTRACT: Exception role for WWW::SFDC libraries use 5.12.0; use strict; use warnings; # VERSION use Log::Log4perl ':easy'; use Scalar::Util 'blessed'; use Moo::Role; use overload '""' => \&_stringify; =attr message The exception message. When this object is stringified, this will be the value returned. =cut has 'message', is => 'ro', default => 'There was an error in WWW::SFDC'; sub _stringify { my ($self) = shift; return $self->message; } =method throw This will log the message using Log4perl then die with itself as the error value. This enables catching the error and determining whether it's recoverable, or whether the values need using. This is intended for doing things like getting the debug log from a failed ExecuteAnonymous, or unit test results from a failed deployment. =cut sub throw { my $self = shift; my $e = blessed $self ? $self : $self->new(@_); FATAL $e; die $e; } 1; __END__ =head1 SYNOPSIS package MyException; use Moo; with 'WWW::SFDC::Role::Exception'; has 'something', is => 'ro', default => 'value'; package MAIN; # Simple: MyException->throw(message => 'Something bad happened!'); # More complex: my $e = MyException->new(message => 'Something bad happened!'); print $e; # Something bad happened! (not HASH(...)) eval { $e->throw(); } print $@->something; # value =head1 BUGS Please report any bugs or feature requests at L<https://github.com/sophos/WWW-SFDC/issues>. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc WWW::SFDC::Role::Exception You can also look for information at L<https://github.com/sophos/WWW-SFDC>
sophos/WWW-SFDC
lib/WWW/SFDC/Role/Exception.pm
Perl
mit
1,759
package BarnOwl::Module::Python; use warnings; use strict; use File::Basename; use Inline "Python" => dirname(__FILE__)."/../../../python/main.py"; init();
luac/barnowl-python
lib/BarnOwl/Module/Python.pm
Perl
mit
158
# This file is auto-generated by the Perl DateTime Suite time zone # code generator (0.07) This code generator comes with the # DateTime::TimeZone module distribution in the tools/ directory # # Generated from debian/tzdata/africa. Olson data version 2008c # # Do not edit this file directly. # package DateTime::TimeZone::Africa::Accra; use strict; use Class::Singleton; use DateTime::TimeZone; use DateTime::TimeZone::OlsonDB; @DateTime::TimeZone::Africa::Accra::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' ); my $spans = [ [ DateTime::TimeZone::NEG_INFINITY, 60494688052, DateTime::TimeZone::NEG_INFINITY, 60494688000, -52, 0, 'LMT' ], [ 60494688052, 61083763200, 60494688052, 61083763200, 0, 0, '' ], [ 61083763200, 61094216400, 61083764400, 61094217600, 1200, 1, 'GHST' ], [ 61094216400, 61115299200, 61094216400, 61115299200, 0, 0, 'GMT' ], [ 61115299200, 61125752400, 61115300400, 61125753600, 1200, 1, 'GHST' ], [ 61125752400, 61146835200, 61125752400, 61146835200, 0, 0, 'GMT' ], [ 61146835200, 61157288400, 61146836400, 61157289600, 1200, 1, 'GHST' ], [ 61157288400, 61178371200, 61157288400, 61178371200, 0, 0, 'GMT' ], [ 61178371200, 61188824400, 61178372400, 61188825600, 1200, 1, 'GHST' ], [ 61188824400, 61209993600, 61188824400, 61209993600, 0, 0, 'GMT' ], [ 61209993600, 61220446800, 61209994800, 61220448000, 1200, 1, 'GHST' ], [ 61220446800, 61241529600, 61220446800, 61241529600, 0, 0, 'GMT' ], [ 61241529600, 61251982800, 61241530800, 61251984000, 1200, 1, 'GHST' ], [ 61251982800, 61273065600, 61251982800, 61273065600, 0, 0, 'GMT' ], [ 61273065600, 61283518800, 61273066800, 61283520000, 1200, 1, 'GHST' ], [ 61283518800, DateTime::TimeZone::INFINITY, 61283518800, DateTime::TimeZone::INFINITY, 0, 0, 'GMT' ], ]; sub olson_version { '2008c' } sub has_dst_changes { 7 } sub _max_year { 2018 } sub _new_instance { return shift->_init( @_, spans => $spans ); } 1;
carlgao/lenga
images/lenny64-peon/usr/share/perl5/DateTime/TimeZone/Africa/Accra.pm
Perl
mit
2,035
package Leaf::ArchCPU; use utf8; use strict; use warnings; use parent qw(Stalk::Command); use feature qw(signatures); no warnings qw(experimental::signatures); use Breeze::Counter; use Breeze::Grad; use List::Util qw(sum); sub processors($self) { my ($stdout, undef, undef) = $self->run_command(["lscpu"], stderr_fatal => 1, status_fatal => 1, ); my ($cpus) = ($stdout =~ m/CPU\(s\):\s*\b(\d+)\b/); $self->log->info("number of cpus: $cpus"); return $cpus; } sub compute_usage($self, %data) { my $idle = sum @data{qw(idle iowait)}; my $nonidle = sum @data{qw(user nice system irq softirq steal)}; my $total = $idle + $nonidle; if (!defined $self->{prev}) { $self->{prev} = { total => $total, idle => $idle }; return 0; } my $d_total = $total - $self->{prev}->{total}; my $d_idle = $idle - $self->{prev}->{idle}; $self->{prev}->@{qw(total idle)} = ($total, $idle); return 100 * ($d_total - $d_idle) / $d_total; } sub new($class, %args) { my $self = $class->SUPER::new(%args); $self->{cpus} = $self->processors; $self->{warning} = $args{warning} // "+inf"; $self->{critical} = $args{critical} // "+inf"; $self->{step} = Breeze::Counter->new( from => -1, current => -1, to => ($self->{cpus} > 1 ? $self->{cpus} - 1 : -1), cycle => 1, ); return $self; } sub invoke($self) { my $srch = int $self->{step} == -1 ? "cpu" : ("cpu" . int $self->{step}); open my $fh, "<:encoding(utf-8)", "/proc/stat" or $self->log->fatal("/proc/stat: $!"); my $line; while ($line = <$fh>) { chomp $line; last if ($line =~ m/^$srch\b/); } close $fh; $self->log->fatal("could not find stat for $srch") unless defined $line; my ($cpu, %data); ($cpu, @data{qw(user nice system idle iowait irq softirq steal)}, undef) = split /\s+/, $line, 10; my $ncpu = int $self->{step} == -1 ? "A" : int $self->{step}; my $util = $self->compute_usage(%data); my $ret = { text => sprintf("$ncpu %3d%%", $util), icon => "", color_grad => [ $util, '%{archcpu.@grad,cpu.@grad,@green-to-red,green yellow red}', ], }; $ret->{invert} = $self->refresh if $util >= $self->{warning}; $ret->{blink} = $self->refresh if $util >= $self->{critical}; return $ret; } sub refresh_on_event($) { 1; } sub on_next($self) { delete $self->{prev}; ++$self->{step}; } sub on_back($self) { delete $self->{prev}; --$self->{step}; } sub on_middle_click($self) { delete $self->{prev}; $self->{step}->reset; } 1;
Cweorth/wild-breeze
Leaf/ArchCPU.pm
Perl
mit
2,771
#!/usr/bin/env perl use strict; my $infile = shift; my $str; open(IN, $infile) or die "Unable to open file $infile\n"; while(<IN>) { chomp; if(length($_) > 0) { $str .= $_."\n"; } } close(IN); open(OUT, ">$infile") or die "Unable to write to file $infile\n"; print OUT $str; close(OUT);
mccrowjp/utilities
txt_remove_blank_lines.pl
Perl
mit
310
package Cpanel::LetsEncrypt::cPanel::LiveAPI; use Cpanel::LiveAPI (); sub new { my $class = shift; my $self = {}; bless( $self, $class ); $self->{api} = Cpanel::LiveAPI->new(); return $self; } sub cpanel_api { my $self = shift; $self->{api} ||= Cpanel::LiveAPI->new(); return $self->{api}; } sub get_home_dir { my $self = shift; return $ENV{'HOME'}; } sub get_ssl_vhost_by_domain { my ($self, $domain) = @_; my $ssl_vhosts = $self->fetch_installed_ssl_info; return $ssl_vhosts->{$domain}; } sub get_domain_aliases { my ($self, $main_domain) = @_; my $json_resp = $self->get_domain_userdata( $main_domain ); return $json_resp->{serveralias}; } sub fetch_installed_ssl_info { my $self = shift; my $SSL_installed_hosts = $self->{api}->uapi( 'SSL', 'installed_hosts', ); my $hash; foreach my $crt ( @{ $SSL_installed_hosts->{'cpanelresult'}->{'result'}->{data} } ) { my $days_left = int( ( $crt->{'certificate'}->{not_after} - time() ) / 86400 ); $hash->{ $crt->{servername} } = { 'domains' => $crt->{'certificate'}->{domains}, 'not_after' => $crt->{'certificate'}->{not_after}, 'issuer_organizationName' => $crt->{'certificate'}->{'issuer.organizationName'}, 'daysleft' => $days_left, 'status' => ( $days_left > '1' ) ? 'Active' : 'Expired', }; } return $hash; } sub get_expired_domains { my $self = shift; my $ssl_vhosts = $self->fetch_installed_ssl_info; my @domains; foreach my $ssl_vhost ( keys( %{$ssl_vhosts} ) ) { if ( $ssl_vhosts->{$ssl_vhost}->{'daysleft'} < '5' and $ssl_vhosts->{$ssl_vhost}->{'issuer_organizationName'} =~ m/Let's\s*Encrypt/i ) { push( @domains, $ssl_vhost ); } } return \@domains; } sub listaccts { my $self = shift; my @domains; my @alt_domains; my $ssl_vhosts = $self->fetch_installed_ssl_info; my $listdomains = $self->{api}->uapi( 'DomainInfo', 'list_domains' ); my $account_ref = $listdomains->{'cpanelresult'}->{'result'}->{'data'}; push( @domains, $account_ref->{'main_domain'} ) if !$ssl_vhosts->{ $account_ref->{'main_domain'} }; push( @alt_domains, @{ $account_ref->{'addon_domains'} } ); push( @alt_domains, @{ $account_ref->{'sub_domains'} } ); foreach my $alt_domain (@alt_domains) { my $main_domain = $self->{api}->uapi( 'DomainInfo', 'single_domain_data', { 'domain' => $alt_domain } ) ->{'cpanelresult'}->{'result'}->{'data'}->{'servername'}; next if ( $ssl_vhosts->{$alt_domain} or grep /^$alt_domain$/, @{ $ssl_vhosts->{$main_domain}->{domains} } ); push( @domains, $alt_domain ); } return \@domains; } sub get_domains_list { my $self = shift; my @domains; my $listdomains = $self->{api}->uapi( 'DomainInfo', 'list_domains' ); my $account_ref = $listdomains->{'cpanelresult'}->{'result'}->{'data'}; push( @domains, $account_ref->{'main_domain'} ); push( @domains, @{ $account_ref->{'addon_domains'} } ); push( @domains, @{ $account_ref->{'sub_domains'} } ); return \@domains; } sub get_domain_userdata { my ( $self, $domain ) = @_; my $domainuserdata = $self->{'api'}->uapi( 'DomainInfo', 'single_domain_data', { 'domain' => $domain } ); return $domainuserdata->{'cpanelresult'}->{'result'}->{'data'}; } sub install_ssl_certificate { my ( $self, $hash_ref ) = @_; my $homedir = $self->get_home_dir(); my $main_dir = $homedir . '/.letsencrypt/live/'; my $cert_file = $main_dir . $hash_ref->{domain} . "/$hash_ref->{domain}.crt"; my $key_file = $main_dir . $hash_ref->{domain} . "/$hash_ref->{domain}.key"; my $ca_file = $main_dir . $hash_ref->{domain} . "/$hash_ref->{domain}.ca"; my $cert = $self->slurp($cert_file); my $key = $self->slurp($key_file); my $cabundle = $self->slurp($ca_file); my $status = $self->{'api'}->uapi( 'SSL', 'install_ssl', { 'domain' => $hash_ref->{domain}, 'cert' => $cert, 'key' => $key, 'cabundle' => $cabundle, } ); return $status; } sub slurp { my ( $self, $file ) = @_; my $content; if ( open( my $fh, '<', $file ) ) { local $/; $content = <$fh>; } return $content; } 1;
Prajithp/letsencrypt-cpanel
lib/Cpanel/LetsEncrypt/cPanel/LiveAPI.pm
Perl
mit
4,587
package Paws::ApiGateway::PutIntegrationResponse; use Moose; has ContentHandling => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'contentHandling'); has HttpMethod => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'httpMethod', required => 1); has ResourceId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'resourceId', required => 1); has ResponseParameters => (is => 'ro', isa => 'Paws::ApiGateway::MapOfStringToString', traits => ['NameInRequest'], request_name => 'responseParameters'); has ResponseTemplates => (is => 'ro', isa => 'Paws::ApiGateway::MapOfStringToString', traits => ['NameInRequest'], request_name => 'responseTemplates'); has RestApiId => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'restApiId', required => 1); has SelectionPattern => (is => 'ro', isa => 'Str', traits => ['NameInRequest'], request_name => 'selectionPattern'); has StatusCode => (is => 'ro', isa => 'Str', traits => ['ParamInURI'], uri_name => 'statusCode', required => 1); use MooseX::ClassAttribute; class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutIntegrationResponse'); class_has _api_uri => (isa => 'Str', is => 'ro', default => '/restapis/{restapi_id}/resources/{resource_id}/methods/{http_method}/integration/responses/{status_code}'); class_has _api_method => (isa => 'Str', is => 'ro', default => 'PUT'); class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::ApiGateway::IntegrationResponse'); class_has _result_key => (isa => 'Str', is => 'ro'); 1; ### main pod documentation begin ### =head1 NAME Paws::ApiGateway::PutIntegrationResponse - Arguments for method PutIntegrationResponse on Paws::ApiGateway =head1 DESCRIPTION This class represents the parameters used for calling the method PutIntegrationResponse on the Amazon API Gateway service. Use the attributes of this class as arguments to method PutIntegrationResponse. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutIntegrationResponse. As an example: $service_obj->PutIntegrationResponse(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 ContentHandling => Str Specifies how to handle response payload content type conversions. Supported values are C<CONVERT_TO_BINARY> and C<CONVERT_TO_TEXT>, with the following behaviors: =over =item * C<CONVERT_TO_BINARY>: Converts a response payload from a Base64-encoded string to the corresponding binary blob. =item * C<CONVERT_TO_TEXT>: Converts a response payload from a binary blob to a Base64-encoded string. =back If this property is not defined, the response payload will be passed through from the integration response to the method response without modification. Valid values are: C<"CONVERT_TO_BINARY">, C<"CONVERT_TO_TEXT"> =head2 B<REQUIRED> HttpMethod => Str Specifies a put integration response request's HTTP method. =head2 B<REQUIRED> ResourceId => Str Specifies a put integration response request's resource identifier. =head2 ResponseParameters => L<Paws::ApiGateway::MapOfStringToString> A key-value map specifying response parameters that are passed to the method response from the back end. The key is a method response header parameter name and the mapped value is an integration response header value, a static value enclosed within a pair of single quotes, or a JSON expression from the integration response body. The mapping key must match the pattern of C<method.response.header.{name}>, where C<name> is a valid and unique header name. The mapped non-static value must match the pattern of C<integration.response.header.{name}> or C<integration.response.body.{JSON-expression}>, where C<name> must be a valid and unique response header name and C<JSON-expression> a valid JSON expression without the C<$> prefix. =head2 ResponseTemplates => L<Paws::ApiGateway::MapOfStringToString> Specifies a put integration response's templates. =head2 B<REQUIRED> RestApiId => Str The string identifier of the associated RestApi. =head2 SelectionPattern => Str Specifies the selection pattern of a put integration response. =head2 B<REQUIRED> StatusCode => Str Specifies the status code that is used to map the integration response to an existing MethodResponse. =head1 SEE ALSO This class forms part of L<Paws>, documenting arguments for method PutIntegrationResponse in L<Paws::ApiGateway> =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/ApiGateway/PutIntegrationResponse.pm
Perl
apache-2.0
4,918
=head1 LICENSE 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. =cut package EnsEMBL::Web::ToolsPipeConfig::VEP; ### Provides configs for VEP for tools pipeline use strict; use warnings; use parent qw(EnsEMBL::Web::ToolsPipeConfig); sub logic_name { 'VEP' } sub runnable { 'EnsEMBL::Web::RunnableDB::VEP' } sub queue_name { $SiteDefs::ENSEMBL_VEP_QUEUE } sub is_lsf { !$SiteDefs::ENSEMBL_VEP_RUN_LOCAL } sub lsf_timeout { $SiteDefs::ENSEMBL_VEP_LSF_TIMEOUT } sub memory_usage { $SiteDefs::ENSEMBL_VEP_MEMORY_USAGE } sub analysis_capacity { $SiteDefs::ENSEMBL_VEP_ANALYSIS_CAPACITY } 1;
muffato/public-plugins
tools_hive/modules/EnsEMBL/Web/ToolsPipeConfig/VEP.pm
Perl
apache-2.0
1,359
if ($ARGV[0]) { $prog=$ARGV[0]; } else { $prog="./retry" ; } if (! -x "$prog") { die("$prog is non-existent or not executable: please define the path or compile first"); } sub runtest { my $testname=shift @_; my $expectrt=shift @_; my $cmd=$prog." ".join(' ',@_); my $out=`$cmd 2>&1`; my $rt=${^CHILD_ERROR_NATIVE}; if ($rt!=$expectrt) { die "$testname failed with ".$rt.": $!"; } return $out; } my $d=`dirname $0`; chomp $d; chdir("$d"); runtest("Failed args",256,"1","0"); runtest("Basic test always fail",256,"1","0","/bin/false"); runtest("Basic test always success",0,"1","0","/bin/true"); runtest("Basic test sometimes fail",0,"5","1","perl","./testretry.pl"); my $output=runtest("Some output",0,"5","1","perl","./testretry.pl","HUUHAA"); sleep(1); $output.=runtest("Some output",0,"5","1","perl","./testretry.pl","HUUHAA"); if ("$output" ne "HUUHAA\nSTDERR: HUUHAA\nHUUHAA\nSTDERR: HUUHAA\n") { die("Output test failed with $output\n"); } print "$0: All tests passed ok\n";
hpernu/retry
test.pl
Perl
apache-2.0
1,005
# # 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 apps::lmsensors::snmp::mode::components::temperature; use strict; use warnings; my $mapping = { lmTempSensorsDevice => { oid => '.1.3.6.1.4.1.2021.13.16.2.1.2' }, lmTempSensorsValue => { oid => '.1.3.6.1.4.1.2021.13.16.2.1.3' }, }; my $oid_lmTempSensorsEntry = '.1.3.6.1.4.1.2021.13.16.2.1'; sub load { my ($self) = @_; push @{$self->{request}}, { oid => $oid_lmTempSensorsEntry }; } 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_lmTempSensorsEntry}})) { next if ($oid !~ /^$mapping->{lmTempSensorsValue}->{oid}\.(.*)$/); my $instance = $1; my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_lmTempSensorsEntry}, instance => $instance); next if ($self->check_filter(section => 'temperature', instance => $instance, name => $result->{lmTempSensorsDevice})); $self->{components}->{temperature}->{total}++; $result->{lmTempSensorsValue} /= 1000; $self->{output}->output_add(long_msg => sprintf("temperature '%s' is %s C [instance = %s]", $result->{lmTempSensorsDevice}, $result->{lmTempSensorsValue}, $instance, )); my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'temperature', instance => $instance, name => $result->{lmTempSensorsDevice}, value => $result->{lmTempSensorsValue}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("Temperature '%s' is %s C", $result->{lmTempSensorsDevice}, $result->{lmTempSensorsValue})); } $self->{output}->perfdata_add( label => 'temperature', unit => 'C', nlabel => 'sensor.temperature.celsius', instances => $result->{lmTempSensorsDevice}, value => $result->{lmTempSensorsValue}, warning => $warn, critical => $crit, ); } } 1;
centreon/centreon-plugins
apps/lmsensors/snmp/mode/components/temperature.pm
Perl
apache-2.0
3,159
#!/usr/bin/env perl =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. =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <ensembl-dev@ebi.ac.uk>. Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>. =head1 NAME A script to set the sample regulatory feature. The sql is based on patch_87_88_c.sql. set_sample_regulatory_feature.pl \ --registry /homes/mnuhn/work_dir_regbuild_testrun/lib/ensembl-funcgen/registry.with_previous_version.human_regbuild_testdb19.pm \ --species homo_sapiens \ =cut use strict; use Getopt::Long; use Bio::EnsEMBL::Registry; use Data::Dumper; use Bio::EnsEMBL::Utils::Logger; my %options; GetOptions ( \%options, "species|s=s", "registry|r=s", ); my $species = $options{'species'}; my $registry = $options{'registry'}; Bio::EnsEMBL::Registry->load_all($registry); my $logger = Bio::EnsEMBL::Utils::Logger->new(); $logger->init_log; my $funcgen_adaptor = Bio::EnsEMBL::Registry->get_DBAdaptor($species, 'funcgen'); my $db_connection = $funcgen_adaptor->dbc; my $sth; $logger->info("Step 1\n"); $sth = $db_connection->prepare(qq( drop table if exists `temp_sample_id_max_activities`; )); $sth->execute; $logger->info("Step 2\n"); $sth = $db_connection->prepare(qq( drop table if exists `temp_sample_id`; )); $sth->execute; $logger->info("Step 3\n"); $sth = $db_connection->prepare(qq( create table temp_sample_id_max_activities as select regulatory_build_id, max(num_activities) as max_num_activities from ( select regulatory_build_id, regulatory_feature_id, count(distinct activity) num_activities from regulatory_build join regulatory_feature using (regulatory_build_id) join regulatory_activity using (regulatory_feature_id) group by regulatory_build_id, regulatory_feature_id order by num_activities desc ) a group by regulatory_build_id; )); $sth->execute; $logger->info("Step 4\n"); $sth = $db_connection->prepare(qq( create table temp_sample_id as select temp_sample_id_max_activities.regulatory_build_id, min(regulatory_feature_id) as sample_regulatory_feature_id from temp_sample_id_max_activities join ( select regulatory_build_id, regulatory_feature_id, count(distinct activity) num_activities from regulatory_build join regulatory_feature using (regulatory_build_id) join regulatory_activity using (regulatory_feature_id) group by regulatory_build_id, regulatory_feature_id order by num_activities desc ) a on ( a.regulatory_build_id=temp_sample_id_max_activities.regulatory_build_id and temp_sample_id_max_activities.max_num_activities=a.num_activities ) group by temp_sample_id_max_activities.regulatory_build_id ; )); $sth->execute; $logger->info("Step 5\n"); $sth = $db_connection->prepare(qq( update regulatory_build, temp_sample_id set regulatory_build.sample_regulatory_feature_id=temp_sample_id.sample_regulatory_feature_id where regulatory_build.regulatory_build_id=temp_sample_id.regulatory_build_id ; )); $sth->execute; $logger->info("Step 6\n"); $sth = $db_connection->prepare(qq( drop table `temp_sample_id_max_activities`; )); $sth->execute; $logger->info("Step 7\n"); $sth = $db_connection->prepare(qq( drop table `temp_sample_id`; )); $sth->execute; $logger->finish_log;
Ensembl/ensembl-funcgen
scripts/regulatory_build/set_sample_regulatory_feature.pl
Perl
apache-2.0
4,142
package UI::ChangeLog; # # # 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 UI::Utils; use Mojo::Base 'Mojolicious::Controller'; sub changelog { my $self = shift; my $date_string = `date "+%Y-%m-%d% %H:%M:%S"`; chomp($date_string); $self->session( last_seen_log => $date_string ); &navbarpage($self); } sub readlog { my $self = shift; my $numdays = defined( $self->param('days') ) ? $self->param('days') : 30; my $rows = defined( $self->param('days') ) ? 1000000 : 1000; # all of them gets to be too much my @data; my $interval = "> now() - interval '" . $numdays . " day'"; # postgres if ( $self->db->storage->isa("DBIx::Class::Storage::DBI::mysql") ) { $interval = "> now() - interval " . $numdays . " day"; } my $rs = $self->db->resultset('Log')->search( { 'me.last_updated' => \$interval }, { prefetch => [ { 'tm_user' => undef } ], order_by => { -desc => 'me.last_updated' }, rows => $rows } ); while ( my $row = $rs->next ) { push( @data, { "id" => $row->id, "level" => $row->level, "message" => $row->message, "user" => $row->tm_user->username, "ticketnum" => $row->ticketnum, "last_updated" => $row->last_updated, } ); } # setting cookie in the lib/Cdn/alog sub - this will be cached # my $date_string = `date "+%Y-%m-%d% %H:%M:%S"`; # chomp($date_string); # $self->session( last_seen_log => $date_string ); $self->render( json => \@data ); } sub newlogcount { my $self = shift; my $cookie = $self->cookie('last_seen_log'); my $user = $self->current_user()->{userid}; my $count = 0; if ( !defined($cookie) ) { my $date_string = `date "+%Y-%m-%d% %H:%M:%S"`; chomp($date_string); $self->cookie( last_seen_log => $date_string, { path => "/", max_age => 604800 } ); # expires in a week. } else { my $since_string = "> \'" . $cookie . "\'"; $count = $self->db->resultset('Log')->search( { -and => [ { tm_user => { '!=' => $user } }, { last_updated => \$since_string } ] }, )->count(); } my $jdata = { newlogcount => $count }; $self->render( json => $jdata ); } sub createlog { my $self = shift; &log( $self, $self->param('message'), $self->param('level') ); return $self->redirect_to('/misc'); } 1;
knutsel/traffic_control-1
traffic_ops/app/lib/UI/ChangeLog.pm
Perl
apache-2.0
2,777
package Paws::Route53::CreateTrafficPolicyInstance; use Moose; has HostedZoneId => (is => 'ro', isa => 'Str', required => 1); has Name => (is => 'ro', isa => 'Str', required => 1); has TrafficPolicyId => (is => 'ro', isa => 'Str', required => 1); has TrafficPolicyVersion => (is => 'ro', isa => 'Int', required => 1); has TTL => (is => 'ro', isa => 'Int', required => 1); use MooseX::ClassAttribute; class_has _api_call => (isa => 'Str', is => 'ro', default => 'CreateTrafficPolicyInstance'); class_has _api_uri => (isa => 'Str', is => 'ro', default => '/2013-04-01/trafficpolicyinstance'); class_has _api_method => (isa => 'Str', is => 'ro', default => 'POST'); class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::Route53::CreateTrafficPolicyInstanceResponse'); class_has _result_key => (isa => 'Str', is => 'ro'); 1; ### main pod documentation begin ### =head1 NAME Paws::Route53::CreateTrafficPolicyInstance - Arguments for method CreateTrafficPolicyInstance on Paws::Route53 =head1 DESCRIPTION This class represents the parameters used for calling the method CreateTrafficPolicyInstance on the Amazon Route 53 service. Use the attributes of this class as arguments to method CreateTrafficPolicyInstance. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to CreateTrafficPolicyInstance. As an example: $service_obj->CreateTrafficPolicyInstance(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> HostedZoneId => Str The ID of the hosted zone in which you want Amazon Route 53 to create resource record sets by using the configuration in a traffic policy. =head2 B<REQUIRED> Name => Str The domain name (such as example.com) or subdomain name (such as www.example.com) for which Amazon Route 53 responds to DNS queries by using the resource record sets that Amazon Route 53 creates for this traffic policy instance. =head2 B<REQUIRED> TrafficPolicyId => Str The ID of the traffic policy that you want to use to create resource record sets in the specified hosted zone. =head2 B<REQUIRED> TrafficPolicyVersion => Int The version of the traffic policy that you want to use to create resource record sets in the specified hosted zone. =head2 B<REQUIRED> TTL => Int (Optional) The TTL that you want Amazon Route 53 to assign to all of the resource record sets that it creates in the specified hosted zone. =head1 SEE ALSO This class forms part of L<Paws>, documenting arguments for method CreateTrafficPolicyInstance in L<Paws::Route53> =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/Route53/CreateTrafficPolicyInstance.pm
Perl
apache-2.0
3,027
#! /usr/bin/perl -w # # aplists.pl [options] [list-parent-directory] # # -h help/usage # -c count messages in last 24 hours # -o include public lists (subscription not moderated) # -O don't include public lists # -p include private lists (subscription moderated) # -P don't include private lists # -a include both public and private lists # -x Generate output in XML format # # Output format is one line per list: # <site>:<listname>[=<info-file>][,<listname>[=info-file]... # # or XML: # <mailing-lists> # <asof>yyyy-mm-dd</asof> # <site> # <name>sitename</name> # <list> # <name>listname</name> # <status>unknown|public|private</status> # <subscribers>int</subscribers> # <digest-subscribers>int</digest-subscribers> # <info>encoded-info</info> # <messages>int</messages> <!-- optional --> # </list> # <list>... # </site> # : # </mailing-lists> # use strict; use Getopt::Long; use Symbol; use POSIX; #use XML::LibXML::Common qw(:encoding); my %options; my $include_public = 1; my $include_private = 0; my $use_xml = 0; my $count = 0; my $debug = 0; my $phandle = gensym(); Getopt::Long::Configure('bundling'); GetOptions(\%options, 'a' => sub { $include_public = $include_private = 1; }, 'c' => \$count, 'd+' => \$debug, 'h' => \&usage, 'o' => \$include_public, 'O' => sub { $include_public = 0; }, 'p' => \$include_private, 'P' => sub { $include_private = 0; }, 'x' => \$use_xml, ); # # No counting if we're not generating XML.. # $count = 0 if ($count && (! $use_xml)); debug('public =', $include_public); debug('private =', $include_private); my $tlh = gensym(); my $slh = gensym(); my $TLD = $ARGV[0] || '/home/coar/apache-apmail/lists'; opendir($tlh, $TLD) or die("Can't opendir($TLD): $!"); my @tldirs = readdir($tlh); closedir($tlh); # # @tldirs now has a list of all the sites. Scan each one for the # lists on that site. # my %lists; for my $tldir (@tldirs) { next if ($tldir !~ /\w\.\w+$/i); next if (! -d "$TLD/$tldir"); opendir($slh, "$TLD/$tldir") or die("Can't opendir($TLD/$tldir): $!"); my @sldirs = readdir($slh); closedir($slh); for my $sldir (@sldirs) { next if ($sldir =~ /^(?:\.+|cvs)$/i); next if (! -d "$TLD/$tldir/$sldir"); push(@{$lists{$tldir}}, $sldir); } } if ($use_xml) { print "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" . "<mailing-lists>\n"; print ' <asof>' . strftime('%Y-%m-%d', localtime()) . "</asof>\n"; } my $ifile = gensym(); for my $site (sort(keys(%lists))) { if ($use_xml) { print " <site>\n" . " <name>$site</name>\n"; } else { print "$site:"; } my $continue = 0; for my $list (sort(@{$lists{$site}})) { my $is_archived; my $cmd; # # Assume the list is public in case we can't figure it out. # my $public = 1; my $is_digested = 1; my $config = "$TLD/$site/$list/config"; if (open(CONFIG, "< $config")) { while (<CONFIG>) { if (/^F:/) { debug(2, "found config line for $list\@$site: $_"); $public = ($_ =~ /S/); $is_archived = ($_ =~ /a/); $is_digested = ($_ =~ /d/); last; } } close(CONFIG); } debug(3, "$list\@$site is " . ($public ? '' : 'not ') . 'public'); debug(3, "$list\@$site is " . ($is_archived ? '' : 'not ') . 'archived'); next if (($public && (! $include_public)) || ((! $public) && (! $include_private))); if ($continue) { if (! $use_xml) { print ','; } } if ($use_xml) { print " <list>\n" . " <name>$list</name>\n" . ' <status>' . ($public ? 'public' : 'private') . "</status>\n"; } else { print $list; } my $info = "$TLD/$site/$list/text/info"; if (-r $info) { if ($use_xml) { open($ifile, "< $info"); my @slurp = <$ifile>; close($ifile); my $slurp = join('', @slurp); if ($slurp !~ /^No information has been provided /) { $slurp = utf8_safe($slurp); # $slurp = encodeToUTF8('ISO-8859-1', $slurp); chomp($slurp); print " <info>\n" . "<![CDATA[$slurp]]>\n" . " </info>\n"; } } else { print "=$info"; } } $cmd = "ezmlm-list -n $TLD/$site/$list |"; open($phandle, $cmd) and do { my $subs = <$phandle>; close($phandle); $subs =~ /(\d+)/; $subs = $1; print " <subscribers>$subs</subscribers>\n"; }; if ($is_digested) { $cmd = "ezmlm-list -n $TLD/$site/$list/digest |"; open($phandle, $cmd) and do { my $subs = <$phandle>; close($phandle); $subs =~ /(\d+)/; $subs = $1; print ' <digest-subscribers>' . $subs . "</digest-subscribers>\n"; }; } if ($count) { my $msgs = -1; if ($is_archived) { $cmd = "find $TLD/$site/$list/archive " . "-mtime -1 -type f -name '[0-9]*' " . '| wc -l |'; debug(2, $cmd); open($phandle, $cmd) and do { $msgs = <$phandle>; close($phandle); chomp($msgs); debug(3, "msgs = '$msgs'"); $msgs =~ /(\d+)/; $msgs = $1; }; } print " <messages>$msgs</messages>\n"; } my $ph = gensym(); my $mods = ''; $cmd = "ezmlm-list $TLD/$site/$list/mod |"; debug(2, $cmd); open($ph, $cmd) and do { my @mods = <$ph>; close($ph); chomp(@mods); $mods = join(' ', @mods); debug(3, "mods = '$mods'"); }; if ($mods) { $mods = utf8_safe($mods); # $mods = encodeToUTF8('ISO-8859-1', $mods); print " <moderators><![CDATA[$mods]]></moderators>\n"; } if ($use_xml) { print " </list>\n"; } } if ($use_xml) { print " </site>\n"; } else { print "\n"; } } if ($use_xml) { print "</mailing-lists>\n"; } # # Help display # sub usage { print STDERR "Usage: $0 [-ahpP] [list-parent]\n" . " -a Include both public and private lists\n" . " -h This message\n" . " -o Include open (public) lists (default)\n" . " -O Do not include open lists\n" . " -p Include closed (private) lists\n" . " -P Do not include closed lists (default)\n"; exit(0); } sub debug { my $level = 1; if ($_[0] =~ /^\d+$/) { $level = shift; } if ($debug >= $level) { print 'debug: ' . join(' ', @_) . "\n"; } } sub utf8_safe { my ($input) = @_; my %table; my $ichar; for (my $i = 0; $i <= 0xFF; $i++) { $ichar = chr($i); if (($i == 0x09) || ($i == 0x0A) || ($i == 0x0D) || (($i >= 0x20) && ($i <= 0x7F))) { $ichar = chr($i); # if ($ichar eq '<') { # $table{$ichar} = '&lt;'; # } # elsif ($ichar eq '>') { # $table{$ichar} = '&gt;'; # } # elsif ($ichar eq '&') { # $table{$ichar} = '&amp;'; # } next; } if (($i < 0x7F) || (($i >= 0x7F) && ($i <= 0x84)) || (($i >= 0x86) && ($i <= 0x9F))) { $table{$ichar} = '*'; } else { $table{$ichar} = sprintf('&#x%02x;', $i); } } my $output = ''; for (my $i = 0; $i < length($input); $i++) { my $ichar = substr($input, $i, 1); if (defined($table{$ichar})) { $output .= $table{$ichar}; } else { $output .= $ichar; } } return $output; } # # Local Variables: # mode: cperl # tab-width: 4 # indent-tabs-mode: nil # End: #
sebbASF/infrastructure-puppet
modules/qmail_asf/files/apmail/bin/aplists.pl
Perl
apache-2.0
8,925
=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. =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 AUTHORS Dan Andrews <dta@sanger.ac.uk> =head1 NAME Bio::EnsEMBL::Pipeline::Alignment::AlignmentSeq - =head1 SYNOPSIS =head1 DESCRIPTION =head1 METHODS =cut package Bio::EnsEMBL::Pipeline::Alignment::AlignmentSeq; use warnings ; use vars qw(@ISA); use strict; use Bio::Seq; use Bio::EnsEMBL::Utils::Exception qw(throw warning info); use Bio::EnsEMBL::Utils::Argument qw(rearrange); @ISA = qw(); sub new { my ($class, @args) = @_; my $self = bless {},$class; my ($name, $seq, $deletions, $start, $exon, $type) = rearrange([qw(NAME SEQ DELETIONS START EXON TYPE)],@args); # Optional arguments $self->seq($seq) if $seq; $self->name($name) if $name; $self->start($start) if $start; $self->exon($exon) if $exon; $self->type($type) if $type; return $self; } sub name { my $self = shift; if (@_) { $self->{'_name'} = shift; } return $self->{'_name'}; } sub seq { my $self = shift; if (@_) { $self->{'_seq'} = shift; } $self->throw('No sequence attached to object') unless $self->{'_seq'}; return $self->{'_seq'}; } # Returns the sequence as an array, with one base per array element. sub seq_array { my $self = shift; $self->throw("Cant retrieve seq_array when there is no sequence.") unless $self->seq; my @array = split //, $self->seq; return \@array; } # Slightly formatted output sub seq_with_newlines { my ($self, $line_length) = @_; $line_length = 60 unless defined $line_length; my $seq_string = $self->seq; $seq_string =~ s/(.{$line_length})/$1\n/g; return $seq_string; } # Writes the sequence back from an array, where one base is # resident in each array element. Empty elements will be # written as gaps '-' sub store_seq_array { my $self = shift; my $input_array = shift; $self->throw("Array for storage contains nothing.") unless (scalar @$input_array > 0); my $concat_seq; for (my $i = 0; $i < scalar @$input_array; $i++){ if (! defined $input_array->[$i] || $input_array->[$i] eq ''){ $concat_seq .= '-'; } else { $concat_seq .= $input_array->[$i]; } } $self->seq($concat_seq); return 1; } sub fetch_base_at_position { my ($self, $base_position) = @_; $self->throw("Must specify a coordinate in order to retrieve a base from the sequence.") unless $base_position; $base_position--; return substr $self->seq, $base_position, 1; } # Specify the insertion position and length of # gap for insertion into both the sequence and # the deletion sequence. sub insert_gap { my ($self, $insert_position, $gap_length) = @_; unless (defined $insert_position && $gap_length > 0){ throw("Need to specify gap insertion position [$insert_position] " . "and length [$gap_length]"); } my $gap = '-' x $gap_length; # Stick the gap in the sequence my $seq = $self->seq; if (length $seq < ($insert_position - 1)){ info("Attempting to insert gap in sequence [" . $self->name . "] beyond the end of the sequence. Sequence length [". length($seq) ."] Insert position [" . ($insert_position - 1) . "]\n"); return 0 } my $new_seq = substr($seq, 0, $insert_position - 1) . $gap . substr($seq, $insert_position - 1); $self->seq($new_seq); # Take note of the gap in our set of deletion coordinates for (my $i = 0; $i < $gap_length; $i++) { $self->increment_deletions_above($insert_position+$i) } return 1 } sub all_gaps { my $self = shift; my $sequence_array = $self->seq_array; my @gap_coordinates; for (my $i = 0; $i < scalar @$sequence_array; $i++) { push @gap_coordinates, $i+1 if $sequence_array->[$i] eq '-' } return \@gap_coordinates } sub add_deletion { my ($self, $position, $length) = @_; throw("Add deletion requires a numeric argument, not this [" . ref($position) . "]") if (ref($position) ne ''); if ($position > $self->length) { warning("Attempting to insert a deletion past the end of sequence."); return 1 } $length = 1 unless $length; $self->deletion_hash->{$position} = $length unless (defined $self->deletion_hash->{$position} && $self->deletion_hash->{$position} > $length); return 1 } sub increment_deletions_above { my ($self, $coord) = @_; my $deletion_hash = $self->deletion_hash; my @coords = keys %$deletion_hash; for (my $i = 0; $i < scalar @coords; $i++) { if ($deletion_hash->{$coords[$i]}){ my $deletion_length = $deletion_hash->{$coords[$i]}; delete $deletion_hash->{$coords[$i]}; $deletion_hash->{$coords[$i]+1} = $deletion_length; } } return 1 } sub deletion_hash { my $self = shift; if (@_){ $self->{'_deletions'} = shift } unless ($self->{'_deletions'}){ $self->{'_deletions'} = {}; } return $self->{'_deletions'} } sub deletion_coords { my $self = shift; my @deletion_coords = keys %{$self->deletion_hash}; return \@deletion_coords } # I'm not sure what this is used for... sub start { my $self = shift; if (@_) { $self->{'_start'} = shift; } return $self->{'_start'} } # Find the lengths of gaps both upstream and downstream of # our sequence. sub _end_gaps { my $self = shift; # Calculate both up and down stream gaps at the same # time for increased overall speed (assuming that # both numbers will ultimately be needed). my $seq = $self->seq; $seq =~ s/^(\-*)/$1/; my $upstream_gaps = length $1; $seq = reverse $seq; $seq =~ s/^(\-*)/$1/; my $downstream_gaps = length $1; $self->{'_first_base_coord'} = $upstream_gaps + 1; $self->{'_last_base_coord'} = $self->length - $downstream_gaps; return 1 } # Find the first non-gap base of our aligned sequence sub first_base_coord { my $self = shift; unless (defined $self->{'_first_base_coord'}){ $self->_end_gaps; } return $self->{'_first_base_coord'} } # Find the last non-gap base of our aligned_sequence sub last_base_coord { my $self = shift; unless (defined $self->{'_last_base_coord'}){ $self->_end_gaps; } return $self->{'_last_base_coord'} } # This stores the exon number. Used by # Bio::EnsEMBL::Pipeline::Alignment::EvidenceAlignment sub exon { my $self = shift; if (@_) { $self->{'_exon'} = shift; } return $self->{'_exon'}; } # Sequence type store - can be 'nucleotide' or 'protein' sub type { my $self = shift; if (@_) { my $type = shift; $self->throw("Unknown sequence type - needs to be either " . "'nucleotide' or 'protein'.") unless ($type eq 'nucleotide' || $type eq 'protein'); $self->{'_type'} = $type; } return $self->{'_type'}; } # Useful to know sub length { my $self = shift; return scalar @{$self->seq_array}; } # Text dump sequence with identifier sub fasta_string { my ($self, $line_length) = @_; $line_length = 60 unless $line_length; return '>' . $self->name . "\n" . $self->seq_with_newlines($line_length) . "\n"; } 1;
Ensembl/ensembl-pipeline
modules/Bio/EnsEMBL/Pipeline/Alignment/AlignmentSeq.pm
Perl
apache-2.0
8,057
# # 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 hardware::server::dell::openmanage::snmp::mode::components::logicaldrive; use strict; use warnings; my %map_state = ( 0 => 'unknown', 1 => 'ready', 2 => 'failed', 3 => 'online', 4 => 'offline', 6 => 'degraded', 15 => 'resynching', 24 => 'rebuild', 26 => 'formatting', 35 => 'initializing', ); my %map_layout = ( 1 => 'Concatened', 2 => 'RAID-0', 3 => 'RAID-1', 4 => 'RAID-2', 5 => 'RAID-3', 6 => 'RAID-4', 7 => 'RAID-5', 8 => 'RAID-6', 9 => 'RAID-7', 10 => 'RAID-10', 11 => 'RAID-30', 12 => 'RAID-50', 13 => 'Add spares', 14 => 'Delete logical', 15 => 'Transform logical', 18 => 'RAID-0-plus-1 - Mylex only', 19 => 'Concatened RAID 1', 20 => 'Concatened RAID 5', 21 => 'no RAID', 22 => 'RAID Morph - Adapted only', ); my %map_status = ( 1 => 'other', 2 => 'unknown', 3 => 'ok', 4 => 'nonCritical', 5 => 'critical', 6 => 'nonRecoverable', ); # In MIB 'dcstorag.mib' my $mapping = { virtualDiskName => { oid => '.1.3.6.1.4.1.674.10893.1.20.140.1.1.2' }, virtualDiskDeviceName => { oid => '.1.3.6.1.4.1.674.10893.1.20.140.1.1.3' }, virtualDiskState => { oid => '.1.3.6.1.4.1.674.10893.1.20.140.1.1.4', map => \%map_state }, }; my $mapping2 = { virtualDiskLengthInMB => { oid => '.1.3.6.1.4.1.674.10893.1.20.140.1.1.6' }, }; my $mapping3 = { virtualDiskLayout => { oid => '.1.3.6.1.4.1.674.10893.1.20.140.1.1.13', map => \%map_layout }, }; my $mapping4 = { virtualDiskComponentStatus => { oid => '.1.3.6.1.4.1.674.10893.1.20.140.1.1.20', map => \%map_status }, }; my $oid_virtualDiskEntry = '.1.3.6.1.4.1.674.10893.1.20.140.1.1'; sub load { my (%options) = @_; push @{$options{request}}, { oid => $oid_virtualDiskEntry, start => $mapping->{virtualDiskName}->{oid}, end => $mapping->{virtualDiskState}->{oid} }, { oid => $mapping2->{virtualDiskLengthInMB}->{oid} }, { oid => $mapping3->{virtualDiskLayout}->{oid} }, { oid => $mapping4->{virtualDiskComponentStatus}->{oid} }; } sub check { my ($self) = @_; $self->{output}->output_add(long_msg => "Checking logical drives"); $self->{components}->{logicaldrive} = {name => 'logical drives', total => 0, skip => 0}; return if ($self->check_exclude(section => 'logicaldrive')); foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$mapping4->{virtualDiskComponentStatus}->{oid}}})) { next if ($oid !~ /^$mapping4->{virtualDiskComponentStatus}->{oid}\.(.*)$/); my $instance = $1; my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_virtualDiskEntry}, instance => $instance); my $result2 = $self->{snmp}->map_instance(mapping => $mapping2, results => $self->{results}->{$mapping2->{virtualDiskLengthInMB}->{oid}}, instance => $instance); my $result3 = $self->{snmp}->map_instance(mapping => $mapping3, results => $self->{results}->{$mapping3->{virtualDiskLayout}->{oid}}, instance => $instance); my $result4 = $self->{snmp}->map_instance(mapping => $mapping4, results => $self->{results}->{$mapping4->{virtualDiskComponentStatus}->{oid}}, instance => $instance); next if ($self->check_exclude(section => 'logicaldrive', instance => $instance)); $self->{components}->{logicaldrive}->{total}++; $self->{output}->output_add(long_msg => sprintf("Logical drive '%s' status is '%s' [instance: %s, size: %s MB, layout: %s, state: %s, device name: %s]", $result->{virtualDiskName}, $result4->{virtualDiskComponentStatus}, $instance, $result2->{virtualDiskLengthInMB}, $result3->{virtualDiskLayout}, $result->{virtualDiskState}, $result->{virtualDiskDeviceName} )); my $exit = $self->get_severity(section => 'logicaldrive', value => $result4->{virtualDiskComponentStatus}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("Logical drive '%s' status is '%s'", $result->{virtualDiskName}, $result4->{virtualDiskComponentStatus})); } } } 1;
wilfriedcomte/centreon-plugins
hardware/server/dell/openmanage/snmp/mode/components/logicaldrive.pm
Perl
apache-2.0
5,175
package t::Object::Animal::Jackalope; BEGIN { for ( 't::Object::Animal::Antelope', 't::Object::Animal::JackRabbit' ) { eval "require $_"; push @t::Object::Animal::Jackalope::ISA, $_; } } use Class::InsideOut qw( private property id ); # superclass is handling new() Class::InsideOut::options( { privacy => 'public' } ); property kills => my %kills; private whiskers => my %whiskers; private sidekick => my %sidekick, { privacy => 'public' }; use vars qw( $freezings $thawings ); sub FREEZE { my $self = shift; $freezings++; } sub THAW { my $self = shift; $thawings++; } 1;
gitpan/Class-InsideOut
t/Object/Animal/Jackalope.pm
Perl
apache-2.0
629
# # Copyright 2021 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package storage::lenovo::iomega::snmp::mode::memory; use base qw(snmp_standard::mode::storage); use strict; use warnings; sub custom_usage_output { my ($self, %options) = @_; return sprintf( 'Ram Total: %s %s Used (-buffers/cache): %s %s (%.2f%%) Free: %s %s (%.2f%%)', $self->{perfdata}->change_bytes(value => $self->{result_values}->{total}), $self->{perfdata}->change_bytes(value => $self->{result_values}->{used}), $self->{result_values}->{prct_used}, $self->{perfdata}->change_bytes(value => $self->{result_values}->{free}), $self->{result_values}->{prct_free} ); } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'ram', type => 0, skipped_code => { -10 => 1 } } ]; $self->{maps_counters}->{ram} = [ { label => 'usage', nlabel => 'memory.usage.bytes', set => { key_values => [ { name => 'used' }, { name => 'free' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ], closure_custom_output => $self->can('custom_usage_output'), perfdatas => [ { value => 'used', template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1 } ] } }, { label => 'usage-free', display_ok => 0, nlabel => 'memory.free.bytes', set => { key_values => [ { name => 'free' }, { name => 'used' }, { name => 'prct_used' }, { name => 'prct_free' }, { name => 'total' } ], closure_custom_output => $self->can('custom_usage_output'), perfdatas => [ { value => 'free', template => '%d', min => 0, max => 'total', unit => 'B', cast_int => 1 } ] } }, { label => 'usage-prct', display_ok => 0, nlabel => 'memory.usage.percentage', set => { key_values => [ { name => 'prct_used' } ], output_template => 'Ram Used : %.2f %%', perfdatas => [ { value => 'prct_used', template => '%.2f', min => 0, max => 100, unit => '%' } ] } }, { label => 'buffer', nlabel => 'memory.buffer.bytes', set => { key_values => [ { name => 'buffer' } ], output_template => 'Buffer: %s %s', output_change_bytes => 1, perfdatas => [ { value => 'buffer', template => '%d', min => 0, unit => 'B' } ] } }, { label => 'cached', nlabel => 'memory.cached.bytes', set => { key_values => [ { name => 'cached' } ], output_template => 'Cached: %s %s', output_change_bytes => 1, perfdatas => [ { value => 'cached', template => '%d', min => 0, unit => 'B' } ] } } ]; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options, force_new_perfdata => 1); bless $self, $class; return $self; } my $mapping = { hrStorageDescr => { oid => '.1.3.6.1.2.1.25.2.3.1.3' }, hrStorageAllocationUnits => { oid => '.1.3.6.1.2.1.25.2.3.1.4' }, hrStorageSize => { oid => '.1.3.6.1.2.1.25.2.3.1.5' }, hrStorageUsed => { oid => '.1.3.6.1.2.1.25.2.3.1.6' } }; sub manage_selection { my ($self, %options) = @_; my $oid_hrstoragetype = '.1.3.6.1.2.1.25.2.3.1.2'; my $snmp_result = $options{snmp}->get_table(oid => $oid_hrstoragetype, nothing_quit => 1); my $storages = []; foreach (keys %$snmp_result) { next if ($snmp_result->{$_} !~ /(?:\.1|\.2)$/); /^$oid_hrstoragetype\.(.*)$/; push @$storages, $1; } $options{snmp}->load( oids => [map($_->{oid}, values(%$mapping))], instances => $storages, nothing_quit => 1 ); $snmp_result = $options{snmp}->get_leef(); my ($total, $used, $cached, $buffer); #.1.3.6.1.2.1.25.2.3.1.3.1 = STRING: Physical memory #.1.3.6.1.2.1.25.2.3.1.3.2 = STRING: Memory buffers #.1.3.6.1.2.1.25.2.3.1.3.3 = STRING: Cached memory foreach (@$storages) { my $result = $options{snmp}->map_instance(mapping => $mapping, results => $snmp_result, instance => $_); next if (!defined($result->{hrStorageUsed})); my $current = $result->{hrStorageUsed} * $result->{hrStorageAllocationUnits}; next if ($current < 0); if ($result->{hrStorageDescr} =~ /Cached\s+memory/i) { $cached = $current; } elsif ($result->{hrStorageDescr} =~ /Memory\s+buffers/i) { $buffer = $current; } elsif ($result->{hrStorageDescr} =~ /Physical\s+memory/i) { $used = $current; $total = $result->{hrStorageSize} * $result->{hrStorageAllocationUnits}; } } $used -= (defined($cached) ? $cached : 0) - (defined($buffer) ? $buffer : 0); $self->{ram} = { total => $total, cached => $cached, buffer => $buffer, used => $used, free => $total - $used, prct_used => $used * 100 / $total, prct_free => 100 - ($used * 100 / $total) }; } 1; __END__ =head1 MODE Check memory. =over 8 =item B<--warning-*> B<--critical-*> Thresholds. Can be: 'usage' (B), 'usage-free' (B), 'usage-prct' (%), 'buffer' (B), 'cached' (B). =back =cut
Tpo76/centreon-plugins
storage/lenovo/iomega/snmp/mode/memory.pm
Perl
apache-2.0
6,374
# # Copyright 2015 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::protocols::dhcp::mode::connection; use base qw(centreon::plugins::mode); use strict; use warnings; use Time::HiRes qw(gettimeofday tv_interval); use IO::Socket; use IO::Select; use Net::DHCP::Packet; use Net::DHCP::Constants; 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 => { "serverip:s@" => { name => 'serverip' }, "out-first-valid" => { name => 'out_first_valid' }, "timeout:s" => { name => 'timeout', default => 15 }, "macaddr:s" => { name => 'macaddr', default => '999999100000'}, "interface:s" => { name => 'interface', default => 'eth0' }, "cidr-match:s@" => { name => 'cidr_match' }, }); $self->{unicast} = 0; return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); if (defined($self->{option_results}->{serverip}) && scalar(@{$self->{option_results}->{serverip}}) > 0) { $self->{unicast} = 1; } $self->{subnet_matcher} = undef; if (defined($self->{option_results}->{cidr_match}) && scalar(@{$self->{option_results}->{cidr_match}}) > 0) { centreon::plugins::misc::mymodule_load(output => $self->{output}, module => 'Net::Subnet', error_msg => "Cannot load module 'Net::Subnet'."); $self->{subnet_matcher} = Net::Subnet::subnet_matcher(@{$self->{option_results}->{cidr_match}}); } } sub send_discover { my ($self, %options) = @_; $self->{random_number} = int(rand(0xFFFFFFFF)); #Create DHCP Discover Packet my $discover = Net::DHCP::Packet->new( Xid => $self->{random_number}, Flags => $self->{unicast} == 1 ? 0 : 0x8000, Chaddr => $self->{option_results}->{macaddr}, Giaddr => $self->{my_ip}, Hops => $self->{unicast} == 1 ? 1 : 0, DHO_HOST_NAME() => 'centreon', DHO_VENDOR_CLASS_IDENTIFIER() => 'foo', DHO_DHCP_MESSAGE_TYPE() => DHCPDISCOVER(), ); my $str = $discover->serialize(); #Send UDP Packet $self->{timing0} = [gettimeofday]; if ($self->{unicast} == 0) { my $remoteipaddr = sockaddr_in(67, INADDR_BROADCAST); send($self->{socket}, $str, 0, $remoteipaddr); } else { foreach my $server_ip (@{$self->{option_results}->{serverip}}) { my $remoteipaddr = sockaddr_in(67, inet_aton($server_ip)); send($self->{socket}, $str, 0, $remoteipaddr); } } } sub create_socket { my ($self, %options) = @_; #Create UDP Socket socket($self->{socket}, AF_INET, SOCK_DGRAM, getprotobyname('udp')); setsockopt($self->{socket}, SOL_SOCKET, SO_REUSEADDR, 1); if ($self->{unicast} == 0) { setsockopt($self->{socket}, SOL_SOCKET, SO_BROADCAST, 1); } $self->{my_ip} = undef; if ($self->{unicast} == 1) { $self->{my_ip} = $self->get_interface_address(interface => $self->{option_results}->{interface}); } my $port = $self->{unicast} == 1 ? '67' : '68'; my $addr = $self->{unicast} == 1 ? inet_aton($self->{my_ip}) : INADDR_ANY; my $binding = bind($self->{socket}, sockaddr_in($port, $addr)); } sub get_interface_address { my ($self, %options) = @_; require 'sys/ioctl.ph'; my $socket; if (!socket($socket, PF_INET, SOCK_STREAM, (getprotobyname('tcp'))[2])) { $self->{output}->output_add(severity => 'UNKNOWN', short_msg => "cannot get interface address: $!"); $self->{output}->display(); $self->{output}->exit(); } my $buf = pack('a256', $options{interface}); if (ioctl($socket, SIOCGIFADDR(), $buf) && (my @address = unpack('x20 C4', $buf))) { return join('.', @address); } $self->{output}->output_add(severity => 'UNKNOWN', short_msg => "cannot get interface address: $!"); $self->{output}->display(); $self->{output}->exit(); } sub get_offer { my ($self, %options) = @_; $self->{discresponse} = []; #Wait DHCP OFFER Packet my $wait = IO::Select->new($self->{socket}); my $timeout = $self->{option_results}->{timeout}; my $time = time(); $self->{random_number} = sprintf("%x", $self->{random_number}); while (my ($found) = $wait->can_read($timeout)) { $timeout -= time() - $time; $time = time(); my $srcpaddr = recv($self->{socket}, my $data, 4096, 0); my $response = new Net::DHCP::Packet($data); my $response_readable = $response->toString(); # Need to get same Xid and MacAddr in response. Otherwise not for me if ($response_readable =~ /^xid\s+=\s+$self->{random_number}/mi && $response_readable =~ /^chaddr\s+=\s+$self->{option_results}->{macaddr}/mi) { $self->{timeelapsed} = tv_interval($self->{timing0}, [gettimeofday]); push @{$self->{discresponse}}, $response_readable; last if (defined($self->{option_results}->{out_first_valid})); } } close $self->{socket}; } sub check_results { my ($self, %options) = @_; foreach my $response (@{$self->{discresponse}}) { $response =~ /DHO_DHCP_LEASE_TIME.*?=\s+(.*?)\n/m; my $lease_time = $1; my $yiaddr; if ($response =~ /^yiaddr\s+=\s+(.*?)\n/m) { $yiaddr = $1; } $response =~ /^siaddr\s+=\s+(.*?)\n/m; my $siaddr = $1; $self->{output}->output_add(long_msg => sprintf("Response from %s : offer address %s (lease time: %s)", $siaddr, $yiaddr, $lease_time)); if (defined($self->{subnet_matcher})) { if (!$self->{subnet_matcher}->($yiaddr)) { $self->{output}->output_add(severity => 'CRITICAL', short_msg => sprintf("Offer address %s not matching (from: %s)", $yiaddr, $siaddr)); } } else { if (!defined($yiaddr) || $yiaddr eq '' || $yiaddr eq '0.0.0.0' ) { $self->{output}->output_add(severity => 'CRITICAL', short_msg => sprintf("No free lease from %s server", $siaddr)); } } } } sub result { my ($self, %options) = @_; $self->{output}->output_add(severity => 'OK', short_msg => sprintf("DHCP Server found with free lease")); if (scalar(@{$self->{discresponse}}) == 0) { $self->{output}->output_add(severity => 'CRITICAL', short_msg => sprintf("No DHCPOFFERs were received")); } elsif ($self->{unicast} == 1) { if (scalar(@{$self->{discresponse}}) != scalar(@{$self->{option_results}->{serverip}})) { $self->{output}->output_add(severity => 'CRITICAL', short_msg => sprintf("%d of %d requested servers responded", scalar(@{$self->{discresponse}}), scalar(@{$self->{option_results}->{serverip}}))); } } $self->check_results(); $self->{output}->perfdata_add(label => "time", unit => 'ms', value => sprintf('%.3f', $self->{timeelapsed})); } sub run { my ($self, %options) = @_; $self->create_socket(); $self->send_discover(); $self->get_offer(); $self->result(); $self->{output}->display(); $self->{output}->exit(); } 1; __END__ =head1 MODE Check DHCP server availability =over 8 =item B<--serverip> IP Addr of the DHCP server to query (do a unicast mode) =item B<--timeout> How much time to check dhcp responses (Default: 15 seconds) =item B<--out-first-valid> Stop after first valid dhcp response =item B<--macaddr> MAC address to use in the DHCP request =item B<--interface> Interface to to use for listening (Default: eth0) =item B<--cidr-match> Match ip addresses offered (can be used multiple times). Returns critical for each ip addresses with no match. =back =cut
s-duret/centreon-plugins
apps/protocols/dhcp/mode/connection.pm
Perl
apache-2.0
9,106
package Paws::IAM::AccessKeyLastUsed; use Moose; has LastUsedDate => (is => 'ro', isa => 'Str', required => 1); has Region => (is => 'ro', isa => 'Str', required => 1); has ServiceName => (is => 'ro', isa => 'Str', required => 1); 1; ### main pod documentation begin ### =head1 NAME Paws::IAM::AccessKeyLastUsed =head1 USAGE This class represents one of two things: =head3 Arguments in a call to a service Use the attributes of this class as arguments to methods. You shouldn't make instances of this class. Each attribute should be used as a named argument in the calls that expect this type of object. As an example, if Att1 is expected to be a Paws::IAM::AccessKeyLastUsed object: $service_obj->Method(Att1 => { LastUsedDate => $value, ..., ServiceName => $value }); =head3 Results returned from an API call Use accessors for each attribute. If Att1 is expected to be an Paws::IAM::AccessKeyLastUsed object: $result = $service_obj->Method(...); $result->Att1->LastUsedDate =head1 DESCRIPTION Contains information about the last time an AWS access key was used. This data type is used as a response element in the GetAccessKeyLastUsed action. =head1 ATTRIBUTES =head2 B<REQUIRED> LastUsedDate => Str The date and time, in ISO 8601 date-time format, when the access key was most recently used. This field is null when: =over =item * The user does not have an access key. =item * An access key exists but has never been used, at least not since IAM started tracking this information on April 22nd, 2015. =item * There is no sign-in data associated with the user =back =head2 B<REQUIRED> Region => Str The AWS region where this access key was most recently used. This field is displays "N/A" when: =over =item * The user does not have an access key. =item * An access key exists but has never been used, at least not since IAM started tracking this information on April 22nd, 2015. =item * There is no sign-in data associated with the user =back For more information about AWS regions, see Regions and Endpoints in the Amazon Web Services General Reference. =head2 B<REQUIRED> ServiceName => Str The name of the AWS service with which this access key was most recently used. This field displays "N/A" when: =over =item * The user does not have an access key. =item * An access key exists but has never been used, at least not since IAM started tracking this information on April 22nd, 2015. =item * There is no sign-in data associated with the user =back =head1 SEE ALSO This class forms part of L<Paws>, describing an object used in L<Paws::IAM> =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/IAM/AccessKeyLastUsed.pm
Perl
apache-2.0
2,801
package VMOMI::VmHealthMonitoringStateChangedEvent; use parent 'VMOMI::ClusterEvent'; use strict; use warnings; our @class_ancestors = ( 'ClusterEvent', 'Event', 'DynamicData', ); our @class_members = ( ['state', undef, 0, ], ['prevState', undef, 0, 1], ); 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/VmHealthMonitoringStateChangedEvent.pm
Perl
apache-2.0
499
package Fixtures::Integration::ProfileParameter; # # Copyright 2015 Comcast Cable Communications Management, 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. # use Moose; extends 'DBIx::Class::EasyFixture'; use namespace::autoclean; use Digest::SHA1 qw(sha1_hex); my %definition_for = ( '0-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 2, }, }, '1-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 3, }, }, '2-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 4, }, }, '3-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 5, }, }, '4-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 277, }, }, '5-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 291, }, }, '6-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 292, }, }, '7-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 293, }, }, '8-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 295, }, }, '9-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 334, }, }, '10-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 341, }, }, '11-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 380, }, }, '12-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 398, }, }, '13-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 400, }, }, '14-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 401, }, }, '15-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 402, }, }, '16-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 403, }, }, '17-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 405, }, }, '18-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 507, }, }, '19-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 509, }, }, '20-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 511, }, }, '21-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 512, }, }, '22-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 513, }, }, '23-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 514, }, }, '24-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 515, }, }, '25-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 591, }, }, '26-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 592, }, }, '27-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 593, }, }, '28-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 615, }, }, '29-8' => { new => 'ProfileParameter', using => { profile => 8, parameter => 701, }, }, '30-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 1, }, }, '31-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 2, }, }, '32-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 3, }, }, '33-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 4, }, }, '34-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 5, }, }, '35-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 276, }, }, '36-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 277, }, }, '37-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 291, }, }, '38-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 292, }, }, '39-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 293, }, }, '40-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 334, }, }, '41-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 379, }, }, '42-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 398, }, }, '43-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 400, }, }, '44-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 401, }, }, '45-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 402, }, }, '46-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 403, }, }, '47-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 404, }, }, '48-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 507, }, }, '49-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 508, }, }, '50-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 509, }, }, '51-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 510, }, }, '52-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 511, }, }, '53-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 512, }, }, '54-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 513, }, }, '55-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 514, }, }, '56-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 515, }, }, '57-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 592, }, }, '58-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 593, }, }, '59-5' => { new => 'ProfileParameter', using => { profile => 5, parameter => 702, }, }, '60-6' => { new => 'ProfileParameter', using => { profile => 6, parameter => 379, }, }, '61-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 11, }, }, '62-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 13, }, }, '63-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 14, }, }, '64-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 15, }, }, '65-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 16, }, }, '66-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 17, }, }, '67-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 18, }, }, '68-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 19, }, }, '69-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 20, }, }, '70-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 21, }, }, '71-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 22, }, }, '72-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 23, }, }, '73-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 24, }, }, '74-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 25, }, }, '75-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 26, }, }, '76-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 27, }, }, '77-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 28, }, }, '78-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 29, }, }, '79-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 30, }, }, '80-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 31, }, }, '81-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 32, }, }, '82-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 33, }, }, '83-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 34, }, }, '84-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 35, }, }, '85-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 36, }, }, '86-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 37, }, }, '87-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 38, }, }, '88-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 39, }, }, '89-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 40, }, }, '90-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 41, }, }, '91-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 42, }, }, '92-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 43, }, }, '93-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 44, }, }, '94-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 45, }, }, '95-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 46, }, }, '96-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 47, }, }, '97-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 48, }, }, '98-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 49, }, }, '99-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 50, }, }, '100-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 51, }, }, '101-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 52, }, }, '102-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 53, }, }, '103-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 54, }, }, '104-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 55, }, }, '105-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 56, }, }, '106-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 57, }, }, '107-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 58, }, }, '108-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 59, }, }, '109-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 60, }, }, '110-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 61, }, }, '111-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 62, }, }, '112-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 63, }, }, '113-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 64, }, }, '114-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 65, }, }, '115-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 66, }, }, '116-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 67, }, }, '117-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 68, }, }, '118-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 69, }, }, '119-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 70, }, }, '120-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 71, }, }, '121-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 72, }, }, '122-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 73, }, }, '123-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 74, }, }, '124-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 75, }, }, '125-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 76, }, }, '126-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 77, }, }, '127-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 78, }, }, '128-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 79, }, }, '129-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 80, }, }, '130-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 81, }, }, '131-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 82, }, }, '132-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 83, }, }, '133-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 84, }, }, '134-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 85, }, }, '135-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 86, }, }, '136-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 87, }, }, '137-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 88, }, }, '138-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 89, }, }, '139-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 90, }, }, '140-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 91, }, }, '141-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 92, }, }, '142-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 93, }, }, '143-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 94, }, }, '144-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 95, }, }, '145-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 96, }, }, '146-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 97, }, }, '147-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 98, }, }, '148-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 99, }, }, '149-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 100, }, }, '150-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 101, }, }, '151-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 102, }, }, '152-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 103, }, }, '153-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 104, }, }, '154-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 105, }, }, '155-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 106, }, }, '156-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 107, }, }, '157-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 108, }, }, '158-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 109, }, }, '159-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 110, }, }, '160-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 111, }, }, '161-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 112, }, }, '162-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 113, }, }, '163-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 114, }, }, '164-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 115, }, }, '165-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 116, }, }, '166-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 117, }, }, '167-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 118, }, }, '168-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 119, }, }, '169-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 120, }, }, '170-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 121, }, }, '171-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 122, }, }, '172-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 123, }, }, '173-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 124, }, }, '174-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 125, }, }, '175-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 126, }, }, '176-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 127, }, }, '177-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 128, }, }, '178-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 129, }, }, '179-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 130, }, }, '180-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 131, }, }, '181-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 132, }, }, '182-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 133, }, }, '183-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 134, }, }, '184-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 135, }, }, '185-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 136, }, }, '186-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 137, }, }, '187-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 138, }, }, '188-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 139, }, }, '189-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 140, }, }, '190-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 141, }, }, '191-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 142, }, }, '192-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 143, }, }, '193-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 144, }, }, '194-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 145, }, }, '195-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 146, }, }, '196-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 147, }, }, '197-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 148, }, }, '198-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 149, }, }, '199-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 150, }, }, '200-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 151, }, }, '201-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 152, }, }, '202-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 153, }, }, '203-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 154, }, }, '204-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 155, }, }, '205-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 156, }, }, '206-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 157, }, }, '207-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 158, }, }, '208-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 159, }, }, '209-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 160, }, }, '210-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 161, }, }, '211-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 162, }, }, '212-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 163, }, }, '213-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 164, }, }, '214-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 165, }, }, '215-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 166, }, }, '216-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 167, }, }, '217-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 168, }, }, '218-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 169, }, }, '219-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 170, }, }, '220-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 171, }, }, '221-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 172, }, }, '222-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 173, }, }, '223-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 174, }, }, '224-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 175, }, }, '225-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 176, }, }, '226-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 177, }, }, '227-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 178, }, }, '228-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 179, }, }, '229-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 180, }, }, '230-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 181, }, }, '231-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 182, }, }, '232-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 183, }, }, '233-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 184, }, }, '234-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 185, }, }, '235-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 186, }, }, '236-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 187, }, }, '237-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 188, }, }, '238-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 189, }, }, '239-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 190, }, }, '240-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 191, }, }, '241-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 192, }, }, '242-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 193, }, }, '243-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 194, }, }, '244-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 195, }, }, '245-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 196, }, }, '246-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 197, }, }, '247-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 198, }, }, '248-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 199, }, }, '249-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 200, }, }, '250-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 201, }, }, '251-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 202, }, }, '252-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 203, }, }, '253-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 204, }, }, '254-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 205, }, }, '255-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 206, }, }, '256-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 207, }, }, '257-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 208, }, }, '258-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 209, }, }, '259-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 210, }, }, '260-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 211, }, }, '261-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 212, }, }, '262-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 213, }, }, '263-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 214, }, }, '264-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 215, }, }, '265-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 216, }, }, '266-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 217, }, }, '267-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 218, }, }, '268-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 219, }, }, '269-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 220, }, }, '270-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 221, }, }, '271-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 222, }, }, '272-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 223, }, }, '273-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 224, }, }, '274-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 225, }, }, '275-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 226, }, }, '276-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 227, }, }, '277-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 228, }, }, '278-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 229, }, }, '279-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 230, }, }, '280-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 231, }, }, '281-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 232, }, }, '282-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 233, }, }, '283-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 234, }, }, '284-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 235, }, }, '285-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 236, }, }, '286-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 263, }, }, '287-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 264, }, }, '288-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 265, }, }, '289-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 266, }, }, '290-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 267, }, }, '291-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 268, }, }, '292-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 269, }, }, '293-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 270, }, }, '294-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 273, }, }, '295-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 295, }, }, '296-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 325, }, }, '297-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 326, }, }, '298-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 327, }, }, '299-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 328, }, }, '300-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 330, }, }, '301-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 331, }, }, '302-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 332, }, }, '321-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 360, }, }, '322-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 361, }, }, '323-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 363, }, }, '324-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 364, }, }, '325-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 366, }, }, '326-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 367, }, }, '327-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 368, }, }, '328-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 369, }, }, '329-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 370, }, }, '330-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 372, }, }, '331-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 373, }, }, '332-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 374, }, }, '333-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 375, }, }, '334-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 376, }, }, '335-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 377, }, }, '336-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 378, }, }, '337-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 380, }, }, '338-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 381, }, }, '339-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 388, }, }, '340-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 389, }, }, '341-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 393, }, }, '342-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 394, }, }, '343-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 395, }, }, '344-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 396, }, }, '345-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 397, }, }, '346-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 399, }, }, '347-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 405, }, }, '348-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 406, }, }, '349-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 407, }, }, '368-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 594, }, }, '369-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 595, }, }, '370-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 596, }, }, '371-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 597, }, }, '372-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 598, }, }, '373-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 599, }, }, '374-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 600, }, }, '375-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 601, }, }, '376-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 609, }, }, '377-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 610, }, }, '378-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 611, }, }, '379-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 612, }, }, '380-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 613, }, }, '381-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 614, }, }, '382-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 616, }, }, '383-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 618, }, }, '402-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 640, }, }, '403-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 645, }, }, '422-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 666, }, }, '423-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 689, }, }, '424-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 700, }, }, '425-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 710, }, }, '426-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 711, }, }, '427-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 715, }, }, '428-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 725, }, }, '429-16' => { new => 'ProfileParameter', using => { profile => 16, parameter => 816, }, }, '1168-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 11, }, }, '1169-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 13, }, }, '1170-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 14, }, }, '1171-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 15, }, }, '1172-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 16, }, }, '1173-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 17, }, }, '1174-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 18, }, }, '1175-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 19, }, }, '1176-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 20, }, }, '1177-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 21, }, }, '1178-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 22, }, }, '1179-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 23, }, }, '1180-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 25, }, }, '1181-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 27, }, }, '1182-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 28, }, }, '1183-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 29, }, }, '1184-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 30, }, }, '1185-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 31, }, }, '1186-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 32, }, }, '1187-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 33, }, }, '1188-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 34, }, }, '1189-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 35, }, }, '1190-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 36, }, }, '1191-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 37, }, }, '1192-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 38, }, }, '1193-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 39, }, }, '1194-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 40, }, }, '1195-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 41, }, }, '1196-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 42, }, }, '1197-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 43, }, }, '1198-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 44, }, }, '1199-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 45, }, }, '1200-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 46, }, }, '1201-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 47, }, }, '1202-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 48, }, }, '1203-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 49, }, }, '1204-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 50, }, }, '1205-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 51, }, }, '1206-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 52, }, }, '1207-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 53, }, }, '1208-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 54, }, }, '1209-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 55, }, }, '1210-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 56, }, }, '1211-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 57, }, }, '1212-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 58, }, }, '1213-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 59, }, }, '1214-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 60, }, }, '1215-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 61, }, }, '1216-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 62, }, }, '1217-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 63, }, }, '1218-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 64, }, }, '1219-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 65, }, }, '1220-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 66, }, }, '1221-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 67, }, }, '1222-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 70, }, }, '1223-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 71, }, }, '1224-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 72, }, }, '1225-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 73, }, }, '1226-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 74, }, }, '1227-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 75, }, }, '1228-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 76, }, }, '1229-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 77, }, }, '1230-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 78, }, }, '1231-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 79, }, }, '1232-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 80, }, }, '1233-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 81, }, }, '1234-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 82, }, }, '1235-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 83, }, }, '1236-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 84, }, }, '1237-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 85, }, }, '1238-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 86, }, }, '1239-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 87, }, }, '1240-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 88, }, }, '1241-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 89, }, }, '1242-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 90, }, }, '1243-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 91, }, }, '1244-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 92, }, }, '1245-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 93, }, }, '1246-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 94, }, }, '1247-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 95, }, }, '1248-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 96, }, }, '1249-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 97, }, }, '1250-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 98, }, }, '1251-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 99, }, }, '1252-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 100, }, }, '1253-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 101, }, }, '1254-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 102, }, }, '1255-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 103, }, }, '1256-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 104, }, }, '1257-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 105, }, }, '1258-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 106, }, }, '1259-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 107, }, }, '1260-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 108, }, }, '1261-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 109, }, }, '1262-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 110, }, }, '1263-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 111, }, }, '1264-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 112, }, }, '1265-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 113, }, }, '1266-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 114, }, }, '1267-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 115, }, }, '1268-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 116, }, }, '1269-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 117, }, }, '1270-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 118, }, }, '1271-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 119, }, }, '1272-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 120, }, }, '1273-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 121, }, }, '1274-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 122, }, }, '1275-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 123, }, }, '1276-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 124, }, }, '1277-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 125, }, }, '1278-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 126, }, }, '1279-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 128, }, }, '1280-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 129, }, }, '1281-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 130, }, }, '1282-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 131, }, }, '1283-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 132, }, }, '1284-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 133, }, }, '1285-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 134, }, }, '1286-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 136, }, }, '1287-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 137, }, }, '1288-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 138, }, }, '1289-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 139, }, }, '1290-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 140, }, }, '1291-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 141, }, }, '1292-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 142, }, }, '1293-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 143, }, }, '1294-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 144, }, }, '1295-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 145, }, }, '1296-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 146, }, }, '1297-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 147, }, }, '1298-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 148, }, }, '1299-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 150, }, }, '1300-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 151, }, }, '1301-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 152, }, }, '1302-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 153, }, }, '1303-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 154, }, }, '1304-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 155, }, }, '1305-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 156, }, }, '1306-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 157, }, }, '1307-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 158, }, }, '1308-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 159, }, }, '1309-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 160, }, }, '1310-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 161, }, }, '1311-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 162, }, }, '1312-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 163, }, }, '1313-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 164, }, }, '1314-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 165, }, }, '1315-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 166, }, }, '1316-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 167, }, }, '1317-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 168, }, }, '1318-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 169, }, }, '1319-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 170, }, }, '1320-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 171, }, }, '1321-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 172, }, }, '1322-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 174, }, }, '1323-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 175, }, }, '1324-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 176, }, }, '1325-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 177, }, }, '1326-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 178, }, }, '1327-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 179, }, }, '1328-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 180, }, }, '1329-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 181, }, }, '1330-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 182, }, }, '1331-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 183, }, }, '1332-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 184, }, }, '1333-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 185, }, }, '1334-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 186, }, }, '1335-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 187, }, }, '1336-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 188, }, }, '1337-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 189, }, }, '1338-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 190, }, }, '1339-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 191, }, }, '1340-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 192, }, }, '1341-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 193, }, }, '1342-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 194, }, }, '1343-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 195, }, }, '1344-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 196, }, }, '1345-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 197, }, }, '1346-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 198, }, }, '1347-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 199, }, }, '1348-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 200, }, }, '1349-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 201, }, }, '1350-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 202, }, }, '1351-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 203, }, }, '1352-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 204, }, }, '1353-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 205, }, }, '1354-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 206, }, }, '1355-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 207, }, }, '1356-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 208, }, }, '1357-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 209, }, }, '1358-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 210, }, }, '1359-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 211, }, }, '1360-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 212, }, }, '1361-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 213, }, }, '1362-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 214, }, }, '1363-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 215, }, }, '1364-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 216, }, }, '1365-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 217, }, }, '1366-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 218, }, }, '1367-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 219, }, }, '1368-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 220, }, }, '1369-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 221, }, }, '1370-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 222, }, }, '1371-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 223, }, }, '1372-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 224, }, }, '1373-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 225, }, }, '1374-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 226, }, }, '1375-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 227, }, }, '1376-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 228, }, }, '1377-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 229, }, }, '1378-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 230, }, }, '1379-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 231, }, }, '1380-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 232, }, }, '1381-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 233, }, }, '1382-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 234, }, }, '1383-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 235, }, }, '1384-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 236, }, }, '1385-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 263, }, }, '1386-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 264, }, }, '1387-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 265, }, }, '1388-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 266, }, }, '1389-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 267, }, }, '1390-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 268, }, }, '1391-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 269, }, }, '1392-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 270, }, }, '1393-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 273, }, }, '1394-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 295, }, }, '1395-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 325, }, }, '1396-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 326, }, }, '1397-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 327, }, }, '1398-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 328, }, }, '1399-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 330, }, }, '1400-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 331, }, }, '1401-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 332, }, }, '1420-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 360, }, }, '1421-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 363, }, }, '1422-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 364, }, }, '1423-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 366, }, }, '1424-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 367, }, }, '1425-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 368, }, }, '1426-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 369, }, }, '1427-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 374, }, }, '1428-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 375, }, }, '1429-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 376, }, }, '1430-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 377, }, }, '1431-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 378, }, }, '1432-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 380, }, }, '1433-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 381, }, }, '1434-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 388, }, }, '1435-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 389, }, }, '1436-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 393, }, }, '1437-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 394, }, }, '1438-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 395, }, }, '1439-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 396, }, }, '1440-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 397, }, }, '1441-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 399, }, }, '1442-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 405, }, }, '1443-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 406, }, }, '1444-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 407, }, }, '1463-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 594, }, }, '1464-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 609, }, }, '1465-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 610, }, }, '1466-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 611, }, }, '1467-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 612, }, }, '1468-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 613, }, }, '1469-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 614, }, }, '1470-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 616, }, }, '1471-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 618, }, }, '1490-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 640, }, }, '1491-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 645, }, }, '1510-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 666, }, }, '1511-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 668, }, }, '1512-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 670, }, }, '1513-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 671, }, }, '1514-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 678, }, }, '1515-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 679, }, }, '1516-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 680, }, }, '1517-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 681, }, }, '1518-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 682, }, }, '1519-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 683, }, }, '1520-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 684, }, }, '1521-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 685, }, }, '1522-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 688, }, }, '1523-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 689, }, }, '1524-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 690, }, }, '1525-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 691, }, }, '1526-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 692, }, }, '1527-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 693, }, }, '1528-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 694, }, }, '1529-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 695, }, }, '1530-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 696, }, }, '1531-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 697, }, }, '1532-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 698, }, }, '1533-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 699, }, }, '1534-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 703, }, }, '1535-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 704, }, }, '1536-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 705, }, }, '1537-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 706, }, }, '1538-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 707, }, }, '1539-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 708, }, }, '1540-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 709, }, }, '1541-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 710, }, }, '1542-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 711, }, }, '1543-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 715, }, }, '1544-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 725, }, }, '1545-26' => { new => 'ProfileParameter', using => { profile => 26, parameter => 816, }, }, '1546-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 1, }, }, '1547-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 11, }, }, '1548-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 13, }, }, '1549-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 14, }, }, '1550-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 15, }, }, '1551-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 16, }, }, '1552-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 17, }, }, '1553-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 18, }, }, '1554-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 19, }, }, '1555-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 20, }, }, '1556-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 21, }, }, '1557-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 22, }, }, '1558-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 23, }, }, '1559-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 24, }, }, '1560-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 25, }, }, '1561-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 26, }, }, '1562-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 27, }, }, '1563-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 28, }, }, '1564-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 29, }, }, '1565-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 30, }, }, '1566-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 31, }, }, '1567-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 32, }, }, '1568-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 33, }, }, '1569-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 34, }, }, '1570-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 35, }, }, '1571-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 36, }, }, '1572-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 37, }, }, '1573-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 38, }, }, '1574-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 39, }, }, '1575-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 40, }, }, '1576-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 41, }, }, '1577-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 42, }, }, '1578-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 43, }, }, '1579-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 44, }, }, '1580-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 45, }, }, '1581-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 46, }, }, '1582-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 47, }, }, '1583-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 48, }, }, '1584-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 49, }, }, '1585-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 50, }, }, '1586-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 51, }, }, '1587-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 52, }, }, '1588-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 53, }, }, '1589-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 54, }, }, '1590-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 55, }, }, '1591-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 56, }, }, '1592-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 57, }, }, '1593-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 58, }, }, '1594-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 59, }, }, '1595-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 60, }, }, '1596-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 61, }, }, '1597-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 62, }, }, '1598-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 63, }, }, '1599-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 64, }, }, '1600-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 65, }, }, '1601-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 66, }, }, '1602-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 67, }, }, '1603-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 68, }, }, '1604-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 69, }, }, '1605-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 70, }, }, '1606-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 71, }, }, '1607-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 72, }, }, '1608-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 73, }, }, '1609-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 74, }, }, '1610-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 75, }, }, '1611-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 76, }, }, '1612-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 77, }, }, '1613-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 78, }, }, '1614-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 79, }, }, '1615-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 80, }, }, '1616-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 81, }, }, '1617-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 82, }, }, '1618-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 83, }, }, '1619-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 84, }, }, '1620-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 85, }, }, '1621-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 86, }, }, '1622-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 87, }, }, '1623-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 88, }, }, '1624-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 89, }, }, '1625-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 90, }, }, '1626-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 91, }, }, '1627-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 92, }, }, '1628-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 93, }, }, '1629-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 94, }, }, '1630-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 95, }, }, '1631-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 96, }, }, '1632-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 97, }, }, '1633-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 98, }, }, '1634-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 99, }, }, '1635-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 100, }, }, '1636-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 101, }, }, '1637-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 102, }, }, '1638-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 103, }, }, '1639-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 104, }, }, '1640-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 105, }, }, '1641-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 106, }, }, '1642-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 107, }, }, '1643-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 108, }, }, '1644-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 109, }, }, '1645-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 110, }, }, '1646-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 111, }, }, '1647-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 112, }, }, '1648-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 113, }, }, '1649-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 114, }, }, '1650-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 115, }, }, '1651-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 116, }, }, '1652-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 117, }, }, '1653-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 118, }, }, '1654-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 119, }, }, '1655-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 120, }, }, '1656-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 121, }, }, '1657-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 122, }, }, '1658-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 123, }, }, '1659-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 124, }, }, '1660-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 125, }, }, '1661-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 126, }, }, '1662-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 127, }, }, '1663-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 128, }, }, '1664-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 129, }, }, '1665-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 130, }, }, '1666-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 131, }, }, '1667-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 132, }, }, '1668-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 133, }, }, '1669-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 134, }, }, '1670-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 135, }, }, '1671-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 136, }, }, '1672-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 137, }, }, '1673-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 138, }, }, '1674-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 139, }, }, '1675-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 140, }, }, '1676-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 141, }, }, '1677-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 142, }, }, '1678-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 143, }, }, '1679-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 144, }, }, '1680-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 145, }, }, '1681-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 146, }, }, '1682-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 147, }, }, '1683-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 148, }, }, '1684-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 149, }, }, '1685-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 150, }, }, '1686-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 151, }, }, '1687-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 152, }, }, '1688-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 153, }, }, '1689-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 154, }, }, '1690-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 155, }, }, '1691-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 156, }, }, '1692-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 157, }, }, '1693-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 158, }, }, '1694-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 159, }, }, '1695-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 160, }, }, '1696-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 161, }, }, '1697-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 162, }, }, '1698-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 163, }, }, '1699-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 164, }, }, '1700-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 165, }, }, '1701-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 166, }, }, '1702-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 167, }, }, '1703-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 168, }, }, '1704-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 169, }, }, '1705-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 170, }, }, '1706-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 171, }, }, '1707-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 172, }, }, '1708-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 173, }, }, '1709-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 174, }, }, '1710-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 175, }, }, '1711-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 176, }, }, '1712-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 177, }, }, '1713-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 178, }, }, '1714-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 179, }, }, '1715-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 180, }, }, '1716-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 181, }, }, '1717-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 182, }, }, '1718-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 183, }, }, '1719-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 184, }, }, '1720-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 185, }, }, '1721-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 186, }, }, '1722-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 187, }, }, '1723-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 188, }, }, '1724-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 189, }, }, '1725-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 190, }, }, '1726-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 191, }, }, '1727-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 192, }, }, '1728-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 193, }, }, '1729-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 194, }, }, '1730-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 195, }, }, '1731-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 196, }, }, '1732-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 197, }, }, '1733-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 198, }, }, '1734-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 199, }, }, '1735-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 200, }, }, '1736-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 201, }, }, '1737-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 202, }, }, '1738-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 203, }, }, '1739-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 204, }, }, '1740-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 205, }, }, '1741-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 206, }, }, '1742-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 207, }, }, '1743-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 208, }, }, '1744-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 209, }, }, '1745-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 210, }, }, '1746-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 211, }, }, '1747-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 212, }, }, '1748-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 213, }, }, '1749-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 214, }, }, '1750-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 215, }, }, '1751-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 216, }, }, '1752-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 217, }, }, '1753-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 218, }, }, '1754-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 219, }, }, '1755-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 220, }, }, '1756-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 221, }, }, '1757-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 222, }, }, '1758-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 223, }, }, '1759-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 224, }, }, '1760-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 225, }, }, '1761-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 226, }, }, '1762-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 227, }, }, '1763-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 228, }, }, '1764-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 229, }, }, '1765-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 230, }, }, '1766-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 231, }, }, '1767-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 232, }, }, '1768-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 233, }, }, '1769-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 234, }, }, '1770-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 235, }, }, '1771-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 236, }, }, '1772-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 263, }, }, '1773-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 264, }, }, '1774-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 265, }, }, '1775-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 266, }, }, '1776-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 267, }, }, '1777-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 268, }, }, '1778-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 269, }, }, '1779-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 270, }, }, '1780-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 273, }, }, '1781-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 325, }, }, '1782-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 326, }, }, '1783-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 327, }, }, '1784-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 328, }, }, '1785-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 330, }, }, '1786-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 331, }, }, '1787-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 332, }, }, '1788-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 360, }, }, '1789-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 361, }, }, '1790-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 363, }, }, '1791-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 364, }, }, '1792-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 366, }, }, '1793-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 367, }, }, '1794-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 368, }, }, '1795-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 369, }, }, '1796-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 370, }, }, '1797-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 372, }, }, '1798-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 373, }, }, '1799-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 374, }, }, '1800-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 375, }, }, '1801-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 376, }, }, '1802-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 377, }, }, '1803-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 378, }, }, '1804-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 379, }, }, '1805-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 381, }, }, '1806-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 388, }, }, '1807-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 389, }, }, '1808-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 393, }, }, '1809-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 394, }, }, '1810-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 395, }, }, '1811-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 396, }, }, '1812-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 397, }, }, '1813-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 399, }, }, '1814-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 404, }, }, '1815-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 406, }, }, '1816-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 551, }, }, '1817-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 552, }, }, '1818-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 553, }, }, '1819-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 554, }, }, '1820-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 555, }, }, '1821-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 556, }, }, '1822-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 557, }, }, '1823-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 558, }, }, '1824-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 559, }, }, '1825-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 560, }, }, '1826-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 561, }, }, '1827-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 562, }, }, '1828-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 563, }, }, '1829-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 564, }, }, '1830-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 565, }, }, '1831-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 566, }, }, '1832-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 567, }, }, '1833-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 568, }, }, '1834-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 594, }, }, '1835-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 595, }, }, '1836-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 596, }, }, '1837-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 597, }, }, '1838-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 598, }, }, '1839-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 599, }, }, '1840-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 600, }, }, '1841-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 601, }, }, '1842-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 609, }, }, '1843-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 610, }, }, '1844-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 611, }, }, '1845-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 612, }, }, '1846-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 613, }, }, '1847-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 614, }, }, '1848-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 616, }, }, '1849-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 618, }, }, '1850-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 640, }, }, '1851-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 645, }, }, '1852-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 666, }, }, '1853-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 689, }, }, '1854-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 700, }, }, '1855-19' => { new => 'ProfileParameter', using => { profile => 19, parameter => 725, }, }, '1856-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 1, }, }, '1857-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 11, }, }, '1858-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 13, }, }, '1859-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 14, }, }, '1860-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 15, }, }, '1861-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 16, }, }, '1862-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 17, }, }, '1863-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 18, }, }, '1864-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 19, }, }, '1865-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 20, }, }, '1866-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 21, }, }, '1867-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 22, }, }, '1868-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 23, }, }, '1869-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 25, }, }, '1870-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 27, }, }, '1871-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 28, }, }, '1872-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 29, }, }, '1873-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 30, }, }, '1874-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 31, }, }, '1875-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 32, }, }, '1876-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 33, }, }, '1877-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 34, }, }, '1878-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 35, }, }, '1879-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 36, }, }, '1880-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 37, }, }, '1881-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 38, }, }, '1882-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 39, }, }, '1883-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 40, }, }, '1884-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 41, }, }, '1885-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 42, }, }, '1886-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 43, }, }, '1887-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 44, }, }, '1888-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 45, }, }, '1889-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 46, }, }, '1890-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 47, }, }, '1891-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 48, }, }, '1892-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 49, }, }, '1893-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 50, }, }, '1894-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 51, }, }, '1895-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 52, }, }, '1896-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 53, }, }, '1897-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 54, }, }, '1898-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 55, }, }, '1899-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 56, }, }, '1900-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 57, }, }, '1901-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 58, }, }, '1902-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 59, }, }, '1903-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 60, }, }, '1904-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 61, }, }, '1905-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 62, }, }, '1906-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 63, }, }, '1907-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 64, }, }, '1908-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 65, }, }, '1909-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 66, }, }, '1910-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 67, }, }, '1911-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 70, }, }, '1912-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 71, }, }, '1913-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 72, }, }, '1914-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 73, }, }, '1915-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 74, }, }, '1916-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 75, }, }, '1917-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 76, }, }, '1918-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 77, }, }, '1919-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 78, }, }, '1920-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 79, }, }, '1921-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 80, }, }, '1922-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 81, }, }, '1923-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 82, }, }, '1924-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 83, }, }, '1925-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 84, }, }, '1926-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 85, }, }, '1927-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 86, }, }, '1928-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 87, }, }, '1929-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 88, }, }, '1930-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 89, }, }, '1931-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 90, }, }, '1932-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 91, }, }, '1933-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 92, }, }, '1934-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 93, }, }, '1935-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 94, }, }, '1936-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 95, }, }, '1937-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 96, }, }, '1938-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 97, }, }, '1939-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 98, }, }, '1940-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 99, }, }, '1941-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 100, }, }, '1942-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 101, }, }, '1943-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 102, }, }, '1944-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 103, }, }, '1945-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 104, }, }, '1946-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 105, }, }, '1947-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 106, }, }, '1948-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 107, }, }, '1949-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 108, }, }, '1950-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 109, }, }, '1951-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 110, }, }, '1952-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 111, }, }, '1953-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 112, }, }, '1954-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 113, }, }, '1955-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 114, }, }, '1956-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 115, }, }, '1957-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 116, }, }, '1958-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 117, }, }, '1959-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 118, }, }, '1960-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 119, }, }, '1961-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 120, }, }, '1962-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 121, }, }, '1963-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 122, }, }, '1964-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 123, }, }, '1965-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 124, }, }, '1966-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 125, }, }, '1967-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 126, }, }, '1968-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 128, }, }, '1969-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 129, }, }, '1970-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 130, }, }, '1971-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 131, }, }, '1972-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 132, }, }, '1973-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 133, }, }, '1974-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 134, }, }, '1975-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 136, }, }, '1976-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 137, }, }, '1977-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 138, }, }, '1978-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 139, }, }, '1979-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 140, }, }, '1980-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 141, }, }, '1981-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 142, }, }, '1982-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 143, }, }, '1983-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 144, }, }, '1984-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 145, }, }, '1985-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 146, }, }, '1986-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 147, }, }, '1987-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 148, }, }, '1988-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 150, }, }, '1989-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 151, }, }, '1990-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 152, }, }, '1991-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 153, }, }, '1992-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 154, }, }, '1993-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 155, }, }, '1994-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 156, }, }, '1995-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 157, }, }, '1996-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 158, }, }, '1997-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 159, }, }, '1998-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 160, }, }, '1999-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 161, }, }, '2000-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 162, }, }, '2001-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 163, }, }, '2002-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 164, }, }, '2003-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 165, }, }, '2004-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 166, }, }, '2005-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 167, }, }, '2006-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 168, }, }, '2007-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 169, }, }, '2008-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 170, }, }, '2009-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 171, }, }, '2010-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 172, }, }, '2011-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 174, }, }, '2012-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 175, }, }, '2013-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 176, }, }, '2014-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 177, }, }, '2015-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 178, }, }, '2016-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 179, }, }, '2017-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 180, }, }, '2018-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 181, }, }, '2019-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 182, }, }, '2020-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 183, }, }, '2021-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 184, }, }, '2022-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 185, }, }, '2023-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 186, }, }, '2024-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 187, }, }, '2025-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 188, }, }, '2026-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 189, }, }, '2027-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 190, }, }, '2028-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 191, }, }, '2029-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 192, }, }, '2030-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 193, }, }, '2031-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 194, }, }, '2032-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 195, }, }, '2033-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 196, }, }, '2034-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 197, }, }, '2035-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 198, }, }, '2036-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 199, }, }, '2037-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 200, }, }, '2038-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 201, }, }, '2039-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 202, }, }, '2040-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 203, }, }, '2041-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 204, }, }, '2042-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 205, }, }, '2043-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 206, }, }, '2044-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 207, }, }, '2045-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 208, }, }, '2046-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 209, }, }, '2047-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 210, }, }, '2048-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 211, }, }, '2049-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 212, }, }, '2050-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 213, }, }, '2051-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 214, }, }, '2052-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 215, }, }, '2053-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 216, }, }, '2054-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 217, }, }, '2055-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 218, }, }, '2056-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 219, }, }, '2057-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 220, }, }, '2058-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 221, }, }, '2059-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 222, }, }, '2060-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 223, }, }, '2061-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 224, }, }, '2062-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 225, }, }, '2063-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 226, }, }, '2064-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 227, }, }, '2065-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 228, }, }, '2066-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 229, }, }, '2067-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 230, }, }, '2068-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 231, }, }, '2069-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 232, }, }, '2070-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 233, }, }, '2071-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 234, }, }, '2072-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 235, }, }, '2073-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 236, }, }, '2074-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 263, }, }, '2075-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 264, }, }, '2076-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 265, }, }, '2077-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 266, }, }, '2078-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 267, }, }, '2079-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 268, }, }, '2080-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 269, }, }, '2081-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 270, }, }, '2082-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 273, }, }, '2083-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 325, }, }, '2084-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 326, }, }, '2085-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 327, }, }, '2086-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 328, }, }, '2087-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 330, }, }, '2088-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 331, }, }, '2089-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 332, }, }, '2090-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 360, }, }, '2091-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 363, }, }, '2092-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 364, }, }, '2093-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 366, }, }, '2094-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 367, }, }, '2095-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 368, }, }, '2096-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 369, }, }, '2097-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 374, }, }, '2098-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 375, }, }, '2099-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 376, }, }, '2100-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 377, }, }, '2101-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 378, }, }, '2102-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 379, }, }, '2103-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 381, }, }, '2104-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 388, }, }, '2105-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 389, }, }, '2106-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 393, }, }, '2107-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 394, }, }, '2108-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 395, }, }, '2109-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 396, }, }, '2110-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 397, }, }, '2111-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 399, }, }, '2112-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 404, }, }, '2113-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 406, }, }, '2114-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 551, }, }, '2115-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 552, }, }, '2116-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 553, }, }, '2117-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 554, }, }, '2118-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 555, }, }, '2119-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 556, }, }, '2120-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 557, }, }, '2121-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 558, }, }, '2122-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 559, }, }, '2123-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 560, }, }, '2124-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 561, }, }, '2125-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 562, }, }, '2126-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 563, }, }, '2127-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 564, }, }, '2128-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 565, }, }, '2129-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 566, }, }, '2130-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 567, }, }, '2131-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 568, }, }, '2132-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 594, }, }, '2133-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 609, }, }, '2134-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 610, }, }, '2135-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 611, }, }, '2136-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 612, }, }, '2137-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 613, }, }, '2138-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 614, }, }, '2139-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 616, }, }, '2140-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 618, }, }, '2141-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 640, }, }, '2142-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 645, }, }, '2143-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 666, }, }, '2144-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 668, }, }, '2145-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 670, }, }, '2146-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 671, }, }, '2147-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 678, }, }, '2148-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 679, }, }, '2149-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 680, }, }, '2150-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 681, }, }, '2151-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 682, }, }, '2152-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 683, }, }, '2153-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 684, }, }, '2154-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 685, }, }, '2155-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 688, }, }, '2156-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 689, }, }, '2157-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 690, }, }, '2158-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 691, }, }, '2159-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 692, }, }, '2160-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 693, }, }, '2161-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 694, }, }, '2162-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 695, }, }, '2163-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 696, }, }, '2164-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 697, }, }, '2165-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 698, }, }, '2166-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 699, }, }, '2167-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 703, }, }, '2168-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 704, }, }, '2169-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 705, }, }, '2170-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 706, }, }, '2171-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 707, }, }, '2172-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 708, }, }, '2173-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 709, }, }, '2174-27' => { new => 'ProfileParameter', using => { profile => 27, parameter => 725, }, }, '2175-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 1, }, }, '2176-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 11, }, }, '2177-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 13, }, }, '2178-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 14, }, }, '2179-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 15, }, }, '2180-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 16, }, }, '2181-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 17, }, }, '2182-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 18, }, }, '2183-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 19, }, }, '2184-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 20, }, }, '2185-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 21, }, }, '2186-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 22, }, }, '2187-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 23, }, }, '2188-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 25, }, }, '2189-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 27, }, }, '2190-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 28, }, }, '2191-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 29, }, }, '2192-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 30, }, }, '2193-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 31, }, }, '2194-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 32, }, }, '2195-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 33, }, }, '2196-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 34, }, }, '2197-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 36, }, }, '2198-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 37, }, }, '2199-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 38, }, }, '2200-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 39, }, }, '2201-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 40, }, }, '2202-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 41, }, }, '2203-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 42, }, }, '2204-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 43, }, }, '2205-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 44, }, }, '2206-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 45, }, }, '2207-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 46, }, }, '2208-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 47, }, }, '2209-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 48, }, }, '2210-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 49, }, }, '2211-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 50, }, }, '2212-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 51, }, }, '2213-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 52, }, }, '2214-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 53, }, }, '2215-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 54, }, }, '2216-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 55, }, }, '2217-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 56, }, }, '2218-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 57, }, }, '2219-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 58, }, }, '2220-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 59, }, }, '2221-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 60, }, }, '2222-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 61, }, }, '2223-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 62, }, }, '2224-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 63, }, }, '2225-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 64, }, }, '2226-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 65, }, }, '2227-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 66, }, }, '2228-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 67, }, }, '2229-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 70, }, }, '2230-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 71, }, }, '2231-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 72, }, }, '2232-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 73, }, }, '2233-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 74, }, }, '2234-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 75, }, }, '2235-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 76, }, }, '2236-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 77, }, }, '2237-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 78, }, }, '2238-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 79, }, }, '2239-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 80, }, }, '2240-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 81, }, }, '2241-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 82, }, }, '2242-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 83, }, }, '2243-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 84, }, }, '2244-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 85, }, }, '2245-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 86, }, }, '2246-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 87, }, }, '2247-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 88, }, }, '2248-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 89, }, }, '2249-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 90, }, }, '2250-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 91, }, }, '2251-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 92, }, }, '2252-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 93, }, }, '2253-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 94, }, }, '2254-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 95, }, }, '2255-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 96, }, }, '2256-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 97, }, }, '2257-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 98, }, }, '2258-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 99, }, }, '2259-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 100, }, }, '2260-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 101, }, }, '2261-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 102, }, }, '2262-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 103, }, }, '2263-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 104, }, }, '2264-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 105, }, }, '2265-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 106, }, }, '2266-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 107, }, }, '2267-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 108, }, }, '2268-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 109, }, }, '2269-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 110, }, }, '2270-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 111, }, }, '2271-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 112, }, }, '2272-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 113, }, }, '2273-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 114, }, }, '2274-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 115, }, }, '2275-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 116, }, }, '2276-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 117, }, }, '2277-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 118, }, }, '2278-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 119, }, }, '2279-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 120, }, }, '2280-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 121, }, }, '2281-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 122, }, }, '2282-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 123, }, }, '2283-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 124, }, }, '2284-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 125, }, }, '2285-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 126, }, }, '2286-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 129, }, }, '2287-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 130, }, }, '2288-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 131, }, }, '2289-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 132, }, }, '2290-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 133, }, }, '2291-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 134, }, }, '2292-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 136, }, }, '2293-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 137, }, }, '2294-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 138, }, }, '2295-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 139, }, }, '2296-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 140, }, }, '2297-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 141, }, }, '2298-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 142, }, }, '2299-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 143, }, }, '2300-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 144, }, }, '2301-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 145, }, }, '2302-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 146, }, }, '2303-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 147, }, }, '2304-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 148, }, }, '2305-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 150, }, }, '2306-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 151, }, }, '2307-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 152, }, }, '2308-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 153, }, }, '2309-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 154, }, }, '2310-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 155, }, }, '2311-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 156, }, }, '2312-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 157, }, }, '2313-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 158, }, }, '2314-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 159, }, }, '2315-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 160, }, }, '2316-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 161, }, }, '2317-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 162, }, }, '2318-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 163, }, }, '2319-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 164, }, }, '2320-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 165, }, }, '2321-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 166, }, }, '2322-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 167, }, }, '2323-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 168, }, }, '2324-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 169, }, }, '2325-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 170, }, }, '2326-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 171, }, }, '2327-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 172, }, }, '2328-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 174, }, }, '2329-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 175, }, }, '2330-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 176, }, }, '2331-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 177, }, }, '2332-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 178, }, }, '2333-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 179, }, }, '2334-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 180, }, }, '2335-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 181, }, }, '2336-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 182, }, }, '2337-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 183, }, }, '2338-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 184, }, }, '2339-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 185, }, }, '2340-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 186, }, }, '2341-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 187, }, }, '2342-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 188, }, }, '2343-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 189, }, }, '2344-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 190, }, }, '2345-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 191, }, }, '2346-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 192, }, }, '2347-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 193, }, }, '2348-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 194, }, }, '2349-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 195, }, }, '2350-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 196, }, }, '2351-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 197, }, }, '2352-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 198, }, }, '2353-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 200, }, }, '2354-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 203, }, }, '2355-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 204, }, }, '2356-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 205, }, }, '2357-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 208, }, }, '2358-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 210, }, }, '2359-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 211, }, }, '2360-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 213, }, }, '2361-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 215, }, }, '2362-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 217, }, }, '2363-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 218, }, }, '2364-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 219, }, }, '2365-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 220, }, }, '2366-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 221, }, }, '2367-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 222, }, }, '2368-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 223, }, }, '2369-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 224, }, }, '2370-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 225, }, }, '2371-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 226, }, }, '2372-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 227, }, }, '2373-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 228, }, }, '2374-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 229, }, }, '2375-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 230, }, }, '2376-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 231, }, }, '2377-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 232, }, }, '2378-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 233, }, }, '2379-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 234, }, }, '2380-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 235, }, }, '2381-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 236, }, }, '2382-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 263, }, }, '2383-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 264, }, }, '2384-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 265, }, }, '2385-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 266, }, }, '2386-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 267, }, }, '2387-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 268, }, }, '2388-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 269, }, }, '2389-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 270, }, }, '2390-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 273, }, }, '2391-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 325, }, }, '2392-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 326, }, }, '2393-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 327, }, }, '2394-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 328, }, }, '2395-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 330, }, }, '2396-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 331, }, }, '2397-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 332, }, }, '2398-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 360, }, }, '2399-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 363, }, }, '2400-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 364, }, }, '2401-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 366, }, }, '2402-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 367, }, }, '2403-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 368, }, }, '2404-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 369, }, }, '2405-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 374, }, }, '2406-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 375, }, }, '2407-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 376, }, }, '2408-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 377, }, }, '2409-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 378, }, }, '2410-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 379, }, }, '2411-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 381, }, }, '2412-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 388, }, }, '2413-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 389, }, }, '2414-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 393, }, }, '2415-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 394, }, }, '2416-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 395, }, }, '2417-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 396, }, }, '2418-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 397, }, }, '2419-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 399, }, }, '2420-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 404, }, }, '2421-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 406, }, }, '2422-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 551, }, }, '2423-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 552, }, }, '2424-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 553, }, }, '2425-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 554, }, }, '2426-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 555, }, }, '2427-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 556, }, }, '2428-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 557, }, }, '2429-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 558, }, }, '2430-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 559, }, }, '2431-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 560, }, }, '2432-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 561, }, }, '2433-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 562, }, }, '2434-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 563, }, }, '2435-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 564, }, }, '2436-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 565, }, }, '2437-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 566, }, }, '2438-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 567, }, }, '2439-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 568, }, }, '2440-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 594, }, }, '2441-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 609, }, }, '2442-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 610, }, }, '2443-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 611, }, }, '2444-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 612, }, }, '2445-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 613, }, }, '2446-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 614, }, }, '2447-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 616, }, }, '2448-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 618, }, }, '2449-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 640, }, }, '2450-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 645, }, }, '2451-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 666, }, }, '2452-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 668, }, }, '2453-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 670, }, }, '2454-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 671, }, }, '2455-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 678, }, }, '2456-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 679, }, }, '2457-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 680, }, }, '2458-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 681, }, }, '2459-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 682, }, }, '2460-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 683, }, }, '2461-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 684, }, }, '2462-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 685, }, }, '2463-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 688, }, }, '2464-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 689, }, }, '2465-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 690, }, }, '2466-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 691, }, }, '2467-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 692, }, }, '2468-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 693, }, }, '2469-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 694, }, }, '2470-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 695, }, }, '2471-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 696, }, }, '2472-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 697, }, }, '2473-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 698, }, }, '2474-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 699, }, }, '2475-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 703, }, }, '2476-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 704, }, }, '2477-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 705, }, }, '2478-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 706, }, }, '2479-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 707, }, }, '2480-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 708, }, }, '2481-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 709, }, }, '2482-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 716, }, }, '2483-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 725, }, }, '2484-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 728, }, }, '2485-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 796, }, }, '2486-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 797, }, }, '2487-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 798, }, }, '2488-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 799, }, }, '2489-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 800, }, }, '2490-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 801, }, }, '2491-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 802, }, }, '2492-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 803, }, }, '2493-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 804, }, }, '2494-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 805, }, }, '2495-45' => { new => 'ProfileParameter', using => { profile => 45, parameter => 808, }, }, '2496-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 11, }, }, '2497-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 14, }, }, '2498-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 15, }, }, '2499-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 16, }, }, '2500-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 17, }, }, '2501-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 18, }, }, '2502-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 19, }, }, '2503-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 20, }, }, '2504-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 21, }, }, '2505-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 22, }, }, '2506-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 23, }, }, '2507-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 24, }, }, '2508-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 25, }, }, '2509-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 26, }, }, '2510-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 27, }, }, '2511-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 28, }, }, '2512-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 29, }, }, '2513-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 30, }, }, '2514-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 31, }, }, '2515-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 32, }, }, '2516-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 33, }, }, '2517-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 34, }, }, '2518-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 35, }, }, '2519-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 36, }, }, '2520-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 37, }, }, '2521-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 38, }, }, '2522-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 39, }, }, '2523-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 40, }, }, '2524-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 41, }, }, '2525-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 42, }, }, '2526-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 43, }, }, '2527-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 44, }, }, '2528-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 45, }, }, '2529-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 46, }, }, '2530-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 47, }, }, '2531-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 48, }, }, '2532-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 49, }, }, '2533-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 50, }, }, '2534-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 51, }, }, '2535-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 52, }, }, '2536-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 53, }, }, '2537-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 54, }, }, '2538-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 55, }, }, '2539-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 56, }, }, '2540-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 57, }, }, '2541-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 58, }, }, '2542-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 59, }, }, '2543-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 60, }, }, '2544-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 61, }, }, '2545-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 62, }, }, '2546-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 63, }, }, '2547-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 64, }, }, '2548-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 65, }, }, '2549-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 66, }, }, '2550-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 67, }, }, '2551-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 68, }, }, '2552-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 69, }, }, '2553-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 70, }, }, '2554-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 71, }, }, '2555-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 72, }, }, '2556-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 73, }, }, '2557-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 74, }, }, '2558-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 75, }, }, '2559-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 76, }, }, '2560-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 77, }, }, '2561-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 78, }, }, '2562-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 79, }, }, '2563-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 80, }, }, '2564-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 81, }, }, '2565-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 82, }, }, '2566-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 83, }, }, '2567-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 84, }, }, '2568-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 85, }, }, '2569-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 86, }, }, '2570-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 87, }, }, '2571-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 88, }, }, '2572-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 89, }, }, '2573-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 90, }, }, '2574-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 91, }, }, '2575-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 92, }, }, '2576-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 93, }, }, '2577-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 94, }, }, '2578-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 95, }, }, '2579-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 96, }, }, '2580-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 97, }, }, '2581-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 98, }, }, '2582-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 99, }, }, '2583-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 100, }, }, '2584-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 101, }, }, '2585-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 102, }, }, '2586-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 103, }, }, '2587-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 104, }, }, '2588-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 105, }, }, '2589-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 106, }, }, '2590-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 107, }, }, '2591-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 108, }, }, '2592-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 109, }, }, '2593-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 110, }, }, '2594-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 111, }, }, '2595-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 112, }, }, '2596-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 113, }, }, '2597-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 114, }, }, '2598-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 115, }, }, '2599-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 116, }, }, '2600-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 117, }, }, '2601-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 118, }, }, '2602-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 119, }, }, '2603-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 120, }, }, '2604-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 121, }, }, '2605-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 122, }, }, '2606-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 123, }, }, '2607-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 124, }, }, '2608-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 125, }, }, '2609-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 126, }, }, '2610-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 127, }, }, '2611-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 128, }, }, '2612-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 129, }, }, '2613-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 130, }, }, '2614-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 131, }, }, '2615-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 132, }, }, '2616-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 133, }, }, '2617-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 134, }, }, '2618-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 135, }, }, '2619-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 136, }, }, '2620-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 137, }, }, '2621-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 138, }, }, '2622-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 139, }, }, '2623-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 140, }, }, '2624-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 141, }, }, '2625-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 142, }, }, '2626-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 143, }, }, '2627-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 144, }, }, '2628-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 145, }, }, '2629-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 146, }, }, '2630-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 147, }, }, '2631-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 148, }, }, '2632-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 149, }, }, '2633-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 150, }, }, '2634-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 151, }, }, '2635-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 152, }, }, '2636-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 153, }, }, '2637-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 154, }, }, '2638-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 155, }, }, '2639-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 156, }, }, '2640-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 157, }, }, '2641-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 158, }, }, '2642-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 159, }, }, '2643-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 160, }, }, '2644-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 161, }, }, '2645-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 162, }, }, '2646-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 163, }, }, '2647-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 164, }, }, '2648-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 165, }, }, '2649-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 166, }, }, '2650-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 167, }, }, '2651-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 168, }, }, '2652-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 169, }, }, '2653-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 170, }, }, '2654-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 171, }, }, '2655-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 172, }, }, '2656-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 173, }, }, '2657-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 174, }, }, '2658-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 175, }, }, '2659-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 176, }, }, '2660-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 177, }, }, '2661-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 178, }, }, '2662-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 179, }, }, '2663-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 180, }, }, '2664-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 181, }, }, '2665-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 182, }, }, '2666-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 183, }, }, '2667-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 184, }, }, '2668-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 185, }, }, '2669-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 186, }, }, '2670-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 187, }, }, '2671-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 188, }, }, '2672-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 189, }, }, '2673-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 190, }, }, '2674-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 191, }, }, '2675-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 192, }, }, '2676-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 193, }, }, '2677-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 194, }, }, '2678-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 195, }, }, '2679-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 196, }, }, '2680-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 197, }, }, '2681-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 198, }, }, '2682-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 199, }, }, '2683-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 200, }, }, '2684-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 201, }, }, '2685-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 202, }, }, '2686-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 203, }, }, '2687-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 204, }, }, '2688-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 205, }, }, '2689-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 206, }, }, '2690-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 207, }, }, '2691-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 208, }, }, '2692-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 209, }, }, '2693-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 210, }, }, '2694-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 211, }, }, '2695-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 212, }, }, '2696-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 213, }, }, '2697-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 214, }, }, '2698-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 215, }, }, '2699-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 216, }, }, '2700-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 217, }, }, '2701-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 218, }, }, '2702-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 219, }, }, '2703-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 220, }, }, '2704-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 221, }, }, '2705-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 222, }, }, '2706-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 223, }, }, '2707-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 224, }, }, '2708-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 225, }, }, '2709-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 226, }, }, '2710-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 227, }, }, '2711-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 228, }, }, '2712-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 229, }, }, '2713-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 230, }, }, '2714-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 231, }, }, '2715-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 232, }, }, '2716-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 233, }, }, '2717-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 234, }, }, '2718-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 235, }, }, '2719-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 236, }, }, '2720-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 263, }, }, '2721-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 264, }, }, '2722-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 265, }, }, '2723-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 266, }, }, '2724-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 267, }, }, '2725-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 268, }, }, '2726-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 269, }, }, '2727-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 270, }, }, '2728-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 273, }, }, '2729-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 295, }, }, '2730-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 325, }, }, '2731-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 326, }, }, '2732-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 327, }, }, '2733-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 328, }, }, '2734-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 330, }, }, '2735-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 331, }, }, '2736-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 332, }, }, '2737-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 360, }, }, '2738-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 361, }, }, '2739-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 363, }, }, '2740-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 364, }, }, '2741-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 366, }, }, '2742-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 367, }, }, '2743-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 368, }, }, '2744-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 369, }, }, '2745-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 370, }, }, '2746-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 372, }, }, '2747-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 373, }, }, '2748-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 374, }, }, '2749-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 375, }, }, '2750-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 376, }, }, '2751-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 377, }, }, '2752-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 378, }, }, '2753-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 380, }, }, '2754-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 381, }, }, '2755-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 388, }, }, '2756-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 389, }, }, '2757-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 393, }, }, '2758-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 394, }, }, '2759-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 395, }, }, '2760-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 396, }, }, '2761-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 397, }, }, '2762-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 399, }, }, '2763-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 405, }, }, '2764-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 406, }, }, '2765-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 594, }, }, '2766-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 595, }, }, '2767-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 596, }, }, '2768-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 597, }, }, '2769-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 598, }, }, '2770-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 599, }, }, '2771-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 600, }, }, '2772-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 601, }, }, '2773-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 609, }, }, '2774-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 610, }, }, '2775-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 611, }, }, '2776-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 612, }, }, '2777-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 613, }, }, '2778-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 614, }, }, '2779-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 616, }, }, '2780-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 618, }, }, '2781-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 640, }, }, '2782-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 645, }, }, '2783-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 666, }, }, '2784-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 667, }, }, '2785-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 689, }, }, '2786-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 700, }, }, '2787-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 710, }, }, '2788-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 711, }, }, '2789-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 715, }, }, '2790-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 725, }, }, '2791-23' => { new => 'ProfileParameter', using => { profile => 23, parameter => 816, }, }, '2792-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 11, }, }, '2793-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 14, }, }, '2794-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 15, }, }, '2795-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 16, }, }, '2796-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 17, }, }, '2797-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 18, }, }, '2798-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 19, }, }, '2799-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 20, }, }, '2800-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 21, }, }, '2801-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 22, }, }, '2802-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 23, }, }, '2803-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 25, }, }, '2804-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 27, }, }, '2805-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 28, }, }, '2806-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 29, }, }, '2807-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 30, }, }, '2808-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 31, }, }, '2809-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 32, }, }, '2810-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 33, }, }, '2811-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 34, }, }, '2812-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 35, }, }, '2813-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 36, }, }, '2814-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 37, }, }, '2815-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 38, }, }, '2816-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 39, }, }, '2817-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 40, }, }, '2818-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 41, }, }, '2819-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 42, }, }, '2820-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 43, }, }, '2821-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 44, }, }, '2822-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 45, }, }, '2823-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 46, }, }, '2824-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 47, }, }, '2825-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 48, }, }, '2826-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 49, }, }, '2827-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 50, }, }, '2828-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 51, }, }, '2829-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 52, }, }, '2830-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 53, }, }, '2831-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 54, }, }, '2832-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 55, }, }, '2833-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 56, }, }, '2834-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 57, }, }, '2835-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 58, }, }, '2836-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 59, }, }, '2837-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 60, }, }, '2838-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 61, }, }, '2839-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 62, }, }, '2840-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 63, }, }, '2841-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 64, }, }, '2842-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 65, }, }, '2843-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 66, }, }, '2844-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 67, }, }, '2845-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 70, }, }, '2846-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 71, }, }, '2847-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 72, }, }, '2848-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 73, }, }, '2849-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 74, }, }, '2850-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 75, }, }, '2851-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 76, }, }, '2852-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 77, }, }, '2853-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 78, }, }, '2854-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 79, }, }, '2855-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 80, }, }, '2856-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 81, }, }, '2857-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 82, }, }, '2858-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 83, }, }, '2859-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 84, }, }, '2860-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 85, }, }, '2861-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 86, }, }, '2862-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 87, }, }, '2863-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 88, }, }, '2864-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 89, }, }, '2865-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 90, }, }, '2866-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 91, }, }, '2867-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 92, }, }, '2868-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 93, }, }, '2869-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 94, }, }, '2870-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 95, }, }, '2871-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 96, }, }, '2872-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 97, }, }, '2873-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 98, }, }, '2874-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 99, }, }, '2875-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 100, }, }, '2876-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 101, }, }, '2877-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 102, }, }, '2878-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 103, }, }, '2879-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 104, }, }, '2880-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 105, }, }, '2881-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 106, }, }, '2882-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 107, }, }, '2883-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 108, }, }, '2884-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 109, }, }, '2885-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 110, }, }, '2886-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 111, }, }, '2887-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 112, }, }, '2888-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 113, }, }, '2889-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 114, }, }, '2890-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 115, }, }, '2891-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 116, }, }, '2892-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 117, }, }, '2893-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 118, }, }, '2894-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 119, }, }, '2895-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 120, }, }, '2896-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 121, }, }, '2897-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 122, }, }, '2898-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 123, }, }, '2899-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 124, }, }, '2900-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 125, }, }, '2901-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 126, }, }, '2902-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 128, }, }, '2903-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 129, }, }, '2904-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 130, }, }, '2905-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 131, }, }, '2906-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 132, }, }, '2907-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 133, }, }, '2908-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 134, }, }, '2909-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 136, }, }, '2910-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 137, }, }, '2911-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 138, }, }, '2912-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 139, }, }, '2913-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 140, }, }, '2914-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 141, }, }, '2915-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 142, }, }, '2916-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 143, }, }, '2917-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 144, }, }, '2918-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 145, }, }, '2919-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 146, }, }, '2920-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 147, }, }, '2921-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 148, }, }, '2922-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 150, }, }, '2923-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 151, }, }, '2924-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 152, }, }, '2925-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 153, }, }, '2926-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 154, }, }, '2927-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 155, }, }, '2928-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 156, }, }, '2929-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 157, }, }, '2930-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 158, }, }, '2931-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 159, }, }, '2932-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 160, }, }, '2933-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 161, }, }, '2934-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 162, }, }, '2935-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 163, }, }, '2936-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 164, }, }, '2937-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 165, }, }, '2938-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 166, }, }, '2939-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 167, }, }, '2940-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 168, }, }, '2941-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 169, }, }, '2942-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 170, }, }, '2943-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 171, }, }, '2944-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 172, }, }, '2945-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 174, }, }, '2946-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 175, }, }, '2947-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 176, }, }, '2948-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 177, }, }, '2949-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 178, }, }, '2950-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 179, }, }, '2951-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 180, }, }, '2952-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 181, }, }, '2953-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 182, }, }, '2954-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 183, }, }, '2955-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 184, }, }, '2956-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 185, }, }, '2957-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 186, }, }, '2958-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 187, }, }, '2959-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 188, }, }, '2960-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 189, }, }, '2961-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 190, }, }, '2962-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 191, }, }, '2963-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 192, }, }, '2964-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 193, }, }, '2965-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 194, }, }, '2966-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 195, }, }, '2967-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 196, }, }, '2968-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 197, }, }, '2969-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 198, }, }, '2970-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 199, }, }, '2971-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 200, }, }, '2972-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 201, }, }, '2973-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 202, }, }, '2974-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 203, }, }, '2975-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 204, }, }, '2976-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 205, }, }, '2977-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 206, }, }, '2978-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 207, }, }, '2979-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 208, }, }, '2980-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 209, }, }, '2981-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 210, }, }, '2982-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 211, }, }, '2983-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 212, }, }, '2984-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 213, }, }, '2985-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 214, }, }, '2986-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 215, }, }, '2987-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 216, }, }, '2988-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 217, }, }, '2989-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 218, }, }, '2990-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 219, }, }, '2991-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 220, }, }, '2992-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 221, }, }, '2993-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 222, }, }, '2994-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 223, }, }, '2995-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 224, }, }, '2996-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 225, }, }, '2997-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 226, }, }, '2998-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 227, }, }, '2999-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 228, }, }, '3000-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 229, }, }, '3001-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 230, }, }, '3002-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 231, }, }, '3003-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 232, }, }, '3004-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 233, }, }, '3005-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 234, }, }, '3006-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 235, }, }, '3007-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 236, }, }, '3008-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 263, }, }, '3009-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 264, }, }, '3010-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 265, }, }, '3011-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 266, }, }, '3012-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 267, }, }, '3013-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 268, }, }, '3014-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 269, }, }, '3015-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 270, }, }, '3016-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 273, }, }, '3017-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 295, }, }, '3018-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 325, }, }, '3019-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 326, }, }, '3020-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 327, }, }, '3021-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 328, }, }, '3022-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 330, }, }, '3023-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 331, }, }, '3024-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 332, }, }, '3043-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 360, }, }, '3044-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 363, }, }, '3045-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 364, }, }, '3046-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 366, }, }, '3047-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 367, }, }, '3048-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 368, }, }, '3049-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 369, }, }, '3050-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 374, }, }, '3051-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 375, }, }, '3052-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 376, }, }, '3053-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 377, }, }, '3054-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 378, }, }, '3055-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 380, }, }, '3056-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 381, }, }, '3057-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 388, }, }, '3058-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 389, }, }, '3059-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 393, }, }, '3060-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 394, }, }, '3061-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 395, }, }, '3062-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 396, }, }, '3063-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 397, }, }, '3064-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 399, }, }, '3065-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 405, }, }, '3066-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 406, }, }, '3067-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 407, }, }, '3086-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 594, }, }, '3087-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 609, }, }, '3088-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 610, }, }, '3089-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 611, }, }, '3090-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 612, }, }, '3091-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 613, }, }, '3092-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 614, }, }, '3093-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 616, }, }, '3094-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 618, }, }, '3113-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 640, }, }, '3114-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 645, }, }, '3133-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 666, }, }, '3134-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 667, }, }, '3135-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 668, }, }, '3136-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 670, }, }, '3137-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 671, }, }, '3138-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 678, }, }, '3139-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 679, }, }, '3140-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 680, }, }, '3141-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 681, }, }, '3142-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 682, }, }, '3143-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 683, }, }, '3144-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 684, }, }, '3145-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 685, }, }, '3146-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 688, }, }, '3147-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 689, }, }, '3148-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 690, }, }, '3149-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 691, }, }, '3150-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 692, }, }, '3151-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 693, }, }, '3152-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 694, }, }, '3153-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 695, }, }, '3154-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 696, }, }, '3155-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 697, }, }, '3156-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 698, }, }, '3157-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 699, }, }, '3158-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 703, }, }, '3159-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 704, }, }, '3160-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 705, }, }, '3161-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 706, }, }, '3162-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 707, }, }, '3163-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 708, }, }, '3164-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 709, }, }, '3165-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 710, }, }, '3166-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 711, }, }, '3167-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 715, }, }, '3168-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 725, }, }, '3169-37' => { new => 'ProfileParameter', using => { profile => 37, parameter => 816, }, }, '3170-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 1, }, }, '3171-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 12, }, }, '3172-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 14, }, }, '3173-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 15, }, }, '3174-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 16, }, }, '3175-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 17, }, }, '3176-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 18, }, }, '3177-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 19, }, }, '3178-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 20, }, }, '3179-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 21, }, }, '3180-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 22, }, }, '3181-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 23, }, }, '3182-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 24, }, }, '3183-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 25, }, }, '3184-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 26, }, }, '3185-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 27, }, }, '3186-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 28, }, }, '3187-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 29, }, }, '3188-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 30, }, }, '3189-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 31, }, }, '3190-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 32, }, }, '3191-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 33, }, }, '3192-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 34, }, }, '3193-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 35, }, }, '3194-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 36, }, }, '3195-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 37, }, }, '3196-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 38, }, }, '3197-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 39, }, }, '3198-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 41, }, }, '3199-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 42, }, }, '3200-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 43, }, }, '3201-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 44, }, }, '3202-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 45, }, }, '3203-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 46, }, }, '3204-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 47, }, }, '3205-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 48, }, }, '3206-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 49, }, }, '3207-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 50, }, }, '3208-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 51, }, }, '3209-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 52, }, }, '3210-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 53, }, }, '3211-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 54, }, }, '3212-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 55, }, }, '3213-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 56, }, }, '3214-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 57, }, }, '3215-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 58, }, }, '3216-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 59, }, }, '3217-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 60, }, }, '3218-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 61, }, }, '3219-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 62, }, }, '3220-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 63, }, }, '3221-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 64, }, }, '3222-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 65, }, }, '3223-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 66, }, }, '3224-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 67, }, }, '3225-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 68, }, }, '3226-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 69, }, }, '3227-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 70, }, }, '3228-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 71, }, }, '3229-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 72, }, }, '3230-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 73, }, }, '3231-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 74, }, }, '3232-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 75, }, }, '3233-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 76, }, }, '3234-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 77, }, }, '3235-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 78, }, }, '3236-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 79, }, }, '3237-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 80, }, }, '3238-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 81, }, }, '3239-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 82, }, }, '3240-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 83, }, }, '3241-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 84, }, }, '3242-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 85, }, }, '3243-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 86, }, }, '3244-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 87, }, }, '3245-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 88, }, }, '3246-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 89, }, }, '3247-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 90, }, }, '3248-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 91, }, }, '3249-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 92, }, }, '3250-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 93, }, }, '3251-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 94, }, }, '3252-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 95, }, }, '3253-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 96, }, }, '3254-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 97, }, }, '3255-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 98, }, }, '3256-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 99, }, }, '3257-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 100, }, }, '3258-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 101, }, }, '3259-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 102, }, }, '3260-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 103, }, }, '3261-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 104, }, }, '3262-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 105, }, }, '3263-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 106, }, }, '3264-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 107, }, }, '3265-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 108, }, }, '3266-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 109, }, }, '3267-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 110, }, }, '3268-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 111, }, }, '3269-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 112, }, }, '3270-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 113, }, }, '3271-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 114, }, }, '3272-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 115, }, }, '3273-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 116, }, }, '3274-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 117, }, }, '3275-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 118, }, }, '3276-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 119, }, }, '3277-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 120, }, }, '3278-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 121, }, }, '3279-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 122, }, }, '3280-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 123, }, }, '3281-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 124, }, }, '3282-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 125, }, }, '3283-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 126, }, }, '3284-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 127, }, }, '3285-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 128, }, }, '3286-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 129, }, }, '3287-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 130, }, }, '3288-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 131, }, }, '3289-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 132, }, }, '3290-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 133, }, }, '3291-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 134, }, }, '3292-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 135, }, }, '3293-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 136, }, }, '3294-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 137, }, }, '3295-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 138, }, }, '3296-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 139, }, }, '3297-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 140, }, }, '3298-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 141, }, }, '3299-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 142, }, }, '3300-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 143, }, }, '3301-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 144, }, }, '3302-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 145, }, }, '3303-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 146, }, }, '3304-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 147, }, }, '3305-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 148, }, }, '3306-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 149, }, }, '3307-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 150, }, }, '3308-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 151, }, }, '3309-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 152, }, }, '3310-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 153, }, }, '3311-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 154, }, }, '3312-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 155, }, }, '3313-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 156, }, }, '3314-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 157, }, }, '3315-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 158, }, }, '3316-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 159, }, }, '3317-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 160, }, }, '3318-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 161, }, }, '3319-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 162, }, }, '3320-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 163, }, }, '3321-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 164, }, }, '3322-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 165, }, }, '3323-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 166, }, }, '3324-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 167, }, }, '3325-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 168, }, }, '3326-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 169, }, }, '3327-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 170, }, }, '3328-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 171, }, }, '3329-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 172, }, }, '3330-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 173, }, }, '3331-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 174, }, }, '3332-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 175, }, }, '3333-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 176, }, }, '3334-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 177, }, }, '3335-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 178, }, }, '3336-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 179, }, }, '3337-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 180, }, }, '3338-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 181, }, }, '3339-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 182, }, }, '3340-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 183, }, }, '3341-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 184, }, }, '3342-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 185, }, }, '3343-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 186, }, }, '3344-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 187, }, }, '3345-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 188, }, }, '3346-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 189, }, }, '3347-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 190, }, }, '3348-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 191, }, }, '3349-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 192, }, }, '3350-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 193, }, }, '3351-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 194, }, }, '3352-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 195, }, }, '3353-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 196, }, }, '3354-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 197, }, }, '3355-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 198, }, }, '3356-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 199, }, }, '3357-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 200, }, }, '3358-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 201, }, }, '3359-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 202, }, }, '3360-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 203, }, }, '3361-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 204, }, }, '3362-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 205, }, }, '3363-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 206, }, }, '3364-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 207, }, }, '3365-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 208, }, }, '3366-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 209, }, }, '3367-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 210, }, }, '3368-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 211, }, }, '3369-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 212, }, }, '3370-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 213, }, }, '3371-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 214, }, }, '3372-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 215, }, }, '3373-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 216, }, }, '3374-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 217, }, }, '3375-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 218, }, }, '3376-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 219, }, }, '3377-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 220, }, }, '3378-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 221, }, }, '3379-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 222, }, }, '3380-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 223, }, }, '3381-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 224, }, }, '3382-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 225, }, }, '3383-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 226, }, }, '3384-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 227, }, }, '3385-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 228, }, }, '3386-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 229, }, }, '3387-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 230, }, }, '3388-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 231, }, }, '3389-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 232, }, }, '3390-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 233, }, }, '3391-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 234, }, }, '3392-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 235, }, }, '3393-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 236, }, }, '3394-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 263, }, }, '3395-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 264, }, }, '3396-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 265, }, }, '3397-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 266, }, }, '3398-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 267, }, }, '3399-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 268, }, }, '3400-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 269, }, }, '3401-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 270, }, }, '3402-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 273, }, }, '3403-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 325, }, }, '3404-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 326, }, }, '3405-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 327, }, }, '3406-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 328, }, }, '3407-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 329, }, }, '3408-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 330, }, }, '3409-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 331, }, }, '3410-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 332, }, }, '3411-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 333, }, }, '3412-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 360, }, }, '3413-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 361, }, }, '3414-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 363, }, }, '3415-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 364, }, }, '3416-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 366, }, }, '3417-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 367, }, }, '3418-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 368, }, }, '3419-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 369, }, }, '3420-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 370, }, }, '3421-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 372, }, }, '3422-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 373, }, }, '3423-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 374, }, }, '3424-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 375, }, }, '3425-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 376, }, }, '3426-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 377, }, }, '3427-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 378, }, }, '3428-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 379, }, }, '3429-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 381, }, }, '3430-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 388, }, }, '3431-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 389, }, }, '3432-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 399, }, }, '3433-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 404, }, }, '3434-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 406, }, }, '3435-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 594, }, }, '3436-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 602, }, }, '3437-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 603, }, }, '3438-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 604, }, }, '3439-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 605, }, }, '3440-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 606, }, }, '3441-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 607, }, }, '3442-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 608, }, }, '3443-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 616, }, }, '3444-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 618, }, }, '3445-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 645, }, }, '3446-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 666, }, }, '3447-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 689, }, }, '3448-2' => { new => 'ProfileParameter', using => { profile => 2, parameter => 725, }, }, '3449-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 1, }, }, '3450-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 11, }, }, '3451-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 14, }, }, '3452-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 15, }, }, '3453-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 16, }, }, '3454-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 17, }, }, '3455-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 18, }, }, '3456-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 19, }, }, '3457-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 20, }, }, '3458-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 21, }, }, '3459-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 22, }, }, '3460-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 23, }, }, '3461-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 24, }, }, '3462-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 25, }, }, '3463-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 26, }, }, '3464-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 27, }, }, '3465-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 28, }, }, '3466-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 29, }, }, '3467-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 30, }, }, '3468-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 31, }, }, '3469-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 32, }, }, '3470-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 33, }, }, '3471-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 34, }, }, '3472-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 35, }, }, '3473-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 36, }, }, '3474-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 37, }, }, '3475-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 38, }, }, '3476-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 39, }, }, '3477-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 40, }, }, '3478-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 41, }, }, '3479-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 42, }, }, '3480-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 43, }, }, '3481-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 44, }, }, '3482-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 45, }, }, '3483-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 46, }, }, '3484-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 47, }, }, '3485-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 48, }, }, '3486-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 49, }, }, '3487-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 50, }, }, '3488-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 51, }, }, '3489-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 52, }, }, '3490-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 53, }, }, '3491-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 54, }, }, '3492-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 55, }, }, '3493-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 56, }, }, '3494-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 57, }, }, '3495-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 58, }, }, '3496-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 59, }, }, '3497-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 60, }, }, '3498-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 61, }, }, '3499-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 62, }, }, '3500-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 63, }, }, '3501-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 64, }, }, '3502-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 65, }, }, '3503-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 66, }, }, '3504-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 67, }, }, '3505-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 68, }, }, '3506-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 69, }, }, '3507-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 70, }, }, '3508-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 71, }, }, '3509-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 72, }, }, '3510-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 73, }, }, '3511-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 74, }, }, '3512-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 75, }, }, '3513-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 76, }, }, '3514-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 77, }, }, '3515-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 78, }, }, '3516-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 79, }, }, '3517-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 80, }, }, '3518-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 81, }, }, '3519-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 82, }, }, '3520-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 83, }, }, '3521-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 84, }, }, '3522-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 85, }, }, '3523-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 86, }, }, '3524-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 87, }, }, '3525-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 88, }, }, '3526-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 89, }, }, '3527-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 90, }, }, '3528-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 91, }, }, '3529-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 92, }, }, '3530-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 93, }, }, '3531-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 94, }, }, '3532-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 95, }, }, '3533-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 96, }, }, '3534-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 97, }, }, '3535-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 98, }, }, '3536-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 99, }, }, '3537-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 100, }, }, '3538-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 101, }, }, '3539-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 102, }, }, '3540-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 103, }, }, '3541-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 104, }, }, '3542-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 105, }, }, '3543-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 106, }, }, '3544-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 107, }, }, '3545-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 108, }, }, '3546-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 109, }, }, '3547-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 110, }, }, '3548-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 111, }, }, '3549-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 112, }, }, '3550-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 113, }, }, '3551-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 114, }, }, '3552-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 115, }, }, '3553-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 116, }, }, '3554-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 117, }, }, '3555-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 118, }, }, '3556-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 119, }, }, '3557-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 120, }, }, '3558-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 121, }, }, '3559-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 122, }, }, '3560-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 123, }, }, '3561-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 124, }, }, '3562-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 125, }, }, '3563-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 126, }, }, '3564-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 127, }, }, '3565-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 128, }, }, '3566-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 129, }, }, '3567-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 130, }, }, '3568-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 131, }, }, '3569-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 132, }, }, '3570-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 133, }, }, '3571-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 134, }, }, '3572-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 135, }, }, '3573-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 136, }, }, '3574-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 137, }, }, '3575-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 138, }, }, '3576-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 139, }, }, '3577-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 140, }, }, '3578-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 141, }, }, '3579-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 142, }, }, '3580-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 143, }, }, '3581-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 144, }, }, '3582-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 145, }, }, '3583-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 146, }, }, '3584-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 147, }, }, '3585-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 148, }, }, '3586-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 149, }, }, '3587-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 150, }, }, '3588-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 151, }, }, '3589-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 152, }, }, '3590-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 153, }, }, '3591-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 154, }, }, '3592-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 155, }, }, '3593-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 156, }, }, '3594-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 157, }, }, '3595-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 158, }, }, '3596-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 159, }, }, '3597-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 160, }, }, '3598-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 161, }, }, '3599-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 162, }, }, '3600-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 163, }, }, '3601-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 164, }, }, '3602-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 165, }, }, '3603-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 166, }, }, '3604-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 167, }, }, '3605-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 168, }, }, '3606-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 169, }, }, '3607-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 170, }, }, '3608-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 171, }, }, '3609-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 172, }, }, '3610-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 173, }, }, '3611-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 174, }, }, '3612-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 175, }, }, '3613-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 176, }, }, '3614-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 177, }, }, '3615-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 178, }, }, '3616-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 179, }, }, '3617-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 180, }, }, '3618-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 181, }, }, '3619-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 182, }, }, '3620-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 183, }, }, '3621-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 184, }, }, '3622-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 185, }, }, '3623-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 186, }, }, '3624-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 187, }, }, '3625-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 188, }, }, '3626-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 189, }, }, '3627-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 190, }, }, '3628-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 191, }, }, '3629-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 192, }, }, '3630-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 193, }, }, '3631-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 194, }, }, '3632-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 195, }, }, '3633-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 196, }, }, '3634-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 197, }, }, '3635-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 198, }, }, '3636-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 199, }, }, '3637-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 200, }, }, '3638-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 201, }, }, '3639-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 202, }, }, '3640-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 203, }, }, '3641-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 204, }, }, '3642-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 205, }, }, '3643-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 206, }, }, '3644-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 207, }, }, '3645-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 208, }, }, '3646-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 209, }, }, '3647-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 210, }, }, '3648-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 211, }, }, '3649-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 212, }, }, '3650-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 213, }, }, '3651-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 214, }, }, '3652-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 215, }, }, '3653-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 216, }, }, '3654-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 217, }, }, '3655-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 218, }, }, '3656-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 219, }, }, '3657-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 220, }, }, '3658-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 221, }, }, '3659-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 222, }, }, '3660-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 223, }, }, '3661-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 224, }, }, '3662-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 225, }, }, '3663-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 226, }, }, '3664-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 227, }, }, '3665-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 228, }, }, '3666-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 229, }, }, '3667-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 230, }, }, '3668-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 231, }, }, '3669-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 232, }, }, '3670-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 233, }, }, '3671-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 234, }, }, '3672-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 235, }, }, '3673-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 236, }, }, '3674-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 263, }, }, '3675-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 264, }, }, '3676-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 265, }, }, '3677-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 266, }, }, '3678-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 267, }, }, '3679-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 268, }, }, '3680-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 269, }, }, '3681-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 270, }, }, '3682-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 273, }, }, '3683-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 325, }, }, '3684-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 326, }, }, '3685-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 327, }, }, '3686-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 328, }, }, '3687-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 330, }, }, '3688-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 331, }, }, '3689-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 332, }, }, '3690-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 360, }, }, '3691-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 361, }, }, '3692-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 363, }, }, '3693-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 364, }, }, '3694-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 366, }, }, '3695-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 367, }, }, '3696-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 368, }, }, '3697-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 369, }, }, '3698-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 370, }, }, '3699-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 372, }, }, '3700-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 373, }, }, '3701-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 374, }, }, '3702-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 375, }, }, '3703-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 376, }, }, '3704-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 377, }, }, '3705-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 378, }, }, '3706-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 379, }, }, '3707-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 381, }, }, '3708-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 388, }, }, '3709-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 389, }, }, '3710-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 393, }, }, '3711-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 394, }, }, '3712-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 395, }, }, '3713-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 396, }, }, '3714-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 397, }, }, '3715-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 399, }, }, '3716-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 404, }, }, '3717-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 406, }, }, '3718-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 594, }, }, '3719-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 595, }, }, '3720-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 596, }, }, '3721-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 597, }, }, '3722-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 598, }, }, '3723-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 599, }, }, '3724-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 600, }, }, '3725-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 601, }, }, '3726-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 609, }, }, '3727-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 610, }, }, '3728-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 611, }, }, '3729-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 612, }, }, '3730-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 613, }, }, '3731-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 614, }, }, '3732-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 616, }, }, '3733-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 618, }, }, '3734-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 640, }, }, '3735-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 645, }, }, '3736-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 666, }, }, '3737-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 667, }, }, '3738-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 689, }, }, '3739-21' => { new => 'ProfileParameter', using => { profile => 21, parameter => 725, }, }, '3740-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 2, }, }, '3741-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 3, }, }, '3742-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 4, }, }, '3743-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 5, }, }, '3744-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 277, }, }, '3745-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 291, }, }, '3746-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 292, }, }, '3747-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 293, }, }, '3748-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 295, }, }, '3749-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 334, }, }, '3750-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 341, }, }, '3751-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 380, }, }, '3752-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 398, }, }, '3753-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 400, }, }, '3754-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 401, }, }, '3755-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 402, }, }, '3756-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 403, }, }, '3757-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 405, }, }, '3758-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 507, }, }, '3759-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 509, }, }, '3760-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 511, }, }, '3761-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 512, }, }, '3762-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 513, }, }, '3763-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 514, }, }, '3764-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 515, }, }, '3765-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 591, }, }, '3766-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 592, }, }, '3767-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 593, }, }, '3768-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 615, }, }, '3769-47' => { new => 'ProfileParameter', using => { profile => 47, parameter => 701, }, }, '3770-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 11, }, }, '3771-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 13, }, }, '3772-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 14, }, }, '3773-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 15, }, }, '3774-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 16, }, }, '3775-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 17, }, }, '3776-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 18, }, }, '3777-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 19, }, }, '3778-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 20, }, }, '3779-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 21, }, }, '3780-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 22, }, }, '3781-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 23, }, }, '3782-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 24, }, }, '3783-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 25, }, }, '3784-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 26, }, }, '3785-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 27, }, }, '3786-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 28, }, }, '3787-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 29, }, }, '3788-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 30, }, }, '3789-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 31, }, }, '3790-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 32, }, }, '3791-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 33, }, }, '3792-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 34, }, }, '3793-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 35, }, }, '3794-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 36, }, }, '3795-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 37, }, }, '3796-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 38, }, }, '3797-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 39, }, }, '3798-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 40, }, }, '3799-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 41, }, }, '3800-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 42, }, }, '3801-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 43, }, }, '3802-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 44, }, }, '3803-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 45, }, }, '3804-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 46, }, }, '3805-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 47, }, }, '3806-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 48, }, }, '3807-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 49, }, }, '3808-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 50, }, }, '3809-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 51, }, }, '3810-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 52, }, }, '3811-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 53, }, }, '3812-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 55, }, }, '3813-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 56, }, }, '3814-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 57, }, }, '3815-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 58, }, }, '3816-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 59, }, }, '3817-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 60, }, }, '3818-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 61, }, }, '3819-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 62, }, }, '3820-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 63, }, }, '3821-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 64, }, }, '3822-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 65, }, }, '3823-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 66, }, }, '3824-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 67, }, }, '3825-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 68, }, }, '3826-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 69, }, }, '3827-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 70, }, }, '3828-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 71, }, }, '3829-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 72, }, }, '3830-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 73, }, }, '3831-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 74, }, }, '3832-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 75, }, }, '3833-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 76, }, }, '3834-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 77, }, }, '3835-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 78, }, }, '3836-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 79, }, }, '3837-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 80, }, }, '3838-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 81, }, }, '3839-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 82, }, }, '3840-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 83, }, }, '3841-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 84, }, }, '3842-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 85, }, }, '3843-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 86, }, }, '3844-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 87, }, }, '3845-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 88, }, }, '3846-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 89, }, }, '3847-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 90, }, }, '3848-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 91, }, }, '3849-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 92, }, }, '3850-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 93, }, }, '3851-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 94, }, }, '3852-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 95, }, }, '3853-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 96, }, }, '3854-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 97, }, }, '3855-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 98, }, }, '3856-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 99, }, }, '3857-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 100, }, }, '3858-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 101, }, }, '3859-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 102, }, }, '3860-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 103, }, }, '3861-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 104, }, }, '3862-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 105, }, }, '3863-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 106, }, }, '3864-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 107, }, }, '3865-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 108, }, }, '3866-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 109, }, }, '3867-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 110, }, }, '3868-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 111, }, }, '3869-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 112, }, }, '3870-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 113, }, }, '3871-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 114, }, }, '3872-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 115, }, }, '3873-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 116, }, }, '3874-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 117, }, }, '3875-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 118, }, }, '3876-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 119, }, }, '3877-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 120, }, }, '3878-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 121, }, }, '3879-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 122, }, }, '3880-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 123, }, }, '3881-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 124, }, }, '3882-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 125, }, }, '3883-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 126, }, }, '3884-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 127, }, }, '3885-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 128, }, }, '3886-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 129, }, }, '3887-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 130, }, }, '3888-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 131, }, }, '3889-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 132, }, }, '3890-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 133, }, }, '3891-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 134, }, }, '3892-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 135, }, }, '3893-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 136, }, }, '3894-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 137, }, }, '3895-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 138, }, }, '3896-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 139, }, }, '3897-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 140, }, }, '3898-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 141, }, }, '3899-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 142, }, }, '3900-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 143, }, }, '3901-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 144, }, }, '3902-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 145, }, }, '3903-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 146, }, }, '3904-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 147, }, }, '3905-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 148, }, }, '3906-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 150, }, }, '3907-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 151, }, }, '3908-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 152, }, }, '3909-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 153, }, }, '3910-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 154, }, }, '3911-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 155, }, }, '3912-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 156, }, }, '3913-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 157, }, }, '3914-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 158, }, }, '3915-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 159, }, }, '3916-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 160, }, }, '3917-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 161, }, }, '3918-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 162, }, }, '3919-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 163, }, }, '3920-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 164, }, }, '3921-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 165, }, }, '3922-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 166, }, }, '3923-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 167, }, }, '3924-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 168, }, }, '3925-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 169, }, }, '3926-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 170, }, }, '3927-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 171, }, }, '3928-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 172, }, }, '3929-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 173, }, }, '3930-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 174, }, }, '3931-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 175, }, }, '3932-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 176, }, }, '3933-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 177, }, }, '3934-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 178, }, }, '3935-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 179, }, }, '3936-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 180, }, }, '3937-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 181, }, }, '3938-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 182, }, }, '3939-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 183, }, }, '3940-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 184, }, }, '3941-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 185, }, }, '3942-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 186, }, }, '3943-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 187, }, }, '3944-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 188, }, }, '3945-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 189, }, }, '3946-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 190, }, }, '3947-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 191, }, }, '3948-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 192, }, }, '3949-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 193, }, }, '3950-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 194, }, }, '3951-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 196, }, }, '3952-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 197, }, }, '3953-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 198, }, }, '3954-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 199, }, }, '3955-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 200, }, }, '3956-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 201, }, }, '3957-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 202, }, }, '3958-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 203, }, }, '3959-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 204, }, }, '3960-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 205, }, }, '3961-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 206, }, }, '3962-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 207, }, }, '3963-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 208, }, }, '3964-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 209, }, }, '3965-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 210, }, }, '3966-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 211, }, }, '3967-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 212, }, }, '3968-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 213, }, }, '3969-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 214, }, }, '3970-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 215, }, }, '3971-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 216, }, }, '3972-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 217, }, }, '3973-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 218, }, }, '3974-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 219, }, }, '3975-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 220, }, }, '3976-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 221, }, }, '3977-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 222, }, }, '3978-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 223, }, }, '3979-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 224, }, }, '3980-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 225, }, }, '3981-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 226, }, }, '3982-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 227, }, }, '3983-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 228, }, }, '3984-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 229, }, }, '3985-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 230, }, }, '3986-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 231, }, }, '3987-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 232, }, }, '3988-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 233, }, }, '3989-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 234, }, }, '3990-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 235, }, }, '3991-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 236, }, }, '3992-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 263, }, }, '3993-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 264, }, }, '3994-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 266, }, }, '3995-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 267, }, }, '3996-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 269, }, }, '3997-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 270, }, }, '3998-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 273, }, }, '3999-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 278, }, }, '4000-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 279, }, }, '4001-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 295, }, }, '4002-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 327, }, }, '4003-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 328, }, }, '4004-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 330, }, }, '4005-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 360, }, }, '4006-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 361, }, }, '4007-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 363, }, }, '4008-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 364, }, }, '4009-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 366, }, }, '4010-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 367, }, }, '4011-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 368, }, }, '4012-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 369, }, }, '4013-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 370, }, }, '4014-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 372, }, }, '4015-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 373, }, }, '4016-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 374, }, }, '4017-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 375, }, }, '4018-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 376, }, }, '4019-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 377, }, }, '4020-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 378, }, }, '4021-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 380, }, }, '4022-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 381, }, }, '4023-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 388, }, }, '4024-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 389, }, }, '4025-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 393, }, }, '4026-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 394, }, }, '4027-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 395, }, }, '4028-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 396, }, }, '4029-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 399, }, }, '4030-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 405, }, }, '4031-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 406, }, }, '4032-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 407, }, }, '4033-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 594, }, }, '4034-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 595, }, }, '4035-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 596, }, }, '4036-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 598, }, }, '4037-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 601, }, }, '4038-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 609, }, }, '4039-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 610, }, }, '4040-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 611, }, }, '4041-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 612, }, }, '4042-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 613, }, }, '4043-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 614, }, }, '4044-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 616, }, }, '4045-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 618, }, }, '4046-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 645, }, }, '4047-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 668, }, }, '4048-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 669, }, }, '4049-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 670, }, }, '4050-20' => { new => 'ProfileParameter', using => { profile => 20, parameter => 689, }, }, '4051-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 11, }, }, '4052-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 13, }, }, '4053-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 14, }, }, '4054-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 15, }, }, '4055-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 16, }, }, '4056-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 17, }, }, '4057-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 18, }, }, '4058-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 19, }, }, '4059-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 20, }, }, '4060-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 21, }, }, '4061-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 22, }, }, '4062-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 23, }, }, '4063-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 25, }, }, '4064-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 27, }, }, '4065-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 28, }, }, '4066-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 29, }, }, '4067-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 30, }, }, '4068-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 31, }, }, '4069-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 32, }, }, '4070-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 33, }, }, '4071-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 34, }, }, '4072-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 35, }, }, '4073-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 36, }, }, '4074-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 37, }, }, '4075-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 38, }, }, '4076-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 39, }, }, '4077-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 40, }, }, '4078-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 41, }, }, '4079-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 42, }, }, '4080-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 43, }, }, '4081-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 44, }, }, '4082-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 45, }, }, '4083-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 46, }, }, '4084-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 47, }, }, '4085-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 48, }, }, '4086-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 49, }, }, '4087-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 50, }, }, '4088-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 51, }, }, '4089-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 52, }, }, '4090-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 53, }, }, '4091-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 55, }, }, '4092-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 56, }, }, '4093-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 57, }, }, '4094-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 58, }, }, '4095-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 59, }, }, '4096-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 60, }, }, '4097-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 61, }, }, '4098-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 62, }, }, '4099-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 63, }, }, '4100-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 64, }, }, '4101-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 65, }, }, '4102-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 66, }, }, '4103-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 67, }, }, '4104-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 70, }, }, '4105-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 71, }, }, '4106-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 72, }, }, '4107-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 73, }, }, '4108-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 74, }, }, '4109-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 75, }, }, '4110-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 76, }, }, '4111-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 77, }, }, '4112-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 78, }, }, '4113-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 79, }, }, '4114-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 80, }, }, '4115-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 81, }, }, '4116-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 82, }, }, '4117-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 83, }, }, '4118-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 84, }, }, '4119-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 85, }, }, '4120-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 86, }, }, '4121-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 87, }, }, '4122-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 88, }, }, '4123-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 89, }, }, '4124-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 90, }, }, '4125-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 91, }, }, '4126-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 92, }, }, '4127-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 93, }, }, '4128-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 94, }, }, '4129-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 95, }, }, '4130-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 96, }, }, '4131-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 97, }, }, '4132-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 98, }, }, '4133-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 99, }, }, '4134-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 100, }, }, '4135-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 101, }, }, '4136-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 102, }, }, '4137-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 103, }, }, '4138-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 104, }, }, '4139-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 105, }, }, '4140-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 106, }, }, '4141-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 107, }, }, '4142-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 108, }, }, '4143-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 109, }, }, '4144-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 110, }, }, '4145-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 111, }, }, '4146-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 112, }, }, '4147-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 113, }, }, '4148-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 114, }, }, '4149-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 115, }, }, '4150-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 116, }, }, '4151-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 117, }, }, '4152-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 118, }, }, '4153-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 119, }, }, '4154-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 120, }, }, '4155-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 121, }, }, '4156-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 122, }, }, '4157-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 123, }, }, '4158-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 124, }, }, '4159-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 125, }, }, '4160-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 126, }, }, '4161-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 128, }, }, '4162-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 129, }, }, '4163-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 130, }, }, '4164-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 131, }, }, '4165-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 132, }, }, '4166-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 133, }, }, '4167-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 134, }, }, '4168-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 136, }, }, '4169-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 137, }, }, '4170-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 138, }, }, '4171-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 139, }, }, '4172-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 140, }, }, '4173-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 141, }, }, '4174-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 142, }, }, '4175-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 143, }, }, '4176-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 144, }, }, '4177-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 145, }, }, '4178-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 146, }, }, '4179-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 147, }, }, '4180-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 148, }, }, '4181-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 150, }, }, '4182-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 151, }, }, '4183-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 152, }, }, '4184-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 153, }, }, '4185-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 154, }, }, '4186-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 155, }, }, '4187-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 156, }, }, '4188-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 157, }, }, '4189-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 158, }, }, '4190-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 159, }, }, '4191-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 160, }, }, '4192-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 161, }, }, '4193-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 162, }, }, '4194-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 163, }, }, '4195-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 164, }, }, '4196-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 165, }, }, '4197-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 166, }, }, '4198-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 167, }, }, '4199-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 168, }, }, '4200-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 169, }, }, '4201-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 170, }, }, '4202-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 171, }, }, '4203-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 172, }, }, '4204-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 174, }, }, '4205-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 175, }, }, '4206-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 176, }, }, '4207-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 177, }, }, '4208-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 178, }, }, '4209-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 179, }, }, '4210-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 180, }, }, '4211-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 181, }, }, '4212-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 182, }, }, '4213-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 183, }, }, '4214-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 184, }, }, '4215-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 185, }, }, '4216-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 186, }, }, '4217-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 187, }, }, '4218-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 188, }, }, '4219-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 189, }, }, '4220-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 190, }, }, '4221-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 191, }, }, '4222-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 192, }, }, '4223-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 193, }, }, '4224-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 194, }, }, '4225-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 196, }, }, '4226-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 197, }, }, '4227-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 198, }, }, '4228-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 199, }, }, '4229-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 200, }, }, '4230-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 201, }, }, '4231-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 202, }, }, '4232-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 203, }, }, '4233-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 204, }, }, '4234-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 205, }, }, '4235-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 206, }, }, '4236-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 207, }, }, '4237-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 208, }, }, '4238-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 209, }, }, '4239-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 210, }, }, '4240-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 211, }, }, '4241-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 212, }, }, '4242-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 213, }, }, '4243-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 214, }, }, '4244-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 215, }, }, '4245-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 216, }, }, '4246-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 217, }, }, '4247-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 218, }, }, '4248-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 219, }, }, '4249-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 220, }, }, '4250-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 221, }, }, '4251-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 222, }, }, '4252-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 223, }, }, '4253-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 224, }, }, '4254-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 225, }, }, '4255-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 226, }, }, '4256-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 227, }, }, '4257-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 228, }, }, '4258-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 229, }, }, '4259-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 230, }, }, '4260-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 231, }, }, '4261-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 232, }, }, '4262-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 233, }, }, '4263-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 234, }, }, '4264-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 235, }, }, '4265-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 236, }, }, '4266-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 263, }, }, '4267-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 264, }, }, '4268-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 266, }, }, '4269-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 267, }, }, '4270-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 269, }, }, '4271-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 270, }, }, '4272-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 273, }, }, '4273-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 278, }, }, '4274-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 279, }, }, '4275-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 295, }, }, '4276-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 327, }, }, '4277-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 328, }, }, '4278-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 330, }, }, '4279-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 360, }, }, '4280-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 363, }, }, '4281-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 364, }, }, '4282-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 366, }, }, '4283-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 367, }, }, '4284-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 368, }, }, '4285-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 369, }, }, '4286-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 374, }, }, '4287-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 375, }, }, '4288-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 376, }, }, '4289-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 377, }, }, '4290-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 378, }, }, '4291-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 380, }, }, '4292-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 381, }, }, '4293-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 388, }, }, '4294-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 389, }, }, '4295-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 393, }, }, '4296-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 394, }, }, '4297-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 395, }, }, '4298-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 396, }, }, '4299-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 399, }, }, '4300-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 405, }, }, '4301-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 406, }, }, '4302-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 407, }, }, '4303-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 594, }, }, '4304-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 609, }, }, '4305-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 610, }, }, '4306-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 611, }, }, '4307-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 612, }, }, '4308-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 613, }, }, '4309-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 614, }, }, '4310-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 616, }, }, '4311-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 618, }, }, '4312-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 645, }, }, '4313-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 668, }, }, '4314-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 669, }, }, '4315-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 670, }, }, '4316-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 671, }, }, '4317-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 678, }, }, '4318-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 679, }, }, '4319-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 680, }, }, '4320-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 681, }, }, '4321-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 682, }, }, '4322-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 683, }, }, '4323-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 684, }, }, '4324-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 685, }, }, '4325-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 688, }, }, '4326-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 689, }, }, '4327-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 690, }, }, '4328-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 691, }, }, '4329-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 692, }, }, '4330-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 694, }, }, '4331-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 695, }, }, '4332-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 698, }, }, '4333-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 699, }, }, '4334-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 703, }, }, '4335-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 704, }, }, '4336-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 705, }, }, '4337-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 706, }, }, '4338-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 707, }, }, '4339-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 708, }, }, '4340-30' => { new => 'ProfileParameter', using => { profile => 30, parameter => 709, }, }, '4341-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 1, }, }, '4342-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 11, }, }, '4343-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 13, }, }, '4344-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 14, }, }, '4345-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 15, }, }, '4346-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 16, }, }, '4347-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 17, }, }, '4348-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 18, }, }, '4349-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 19, }, }, '4350-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 20, }, }, '4351-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 21, }, }, '4352-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 22, }, }, '4353-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 23, }, }, '4354-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 25, }, }, '4355-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 27, }, }, '4356-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 28, }, }, '4357-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 29, }, }, '4358-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 30, }, }, '4359-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 31, }, }, '4360-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 32, }, }, '4361-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 33, }, }, '4362-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 34, }, }, '4363-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 35, }, }, '4364-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 36, }, }, '4365-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 37, }, }, '4366-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 38, }, }, '4367-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 39, }, }, '4368-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 40, }, }, '4369-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 41, }, }, '4370-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 42, }, }, '4371-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 43, }, }, '4372-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 44, }, }, '4373-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 45, }, }, '4374-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 46, }, }, '4375-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 47, }, }, '4376-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 48, }, }, '4377-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 49, }, }, '4378-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 50, }, }, '4379-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 51, }, }, '4380-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 52, }, }, '4381-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 53, }, }, '4382-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 55, }, }, '4383-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 56, }, }, '4384-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 57, }, }, '4385-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 58, }, }, '4386-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 59, }, }, '4387-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 60, }, }, '4388-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 61, }, }, '4389-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 62, }, }, '4390-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 63, }, }, '4391-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 64, }, }, '4392-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 65, }, }, '4393-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 66, }, }, '4394-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 67, }, }, '4395-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 70, }, }, '4396-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 71, }, }, '4397-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 72, }, }, '4398-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 73, }, }, '4399-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 74, }, }, '4400-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 75, }, }, '4401-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 76, }, }, '4402-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 77, }, }, '4403-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 78, }, }, '4404-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 79, }, }, '4405-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 80, }, }, '4406-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 81, }, }, '4407-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 82, }, }, '4408-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 83, }, }, '4409-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 84, }, }, '4410-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 85, }, }, '4411-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 86, }, }, '4412-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 87, }, }, '4413-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 88, }, }, '4414-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 89, }, }, '4415-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 90, }, }, '4416-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 91, }, }, '4417-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 92, }, }, '4418-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 93, }, }, '4419-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 94, }, }, '4420-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 95, }, }, '4421-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 96, }, }, '4422-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 97, }, }, '4423-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 98, }, }, '4424-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 99, }, }, '4425-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 100, }, }, '4426-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 101, }, }, '4427-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 102, }, }, '4428-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 103, }, }, '4429-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 104, }, }, '4430-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 105, }, }, '4431-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 106, }, }, '4432-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 107, }, }, '4433-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 108, }, }, '4434-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 109, }, }, '4435-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 110, }, }, '4436-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 111, }, }, '4437-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 112, }, }, '4438-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 113, }, }, '4439-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 114, }, }, '4440-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 115, }, }, '4441-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 116, }, }, '4442-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 117, }, }, '4443-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 118, }, }, '4444-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 119, }, }, '4445-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 120, }, }, '4446-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 121, }, }, '4447-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 122, }, }, '4448-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 123, }, }, '4449-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 124, }, }, '4450-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 125, }, }, '4451-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 126, }, }, '4452-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 128, }, }, '4453-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 129, }, }, '4454-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 130, }, }, '4455-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 131, }, }, '4456-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 132, }, }, '4457-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 133, }, }, '4458-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 134, }, }, '4459-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 136, }, }, '4460-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 137, }, }, '4461-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 138, }, }, '4462-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 139, }, }, '4463-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 140, }, }, '4464-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 141, }, }, '4465-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 142, }, }, '4466-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 143, }, }, '4467-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 144, }, }, '4468-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 145, }, }, '4469-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 146, }, }, '4470-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 147, }, }, '4471-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 148, }, }, '4472-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 150, }, }, '4473-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 151, }, }, '4474-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 152, }, }, '4475-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 153, }, }, '4476-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 154, }, }, '4477-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 155, }, }, '4478-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 156, }, }, '4479-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 157, }, }, '4480-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 158, }, }, '4481-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 159, }, }, '4482-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 160, }, }, '4483-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 161, }, }, '4484-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 162, }, }, '4485-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 163, }, }, '4486-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 164, }, }, '4487-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 165, }, }, '4488-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 166, }, }, '4489-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 167, }, }, '4490-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 168, }, }, '4491-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 169, }, }, '4492-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 170, }, }, '4493-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 171, }, }, '4494-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 172, }, }, '4495-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 174, }, }, '4496-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 175, }, }, '4497-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 176, }, }, '4498-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 177, }, }, '4499-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 178, }, }, '4500-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 179, }, }, '4501-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 180, }, }, '4502-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 181, }, }, '4503-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 182, }, }, '4504-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 183, }, }, '4505-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 184, }, }, '4506-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 185, }, }, '4507-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 186, }, }, '4508-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 187, }, }, '4509-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 188, }, }, '4510-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 189, }, }, '4511-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 190, }, }, '4512-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 191, }, }, '4513-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 192, }, }, '4514-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 193, }, }, '4515-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 194, }, }, '4516-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 196, }, }, '4517-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 197, }, }, '4518-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 198, }, }, '4519-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 199, }, }, '4520-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 200, }, }, '4521-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 201, }, }, '4522-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 202, }, }, '4523-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 203, }, }, '4524-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 204, }, }, '4525-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 205, }, }, '4526-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 206, }, }, '4527-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 207, }, }, '4528-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 208, }, }, '4529-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 209, }, }, '4530-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 210, }, }, '4531-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 211, }, }, '4532-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 212, }, }, '4533-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 213, }, }, '4534-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 214, }, }, '4535-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 215, }, }, '4536-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 216, }, }, '4537-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 217, }, }, '4538-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 218, }, }, '4539-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 219, }, }, '4540-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 220, }, }, '4541-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 221, }, }, '4542-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 222, }, }, '4543-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 223, }, }, '4544-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 224, }, }, '4545-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 225, }, }, '4546-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 226, }, }, '4547-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 227, }, }, '4548-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 228, }, }, '4549-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 229, }, }, '4550-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 230, }, }, '4551-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 231, }, }, '4552-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 232, }, }, '4553-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 233, }, }, '4554-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 234, }, }, '4555-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 235, }, }, '4556-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 236, }, }, '4557-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 263, }, }, '4558-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 264, }, }, '4559-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 266, }, }, '4560-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 267, }, }, '4561-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 269, }, }, '4562-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 270, }, }, '4563-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 273, }, }, '4564-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 278, }, }, '4565-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 279, }, }, '4566-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 327, }, }, '4567-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 328, }, }, '4568-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 330, }, }, '4569-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 360, }, }, '4570-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 363, }, }, '4571-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 364, }, }, '4572-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 366, }, }, '4573-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 367, }, }, '4574-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 368, }, }, '4575-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 369, }, }, '4576-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 374, }, }, '4577-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 375, }, }, '4578-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 376, }, }, '4579-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 377, }, }, '4580-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 378, }, }, '4581-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 379, }, }, '4582-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 381, }, }, '4583-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 388, }, }, '4584-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 389, }, }, '4585-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 393, }, }, '4586-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 394, }, }, '4587-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 395, }, }, '4588-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 396, }, }, '4589-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 399, }, }, '4590-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 404, }, }, '4591-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 406, }, }, '4592-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 594, }, }, '4593-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 609, }, }, '4594-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 610, }, }, '4595-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 611, }, }, '4596-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 612, }, }, '4597-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 613, }, }, '4598-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 614, }, }, '4599-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 616, }, }, '4600-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 618, }, }, '4601-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 645, }, }, '4602-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 668, }, }, '4603-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 669, }, }, '4604-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 670, }, }, '4605-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 671, }, }, '4606-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 678, }, }, '4607-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 679, }, }, '4608-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 680, }, }, '4609-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 681, }, }, '4610-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 682, }, }, '4611-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 683, }, }, '4612-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 684, }, }, '4613-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 685, }, }, '4614-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 688, }, }, '4615-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 689, }, }, '4616-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 690, }, }, '4617-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 691, }, }, '4618-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 692, }, }, '4619-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 694, }, }, '4620-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 695, }, }, '4621-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 698, }, }, '4622-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 699, }, }, '4623-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 703, }, }, '4624-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 704, }, }, '4625-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 705, }, }, '4626-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 706, }, }, '4627-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 707, }, }, '4628-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 708, }, }, '4629-31' => { new => 'ProfileParameter', using => { profile => 31, parameter => 709, }, }, '4630-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 1, }, }, '4631-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 11, }, }, '4632-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 12, }, }, '4633-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 14, }, }, '4634-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 15, }, }, '4635-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 16, }, }, '4636-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 17, }, }, '4637-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 18, }, }, '4638-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 19, }, }, '4639-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 20, }, }, '4640-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 21, }, }, '4641-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 22, }, }, '4642-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 23, }, }, '4643-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 24, }, }, '4644-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 25, }, }, '4645-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 26, }, }, '4646-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 27, }, }, '4647-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 28, }, }, '4648-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 29, }, }, '4649-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 30, }, }, '4650-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 31, }, }, '4651-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 32, }, }, '4652-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 33, }, }, '4653-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 34, }, }, '4654-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 35, }, }, '4655-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 36, }, }, '4656-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 37, }, }, '4657-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 38, }, }, '4658-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 39, }, }, '4659-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 40, }, }, '4660-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 41, }, }, '4661-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 42, }, }, '4662-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 43, }, }, '4663-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 44, }, }, '4664-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 45, }, }, '4665-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 46, }, }, '4666-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 47, }, }, '4667-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 48, }, }, '4668-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 49, }, }, '4669-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 50, }, }, '4670-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 51, }, }, '4671-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 52, }, }, '4672-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 53, }, }, '4673-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 55, }, }, '4674-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 56, }, }, '4675-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 57, }, }, '4676-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 58, }, }, '4677-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 59, }, }, '4678-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 60, }, }, '4679-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 61, }, }, '4680-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 62, }, }, '4681-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 63, }, }, '4682-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 64, }, }, '4683-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 65, }, }, '4684-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 66, }, }, '4685-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 67, }, }, '4686-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 68, }, }, '4687-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 69, }, }, '4688-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 70, }, }, '4689-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 71, }, }, '4690-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 72, }, }, '4691-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 73, }, }, '4692-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 74, }, }, '4693-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 75, }, }, '4694-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 76, }, }, '4695-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 77, }, }, '4696-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 78, }, }, '4697-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 79, }, }, '4698-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 80, }, }, '4699-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 81, }, }, '4700-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 82, }, }, '4701-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 83, }, }, '4702-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 84, }, }, '4703-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 85, }, }, '4704-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 86, }, }, '4705-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 87, }, }, '4706-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 88, }, }, '4707-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 89, }, }, '4708-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 90, }, }, '4709-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 91, }, }, '4710-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 92, }, }, '4711-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 93, }, }, '4712-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 94, }, }, '4713-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 95, }, }, '4714-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 96, }, }, '4715-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 97, }, }, '4716-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 98, }, }, '4717-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 99, }, }, '4718-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 100, }, }, '4719-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 101, }, }, '4720-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 102, }, }, '4721-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 103, }, }, '4722-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 104, }, }, '4723-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 105, }, }, '4724-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 106, }, }, '4725-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 107, }, }, '4726-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 108, }, }, '4727-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 109, }, }, '4728-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 110, }, }, '4729-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 111, }, }, '4730-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 112, }, }, '4731-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 113, }, }, '4732-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 114, }, }, '4733-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 115, }, }, '4734-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 116, }, }, '4735-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 117, }, }, '4736-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 118, }, }, '4737-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 119, }, }, '4738-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 120, }, }, '4739-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 121, }, }, '4740-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 122, }, }, '4741-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 123, }, }, '4742-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 124, }, }, '4743-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 125, }, }, '4744-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 126, }, }, '4745-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 127, }, }, '4746-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 128, }, }, '4747-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 129, }, }, '4748-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 130, }, }, '4749-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 131, }, }, '4750-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 132, }, }, '4751-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 133, }, }, '4752-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 134, }, }, '4753-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 135, }, }, '4754-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 136, }, }, '4755-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 137, }, }, '4756-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 138, }, }, '4757-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 139, }, }, '4758-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 140, }, }, '4759-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 141, }, }, '4760-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 142, }, }, '4761-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 143, }, }, '4762-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 144, }, }, '4763-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 145, }, }, '4764-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 146, }, }, '4765-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 147, }, }, '4766-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 148, }, }, '4767-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 150, }, }, '4768-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 151, }, }, '4769-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 152, }, }, '4770-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 153, }, }, '4771-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 154, }, }, '4772-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 155, }, }, '4773-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 156, }, }, '4774-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 157, }, }, '4775-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 158, }, }, '4776-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 159, }, }, '4777-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 160, }, }, '4778-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 161, }, }, '4779-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 162, }, }, '4780-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 163, }, }, '4781-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 164, }, }, '4782-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 165, }, }, '4783-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 166, }, }, '4784-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 167, }, }, '4785-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 168, }, }, '4786-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 169, }, }, '4787-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 170, }, }, '4788-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 171, }, }, '4789-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 172, }, }, '4790-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 173, }, }, '4791-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 174, }, }, '4792-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 175, }, }, '4793-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 176, }, }, '4794-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 177, }, }, '4795-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 178, }, }, '4796-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 179, }, }, '4797-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 180, }, }, '4798-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 181, }, }, '4799-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 182, }, }, '4800-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 183, }, }, '4801-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 184, }, }, '4802-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 185, }, }, '4803-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 186, }, }, '4804-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 187, }, }, '4805-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 188, }, }, '4806-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 189, }, }, '4807-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 190, }, }, '4808-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 191, }, }, '4809-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 192, }, }, '4810-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 193, }, }, '4811-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 194, }, }, '4812-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 196, }, }, '4813-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 197, }, }, '4814-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 198, }, }, '4815-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 199, }, }, '4816-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 200, }, }, '4817-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 201, }, }, '4818-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 202, }, }, '4819-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 203, }, }, '4820-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 204, }, }, '4821-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 205, }, }, '4822-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 206, }, }, '4823-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 207, }, }, '4824-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 208, }, }, '4825-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 209, }, }, '4826-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 210, }, }, '4827-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 211, }, }, '4828-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 212, }, }, '4829-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 213, }, }, '4830-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 214, }, }, '4831-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 215, }, }, '4832-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 216, }, }, '4833-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 217, }, }, '4834-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 218, }, }, '4835-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 219, }, }, '4836-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 220, }, }, '4837-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 221, }, }, '4838-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 222, }, }, '4839-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 223, }, }, '4840-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 224, }, }, '4841-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 225, }, }, '4842-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 226, }, }, '4843-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 227, }, }, '4844-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 228, }, }, '4845-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 229, }, }, '4846-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 230, }, }, '4847-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 231, }, }, '4848-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 232, }, }, '4849-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 233, }, }, '4850-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 234, }, }, '4851-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 235, }, }, '4852-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 236, }, }, '4853-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 263, }, }, '4854-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 264, }, }, '4855-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 266, }, }, '4856-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 267, }, }, '4857-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 269, }, }, '4858-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 270, }, }, '4859-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 273, }, }, '4860-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 278, }, }, '4861-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 279, }, }, '4862-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 327, }, }, '4863-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 328, }, }, '4864-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 330, }, }, '4865-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 360, }, }, '4866-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 361, }, }, '4867-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 363, }, }, '4868-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 364, }, }, '4869-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 366, }, }, '4870-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 367, }, }, '4871-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 368, }, }, '4872-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 369, }, }, '4873-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 370, }, }, '4874-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 372, }, }, '4875-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 373, }, }, '4876-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 374, }, }, '4877-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 375, }, }, '4878-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 376, }, }, '4879-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 377, }, }, '4880-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 378, }, }, '4881-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 379, }, }, '4882-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 381, }, }, '4883-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 388, }, }, '4884-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 389, }, }, '4885-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 399, }, }, '4886-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 404, }, }, '4887-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 406, }, }, '4888-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 594, }, }, '4889-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 602, }, }, '4890-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 603, }, }, '4891-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 605, }, }, '4892-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 608, }, }, '4893-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 616, }, }, '4894-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 618, }, }, '4895-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 645, }, }, '4896-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 668, }, }, '4897-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 669, }, }, '4898-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 670, }, }, '4899-4' => { new => 'ProfileParameter', using => { profile => 4, parameter => 689, }, }, '4900-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 380, }, }, '4901-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 382, }, }, '4902-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 383, }, }, '4903-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 384, }, }, '4904-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 385, }, }, '4905-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 386, }, }, '4906-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 387, }, }, '4907-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 390, }, }, '4908-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 391, }, }, '4909-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 392, }, }, '4910-12' => { new => 'ProfileParameter', using => { profile => 12, parameter => 408, }, }, '4911-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 379, }, }, '4912-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 382, }, }, '4913-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 383, }, }, '4914-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 384, }, }, '4915-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 385, }, }, '4916-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 386, }, }, '4917-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 387, }, }, '4918-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 390, }, }, '4919-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 391, }, }, '4920-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 392, }, }, '4921-11' => { new => 'ProfileParameter', using => { profile => 11, parameter => 408, }, }, '4922-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 380, }, }, '4923-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 717, }, }, '4924-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 718, }, }, '4925-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 719, }, }, '4926-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 720, }, }, '4927-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 721, }, }, '4928-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 722, }, }, '4929-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 723, }, }, '4930-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 724, }, }, '4931-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 735, }, }, '4932-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 736, }, }, '4933-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 737, }, }, '4934-34' => { new => 'ProfileParameter', using => { profile => 34, parameter => 738, }, }, 'g-502' => { new => 'ProfileParameter', using => { profile => 6, parameter => 502, }, }, 'g-504' => { new => 'ProfileParameter', using => { profile => 6, parameter => 504, }, }, 'g-505' => { new => 'ProfileParameter', using => { profile => 6, parameter => 505, }, }, 'g-506' => { new => 'ProfileParameter', using => { profile => 6, parameter => 506, }, }, 'g-726' => { new => 'ProfileParameter', using => { profile => 6, parameter => 726, }, }, 'g-817' => { new => 'ProfileParameter', using => { profile => 6, parameter =>817, }, }, 'g-818' => { new => 'ProfileParameter', using => { profile => 6, parameter => 818, }, }, ); sub name { return "ProfileParameter"; } sub get_definition { my ( $self, $name ) = @_; return $definition_for{$name}; } sub all_fixture_names { return keys %definition_for; } __PACKAGE__->meta->make_immutable; 1;
cjqian/traffic_control
traffic_ops/app/lib/Fixtures/Integration/ProfileParameter.pm
Perl
apache-2.0
370,727
#!/usr/bin/perl =pod Pubsub envelope subscriber Author: Alexander D'Archangel (darksuji) <darksuji(at)gmail(dot)com> =cut use strict; use warnings; use 5.10.0; use ZeroMQ qw/:all/; # Prepare our context and subscriber my $context = ZeroMQ::Context->new(); my $subscriber = $context->socket(ZMQ_SUB); $subscriber->connect('tcp://localhost:5563'); $subscriber->setsockopt(ZMQ_SUBSCRIBE, 'B'); while (1) { # Read envelope with address my $address = $subscriber->recv()->data; # Read message contents my $contents = $subscriber->recv()->data; say "[$address] $contents"; }
krattai/noo-ebs
docs/zeroMQ-guide2/examples/Perl/psenvsub.pl
Perl
bsd-2-clause
596
=begin html <meta> <link rel="stylesheet" type="text/css" href="sibyl.css" /> </meta> <div id="title"> The Sibyl </div> <div id="subtitle"> Another layer of security for authentication </div> <p> <div id="menubar"> <a href="index.html">Home</a> <a href="download.html">Download</a> <a href="faq.html">FAQ</a> <a href="sibyl_step_by_step.html">Details</a> <a href="technical.html">Technical</a> </div> </p> =end html =head1 The protocol of the Sibyl The communication between the login server and the Sibyl must needs be as simple as possible, as the latter is devised to perform essentially a single operation (checking whether two authentication tokens match). Hence, there is a very limited set of commands which it will respond to. The Sibyl is designed to be as silent as possible and *will not report mistakes*: if any command or communication attempt does not conform to the protocol described below, it will close the connection silently. The syntax of the commands understood by the sibyl is: "[X];nonce;param1;param2@@" where: =over =item [X] denotes either a literal '[]' or '[-]' or a digit (0 to 9) between square brackets. Each of these commands means: =over =item '[]': Perform the standard operation (check two tokens for match). =item '[-]': Send back the public decryption and signing keys. This command needs no parameters (so it is just '[-];nonce;@@') =item '[D]': (where D) is a digit. Translate the parameter (only one) from one encryption key to the encryption key with digit D. This is only needed when updating encryption keys on the Sibyl: whenever a new encryption key is generated, it *must* have the same name as the original one (say 'decrypt') with a trailing digit (f.e. 'decrypt7'). This command will ask the Sibyl to decrypt the first parameter using the key 'decrypt' and reencrypt it using the (public) key 'decrypt7.pub'. The Sibyl will (if the command runs successfully) perform the reencryption and send the new encrypted key back to the server. There is a sample script 'translate_client.pl' in the src/client directory which automates this process for shadow-type files. This is the *only* way to update the stored authentication tokens on the login server. =item '[-]': Send the public keys The Sibyl will send back the public keys as a text stream. The user will then have to save their contents according to the configuration on the server. There is a script 'get_keys.pl' in the src/client directory which sends this command to the Sibyl. =back =item The 'nonce' parameter is: For the standard operation (the '[]' case), a new nonce (sixteen hex digits). For the '[-]' and '[D]' operations, the same nonce as the Sibyl sent back. =item The parameters are: param1: In the '[]' case (ordinary operation), the stored authentication token, which *contains the SALT*. In the '[D]' case, the stored authentication token, *without* the salt. param2: Only used in the '[]' case, the authentication token as received by the login server (and publicly encrypted+base 64 encoded), as explained in the main documentation. The trailing *two* 'at' signs '@@' are required always. They indicate the end of the message. =back The commands understood by the Sibyl are: =over =item =back =begin html <div id="reminder"> <p> This security project, the <strong>Sibyl</strong>, has been invented and implemented by <a href="http://pfortuny.net">Pedro Fortuny</a> and <a href="http://rafacas.net"> Rafael Casado</a>. Keep updated. </p> <p> You can also see <a href="http://www.linkedin.com/profile/view?id=24022019">Pedro</a>'s and <a href="http://www.linkedin.com/profile/view?id=11581943">Rafa</a>'s LinkedIn profiles. </p> <p> All the documentation in this domain is published under a <a href="http://creativecommons.org/licenses/by/3.0/">Creative Commons-By Attribution licence</a>. All the code is made public subject to the <a href="http://creativecommons.org/licenses/BSD/"> BSD licence</a>. </p> </div> </div> <div id="footer"> (c) 2010 Pedro Fortuny Ayuso and Rafael Casado S&aacute;nchez. </div> =end html =cut
thesibyl/thesibyl
doc/protocol.pod
Perl
bsd-3-clause
4,292
#!%PERL% # Copyright (c) vhffs project and its contributors # 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 vhffs 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. use strict; use utf8; use lib '%VHFFS_LIB_DIR%'; use Vhffs::Robots::MailingList; my $vhffs = new Vhffs; exit 1 unless defined $vhffs; Vhffs::Robots::lock( $vhffs, 'ml' ); my $mls = Vhffs::Services::MailingList::getall( $vhffs, Vhffs::Constants::WAITING_FOR_CREATION ); foreach ( @{$mls} ) { Vhffs::Robots::MailingList::create( $_ ); } $mls = Vhffs::Services::MailingList::getall( $vhffs, Vhffs::Constants::WAITING_FOR_DELETION ); foreach ( @{$mls} ) { Vhffs::Robots::MailingList::delete( $_ ); } $mls = Vhffs::Services::MailingList::getall( $vhffs, Vhffs::Constants::WAITING_FOR_MODIFICATION ); foreach ( @{$mls} ) { Vhffs::Robots::MailingList::modify( $_ ); } Vhffs::Robots::unlock( $vhffs, 'ml' ); exit 0;
najamelan/vhffs-4.5
vhffs-robots/src/mailinglist.pl
Perl
bsd-3-clause
2,265
#!/usr/bin/perl use DynaLoader; my $pxccmd = "../../pxc --no-realpath -w=.pxc -p=../common/pxc_dynamic.profile -g -ne" . " ./test1_main.px"; system("$pxccmd") == 0 or die; my $libref = DynaLoader::dl_load_file("./test1_main.so") or die; my $symref = DynaLoader::dl_find_symbol($libref, "pxc_library_init") or die; my $initfn = DynaLoader::dl_install_xsub(undef, $symref) or die; &$initfn(); my $o = test1::hoge::new(); test1::hoge::set_x($o, 123); my $x = test1::hoge::get_x($o); test1::hoge::set_z($o, "xyz"); my $z = test1::hoge::get_z($o); print "$x $z\n"; my $pkg_test1_hoge = \%{test1::hoge::}; my $f = $pkg_test1_hoge->{get_x}; my $c = *$f{CODE}; # my $c = *{$pkg->{hoge_get_x}}{CODE}; my $x1 = &$c($o); print "$x1\n";
ahiguti/pxc
pxc/tests/skip_016_perl/pxcinv_1_2.pl
Perl
bsd-3-clause
733
% * -*- Mode: Prolog -*- */ :- module(functions, [ makefile_function/3, makefile_function/4, makefile_subst_ref/3, makefile_subst_ref/4, makefile_computed_var/3, makefile_computed_var/4, eval_var/2, eval_var/3 ]). :- use_module(library(readutil)). :- use_module(library(biomake/utils)). :- use_module(library(biomake/embed)). :- use_module(library(biomake/biomake)). makefile_function(Result) --> makefile_function(Result,v(null,null,null,[])). makefile_function(Result,V) --> lb("subst"), xchr_arg(From,V), comma, xchr_arg(To,V), comma, xchr_arg(Src,V), rb, !, { phrase(subst(From,To,Rc),Src), string_chars(Result,Rc) }. makefile_function(Result,V) --> lb("patsubst"), xchr_arg(From,V), comma, xchr_arg(To,V), comma, xlst_arg(Src,V), rb, !, { phrase(patsubst_lr(FL,FR),From), phrase(patsubst_lr(TL,TR),To), patsubst_all(FL,FR,TL,TR,Src,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("strip"), xlst_arg(L,V), rb, !, { concat_string_list_spaced(L,Result) }. makefile_function(Result,V) --> lb("findstring"), xstr_arg(S,V), comma, xlst_arg(L,V), rb, !, { findstring(S,L,Result) }. makefile_function(Result,V) --> lb("filter"), xchr_arg(P,V), comma, xlst_arg(L,V), rb, !, { phrase(patsubst_lr(PL,PR),P), filter(PL,PR,L,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("filter-out"), xchr_arg(P,V), comma, xlst_arg(L,V), rb, !, { phrase(patsubst_lr(PL,PR),P), filter_out(PL,PR,L,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("sort"), xlst_arg(L,V), rb, !, { sort(L,S), remove_dups(S,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("word"), xnum_arg(N,V), comma, xlst_arg(L,V), rb, !, { nth_element(N,L,Result) }. makefile_function(Result,V) --> lb("wordlist"), xnum_arg(S,V), comma, xnum_arg(E,V), comma, xlst_arg(L,V), rb, !, { slice(S,E,L,Sliced), concat_string_list(Sliced,Result," ") }. makefile_function(Result,V) --> lb("words"), xlst_arg(L,V), rb, !, { length(L,Result) }. makefile_function(Result,V) --> lb("firstword"), xlst_arg([Result|_],V), rb, !. makefile_function(Result,V) --> lb("lastword"), xlst_arg(L,V), rb, !, { last_element(L,Result) }. makefile_function(Result,V) --> lb("dir"), xlst_arg(Paths,V), rb, !, { maplist(file_directory_slash,Paths,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("notdir"), xlst_arg(Paths,V), rb, !, { maplist(file_base_name,Paths,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("basename"), xlst_arg(Paths,V), rb, !, { maplist(basename,Paths,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("suffix"), xlst_arg(Paths,V), rb, !, { maplist(suffix,Paths,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("addsuffix"), str_arg(Suffix), comma, xlst_arg(Prefixes,V), rb, !, { addsuffix(Suffix,Prefixes,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("addprefix"), str_arg(Prefix), comma, xlst_arg(Suffixes,V), rb, !, { addprefix(Prefix,Suffixes,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("join"), xlst_arg(Prefixes,V), comma, xlst_arg(Suffixes,V), rb, !, { maplist(string_concat,Prefixes,Suffixes,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("wildcard"), xstr_arg(W,V), rb, !, { expand_file_name(W,Rx), include(exists_file,Rx,R), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("abspath"), xstr_arg(Path,V), rb, !, { absolute_file_name(Path,Result); Result = "" }. makefile_function(Result,V) --> lb("realpath"), xstr_arg(Path,V), rb, !, { (absolute_file_name(Path,Result), (exists_file(Result); exists_directory(Result))); Result = "" }. makefile_function(Result,V) --> lb("call"), xvar_arg(UserFunc,V), opt_whitespace, call_param_list(L,V), rb, !, { V = v(V1,V2,V3,BLold), call_bindings(L,1,BLnew), append(BLold,BLnew,BL), eval_var(UserFunc,Result,v(V1,V2,V3,BL)) }. makefile_function(Result,V) --> lb("shell"), xstr_arg(Exec,V), rb, !, { shell_eval_str(Exec,Result) }. makefile_function(Result,V) --> lb("foreach"), var_arg(Var), opt_whitespace, comma, xlst_arg(List,V), comma, str_arg(Text), rb, !, { makefile_foreach(Var,List,Text,R,V), concat_string_list_spaced(R,Result) }. makefile_function(Result,V) --> lb("if"), xstr_arg(Condition,V), opt_whitespace, comma, str_arg(Then), comma, str_arg(Else), rb, !, { (Condition = ''; Condition = "") -> expand_vars(Else,Result,V); expand_vars(Then,Result,V) }. makefile_function(Result,V) --> lb("if"), xstr_arg(Condition,V), opt_whitespace, comma, str_arg(Then), rb, !, { (Condition = ''; Condition = "") -> Result = ""; expand_vars(Then,Result,V) }. makefile_function(Result,V) --> lb("or"), opt_whitespace, cond_param_list(L), rb, !, { makefile_or(L,Result,V) }. makefile_function(Result,V) --> lb("and"), opt_whitespace, cond_param_list(L), rb, !, { makefile_and(L,Result,V) }. makefile_function(Result,_V) --> lb("value"), opt_whitespace, var_arg(Var), rb, { atom_string(VarAtom,Var), global_binding(VarAtom,Result) }, !. makefile_function(Result,V) --> lb("value"), opt_whitespace, var_arg(Var), rb, !, { bindvar(Var,V,Result) }. makefile_function(Result,V) --> lb("iota"), opt_whitespace, xnum_arg(N,V), rb, !, { iota(N,L), concat_string_list_spaced(L,Result) }. makefile_function(Result,V) --> lb("iota"), opt_whitespace, xnum_arg(S,V), comma, opt_whitespace, xnum_arg(E,V), rb, !, { iota(S,E,L), concat_string_list_spaced(L,Result) }. makefile_function(Result,V) --> lb("add"), opt_whitespace, xstr_arg(Na,V), comma, opt_whitespace, xlst_arg(List,V), rb, !, { maplist(add(Na),List,ResultList), concat_string_list_spaced(ResultList,Result) }. makefile_function(Result,V) --> lb("multiply"), opt_whitespace, xstr_arg(Na,V), comma, opt_whitespace, xlst_arg(List,V), rb, !, { maplist(multiply(Na),List,ResultList), concat_string_list_spaced(ResultList,Result) }. makefile_function(Result,V) --> lb("divide"), opt_whitespace, xstr_arg(Na,V), comma, opt_whitespace, xlst_arg(List,V), rb, !, { maplist(divide(Na),List,ResultList), concat_string_list_spaced(ResultList,Result) }. makefile_function(Result,V) --> lb("bagof"), xstr_arg(Template,V), comma, xstr_arg(Goal,V), rb, !, { eval_bagof(Template,Goal,Result) }. makefile_function("",_V) --> ['('], str_arg(S), [')'], !, {format("Warning: unknown function $(~w)~n",[S])}. makefile_subst_ref(Result) --> makefile_subst_ref(Result,v(null,null,null,[])). makefile_subst_ref(Result,V) --> ['('], xvar_arg(Var,V), [':'], suffix_arg(From), ['='], suffix_arg(To), [')'], !, { eval_var(Var,Val,V), split_spaces(Val,L), maplist(substref(From,To),L,Lsub), concat_string_list_spaced(Lsub,Result) }. substref(From,To,Orig,Result) :- string_chars(Orig,C), phrase(patsubst_lr(FL,FR),['%'|From]), phrase(patsubst_lr(TL,TR),['%'|To]), patsubst(FL,FR,TL,TR,C,Rc), string_chars(Result,Rc). makefile_computed_var(Result) --> makefile_computed_var(Result,v(null,null,null,[])). makefile_computed_var(Result,V) --> ['('], xvar_arg(Var,V), [')'], !, { eval_var(Var,Result,V) }. lb(Func) --> ['('], {string_chars(Func,Cs)}, opt_whitespace, Cs, [' '], !. rb --> opt_whitespace, [')']. comma --> opt_whitespace, [',']. xlst_arg(L,V) --> xstr_arg(S,V), !, {split_spaces(S,L)}. xchr_arg(C,V) --> xstr_arg(S,V), !, {string_chars(S,C)}. xnum_arg(N,V) --> xstr_arg(S,V), !, {atom_number(S,N)}. xstr_arg(Sx,V) --> str_arg(S), !, {expand_vars(S,Sx,V)}. chr_arg(C) --> str_arg(S), !, {string_chars(S,C)}. str_arg(S) --> opt_whitespace, str_arg_outer(S). str_arg_outer(S) --> ['('], !, str_arg_inner(Si), [')'], str_arg_outer(Rest), {concat_string_list(["(",Si,")",Rest],S)}. str_arg_outer(S) --> string_from_chars(Start,"(),"), !, str_arg_outer(Rest), {string_concat(Start,Rest,S)}. str_arg_outer("") --> !. str_arg_inner(S) --> ['('], !, str_arg_inner(Si), [')'], str_arg_inner(Rest), {concat_string_list(["(",Si,")",Rest],S)}. str_arg_inner(S) --> string_from_chars(Start,"()"), !, str_arg_inner(Rest), {string_concat(Start,Rest,S)}. str_arg_inner("") --> !. xvar_arg(S,_V) --> var_arg(S). xvar_arg(S,V) --> ['$','('], !, xstr_arg(X,V), [')'], {eval_var(X,S,V)}. var_arg(S) --> opt_whitespace, makefile_var_string_from_chars(S). suffix_arg(C) --> char_list(C,['=',')',' ']). var_expr(VarName,Expr) :- concat_string_list(["$(",VarName,")"],Expr). eval_var(VarName,Val) :- var_expr(VarName,Expr), expand_vars(Expr,Val). eval_var(VarName,Val,V) :- var_expr(VarName,Expr), expand_vars(Expr,Val,V). call_param_list([],_V) --> []. call_param_list([P|Ps],V) --> comma, !, xstr_arg(P,V), call_param_list(Ps,V). call_bindings([],_,[]). call_bindings([Param|Params],Num,[NumAtom=Param|Vars]) :- atom_number(NumAtom,Num), NextNum is Num + 1, call_bindings(Params,NextNum,Vars). makefile_foreach(_,[],_,[],_). makefile_foreach(Var,[L|Ls],Text,[R|Rs],V) :- atom_string(VarAtom,Var), V = v(V1,V2,V3,BLold), append(BLold,[VarAtom=L],BL), expand_vars(Text,R,v(V1,V2,V3,BL)), makefile_foreach(Var,Ls,Text,Rs,V). cond_param_list([P|Ps]) --> str_arg(P), comma, !, cond_param_list(Ps). cond_param_list([P]) --> str_arg(P), !. makefile_or([],'',_) :- !. makefile_or([C|_],Result,V) :- expand_vars(C,Result,V), Result \= "", Result \= '', !. makefile_or([_|Cs],Result,V) :- makefile_or(Cs,Result,V). makefile_and([C],Result,V) :- expand_vars(C,Result,V), !. makefile_and([C|Cs],Result,V) :- expand_vars(C,X,V), X \= "", X \= '', !, makefile_and(Cs,Result,V). makefile_and(_,'',_). subst(Cs,Ds,Result) --> Cs, !, subst(Cs,Ds,Rest), {append(Ds,Rest,Result)}. subst(Cs,Ds,[C|Rest]) --> [C], !, subst(Cs,Ds,Rest). subst(_Cs,_Ds,[]) --> !. patsubst_all(_,_,_,_,[],[]). patsubst_all(FL,FR,TL,TR,[Src|Srest],[Dest|Drest]) :- string_chars(Src,Sc), patsubst(FL,FR,TL,TR,Sc,Dc), string_chars(Dest,Dc), !, patsubst_all(FL,FR,TL,TR,Srest,Drest). patsubst(FL,FR,TL,TR,S,D) :- phrase(patsubst_match(FL,FR,Match),S), append(TL,Match,DL), append(DL,TR,D). patsubst(_,_,_,_,S,S). patsubst_lr([],[]) --> []. patsubst_lr([C|L],R) --> [C], {C\='%'}, !, patsubst_lr(L,R). patsubst_lr([],R) --> ['%'], patsubst_lr_r(R). patsubst_lr_r([]) --> []. patsubst_lr_r([C|R]) --> [C], !, patsubst_lr_r(R). patsubst_match(L,R,Match) --> L, patsubst_match_m(R,Match). patsubst_match_m(R,[C|Match]) --> [C], patsubst_match_m(R,Match). patsubst_match_m(R,[]) --> R. findstring(S,[L|_],S) :- string_codes(S,Sc), string_codes(L,Lc), Sc = Lc, !. % this seems a bit contrived, but a straight test for string equality doesn't seem to work findstring(S,[_|L],R) :- findstring(S,L,R). findstring(_,[],""). filter(_,_,[],[]). filter(L,R,[Src|Srest],[Src|Drest]) :- string_chars(Src,Sc), phrase(patsubst_match(L,R,_),Sc), !, filter(L,R,Srest,Drest). filter(L,R,[_|Srest],Dest) :- filter(L,R,Srest,Dest). filter_out(_,_,[],[]). filter_out(L,R,[Src|Srest],Dest) :- string_chars(Src,Sc), phrase(patsubst_match(L,R,_),Sc), !, filter_out(L,R,Srest,Dest). filter_out(L,R,[Src|Srest],[Src|Drest]) :- filter_out(L,R,Srest,Drest). % remove_dups assumes list is sorted remove_dups([],[]). remove_dups([X,X|Xs],Y) :- !, remove_dups([X|Xs],Y). remove_dups([X|Xs],[X|Ys]) :- remove_dups(Xs,Ys). basename_suffix(B,S) --> string_from_chars(B," "), ['.'], string_from_chars(Srest," ."), {string_concat(".",Srest,S)}, !. basename_suffix("",S) --> ['.'], string_from_chars(Srest," ."), {string_concat(".",Srest,S)}, !. basename_suffix(B,"") --> string_from_chars(B," ."). basename(P,B) :- string_chars(P,Pc), phrase(basename_suffix(B,_),Pc). suffix(P,S) :- string_chars(P,Pc), phrase(basename_suffix(_,S),Pc). addsuffix(_,[],[]). addsuffix(S,[N|Ns],[R|Rs]) :- string_concat(N,S,R), addsuffix(S,Ns,Rs). addprefix(_,[],[]). addprefix(P,[N|Ns],[R|Rs]) :- string_concat(P,N,R), addprefix(P,Ns,Rs). iota(N,L) :- iota(1,N,L). iota(S,E,[]) :- S > E, !. iota(S,E,[S|L]) :- Snext is S + 1, iota(Snext,E,L). % these arithmetic functions are highly idiosyncratic to this module - do not re-use! multiply(Aa,Bs,C) :- atom_string(Aa,As), number_string(A,As), number_string(B,Bs), C is A * B. divide(Aa,Bs,C) :- atom_string(Aa,As), number_string(A,As), number_string(B,Bs), C is B / A. add(Aa,Bs,C) :- atom_string(Aa,As), number_string(A,As), number_string(B,Bs), C is A + B.
evoldoers/biomake
prolog/biomake/functions.pl
Perl
bsd-3-clause
12,596
#!/usr/bin/env perl # vim:ts=4:sw=4:expandtab # © 2012 Michael Stapelberg # Licensed under BSD license, see https://github.com/i3/i3/blob/next/LICENSE # # Append this line to your i3 config file: # exec_always ~/per-workspace-layout.pl # # Then, change the %layouts hash like you want your workspaces to be set up. # This script requires i3 >= v4.4 for the extended workspace event. use strict; use warnings; use AnyEvent; use AnyEvent::I3; use v5.10; use utf8; my %layouts = ( '2' => 'stacked', ); my $i3 = i3(); die "Could not connect to i3: $!" unless $i3->connect->recv(); die "Could not subscribe to the workspace event: $!" unless $i3->subscribe({ workspace => sub { my ($msg) = @_; return unless $msg->{change} eq 'focus'; die "Your version of i3 is too old. You need >= v4.4" unless exists($msg->{current}); my $ws = $msg->{current}; # If the workspace already has children, don’t change the layout. return unless scalar @{$ws->{nodes}} == 0; my $name = $ws->{name}; my $con_id = $ws->{id}; return unless exists $layouts{$name}; $i3->command(qq|[con_id="$con_id"] layout | . $layouts{$name}); }, _error => sub { my ($msg) = @_; say "AnyEvent::I3 error: $msg"; say "Exiting."; exit 1; }, })->recv->{success}; # Run forever. AnyEvent->condvar->recv
fuadsaud/houdini
stow/i3/.local/bin/i3-per-workspace-layout.pl
Perl
mit
1,500
#!perl # Copyright 2018 Jeffrey Kegler # This file is part of Marpa::R2. Marpa::R2 is free software: you can # redistribute it and/or modify it under the terms of the GNU Lesser # General Public License as published by the Free Software Foundation, # either version 3 of the License, or (at your option) any later version. # # Marpa::R2 is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser # General Public License along with Marpa::R2. If not, see # http://www.gnu.org/licenses/. # Test of Abstract Syntax Forest use 5.010001; use strict; use warnings; no warnings qw(recursion); use English qw( -no_match_vars ); use lib 'inc'; use Marpa::R2; use Data::Dumper; open my $metag_fh, q{<}, 'lib/Marpa/R2/meta/metag.bnf' or die; my $metag_source = do { local $/ = undef; <$metag_fh>; }; close $metag_fh; my $meta_grammar = Marpa::R2::Scanless::G->new( { bless_package => 'My_ASF', source => \$metag_source } ); my ( $actual_value, $actual_result ) = my_parser( $meta_grammar, \$metag_source ); say $actual_value; die if $actual_result ne 'ASF OK'; sub my_parser { my ( $grammar, $p_string ) = @_; my $slr = Marpa::R2::Scanless::R->new( { grammar => $grammar } ); if ( not defined eval { $slr->read($p_string); 1 } ) { my $abbreviated_error = $EVAL_ERROR; chomp $abbreviated_error; return 'No parse', $abbreviated_error; } ## end if ( not defined eval { $slr->read($p_string); 1 } ) my $asf = Marpa::R2::ASF->new( { slr => $slr } ); if ( not defined $asf ) { return 'No ASF', 'Input read to end but no ASF'; } # say STDERR "Rules:\n", $slr->thick_g1_grammar()->show_rules(); # say STDERR "IRLs:\n", $slr->thick_g1_grammar()->show_irls(); # say STDERR "ISYs:\n", $slr->thick_g1_grammar()->show_isys(); # say STDERR "Or-nodes:\n", $slr->thick_g1_recce()->verbose_or_nodes(); # say STDERR "And-nodes:\n", $slr->thick_g1_recce()->show_and_nodes(); # say STDERR "Bocage:\n", $slr->thick_g1_recce()->show_bocage(); my $asf_desc = show($asf); # say STDERR $asf->show_nidsets(); # say STDERR $asf->show_powersets(); return $asf_desc, 'ASF OK'; } ## end sub my_parser # GLADE_SEEN is a local -- this is to silence warnings our %GLADE_SEEN; sub form_choice { my ( $parent_choice, $sub_choice ) = @_; return $sub_choice if not defined $parent_choice; return join q{.}, $parent_choice, $sub_choice; } sub show_symches { my ( $asf, $glade_id, $parent_choice, $item_ix ) = @_; if ( $GLADE_SEEN{$glade_id} ) { return [ [0, $glade_id, "already displayed"] ]; } $GLADE_SEEN{$glade_id} = 1; my $grammar = $asf->grammar(); my @lines = (); my $symch_indent = 0; my $symch_count = $asf->glade_symch_count($glade_id); my $symch_choice = $parent_choice; if ( $symch_count > 1 ) { $item_ix //= 0; push @lines, [ 0, undef, "Symbol #$item_ix, " . $asf->glade_symbol_name($glade_id) . ", has $symch_count symches" ]; $symch_indent += 2; $symch_choice = form_choice( $parent_choice, $item_ix ); } ## end if ( $symch_count > 1 ) for ( my $symch_ix = 0; $symch_ix < $symch_count; $symch_ix++ ) { my $current_choice = $symch_count > 1 ? form_choice( $symch_choice, $symch_ix ) : $symch_choice; my $indent = $symch_indent; if ( $symch_count > 1 ) { push @lines, [ $symch_indent , undef, "Symch #$current_choice" ]; } my $rule_id = $asf->symch_rule_id( $glade_id, $symch_ix ); if ( $rule_id >= 0 ) { push @lines, [ $symch_indent, $glade_id, "Rule " . $grammar->brief_rule($rule_id) ]; for my $line ( @{ show_factorings( $asf, $glade_id, $symch_ix, $current_choice ) } ) { my ( $line_indent, @rest_of_line ) = @{$line}; push @lines, [ $line_indent + $symch_indent + 2, @rest_of_line ]; } ## end for my $line ( show_factorings( $asf, $glade_id, ...)) } ## end if ( $rule_id >= 0 ) else { my $line = show_terminal( $asf, $glade_id, $current_choice ); my ( $line_indent, @rest_of_line ) = @{$line}; push @lines, [ $line_indent + $symch_indent, @rest_of_line ]; } ## end else [ if ( $rule_id >= 0 ) ] } ## end for ( my $symch_ix = 0; $symch_ix < $symch_count; $symch_ix...) # say "show_symches = ", Data::Dumper::Dumper(\@lines); return \@lines; } ## end sub show_symches # Show all the factorings of a SYMCH sub show_factorings { my ( $asf, $glade_id, $symch_ix, $parent_choice ) = @_; my @lines; my $factoring_count = $asf->symch_factoring_count( $glade_id, $symch_ix ); for ( my $factoring_ix = 0; $factoring_ix < $factoring_count; $factoring_ix++ ) { my $indent = 0; my $current_choice = $parent_choice; if ( $factoring_count > 1 ) { $indent = 2; $current_choice = form_choice( $parent_choice, $factoring_ix ); push @lines, [ 0, undef, "Factoring #$current_choice" ]; } my $symbol_count = $asf->factoring_symbol_count( $glade_id, $symch_ix, $factoring_ix ); SYMBOL: for my $symbol_ix ( 0 .. $symbol_count - 1 ) { my $downglade_id = $asf->factor_downglade_id( $glade_id, $symch_ix, $factoring_ix, $symbol_ix ); for my $line ( @{ show_symches( $asf, $downglade_id, $current_choice, $symbol_ix ) } ) { my ( $line_indent, @rest_of_line ) = @{$line}; push @lines, [ $line_indent + $indent, @rest_of_line ]; } ## end for my $line ( show_symches( $asf, $downglade_id, ...)) } ## end SYMBOL: for my $symbol_ix ( 0 .. $symbol_count - 1 ) } ## end for ( my $factoring_ix = 0; $factoring_ix < $factoring_count...) return \@lines; } ## end sub show_factorings sub show_terminal { my ( $asf, $glade_id, $symch_ix, $parent_choice ) = @_; # There can only be one symbol in a terminal and therefore only one factoring my $current_choice = $parent_choice; my $literal = $asf->glade_literal($glade_id); my $symbol_name = $asf->glade_symbol_name($glade_id); return [0, $glade_id, qq{Symbol: $symbol_name "$literal"}]; } ## end sub show_terminal sub show { my ($asf) = @_; my $peak = $asf->peak(); local %GLADE_SEEN = (); ## no critic (Variables::ProhibitLocalVars) my $lines = show_symches( $asf, $peak ); my $next_sequenced_id = 1; # one-based my %sequenced_id = (); $sequenced_id{$_} //= $next_sequenced_id++ for grep { defined } map { $_->[1] } @{$lines}; my $text = q{}; for my $line ( @{$lines}[ 1 .. $#$lines ] ) { my ( $line_indent, $glade_id, $body ) = @{$line}; $line_indent -= 2; $text .= q{ } x $line_indent; $text .= 'GL' . $sequenced_id{$glade_id} . q{ } if defined $glade_id; $text .= "$body\n"; } return $text; } ## end sub show # vim: expandtab shiftwidth=4:
jddurand/c-marpaESLIF
3rdparty/github/marpaWrapper/3rdparty/github/Marpa--R2/cpan/meta_to_asf.pl
Perl
mit
7,644
########################################################################### # # 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::es_MX - Locale data examples for the es-MX locale. =head1 DESCRIPTION This pod file contains examples of the locale data available for the Spanish Mexico locale. =head2 Days =head3 Wide (format) lunes martes miércoles jueves viernes sábado domingo =head3 Abbreviated (format) lun. mar. mié. jue. vie. sáb. dom. =head3 Narrow (format) L M M J V S D =head3 Wide (stand-alone) lunes martes miércoles jueves viernes sábado domingo =head3 Abbreviated (stand-alone) lun. mar. mié. jue. vie. sáb. dom. =head3 Narrow (stand-alone) L M M J V S D =head2 Months =head3 Wide (format) enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre =head3 Abbreviated (format) ene feb mar abr may jun jul ago sep oct nov dic =head3 Narrow (format) e f m a m j j a s o n d =head3 Wide (stand-alone) enero febrero marzo abril mayo junio julio agosto septiembre octubre noviembre diciembre =head3 Abbreviated (stand-alone) ene. feb. mar. abr. may. jun. jul. ago. sep. oct. nov. dic. =head3 Narrow (stand-alone) E F M A M J J A S O N D =head2 Quarters =head3 Wide (format) 1er. trimestre 2º. trimestre 3er. trimestre 4º trimestre =head3 Abbreviated (format) 1er. trim. 2º. trim. 3er. trim. 4º trim. =head3 Narrow (format) 1T 2T 3T 4T =head3 Wide (stand-alone) 1er. trimestre 2º. trimestre 3er. trimestre 4º trimestre =head3 Abbreviated (stand-alone) 1er. trim. 2º. trim. 3er. trim. 4º trim. =head3 Narrow (stand-alone) 1T 2T 3T 4T =head2 Eras =head3 Wide (format) antes de Cristo después de Cristo =head3 Abbreviated (format) a. C. d. C. =head3 Narrow (format) a. C. d. C. =head2 Date Formats =head3 Full 2008-02-05T18:30:30 = martes, 5 de febrero de 2008 1995-12-22T09:05:02 = viernes, 22 de diciembre de 1995 -0010-09-15T04:44:23 = sábado, 15 de septiembre de -10 =head3 Long 2008-02-05T18:30:30 = 5 de febrero de 2008 1995-12-22T09:05:02 = 22 de diciembre de 1995 -0010-09-15T04:44:23 = 15 de septiembre de -10 =head3 Medium 2008-02-05T18:30:30 = 05/02/2008 1995-12-22T09:05:02 = 22/12/1995 -0010-09-15T04:44:23 = 15/09/-10 =head3 Short 2008-02-05T18:30:30 = 05/02/08 1995-12-22T09:05:02 = 22/12/95 -0010-09-15T04:44:23 = 15/09/-10 =head2 Time Formats =head3 Full 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 Long 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 Medium 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 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 =head2 Datetime Formats =head3 Full 2008-02-05T18:30:30 = martes, 5 de febrero de 2008, 18:30:30 UTC 1995-12-22T09:05:02 = viernes, 22 de diciembre de 1995, 09:05:02 UTC -0010-09-15T04:44:23 = sábado, 15 de septiembre de -10, 04:44:23 UTC =head3 Long 2008-02-05T18:30:30 = 5 de febrero de 2008, 18:30:30 UTC 1995-12-22T09:05:02 = 22 de diciembre de 1995, 09:05:02 UTC -0010-09-15T04:44:23 = 15 de septiembre de -10, 04:44:23 UTC =head3 Medium 2008-02-05T18:30:30 = 05/02/2008 18:30:30 1995-12-22T09:05:02 = 22/12/1995 09:05:02 -0010-09-15T04:44:23 = 15/09/-10 04:44:23 =head3 Short 2008-02-05T18:30:30 = 05/02/08 18:30 1995-12-22T09:05:02 = 22/12/95 09:05 -0010-09-15T04:44:23 = 15/09/-10 04:44 =head2 Available Formats =head3 E (ccc) 2008-02-05T18:30:30 = mar. 1995-12-22T09:05:02 = vie. -0010-09-15T04:44:23 = sáb. =head3 EHm (E H:mm) 2008-02-05T18:30:30 = mar. 18:30 1995-12-22T09:05:02 = vie. 9:05 -0010-09-15T04:44:23 = sáb. 4:44 =head3 EHms (E H:mm:ss) 2008-02-05T18:30:30 = mar. 18:30:30 1995-12-22T09:05:02 = vie. 9:05:02 -0010-09-15T04:44:23 = sáb. 4:44:23 =head3 Ed (E d) 2008-02-05T18:30:30 = mar. 5 1995-12-22T09:05:02 = vie. 22 -0010-09-15T04:44:23 = sáb. 15 =head3 Ehm (E h:mm a) 2008-02-05T18:30:30 = mar. 6:30 p.m. 1995-12-22T09:05:02 = vie. 9:05 a.m. -0010-09-15T04:44:23 = sáb. 4:44 a.m. =head3 Ehms (E h:mm:ss a) 2008-02-05T18:30:30 = mar. 6:30:30 p.m. 1995-12-22T09:05:02 = vie. 9:05:02 a.m. -0010-09-15T04:44:23 = sáb. 4:44:23 a.m. =head3 Gy (y G) 2008-02-05T18:30:30 = 2008 d. C. 1995-12-22T09:05:02 = 1995 d. C. -0010-09-15T04:44:23 = -10 a. C. =head3 GyMMM (MMM y G) 2008-02-05T18:30:30 = feb 2008 d. C. 1995-12-22T09:05:02 = dic 1995 d. C. -0010-09-15T04:44:23 = sep -10 a. C. =head3 GyMMMEd (E, d MMM y G) 2008-02-05T18:30:30 = mar., 5 feb 2008 d. C. 1995-12-22T09:05:02 = vie., 22 dic 1995 d. C. -0010-09-15T04:44:23 = sáb., 15 sep -10 a. C. =head3 GyMMMM (MMMM 'de' y G) 2008-02-05T18:30:30 = febrero de 2008 d. C. 1995-12-22T09:05:02 = diciembre de 1995 d. C. -0010-09-15T04:44:23 = septiembre de -10 a. C. =head3 GyMMMMEd (E, d 'de' MMMM 'de' y G) 2008-02-05T18:30:30 = mar., 5 de febrero de 2008 d. C. 1995-12-22T09:05:02 = vie., 22 de diciembre de 1995 d. C. -0010-09-15T04:44:23 = sáb., 15 de septiembre de -10 a. C. =head3 GyMMMMd (d 'de' MMMM 'de' y G) 2008-02-05T18:30:30 = 5 de febrero de 2008 d. C. 1995-12-22T09:05:02 = 22 de diciembre de 1995 d. C. -0010-09-15T04:44:23 = 15 de septiembre de -10 a. C. =head3 GyMMMd (d MMM y G) 2008-02-05T18:30:30 = 5 feb 2008 d. C. 1995-12-22T09:05:02 = 22 dic 1995 d. C. -0010-09-15T04:44:23 = 15 sep -10 a. C. =head3 H (HH) 2008-02-05T18:30:30 = 18 1995-12-22T09:05:02 = 09 -0010-09-15T04:44:23 = 04 =head3 Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 =head3 Hms (H:mm:ss) 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 Hmsv (H:mm:ss v) 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 Hmsvvvv (H:mm:ss (vvvv)) 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 Hmv (H:mm v) 2008-02-05T18:30:30 = 18:30 UTC 1995-12-22T09:05:02 = 9:05 UTC -0010-09-15T04:44:23 = 4: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 = mar., 5/2 1995-12-22T09:05:02 = vie., 22/12 -0010-09-15T04:44:23 = sáb., 15/9 =head3 MMM (LLL) 2008-02-05T18:30:30 = feb. 1995-12-22T09:05:02 = dic. -0010-09-15T04:44:23 = sep. =head3 MMMEd (E d 'de' MMM) 2008-02-05T18:30:30 = mar. 5 de feb 1995-12-22T09:05:02 = vie. 22 de dic -0010-09-15T04:44:23 = sáb. 15 de sep =head3 MMMMEd (E, d 'de' MMMM) 2008-02-05T18:30:30 = mar., 5 de febrero 1995-12-22T09:05:02 = vie., 22 de diciembre -0010-09-15T04:44:23 = sáb., 15 de septiembre =head3 MMMMd (d 'de' MMMM) 2008-02-05T18:30:30 = 5 de febrero 1995-12-22T09:05:02 = 22 de diciembre -0010-09-15T04:44:23 = 15 de septiembre =head3 MMMd (d MMM) 2008-02-05T18:30:30 = 5 feb 1995-12-22T09:05:02 = 22 dic -0010-09-15T04:44:23 = 15 sep =head3 MMMdd (dd-MMM) 2008-02-05T18:30:30 = 05-feb 1995-12-22T09:05:02 = 22-dic -0010-09-15T04:44:23 = 15-sep =head3 MMd (d/MM) 2008-02-05T18:30:30 = 5/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 =head3 MMdd (dd/MM) 2008-02-05T18:30:30 = 05/02 1995-12-22T09:05:02 = 22/12 -0010-09-15T04:44:23 = 15/09 =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 hmsvvvv (h:mm:ss a (vvvv)) 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 = mar. 5/2/2008 1995-12-22T09:05:02 = vie. 22/12/1995 -0010-09-15T04:44:23 = sáb. 15/9/-10 =head3 yMM (MM/y) 2008-02-05T18:30:30 = 02/2008 1995-12-22T09:05:02 = 12/1995 -0010-09-15T04:44:23 = 09/-10 =head3 yMMM (MMMM 'de' y) 2008-02-05T18:30:30 = febrero de 2008 1995-12-22T09:05:02 = diciembre de 1995 -0010-09-15T04:44:23 = septiembre de -10 =head3 yMMMEd (EEE, d 'de' MMMM 'de' y) 2008-02-05T18:30:30 = mar., 5 de febrero de 2008 1995-12-22T09:05:02 = vie., 22 de diciembre de 1995 -0010-09-15T04:44:23 = sáb., 15 de septiembre de -10 =head3 yMMMM (MMMM 'de' y) 2008-02-05T18:30:30 = febrero de 2008 1995-12-22T09:05:02 = diciembre de 1995 -0010-09-15T04:44:23 = septiembre de -10 =head3 yMMMMEd (EEE, d 'de' MMMM 'de' y) 2008-02-05T18:30:30 = mar., 5 de febrero de 2008 1995-12-22T09:05:02 = vie., 22 de diciembre de 1995 -0010-09-15T04:44:23 = sáb., 15 de septiembre de -10 =head3 yMMMMd (d 'de' MMMM 'de' y) 2008-02-05T18:30:30 = 5 de febrero de 2008 1995-12-22T09:05:02 = 22 de diciembre de 1995 -0010-09-15T04:44:23 = 15 de septiembre de -10 =head3 yMMMd (d 'de' MMMM 'de' y) 2008-02-05T18:30:30 = 5 de febrero de 2008 1995-12-22T09:05:02 = 22 de diciembre de 1995 -0010-09-15T04:44:23 = 15 de septiembre de -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 = 1er. trim. 2008 1995-12-22T09:05:02 = 4º trim. 1995 -0010-09-15T04:44:23 = 3er. trim. -10 =head3 yQQQQ (QQQQ 'de' y) 2008-02-05T18:30:30 = 1er. trimestre de 2008 1995-12-22T09:05:02 = 4º trimestre de 1995 -0010-09-15T04:44:23 = 3er. trimestre de -10 =head2 Miscellaneous =head3 Prefers 24 hour time? Yes =head3 Local first day of the week 7 (domingo) =head1 SUPPORT See L<DateTime::Locale>. =cut
jkb78/extrajnm
local/lib/perl5/DateTime/Locale/es_MX.pod
Perl
mit
11,835
#!/usr/bin/perl -w ###################################################################### # # process LNB data files, u01, u03, mpr and create reports, export # data as CSV, HTML or SQL. # ###################################################################### # use strict; # use Getopt::Std; use File::Find; use File::Path qw(mkpath); # ###################################################################### # # logical constants # use constant TRUE => 1; use constant FALSE => 0; # # output types # use constant PROD_COMPLETE => 3; use constant PROD_COMPLETE_LATER => 4; use constant DETECT_CHANGE => 5; use constant MANUAL_CLEAR => 11; use constant TIMER_NOT_RUNNING => 12; use constant AUTO_CLEAR => 13; # # processing states # use constant RESET => 'reset'; use constant BASELINE => 'baseline'; use constant DELTA => 'delta'; # # common sections for all files types: u01, u03, mpr # use constant INDEX => '[Index]'; use constant INFORMATION => '[Information]'; # # sections specific to u01 # use constant TIME => '[Time]'; use constant CYCLETIME => '[CycleTime]'; use constant COUNT => '[Count]'; use constant DISPENSER => '[Dispenser]'; use constant MOUNTPICKUPFEEDER => '[MountPickupFeeder]'; use constant MOUNTPICKUPNOZZLE => '[MountPickupNozzle]'; use constant INSPECTIONDATA => '[InspectionData]'; # # sections specific to u03 # use constant BRECG => '[BRecg]'; use constant BRECGCALC => '[BRecgCalc]'; use constant ELAPSETIMERECOG => '[ElapseTimeRecog]'; use constant SBOARD => '[SBoard]'; use constant HEIGHTCORRECT => '[HeightCorrect]'; use constant MOUNTQUALITYTRACE => '[MountQualityTrace]'; use constant MOUNTLATESTREEL => '[MountLatestReel]'; use constant MOUNTEXCHANGEREEL => '[MountExchangeReel]'; # # sections specfic to mpr # use constant TIMEDATASP => '[TimeDataSP]'; use constant COUNTDATASP => '[CountDataSP]'; use constant COUNTDATASP2 => '[CountDataSP2]'; use constant TRACEDATASP => '[TraceDataSP]'; use constant TRACEDATASP_2 => '[TraceDataSP_2]'; use constant ISPINFODATA => '[ISPInfoData]'; use constant MASKISPINFODATA => '[MaskISPInfoData]'; # # verbose levels # use constant NOVERBOSE => 0; use constant MINVERBOSE => 1; use constant MIDVERBOSE => 2; use constant MAXVERBOSE => 3; # # processing options # use constant PROC_OPT_NONE => 0; use constant PROC_OPT_IGNRESET12 => 1; use constant PROC_OPT_IGNALL12 => 2; use constant PROC_OPT_USENEGDELTS => 4; # ###################################################################### # # globals # my $cmd = $0; my $log_fh = *STDOUT; # # cmd line options # my $logfile = ''; my $verbose = NOVERBOSE; my $file_type = "all"; my $export_csv = FALSE; my $export_dir = '/tmp/'; my $proc_options = PROC_OPT_NONE; my $audit_only = FALSE; # my %verbose_levels = ( off => NOVERBOSE(), min => MINVERBOSE(), mid => MIDVERBOSE(), max => MAXVERBOSE() ); # my %allowed_proc_options = ( NONE => PROC_OPT_NONE(), IGNRESET12 => PROC_OPT_IGNRESET12(), IGNALL12 => PROC_OPT_IGNALL12(), USENEGDELTS => PROC_OPT_USENEGDELTS() ); # ######################################################################## ######################################################################## # # miscellaneous functions # sub usage { my ($arg0) = @_; print $log_fh <<EOF; usage: $arg0 [-?] [-h] \\ [-w | -W |-v level] \\ [-t u10|u03|mpr] \\ [-l logfile] \\ [-o option] \\ [-x] [-d path] \\ directory ... where: -? or -h - print usage. -w - enable warning (level=min=1) -W - enable warning and trace (level=mid=2) -v - verbose level: 0=off,1=min,2=mid,3=max -t file-type = type of file to process: u01, u03, mpr. default is all files. -l logfile - log file path -o option - enable a procesing option: ignreset12 - ignore resetable output=12 fields. ignall12 - ignore all output=12 files. usenegdelts - use negative deltas in calculations. -x - export reports as CSV files. -a - run audit only. -d path - export directory, defaults to '/tmp'. EOF } # ######################################################################## ######################################################################## # # scan directories for U01, U03 and MPR files. # my %all_list = (); my $one_type = ''; # sub want_one_type { if ($_ =~ m/^.*\.${one_type}$/) { printf $log_fh "FOUND %s FILE: %s\n", $one_type, $File::Find::name if ($verbose >= MAXVERBOSE); # my $file_name = $_; # my $date = ''; my $mach_no = ''; my $stage = ''; my $lane = ''; my $pcb_serial = ''; my $pcb_id = ''; my $output_no = ''; my $pcb_id_lot_no = ''; # my @parts = split('\+-\+', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } else { @parts = split('-', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } } # unshift @{$all_list{$one_type}}, { 'file_name' => $file_name, 'full_path' => $File::Find::name, 'directory' => $File::Find::dir, 'date' => $date, 'mach_no' => $mach_no, 'stage' => $stage, 'lane' => $lane, 'pcb_serial' => $pcb_serial, 'pcb_id' => $pcb_id, 'output_no' => $output_no, 'pcb_id_lot_no' => $pcb_id_lot_no }; } } # sub want_all_types { my $dt = ''; # if ($_ =~ m/^.*\.u01$/) { printf $log_fh "FOUND u01 FILE: %s\n", $File::Find::name if ($verbose >= MAXVERBOSE); $dt = 'u01'; } elsif ($_ =~ m/^.*\.u03$/) { printf $log_fh "FOUND u03 FILE: %s\n", $File::Find::name if ($verbose >= MAXVERBOSE); $dt = 'u03'; } elsif ($_ =~ m/^.*\.mpr$/) { printf $log_fh "FOUND mpr FILE: %s\n", $File::Find::name if ($verbose >= MAXVERBOSE); $dt = 'mpr'; } # if ($dt ne '') { my $file_name = $_; # my $date = ''; my $mach_no = ''; my $stage = ''; my $lane = ''; my $pcb_serial = ''; my $pcb_id = ''; my $output_no = ''; my $pcb_id_lot_no = ''; # my @parts = split('\+-\+', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } else { @parts = split('-', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } } # unshift @{$all_list{$dt}}, { 'file_name' => $file_name, 'full_path' => $File::Find::name, 'directory' => $File::Find::dir, 'date' => $date, 'mach_no' => $mach_no, 'stage' => $stage, 'lane' => $lane, 'pcb_serial' => $pcb_serial, 'pcb_id' => $pcb_id, 'output_no' => $output_no, 'pcb_id_lot_no' => $pcb_id_lot_no }; } } # sub get_all_files { my ($ftype, $pargv, $pu01, $pu03, $pmpr) = @_; # # optimize for file type # if ($ftype eq 'u01') { $one_type = $ftype; $all_list{$one_type} = $pu01; # find(\&want_one_type, @{$pargv}); # @{$pu01} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu01}; } elsif ($ftype eq 'u03') { $one_type = $ftype; $all_list{$one_type} = $pu03; # find(\&want_one_type, @{$pargv}); # @{$pu03} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu03}; } elsif ($ftype eq 'mpr') { $one_type = $ftype; $all_list{$one_type} = $pmpr; # find(\&want_one_type, @{$pargv}); # @{$pmpr} = sort { $a->{file_name} cmp $b->{file_name} } @{$pmpr}; } else { $all_list{u01} = $pu01; $all_list{u03} = $pu03; $all_list{mpr} = $pmpr; # find(\&want_all_types, @{$pargv}); # @{$pu01} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu01}; @{$pu03} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu03}; @{$pmpr} = sort { $a->{file_name} cmp $b->{file_name} } @{$pmpr}; } } # ######################################################################## ######################################################################## # # process U01 files. # sub process_u01_files { my ($pu01s) = @_; # # any files to process? # if (scalar(@{$pu01s}) <= 0) { printf $log_fh "No U01 files to process. Returning.\n\n"; return; } # my %db = (); audit_u01_files($pu01s, \%db); # unless ($audit_only == TRUE) { if ($export_csv == TRUE) { export_u01_report(\%db); } else { print_u01_report(\%db); } } # return; } # ######################################################################## ######################################################################## # # process U03 files. # sub process_u03_files { my ($pu03s) = @_; # # any files to process? # if (scalar(@{$pu03s}) <= 0) { printf $log_fh "No U03 files to process. Returning.\n\n"; return; } # my %db = (); audit_u03_files($pu03s, \%db); # unless ($audit_only == TRUE) { if ($export_csv == TRUE) { export_u03_report(\%db); } else { print_u03_report(\%db); } } # return; } # ######################################################################## ######################################################################## # # process MPR files. # sub process_mpr_files { my ($pu01s) = @_; # # any files to process? # if (scalar(@{$pu01s}) <= 0) { printf $log_fh "No U01 files to process. Returning.\n\n"; return; } # my %db = (); audit_u01_files($pu01s, \%db); # unless ($audit_only == TRUE) { if ($export_csv == TRUE) { export_u01_report(\%db); } else { print_u01_report(\%db); } } # return; } # ######################################################################## ######################################################################## # # start main execution. # my %opts; if (getopts('?hwWv:t:l:o:xd:a', \%opts) != 1) { usage($cmd); exit 2; } # foreach my $opt (%opts) { if (($opt eq "h") or ($opt eq "?")) { usage($cmd); exit 0; } elsif ($opt eq "w") { $verbose = MINVERBOSE; } elsif ($opt eq "W") { $verbose = MIDVERBOSE; } elsif ($opt eq "v") { if ($opts{$opt} =~ m/^[0123]$/) { $verbose = $opts{$opt}; } elsif (exist($verbose_levels{$opts{$opt}})) { $verbose = $verbose_levels{$opts{$opt}}; } else { printf $log_fh "\nInvalid verbose level: $opts{$opt}\n"; usage($cmd); exit 2; } } elsif ($opt eq "t") { $file_type = $opts{$opt}; $file_type =~ tr/[A-Z]/[a-z]/; if ($file_type !~ m/^(u01|u03|mpr)$/i) { printf $log_fh "\nInvalid file type: $opts{$opt}\n"; usage($cmd); exit 2; } } elsif ($opt eq "l") { local *FH; $logfile = $opts{$opt}; open(FH, '>', $logfile) or die $!; $log_fh = *FH; printf $log_fh "\nLog File: %s\n", $logfile; } elsif ($opt eq "o") { my $option = $opts{$opt}; $option =~ tr/[a-z]/[A-Z]/; if (exists($allowed_proc_options{$option})) { $proc_options |= $allowed_proc_options{$option}; } else { printf $log_fh "\nInvalid option type: $opts{$opt}\n"; usage($cmd); exit 2; } } elsif ($opt eq "x") { $export_csv = TRUE; } elsif ($opt eq "d") { $export_dir = $opts{$opt}; mkpath($export_dir) unless ( -d $export_dir ); printf $log_fh "\nExport directory: %s\n", $export_dir; } elsif ($opt eq "a") { $audit_only = TRUE; } } # if (scalar(@ARGV) == 0) { printf $log_fh "No directories given.\n"; usage($cmd); exit 2; } # printf $log_fh "\nScan directories for U01, U03 and MPR files: \n\n"; # my @u01_files = (); my @u03_files = (); my @mpr_files = (); # get_all_files($file_type, \@ARGV, \@u01_files, \@u03_files, \@mpr_files); # printf $log_fh "Number of U01 files: %d\n", scalar(@u01_files); printf $log_fh "Number of U03 files: %d\n", scalar(@u03_files); printf $log_fh "Number of MPR files: %d\n\n", scalar(@mpr_files); # process_u01_files(\@u01_files); process_u03_files(\@u03_files); process_mpr_files(\@mpr_files); # printf $log_fh "\nAll Done\n"; # exit 0; __DATA__ ###################################################################### # # constants # # logical constants # use constant TRUE => 1; use constant FALSE => 0; # # output types # use constant PROD_COMPLETE => 3; use constant PROD_COMPLETE_LATER => 4; use constant DETECT_CHANGE => 5; use constant MANUAL_CLEAR => 11; use constant TIMER_NOT_RUNNING => 12; use constant AUTO_CLEAR => 13; # # processing states # use constant RESET => 'reset'; use constant BASELINE => 'baseline'; use constant DELTA => 'delta'; # # common sections for all files types: u01, u03, mpr # use constant INDEX => '[Index]'; use constant INFORMATION => '[Information]'; # # sections specific to u01 # use constant TIME => '[Time]'; use constant CYCLETIME => '[CycleTime]'; use constant COUNT => '[Count]'; use constant DISPENSER => '[Dispenser]'; use constant MOUNTPICKUPFEEDER => '[MountPickupFeeder]'; use constant MOUNTPICKUPNOZZLE => '[MountPickupNozzle]'; use constant INSPECTIONDATA => '[InspectionData]'; # # sections specific to u03 # use constant BRECG => '[BRecg]'; use constant BRECGCALC => '[BRecgCalc]'; use constant ELAPSETIMERECOG => '[ElapseTimeRecog]'; use constant SBOARD => '[SBoard]'; use constant HEIGHTCORRECT => '[HeightCorrect]'; use constant MOUNTQUALITYTRACE => '[MountQualityTrace]'; use constant MOUNTLATESTREEL => '[MountLatestReel]'; use constant MOUNTEXCHANGEREEL => '[MountExchangeReel]'; # # sections specfic to mpr # use constant TIMEDATASP => '[TimeDataSP]'; use constant COUNTDATASP => '[CountDataSP]'; use constant COUNTDATASP2 => '[CountDataSP2]'; use constant TRACEDATASP => '[TraceDataSP]'; use constant TRACEDATASP_2 => '[TraceDataSP_2]'; use constant ISPINFODATA => '[ISPInfoData]'; use constant MASKISPINFODATA => '[MaskISPInfoData]'; # # verbose levels # use constant NOVERBOSE => 0; use constant MINVERBOSE => 1; use constant MIDVERBOSE => 2; use constant MAXVERBOSE => 3; # # processing options # use constant PROC_OPT_NONE => 0; use constant PROC_OPT_IGN12 => 1; # bit positions use constant PROC_OPT_NMVAL2 => 2; use constant PROC_OPT_IGNALL12 => 4; # bit positions # ###################################################################### # # globals # my $cmd = $0; my $log_fh = *STDOUT; # # cmd line options # my $logfile = ''; my $verbose = 0; my $file_type = ""; # default is all files: u01, u03, mpr my $use_neg_delta = FALSE; my $audit_only = FALSE; my $red_flag_trigger = 0; # off by default my $export_csv = FALSE; my $export_dir = '/tmp/'; my $proc_option = PROC_OPT_NONE; # my %red_flags =(); # my %verbose_levels = ( off => 0, min => 1, mid => 2, max => 3 ); # # report formats # my @nozzle_print_cols = ( { name => 'Machine', format => '%-8s ' }, { name => 'Lane', format => '%-8s ' }, { name => 'Stage', format => '%-8s ' }, { name => 'NHAdd', format => '%-8s ' }, { name => 'NCAdd', format => '%-8s ' }, { name => 'Blkserial', format => '%-30s ' }, { name => 'Pickup', format => '%-8s ' }, { name => 'PMiss', format => '%-8s ' }, { name => 'RMiss', format => '%-8s ' }, { name => 'DMiss', format => '%-8s ' }, { name => 'MMiss', format => '%-8s ' }, { name => 'HMiss', format => '%-8s ' }, { name => 'TRSMiss', format => '%-8s ' }, { name => 'Mount', format => '%-8s ' } ); # my @nozzle_print_cols2 = ( { name => 'Machine', format => '%-8s ' }, { name => 'Lane', format => '%-8s ' }, { name => 'Stage', format => '%-8s ' }, { name => 'NHAdd', format => '%-8s ' }, { name => 'NCAdd', format => '%-8s ' }, { name => 'Pickup', format => '%-8s ' }, { name => 'PMiss', format => '%-8s ' }, { name => 'RMiss', format => '%-8s ' }, { name => 'DMiss', format => '%-8s ' }, { name => 'MMiss', format => '%-8s ' }, { name => 'HMiss', format => '%-8s ' }, { name => 'TRSMiss', format => '%-8s ' }, { name => 'Mount', format => '%-8s ' } ); # my @nozzle_export_cols = ( { name => 'Machine', format => '%s' }, { name => 'Lane', format => ',%s ' }, { name => 'Stage', format => ',%s' }, { name => 'NHAdd', format => ',%s' }, { name => 'NCAdd', format => ',%s' }, { name => 'Blkserial', format => ',%s' }, { name => 'Pickup', format => ',%s' }, { name => 'PMiss', format => ',%s' }, { name => 'RMiss', format => ',%s' }, { name => 'DMiss', format => ',%s' }, { name => 'MMiss', format => ',%s' }, { name => 'HMiss', format => ',%s' }, { name => 'TRSMiss', format => ',%s' }, { name => 'Mount', format => ',%s' } ); # my @nozzle_export_cols2 = ( { name => 'Machine', format => '%s' }, { name => 'Lane', format => ',%s' }, { name => 'Stage', format => ',%s' }, { name => 'NHAdd', format => ',%s' }, { name => 'NCAdd', format => ',%s' }, { name => 'Pickup', format => ',%s' }, { name => 'PMiss', format => ',%s' }, { name => 'RMiss', format => ',%s' }, { name => 'DMiss', format => ',%s' }, { name => 'MMiss', format => ',%s' }, { name => 'HMiss', format => ',%s' }, { name => 'TRSMiss', format => ',%s' }, { name => 'Mount', format => ',%s' } ); # my @nozzle_count_cols = ( 'Pickup', 'PMiss', 'RMiss', 'DMiss', 'MMiss', 'HMiss', 'TRSMiss', 'Mount' ); # my @feeder_print_cols = ( { name => 'Machine', format => '%-8s ' }, { name => 'Lane', format => '%-8s ' }, { name => 'Stage', format => '%-8s ' }, { name => 'FAdd', format => '%-8s ' }, { name => 'FSAdd', format => '%-8s ' }, # { name => 'Blkserial', format => '%-30s ' }, { name => 'ReelID', format => '%-30s ' }, { name => 'Pickup', format => '%-8s ' }, { name => 'PMiss', format => '%-8s ' }, { name => 'RMiss', format => '%-8s ' }, { name => 'DMiss', format => '%-8s ' }, { name => 'MMiss', format => '%-8s ' }, { name => 'HMiss', format => '%-8s ' }, { name => 'TRSMiss', format => '%-8s ' }, { name => 'Mount', format => '%-8s ' } ); # my @feeder_print_cols2 = ( { name => 'Machine', format => '%-8s ' }, { name => 'Lane', format => '%-8s ' }, { name => 'Stage', format => '%-8s ' }, { name => 'FAdd', format => '%-8s ' }, { name => 'FSAdd', format => '%-8s ' }, { name => 'Pickup', format => '%-8s ' }, { name => 'PMiss', format => '%-8s ' }, { name => 'RMiss', format => '%-8s ' }, { name => 'DMiss', format => '%-8s ' }, { name => 'MMiss', format => '%-8s ' }, { name => 'HMiss', format => '%-8s ' }, { name => 'TRSMiss', format => '%-8s ' }, { name => 'Mount', format => '%-8s ' } ); # my @feeder_export_cols = ( { name => 'Machine', format => '%s' }, { name => 'Lane', format => ',%s' }, { name => 'Stage', format => ',%s' }, { name => 'FAdd', format => ',%s' }, { name => 'FSAdd', format => ',%s' }, # { name => 'Blkserial', format => ',%s' }, { name => 'ReelID', format => ',%s' }, { name => 'Pickup', format => ',%s' }, { name => 'PMiss', format => ',%s' }, { name => 'RMiss', format => ',%s' }, { name => 'DMiss', format => ',%s' }, { name => 'MMiss', format => ',%s' }, { name => 'HMiss', format => ',%s' }, { name => 'TRSMiss', format => ',%s' }, { name => 'Mount', format => ',%s' } ); # my @feeder_export_cols2 = ( { name => 'Machine', format => '%s' }, { name => 'Lane', format => ',%s' }, { name => 'Stage', format => ',%s' }, { name => 'FAdd', format => ',%s' }, { name => 'FSAdd', format => ',%s' }, { name => 'Pickup', format => ',%s' }, { name => 'PMiss', format => ',%s' }, { name => 'RMiss', format => ',%s' }, { name => 'DMiss', format => ',%s' }, { name => 'MMiss', format => ',%s' }, { name => 'HMiss', format => ',%s' }, { name => 'TRSMiss', format => ',%s' }, { name => 'Mount', format => ',%s' } ); # my @feeder_count_cols = ( 'Pickup', 'PMiss', 'RMiss', 'DMiss', 'MMiss', 'HMiss', 'TRSMiss', 'Mount' ); # my @mount_quality_trace_cols = ( 'B', 'IDNUM', 'TURN', 'MS', 'TS', 'FAdd', 'FSAdd', 'FBLKCode', 'FBLKSerial', 'NHAdd', 'NCAdd', 'NBLKCode', 'NBLKSerial', 'ReelID', 'F', 'RCGX', 'RCGY', 'RCGA', 'TCX', 'TCY', 'MPosiRecX', 'MPosiRecY', 'MPosiRecA', 'MPosiRecZ', 'THMAX', 'THAVE', 'MNTCX', 'MNTCY', 'MNTCA', 'TLX', 'TLY', 'InspectArea', 'DIDNUM', 'DS', 'DispenseID', 'PARTS', 'WarpZ' ); # my @mount_latest_reel_cols = ( 'BLKCode', 'BLKSerial', 'Ftype', 'FAdd', 'FSAdd', 'Use', 'PEStatus', 'PCStatus', 'Remain', 'Init', 'PartsName', 'Custom1', 'Custom2', 'Custom3', 'Custom4', 'ReelID', 'PartsEmp' ); # my @mount_exchange_reel_cols = ( 'BLKCode', 'BLKSerial', 'Ftype', 'FAdd', 'FSAdd', 'Use', 'PEStatus', 'PCStatus', 'Remain', 'Init', 'PartsName', 'Custom1', 'Custom2', 'Custom3', 'Custom4', 'ReelID', 'PartsEmp' ); # # fields to ignore for output=12 files if enabled. # my %ignored_output12_fields = ( 'TPICKUP' => 1, 'TPMISS' => 1, 'TRMISS' => 1, 'TDMISS' => 1, 'TMMISS' => 1, 'THMISS' => 1, 'CPERR' => 1, 'CRERR' => 1, 'CDERR' => 1, 'CMERR' => 1, 'CTERR' => 1 ); # # summary tables. # my %totals = (); my %report_precision = (); # ###################################################################### # # miscellaneous routines # sub usage { my ($arg0) = @_; print <<EOF; usage: $arg0 [-?] [-h] \\ [-w | -W |-v level] \\ [-t u10|u03|mpr] \\ [-r value] \\ [-L logfile] \\ [-O option] \\ [-n] \\ [-a] \\ [-x] [-d path] \\ directory ... where: -? or -h - print usage. -w - enable warning (level=min=1) -W - enable warning and trace (level=mid=2) -v - verbose level: 0=off,1=min,2=mid,3=max -t file-type = type of file to process: u01, u03, mpr. default is all files. -r value - red flag if counts decrease by more than this amount. -L logfile - log file path -O option - enable a procesing option: ign12 - ignore resetable output=12 fields. nmval2 - calculate Count/Time data using 2nd algo. ignall12 - ignore all output=12 files. -n - use negative deltas (default is NOT to use) -a - only audit data, do not generate any report. -x - export reports as CSV files. -d path - export directory, defaults to '/tmp'. EOF } # sub get_product_info { my ($pdata, $pmjsid, $plotname, $plotnumber) = @_; # my $section = INDEX; $$pmjsid = $pdata->{$section}->{data}->{MJSID}; $$pmjsid = $1 if ($$pmjsid =~ m/"([^"]*)"/); # $section = INFORMATION; $$plotname = $pdata->{$section}->{data}->{LotName}; $$plotname = $1 if ($$plotname =~ m/"([^"]*)"/); $$plotnumber = $pdata->{$section}->{data}->{LotNumber}; } # sub set_product_info_u01 { my ($pdb, $pu01) = @_; # my $filename = $pu01->{file_name}; # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $mjsid = 'UNKNOWN'; my $lotname = 'UNKNOWN'; my $lotnumber = 0; # if ( ! exists($pdb->{product}{u01}{$machine}{$lane}{$stage})) { $pdb->{product}{u01}{$machine}{$lane}{$stage} = "${mjsid}_${lotname}_${lotnumber}"; $pdb->{change_over}{u01}{$machine}{$lane}{$stage} = FALSE; } elsif (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER)) { get_product_info($pu01, \$mjsid, \$lotname, \$lotnumber); # if (($pdb->{product}{u01}{$machine}{$lane}{$stage} ne "${mjsid}_${lotname}_${lotnumber}") && ($pdb->{product}{u01}{$machine}{$lane}{$stage} ne "UNKNOWN_UNKNOWN_0")) { $pdb->{change_over}{u01}{$machine}{$lane}{$stage} = TRUE; } else { $pdb->{change_over}{u01}{$machine}{$lane}{$stage} = FALSE; } # $pdb->{product}{u01}{$machine}{$lane}{$stage} = "${mjsid}_${lotname}_${lotnumber}"; } else { # clear it this flag. $pdb->{change_over}{u01}{$machine}{$lane}{$stage} = FALSE; } # printf $log_fh "Product U01: %s, Change Over: %d\n", $pdb->{product}{u01}{$machine}{$lane}{$stage}, $pdb->{change_over}{u01}{$machine}{$lane}{$stage} if ($verbose >= MIDVERBOSE); } # sub set_product_info_u03 { my ($pdb, $pu03) = @_; # my $filename = $pu03->{file_name}; # my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; # my $mjsid = 'UNKNOWN'; my $lotname = 'UNKNOWN'; my $lotnumber = 0; # if (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER)) { get_product_info($pu03, \$mjsid, \$lotname, \$lotnumber); $pdb->{product}{u03}{$machine}{$lane}{$stage} = "${mjsid}_${lotname}_${lotnumber}"; } elsif ( ! exists($pdb->{product}{u03}{$machine}{$lane}{$stage})) { $pdb->{product}{u03}{$machine}{$lane}{$stage} = "${mjsid}_${lotname}_${lotnumber}"; } # printf $log_fh "Product U03: %s\n", $pdb->{product}{u03}{$machine}{$lane}{$stage} if ($verbose >= MIDVERBOSE); } # sub set_red_flag { my ($machine, $lane, $stage, $filename, $delta) = @_; # return unless ($red_flag_trigger > 0); # $delta = -$delta unless ($delta >= 0); # if ($delta >= $red_flag_trigger) { $red_flags{$machine}{$lane}{$stage} = $filename; } } # sub check_red_flag { my ($pu01) = @_; # return unless ($red_flag_trigger > 0); # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; # if (exists($red_flags{$machine}{$lane}{$stage})) { my $previous_filename = $red_flags{$machine}{$lane}{$stage}; # printf $log_fh "\nRED FLAG FILES FOR MACHINE: %s, Lane: %s, Stage: %s:\n", $machine, $lane, $stage; printf $log_fh "==>> Previous File: %s\n", $previous_filename; printf $log_fh "==>> Current File : %s\n", $filename; # delete $red_flags{$machine}{$lane}{$stage}; } } # ###################################################################### # # report routines # sub init_report_precision { my $section = TIME; $report_precision{$section}{set} = FALSE; $report_precision{$section}{precision} = 0; # $section = COUNT; $report_precision{$section}{set} = FALSE; $report_precision{$section}{precision} = 0; # $section = MOUNTPICKUPFEEDER; $report_precision{$section}{set} = FALSE; $report_precision{$section}{precision} = 0; # $section = MOUNTPICKUPNOZZLE; $report_precision{$section}{set} = FALSE; $report_precision{$section}{precision} = 0; # $section = MOUNTQUALITYTRACE; $report_precision{$section}{set} = FALSE; $report_precision{$section}{precision} = 0; # $section = MOUNTLATESTREEL; $report_precision{$section}{set} = FALSE; $report_precision{$section}{precision} = 0; # $section = MOUNTEXCHANGEREEL; $report_precision{$section}{set} = FALSE; $report_precision{$section}{precision} = 0; } # sub set_report_name_value_precision { my ($pu01, $section) = @_; # return unless ($report_precision{$section}{set} == FALSE); # $report_precision{$section}{precision} = 0; # foreach my $key (keys %{$pu01->{$section}->{data}}) { my $keylen = length($key); if ($keylen > $report_precision{$section}{precision}) { $report_precision{$section}{precision} = $keylen; } } # if ($report_precision{$section}{precision} <= 0) { $report_precision{$section}{precision} = 20; } # $report_precision{$section}{set} = TRUE; } # sub set_report_nozzle_precision { my ($pu01) = @_; # my $section = MOUNTPICKUPNOZZLE; # return unless ($report_precision{$section}{set} == FALSE); # $report_precision{$section}{precision} = 0; # foreach my $key (@nozzle_count_cols) { my $keylen = length($key); if ($keylen > $report_precision{$section}{precision}) { $report_precision{$section}{precision} = $keylen; } } # if ($report_precision{$section}{precision} <= 0) { $report_precision{$section}{precision} = 20; } # $report_precision{$section}{set} = TRUE; } # sub set_report_feeder_precision { my ($pu01) = @_; # my $section = MOUNTPICKUPFEEDER; # return unless ($report_precision{$section}{set} == FALSE); # $report_precision{$section}{precision} = 0; # foreach my $key (@feeder_count_cols) { my $keylen = length($key); if ($keylen > $report_precision{$section}{precision}) { $report_precision{$section}{precision} = $keylen; } } # if ($report_precision{$section}{precision} <= 0) { $report_precision{$section}{precision} = 20; } # $report_precision{$section}{set} = TRUE; } # sub set_report_quality_trace_precision { my ($pu03) = @_; # my $section = MOUNTQUALITYTRACE; # return unless ($report_precision{$section}{set} == FALSE); # $report_precision{$section}{precision} = 0; # foreach my $key (@mount_quality_trace_cols) { my $keylen = length($key); if ($keylen > $report_precision{$section}{precision}) { $report_precision{$section}{precision} = $keylen; } } # if ($report_precision{$section}{precision} <= 0) { $report_precision{$section}{precision} = 20; } # $report_precision{$section}{set} = TRUE; } # sub set_report_latest_reel_precision { my ($pu03) = @_; # my $section = MOUNTLATESTREEL; # return unless ($report_precision{$section}{set} == FALSE); # $report_precision{$section}{precision} = 0; # foreach my $key (@mount_latest_reel_cols) { my $keylen = length($key); if ($keylen > $report_precision{$section}{precision}) { $report_precision{$section}{precision} = $keylen; } } # if ($report_precision{$section}{precision} <= 0) { $report_precision{$section}{precision} = 20; } # $report_precision{$section}{set} = TRUE; } # sub set_report_exchange_reel_precision { my ($pu03) = @_; # my $section = MOUNTEXCHANGEREEL; # return unless ($report_precision{$section}{set} == FALSE); # $report_precision{$section}{precision} = 0; # foreach my $key (@mount_exchange_reel_cols) { my $keylen = length($key); if ($keylen > $report_precision{$section}{precision}) { $report_precision{$section}{precision} = $keylen; } } # if ($report_precision{$section}{precision} <= 0) { $report_precision{$section}{precision} = 20; } # $report_precision{$section}{set} = TRUE; } # ###################################################################### # # read in data file and load all sections # sub load { my ($pdata) = @_; # my $path = $pdata->{full_path}; # if ( ! -r $path ) { printf $log_fh "\nERROR: file $path is NOT readable\n\n"; return 0; } # unless (open(INFD, $path)) { printf $log_fh "\nERROR: unable to open $path.\n\n"; return 0; } @{$pdata->{data}} = <INFD>; close(INFD); # # remove newlines # chomp(@{$pdata->{data}}); printf $log_fh "Lines read: %d\n", scalar(@{$pdata->{data}}) if ($verbose >= MAXVERBOSE); # return 1; } # sub load_name_value { my ($pdata, $section) = @_; # printf $log_fh "\nLoading Name-Value Section: %s\n", $section if ($verbose >= MAXVERBOSE); # my $re_section = '\\' . $section; @{$pdata->{raw}->{$section}} = grep /^${re_section}\s*$/ .. /^\s*$/, @{$pdata->{data}}; # # printf $log_fh "<%s>\n", join("\n", @{$pdata->{raw}->{$section}}); # if (scalar(@{$pdata->{raw}->{$section}}) <= 2) { $pdata->{$section} = {}; printf $log_fh "No data found.\n" if ($verbose >= MAXVERBOSE); return 1; } # shift @{$pdata->{raw}->{$section}}; pop @{$pdata->{raw}->{$section}}; # printf $log_fh "Section Lines: %d\n", scalar(@{$pdata->{raw}->{$section}}) if ($verbose >= MAXVERBOSE); # %{$pdata->{$section}->{data}} = map { split /\s*=\s*/, $_, 2 } @{$pdata->{raw}->{$section}}; printf $log_fh "Number of Keys: %d\n", scalar(keys %{$pdata->{$section}->{data}}) if ($verbose >= MAXVERBOSE); # return 1; } # sub split_quoted_string { my $rec = shift; # my $rec_len = length($rec); # my $istart = -1; my $iend = -1; my $in_string = 0; # my @tokens = (); my $token = ""; # for (my $i=0; $i<$rec_len; $i++) { my $c = substr($rec, $i, 1); # if ($in_string == 1) { if ($c eq '"') { $in_string = 0; } else { $token .= $c; } } elsif ($c eq '"') { $in_string = 1; } elsif ($c eq ' ') { # printf $log_fh "Token ... <%s>\n", $token; push (@tokens, $token); $token = ''; } else { $token .= $c; } } # if (length($token) > 0) { # printf $log_fh "Token ... <%s>\n", $token; push (@tokens, $token); $token = ''; } # # printf $log_fh "Tokens: \n%s\n", join("\n",@tokens); # return @tokens; } # sub load_list { my ($pdata, $section) = @_; # printf $log_fh "\nLoading List Section: %s\n", $section if ($verbose >= MAXVERBOSE); # my $re_section = '\\' . $section; @{$pdata->{raw}->{$section}} = grep /^${re_section}\s*$/ .. /^\s*$/, @{$pdata->{data}}; # # printf $log_fh "<%s>\n", join("\n", @{$pdata->{raw}->{$section}}); # if (scalar(@{$pdata->{raw}->{$section}}) <= 3) { $pdata->{$section} = {}; printf $log_fh "No data found.\n" if ($verbose >= MAXVERBOSE); return 1; } shift @{$pdata->{raw}->{$section}}; pop @{$pdata->{raw}->{$section}}; $pdata->{$section}->{header} = shift @{$pdata->{raw}->{$section}}; @{$pdata->{$section}->{column_names}} = split / /, $pdata->{$section}->{header}; my $number_columns = scalar(@{$pdata->{$section}->{column_names}}); # @{$pdata->{$section}->{data}} = (); # printf $log_fh "Section Lines: %d\n", scalar(@{$pdata->{raw}->{$section}}) if ($verbose >= MAXVERBOSE); # printf $log_fh "Column Names: %d\n", $number_columns; foreach my $record (@{$pdata->{raw}->{$section}}) { # printf $log_fh "\nRECORD: %s\n", $record; # # printf $log_fh "\nRECORD (original): %s\n", $record; # $record =~ s/"\s+"\s/"" /g; # $record =~ s/"\s+"\s*$/""/g; # printf $log_fh "\nRECORD (final): %s\n", $record; # my @tokens = split / /, $record; # my @tokens = split_quoted_string($record); my $number_tokens = scalar(@tokens); printf $log_fh "Number of tokens in record: %d\n", $number_tokens if ($verbose >= MAXVERBOSE); # if ($number_tokens == $number_columns) { my %data = (); @data{@{$pdata->{$section}->{column_names}}} = @tokens; my $data_size = scalar(keys %data); # printf $log_fh "Current Data Size: %d\n", $data_size; unshift @{$pdata->{$section}->{data}}, \%data; printf $log_fh "Current Number of Records: %d\n", scalar(@{$pdata->{$section}->{data}}) if ($verbose >= MAXVERBOSE); } else { printf $log_fh "SKIPPING RECORD - NUMBER TOKENS (%d) != NUMBER COLUMNS (%d)\n", $number_tokens, $number_columns; } } # return 1; } # ###################################################################### # # audit U01 files # ###################################################################### # # routines for Count and Time sections # sub calculate_u01_name_value_delta { my ($pdb, $pu01, $section) = @_; # my $filename = $pu01->{file_name}; # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # if ((($proc_option & PROC_OPT_IGN12) != 0) && ($output_no == TIMER_NOT_RUNNING) && ($section eq COUNT)) { foreach my $key (keys %{$pu01->{$section}->{data}}) { my $delta = 0; # my $KEY = $key; $KEY =~ tr/[a-z]/[A-Z]/; # if (exists($ignored_output12_fields{$KEY})) { $delta = 0; } elsif (exists($pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$key})) { $delta = $pu01->{$section}->{data}->{$key} - $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$key}; } else { $delta = $pu01->{$section}->{data}->{$key}; printf $log_fh "ERROR: [%s] %s key %s NOT found in cache. Taking counts (%d) as is.\n", $filename, $section, $key, $delta; } # if ($delta >= 0) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key} = $delta; } elsif ($use_neg_delta == TRUE) { printf $log_fh "%d WARNING: [%s] using NEGATIVE delta for %s key %s: %d\n", __LINE__, $filename, $section, $key, $delta if ($verbose >= MINVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key} = $delta; } else { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key} = 0; printf $log_fh "%d WARNING: [%s] setting NEGATIVE delta (%d) for %s key %s to ZERO\n", __LINE__, $filename, $delta, $section, $key if ($verbose >= MINVERBOSE); set_red_flag($machine, $lane, $stage, $filename, $delta); } # printf $log_fh "%s: %s = %d\n", $section, $key, $delta if ($verbose >= MAXVERBOSE); } } else { foreach my $key (keys %{$pu01->{$section}->{data}}) { my $delta = 0; # if (exists($pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$key})) { $delta = $pu01->{$section}->{data}->{$key} - $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$key}; } else { $delta = $pu01->{$section}->{data}->{$key}; printf $log_fh "ERROR: [%s] %s key %s NOT found in cache. Taking counts (%d) as is.\n", $filename, $section, $key, $delta; } # if ($delta >= 0) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key} = $delta; } elsif ($use_neg_delta == TRUE) { printf $log_fh "%d WARNING: [%s] using NEGATIVE delta for %s key %s: %d\n", __LINE__, $filename, $section, $key, $delta if ($verbose >= MINVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key} = $delta; } else { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key} = 0; printf $log_fh "%d WARNING: [%s] setting NEGATIVE delta (%d) for %s key %s to ZERO\n", __LINE__, $filename, $delta, $section, $key if ($verbose >= MINVERBOSE); set_red_flag($machine, $lane, $stage, $filename, $delta); } # printf $log_fh "%s: %s = %d\n", $section, $key, $delta if ($verbose >= MAXVERBOSE); } } } # sub copy_u01_name_value_delta { my ($pdb, $pu01, $section) = @_; # my $filename = $pu01->{file_name}; # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # delete $pdb->{$section}->{$machine}{$lane}{$stage}{delta}; # foreach my $key (keys %{$pu01->{$section}->{data}}) { my $delta = $pu01->{$section}->{data}->{$key}; $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key} = $delta; printf $log_fh "%s: %s = %d\n", $section, $key, $delta if ($verbose >= MAXVERBOSE); } } # sub copy_u01_name_value_cache { my ($pdb, $pu01, $section) = @_; # my $filename = $pu01->{file_name}; # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # foreach my $key (keys %{$pu01->{$section}->{data}}) { $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$key} = $pu01->{$section}->{data}->{$key}; } } # sub tabulate_u01_name_value_delta { my ($pdb, $pu01, $section) = @_; # my $filename = $pu01->{file_name}; # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $product = $pdb->{product}{u01}{$machine}{$lane}{$stage}; # foreach my $key (keys %{$pu01->{$section}->{data}}) { # # product dependent totals # if (exists($totals{by_product}{$product}{$section}{totals}{$key})) { $totals{by_product}{$product}{$section}{totals}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{by_product}{$product}{$section}{totals}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } # if (exists($totals{by_product}{$product}{$section}{by_machine}{$machine}{$key})) { $totals{by_product}{$product}{$section}{by_machine}{$machine}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{by_product}{$product}{$section}{by_machine}{$machine}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } # if (exists($totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}{$key})) { $totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } # if (exists($totals{by_product}{$product}{$section}{by_machine_lane_stage}{$machine}{$lane}{$stage}{$key})) { $totals{by_product}{$product}{$section}{by_machine_lane_stage}{$machine}{$lane}{$stage}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{by_product}{$product}{$section}{by_machine_lane_stage}{$machine}{$lane}{$stage}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } # # product independent totals # if (exists($totals{$section}{totals}{$key})) { $totals{$section}{totals}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{$section}{totals}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } # if (exists($totals{$section}{by_machine}{$machine}{$key})) { $totals{$section}{by_machine}{$machine}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{$section}{by_machine}{$machine}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } # if (exists($totals{$section}{by_machine_lane}{$machine}{$lane}{$key})) { $totals{$section}{by_machine_lane}{$machine}{$lane}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{$section}{by_machine_lane}{$machine}{$lane}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } # if (exists($totals{$section}{by_machine_lane_stage}{$machine}{$lane}{$stage}{$key})) { $totals{$section}{by_machine_lane_stage}{$machine}{$lane}{$stage}{$key} += $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } else { $totals{$section}{by_machine_lane_stage}{$machine}{$lane}{$stage}{$key} = $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$key}; } } } # sub audit_u01_name_value { my ($pdb, $pu01, $section) = @_; # set_report_name_value_precision($pu01, $section); # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $mjsid = ''; my $lotname = ''; my $lotnumber = 0; # my $change_over = $pdb->{change_over}{u01}{$machine}{$lane}{$stage}; printf $log_fh "Change Over: %s\n", $change_over if ($verbose >= MAXVERBOSE); # get_product_info($pu01, \$mjsid, \$lotname, \$lotnumber); # printf $log_fh "%d: %s filename: %s, mjsid: %s, lotname: %s, lotnumber: %s\n", __LINE__, $section, $filename, $mjsid, $lotname, $lotnumber; # printf $log_fh "\nSECTION : %s\n", $section if ($verbose >= MAXVERBOSE); # if ($verbose >= MAXVERBOSE) { printf $log_fh "MACHINE : %s\n", $machine; printf $log_fh "LANE : %d\n", $lane; printf $log_fh "STAGE : %d\n", $stage; printf $log_fh "OUTPUT NO: %s\n", $output_no; printf $log_fh "FILE RECS : %d\n", scalar(@{$pu01->{data}}); printf $log_fh "%s RECS: %d\n", $section, scalar(keys %{$pu01->{$section}->{data}}); } # if ( ! exists($pdb->{$section}->{$machine}{$lane}{$stage}{state})) { printf $log_fh "ENTRY STATE: UNKNOWN\n" if ($verbose >= MAXVERBOSE); # if (($output_no == MANUAL_CLEAR) || ($output_no == AUTO_CLEAR)) { $pdb->{$section}->{$machine}{$lane}{$stage}{state} = RESET; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; } else { $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; # copy_u01_name_value_cache($pdb, $pu01, $section); } printf $log_fh "EXIT STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); # return; } # my $state = $pdb->{$section}->{$machine}{$lane}{$stage}{state}; # $state = RESET if ($change_over == TRUE); # printf $log_fh "ENTRY STATE: %s\n", $state if ($verbose >= MAXVERBOSE); # if (($output_no == MANUAL_CLEAR) || ($output_no == AUTO_CLEAR)) { $pdb->{$section}->{$machine}{$lane}{$stage}{state} = RESET; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; } elsif ($state eq DELTA) { calculate_u01_name_value_delta($pdb, $pu01, $section); tabulate_u01_name_value_delta($pdb, $pu01, $section); copy_u01_name_value_cache($pdb, $pu01, $section); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } elsif ($state eq RESET) { copy_u01_name_value_delta($pdb, $pu01, $section); tabulate_u01_name_value_delta($pdb, $pu01, $section); copy_u01_name_value_cache($pdb, $pu01, $section); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } elsif ($state eq BASELINE) { $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; # copy_u01_name_value_cache($pdb, $pu01, $section); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } else { die "ERROR: unknown $section state: $state. Stopped"; } printf $log_fh "EXIT STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); # return; } # # another way to calculate ... # sub audit_u01_name_value_2 { my ($pdb, $pu01, $section) = @_; # set_report_name_value_precision($pu01, $section); # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $mjsid = ''; my $lotname = ''; my $lotnumber = 0; # my $change_over = $pdb->{change_over}{u01}{$machine}{$lane}{$stage}; printf $log_fh "Change Over: %s\n", $change_over if ($verbose >= MAXVERBOSE); # get_product_info($pu01, \$mjsid, \$lotname, \$lotnumber); # printf $log_fh "%d: %s filename: %s, mjsid: %s, lotname: %s, lotnumber: %s\n", __LINE__, $section, $filename, $mjsid, $lotname, $lotnumber; # printf $log_fh "\nSECTION : %s\n", $section if ($verbose >= MAXVERBOSE); # if ($verbose >= MAXVERBOSE) { printf $log_fh "MACHINE : %s\n", $machine; printf $log_fh "LANE : %d\n", $lane; printf $log_fh "STAGE : %d\n", $stage; printf $log_fh "OUTPUT NO: %s\n", $output_no; printf $log_fh "FILE RECS : %d\n", scalar(@{$pu01->{data}}); printf $log_fh "%s RECS: %d\n", $section, scalar(keys %{$pu01->{$section}->{data}}); } # if (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER) || ($output_no == DETECT_CHANGE) || ($output_no == TIMER_NOT_RUNNING)) { if ( ! exists($pdb->{$section}->{$machine}{$lane}{$stage}{state})) { printf $log_fh "ENTRY STATE: UNKNOWN\n" if ($verbose >= MAXVERBOSE); # delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; copy_u01_name_value_cache($pdb, $pu01, $section); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } else { my $state = $pdb->{$section}->{$machine}{$lane}{$stage}{state}; $state = RESET if ($change_over == TRUE); printf $log_fh "ENTRY STATE: %s\n", $state if ($verbose >= MAXVERBOSE); # if ($state eq DELTA) { calculate_u01_name_value_delta($pdb, $pu01, $section); tabulate_u01_name_value_delta($pdb, $pu01, $section); copy_u01_name_value_cache($pdb, $pu01, $section); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } elsif ($state eq RESET) { copy_u01_name_value_delta($pdb, $pu01, $section); tabulate_u01_name_value_delta($pdb, $pu01, $section); copy_u01_name_value_cache($pdb, $pu01, $section); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } elsif ($state eq BASELINE) { delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; copy_u01_name_value_cache($pdb, $pu01, $section); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } else { die "ERROR: unknown $section state: $state. Stopped"; } printf $log_fh "EXIT STATE: %s\n", $state if ($verbose >= MAXVERBOSE); } } elsif (($output_no == MANUAL_CLEAR) || ($output_no == AUTO_CLEAR)) { my $state = $pdb->{$section}->{$machine}{$lane}{$stage}{state}; printf $log_fh "ENTRY STATE: %s\n", $state if ($verbose >= MAXVERBOSE); # delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = RESET; printf $log_fh "EXIT STATE: %s\n", $state if ($verbose >= MAXVERBOSE); } else { die "ERROR: unknown output type: $output_no. Stopped"; } # return; } # ###################################################################### # # routines for feeder section # sub calculate_u01_feeder_delta { my ($pdb, $pu01) = @_; # my $section = MOUNTPICKUPFEEDER; # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $pcols = $pu01->{$section}->{column_names}; # delete $pdb->{$section}->{$machine}{$lane}{$stage}{delta}; # foreach my $prow (@{$pu01->{$section}->{data}}) { my $fadd = $prow->{FAdd}; my $fsadd = $prow->{FSAdd}; my $reelid = $prow->{ReelID}; # my $is_tray = substr($fadd, -4, 2); if ($is_tray > 0) { $is_tray = TRUE; printf $log_fh "%d: [%s] %s IS tray part (%s) fadd: %s, fsadd: %s\n", __LINE__, $filename, $section, $is_tray, $fadd, $fsadd if ($verbose >= MAXVERBOSE); } else { $is_tray = FALSE; printf $log_fh "%d: [%s] %s IS NOT tray part (%s) fadd: %s, fsadd: %s\n", __LINE__, $filename, $section, $is_tray, $fadd, $fsadd if ($verbose >= MAXVERBOSE); } # if ( ! exists($pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$fadd}{$fsadd}{data})) { printf $log_fh "%d WARNING: [%s] %s FAdd %s, FSAdd %s NOT found in cache. Taking all counts as is.\n", __LINE__, $filename, $section, $fadd, $fsadd if ($verbose >= MINVERBOSE); foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col} = $prow->{$col}; } } else { my $cache_reelid = $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$fadd}{$fsadd}{data}{ReelID}; my $cache_filename = $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$fadd}{$fsadd}{filename}; if (($reelid eq $cache_reelid) || ($is_tray == TRUE)) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{ReelID} = $reelid; # foreach my $col (@feeder_count_cols) { my $u01_value = $prow->{$col}; my $cache_value = $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$fadd}{$fsadd}{data}{$col}; # my $delta = $u01_value - $cache_value; # if ($delta >= 0) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col} = $delta; } elsif ($use_neg_delta == TRUE) { printf $log_fh "%d WARNING: [%s] [%s] %s FAdd %s, FSAdd %s using NEGATIVE delta for key %s: %d\n", __LINE__, $filename, $cache_filename, $section, $fadd, $fsadd, $col, $delta if ($verbose >= MINVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col} = $delta; } else { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col} = 0; printf $log_fh "%d WARNING: [%s] [%s] %s FAdd %s, FSAdd %s setting NEGATIVE delta (%d) for key %s to ZERO; current value %d, cache value %d\n", __LINE__, $filename, $cache_filename, $section, $fadd, $fsadd, $delta, $col, $u01_value, $cache_value if ($verbose >= MINVERBOSE); set_red_flag($machine, $lane, $stage, $filename, $delta); } } } else { printf $log_fh "%d WARNING: [%s] %s FAdd %s, FSAdd %s REELID CHANGED: CACHED %s, CURRENT U01 %s\n", __LINE__, $filename, $section, $fadd, $fsadd, $cache_reelid, $reelid if ($verbose >= MINVERBOSE); # delete $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}; # foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col} = $prow->{$col}; } } } } } # sub copy_u01_feeder_cache { my ($pdb, $pu01, $state) = @_; # my $section = MOUNTPICKUPFEEDER; # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $pcols = $pu01->{$section}->{column_names}; # foreach my $prow (@{$pu01->{$section}->{data}}) { my $fadd = $prow->{FAdd}; my $fsadd = $prow->{FSAdd}; # foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$fadd}{$fsadd}{data}{$col} = $prow->{$col}; } # $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$fadd}{$fsadd}{state} = $state; $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$fadd}{$fsadd}{filename} = $filename; } } # sub copy_u01_feeder_delta { my ($pdb, $pu01) = @_; # my $section = MOUNTPICKUPFEEDER; # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $pcols = $pu01->{$section}->{column_names}; # delete $pdb->{$section}->{$machine}{$lane}{$stage}{delta}; # foreach my $prow (@{$pu01->{$section}->{data}}) { my $fadd = $prow->{FAdd}; my $fsadd = $prow->{FSAdd}; # foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col} = $prow->{$col}; } } } # sub tabulate_u01_feeder_delta { my ($pdb, $pu01) = @_; # my $filename = $pu01->{file_name}; # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; my $section = MOUNTPICKUPFEEDER; # my $product = $pdb->{product}{u01}{$machine}{$lane}{$stage}; # foreach my $fadd (sort { $a <=> $b } keys %{$pdb->{$section}{$machine}{$lane}{$stage}{delta}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}}) { my $reelid = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{ReelID}; # # product-independent totals # if (exists($totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid})) { foreach my $col (@feeder_count_cols) { $totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } else { foreach my $col (@feeder_count_cols) { $totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } # if (exists($totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid})) { foreach my $col (@feeder_count_cols) { $totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } else { foreach my $col (@feeder_count_cols) { $totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } # if (exists($totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd})) { foreach my $col (@feeder_count_cols) { $totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } else { foreach my $col (@feeder_count_cols) { $totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } # # product-dependent totals # if (exists($totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid})) { foreach my $col (@feeder_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } else { foreach my $col (@feeder_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } # if (exists($totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid})) { foreach my $col (@feeder_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } else { foreach my $col (@feeder_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } # if (exists($totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd})) { foreach my $col (@feeder_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } else { foreach my $col (@feeder_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$fadd}{$fsadd}{data}{$col}; } } } } } # sub audit_u01_feeders { my ($pdb, $pu01) = @_; # set_report_feeder_precision($pu01); # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; my $section = MOUNTPICKUPFEEDER; my $filename = $pu01->{file_name}; # printf $log_fh "\nSECTION : %s\n", $section if ($verbose >= MAXVERBOSE); # if ($verbose >= MAXVERBOSE) { printf $log_fh "MACHINE : %s\n", $machine; printf $log_fh "LANE : %d\n", $lane; printf $log_fh "STAGE : %d\n", $stage; printf $log_fh "OUTPUT NO: %s\n", $output_no; printf $log_fh "FILE RECS : %d\n", scalar(@{$pu01->{data}}); printf $log_fh "%s RECS: %d\n", $section, scalar(@{$pu01->{$section}->{data}}) if (defined(@{$pu01->{$section}->{data}})); } # # check if the file has a feeder data section. # if ($output_no == TIMER_NOT_RUNNING) { printf $log_fh "No Feeder data in Output=%d U01 files. Skipping.\n", $output_no if ($verbose >= MAXVERBOSE); return; } elsif (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER)) { if ( ! exists($pdb->{$section}->{$machine}{$lane}{$stage}{state})) { printf $log_fh "ENTRY STATE: UNKNOWN\n", if ($verbose >= MAXVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; # copy_u01_feeder_cache($pdb, $pu01, DELTA); } elsif ($pdb->{$section}->{$machine}{$lane}{$stage}{state} eq RESET) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); copy_u01_feeder_delta($pdb, $pu01); tabulate_u01_feeder_delta($pdb, $pu01); copy_u01_feeder_cache($pdb, $pu01, DELTA); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } elsif ($pdb->{$section}->{$machine}{$lane}{$stage}{state} eq DELTA) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); calculate_u01_feeder_delta($pdb, $pu01); tabulate_u01_feeder_delta($pdb, $pu01); copy_u01_feeder_cache($pdb, $pu01, DELTA); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } else { my $state = $pdb->{$section}->{$machine}{$lane}{$stage}{state}; die "ERROR: unknown $section state: $state. Stopped"; } } elsif ($output_no == DETECT_CHANGE) { if ( ! exists($pdb->{$section}->{$machine}{$lane}{$stage}{state})) { printf $log_fh "ENTRY STATE: UNKNOWN\n", if ($verbose >= MAXVERBOSE); # copy_u01_feeder_cache($pdb, $pu01, DELTA); } elsif ($pdb->{$section}->{$machine}{$lane}{$stage}{state} eq RESET) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); copy_u01_feeder_delta($pdb, $pu01); tabulate_u01_feeder_delta($pdb, $pu01); copy_u01_feeder_cache($pdb, $pu01, DELTA); } elsif ($pdb->{$section}->{$machine}{$lane}{$stage}{state} eq DELTA) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); calculate_u01_feeder_delta($pdb, $pu01); tabulate_u01_feeder_delta($pdb, $pu01); copy_u01_feeder_cache($pdb, $pu01, DELTA); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } else { my $state = $pdb->{$section}->{$machine}{$lane}{$stage}{state}; die "ERROR: unknown $section state: $state. Stopped"; } } elsif (($output_no == MANUAL_CLEAR) || ($output_no == AUTO_CLEAR)) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{state} = RESET; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; } else { die "ERROR: unknown $section output type: $output_no. Stopped"; } # printf $log_fh "EXIT STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); # return; } # ###################################################################### # # routines for nozzle section # sub calculate_u01_nozzle_delta { my ($pdb, $pu01) = @_; # my $section = MOUNTPICKUPNOZZLE; # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $pcols = $pu01->{$section}->{column_names}; # delete $pdb->{$section}->{$machine}{$lane}{$stage}{delta}; # foreach my $prow (@{$pu01->{$section}->{data}}) { my $nhadd = $prow->{NHAdd}; my $ncadd = $prow->{NCAdd}; my $blkserial = $prow->{BLKSerial}; # if ( ! exists($pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$nhadd}{$ncadd}{data})) { printf $log_fh "%d WARNING: [%s] %s NHAdd %s, NCAdd %s NOT found in cache. Taking all counts as is.\n", __LINE__, $filename, $section, $nhadd, $ncadd if ($verbose >= MINVERBOSE); foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col} = $prow->{$col}; } } else { my $cache_blkserial = $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$nhadd}{$ncadd}{data}{BLKSerial}; if ($blkserial eq $cache_blkserial) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{BLKSerial} = $blkserial; # foreach my $col (@nozzle_count_cols) { my $u01_value = $prow->{$col}; my $cache_value = $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$nhadd}{$ncadd}{data}{$col}; # my $delta = $u01_value - $cache_value; # if ($delta >= 0) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col} = $delta; } elsif ($use_neg_delta == TRUE) { printf $log_fh "%d WARNING: [%s] %s NHAdd %s, NCAdd %s using NEGATIVE delta for key %s: %d\n", __LINE__, $filename, $section, $nhadd, $ncadd, $col, $delta if ($verbose >= MINVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col} = $delta; } else { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col} = 0; printf $log_fh "%d WARNING: [%s] %s NHAdd %s, NCAdd %s setting NEGATIVE delta (%d) for key %s to ZERO\n", __LINE__, $filename, $section, $nhadd, $ncadd, $delta, $col if ($verbose >= MINVERBOSE); set_red_flag($machine, $lane, $stage, $filename, $delta); } } } else { printf $log_fh "%d WARNING: [%s] %s NHAdd %s, NCAdd %s BLKSERIAL CHANGED: CACHED %s, CURRENT U01 %s\n", __LINE__, $filename, $section, $nhadd, $ncadd, $cache_blkserial, $blkserial if ($verbose >= MINVERBOSE); # delete $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}; # foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col} = $prow->{$col}; } } } } } # sub copy_u01_nozzle_cache { my ($pdb, $pu01, $state) = @_; # my $section = MOUNTPICKUPNOZZLE; # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $pcols = $pu01->{$section}->{column_names}; # foreach my $prow (@{$pu01->{$section}->{data}}) { my $nhadd = $prow->{NHAdd}; my $ncadd = $prow->{NCAdd}; # foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$nhadd}{$ncadd}{data}{$col} = $prow->{$col}; } # $pdb->{$section}->{$machine}{$lane}{$stage}{cache}{$nhadd}{$ncadd}{state} = $state; } } # sub copy_u01_nozzle_delta { my ($pdb, $pu01) = @_; # my $section = MOUNTPICKUPNOZZLE; # my $filename = $pu01->{file_name}; my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; # my $pcols = $pu01->{$section}->{column_names}; # delete $pdb->{$section}->{$machine}{$lane}{$stage}{delta}; # foreach my $prow (@{$pu01->{$section}->{data}}) { my $nhadd = $prow->{NHAdd}; my $ncadd = $prow->{NCAdd}; # foreach my $col (@{$pcols}) { $pdb->{$section}->{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col} = $prow->{$col}; } } } # sub tabulate_u01_nozzle_delta { my ($pdb, $pu01) = @_; # my $filename = $pu01->{file_name}; # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; my $section = MOUNTPICKUPNOZZLE; # my $product = $pdb->{product}{u01}{$machine}{$lane}{$stage}; # foreach my $nhadd (sort { $a <=> $b } keys %{$pdb->{$section}{$machine}{$lane}{$stage}{delta}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}}) { my $blkserial = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{BLKSerial}; # # product-independent totals # if (exists($totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial})) { foreach my $col (@nozzle_count_cols) { $totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } else { foreach my $col (@nozzle_count_cols) { $totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } # if (exists($totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd})) { foreach my $col (@nozzle_count_cols) { $totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } else { foreach my $col (@nozzle_count_cols) { $totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } # # product-dependent totals # if (exists($totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial})) { foreach my $col (@nozzle_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } else { foreach my $col (@nozzle_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } # if (exists($totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd})) { foreach my $col (@nozzle_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col} += $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } else { foreach my $col (@nozzle_count_cols) { $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col} = $pdb->{$section}{$machine}{$lane}{$stage}{delta}{$nhadd}{$ncadd}{data}{$col}; } } } } } # sub audit_u01_nozzles { my ($pdb, $pu01) = @_; # set_report_nozzle_precision($pu01); # my $machine = $pu01->{mach_no}; my $lane = $pu01->{lane}; my $stage = $pu01->{stage}; my $output_no = $pu01->{output_no}; my $section = MOUNTPICKUPNOZZLE; my $filename = $pu01->{file_name}; # printf $log_fh "\nSECTION : %s\n", $section if ($verbose >= MAXVERBOSE); # if ($verbose >= MAXVERBOSE) { printf $log_fh "MACHINE : %s\n", $machine; printf $log_fh "LANE : %d\n", $lane; printf $log_fh "STAGE : %d\n", $stage; printf $log_fh "OUTPUT NO: %s\n", $output_no; printf $log_fh "FILE RECS : %d\n", scalar(@{$pu01->{data}}); printf $log_fh "%s RECS: %d\n", $section, scalar(@{$pu01->{$section}->{data}}) if (defined(@{$pu01->{$section}->{data}})); } # # check if the file has a nozzle data section. # if (($output_no == DETECT_CHANGE) || ($output_no == TIMER_NOT_RUNNING)) { printf $log_fh "No Nozzle data in Output=%d U01 files. Skipping.\n", $output_no if ($verbose >= MAXVERBOSE); return; } elsif (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER)) { if ( ! exists($pdb->{$section}->{$machine}{$lane}{$stage}{state})) { printf $log_fh "ENTRY STATE: UNKNOWN\n", if ($verbose >= MAXVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; # copy_u01_nozzle_cache($pdb, $pu01, DELTA); } elsif ($pdb->{$section}->{$machine}{$lane}{$stage}{state} eq RESET) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); copy_u01_nozzle_delta($pdb, $pu01); tabulate_u01_nozzle_delta($pdb, $pu01); copy_u01_nozzle_cache($pdb, $pu01, DELTA); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } elsif ($pdb->{$section}->{$machine}{$lane}{$stage}{state} eq DELTA) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); calculate_u01_nozzle_delta($pdb, $pu01); tabulate_u01_nozzle_delta($pdb, $pu01); copy_u01_nozzle_cache($pdb, $pu01, DELTA); # $pdb->{$section}->{$machine}{$lane}{$stage}{state} = DELTA; } else { my $state = $pdb->{$section}->{$machine}{$lane}{$stage}{state}; die "ERROR: unknown $section state: $state. Stopped"; } } elsif (($output_no == MANUAL_CLEAR) || ($output_no == AUTO_CLEAR)) { printf $log_fh "ENTRY STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); $pdb->{$section}->{$machine}{$lane}{$stage}{state} = RESET; delete $pdb->{$section}->{$machine}{$lane}{$stage}{cache}; } else { die "ERROR: unknown $section output type: $output_no. Stopped"; } # printf $log_fh "EXIT STATE: %s\n", $pdb->{$section}->{$machine}{$lane}{$stage}{state} if ($verbose >= MAXVERBOSE); # return; } # ###################################################################### # # high-level u01 file audit functions # sub audit_u01_file { my ($pdb, $pu01) = @_; # my $output_no = $pu01->{output_no}; # return if (($output_no == TIMER_NOT_RUNNING) && (($proc_option & PROC_OPT_IGNALL12) != 0)); # check_red_flag($pu01); set_product_info_u01($pdb, $pu01); # if (($proc_option & PROC_OPT_NMVAL2) != 0) { audit_u01_name_value_2($pdb, $pu01, COUNT); audit_u01_name_value_2($pdb, $pu01, TIME); } else { audit_u01_name_value($pdb, $pu01, COUNT); audit_u01_name_value($pdb, $pu01, TIME); } audit_u01_feeders($pdb, $pu01); audit_u01_nozzles($pdb, $pu01); # return; } # sub load_u01_sections { my ($pu01) = @_; # load_name_value($pu01, INDEX); load_name_value($pu01, INFORMATION); # load_name_value($pu01, TIME); load_name_value($pu01, CYCLETIME); load_name_value($pu01, COUNT); load_list($pu01, DISPENSER); load_list($pu01, MOUNTPICKUPFEEDER); load_list($pu01, MOUNTPICKUPNOZZLE); load_name_value($pu01, INSPECTIONDATA); } # sub audit_u01_files { my ($pu01s, $pdb) = @_; # printf $log_fh "\nAudit U01 files:\n"; # foreach my $pu01 (@{$pu01s}) { printf $log_fh "\nAudit U01: %s\n", $pu01->{file_name} if ($verbose >= MIDVERBOSE); # next unless (load($pu01) != 0); # load_u01_sections($pu01); # audit_u01_file($pdb, $pu01); } # return; } # ###################################################################### # # print u01 file report functions # sub print_u01_count_report { my ($pdb) = @_; # ############################################################### # my $section = COUNT; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s by Machine:\n", $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine}}) { printf $log_fh "Machine: %s\n", $machine; foreach my $key (sort keys %{$totals{$section}{by_machine}{$machine}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{$section}{by_machine}{$machine}{$key}; } } # $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s by Machine and Lane:\n", $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}{$machine}}) { printf $log_fh "Machine: %s, Lane: %s\n", $machine, $lane; foreach my $key (sort keys %{$totals{$section}{by_machine_lane}{$machine}{$lane}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{$section}{by_machine_lane}{$machine}{$lane}{$key}; } } } # ############################################################### # foreach my $product (sort keys %{$totals{by_product}}) { $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For Product %s %s by Machine:\n", $product, $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine}}) { printf $log_fh "Machine: %s\n", $machine; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine}{$machine}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{by_product}{$product}{$section}{by_machine}{$machine}{$key}; } } } # foreach my $product (sort keys %{$totals{by_product}}) { $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For Product %s %s by Machine and Lane:\n", $product, $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}}) { printf $log_fh "Machine: %s, Lane: %s\n", $machine, $lane; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}{$key}; } } } } } # sub print_u01_time_report { my ($pdb) = @_; # ############################################################### # my $section = TIME; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s by Machine:\n", $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine}}) { printf $log_fh "Machine: %s\n", $machine; foreach my $key (sort keys %{$totals{$section}{by_machine}{$machine}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{$section}{by_machine}{$machine}{$key}; } } # $section = TIME; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s by Machine and Lane:\n", $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}{$machine}}) { printf $log_fh "Machine: %s, Lane: %s\n", $machine, $lane; foreach my $key (sort keys %{$totals{$section}{by_machine_lane}{$machine}{$lane}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{$section}{by_machine_lane}{$machine}{$lane}{$key}; } } } # ############################################################### # foreach my $product (sort keys %{$totals{by_product}}) { $section = TIME; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For Product %s %s by Machine:\n", $product, $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine}}) { printf $log_fh "Machine: %s\n", $machine; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine}{$machine}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{by_product}{$product}{$section}{by_machine}{$machine}{$key}; } } } # foreach my $product (sort keys %{$totals{by_product}}) { $section = TIME; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For Product %s %s by Machine and Lane:\n", $product, $section; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}}) { printf $log_fh "Machine: %s, Lane: %s\n", $machine, $lane; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}}) { printf $log_fh "\t%-${section_precision}s: %d\n", $key, $totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}{$key}; } } } } } # sub print_u01_nozzle_report { my ($pdb) = @_; # ############################################################### # my $section = MOUNTPICKUPNOZZLE; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s by Machine, Lane, Stage, NHAdd, NCAdd, Blkserial:\n", $section; # foreach my $pcol (@nozzle_print_cols) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}}) { foreach my $blkserial (sort keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s %-30s ", $machine, $lane, $stage, $nhadd, $ncadd, $blkserial; foreach my $col (@nozzle_count_cols) { printf $log_fh "%-8d ", $totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col}; } printf $log_fh "\n"; } } } } } } # printf $log_fh "\nData For %s by Machine, Lane, Stage, NHAdd, NCAdd:\n", $section; # foreach my $pcol (@nozzle_print_cols2) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s ", $machine, $lane, $stage, $nhadd, $ncadd; foreach my $col (@nozzle_count_cols) { printf $log_fh "%-8d ", $totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col}; } printf $log_fh "\n"; } } } } } # ############################################################### # foreach my $product (sort keys %{$totals{by_product}}) { my $section = MOUNTPICKUPNOZZLE; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s %s by Machine, Lane, Stage, NHAdd, NCAdd, Blkserial:\n", $product, $section; # foreach my $pcol (@nozzle_print_cols) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}}) { foreach my $blkserial (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s %-30s ", $machine, $lane, $stage, $nhadd, $ncadd, $blkserial; foreach my $col (@nozzle_count_cols) { printf $log_fh "%-8d ", $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col}; } printf $log_fh "\n"; } } } } } } # printf $log_fh "\nData For %s %s by Machine, Lane, Stage, NHAdd, NCAdd:\n", $product, $section; # foreach my $pcol (@nozzle_print_cols2) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s ", $machine, $lane, $stage, $nhadd, $ncadd; foreach my $col (@nozzle_count_cols) { printf $log_fh "%-8d ", $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col}; } printf $log_fh "\n"; } } } } } } } # sub print_u01_feeder_report { my ($pdb) = @_; # ############################################################### # my $section = MOUNTPICKUPFEEDER; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s by Machine, Lane, Stage, FAdd, FSAdd, ReelID:\n", $section; # foreach my $pcol (@feeder_print_cols) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}}) { foreach my $reelid (sort keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s %-30s ", $machine, $lane, $stage, $fadd, $fsadd, $reelid; foreach my $col (@feeder_count_cols) { printf $log_fh "%-8d ", $totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col}; } printf $log_fh "\n"; } } } } } } # printf $log_fh "\nData For %s by Machine, Lane, Stage, FAdd, FSAdd:\n", $section; # foreach my $pcol (@feeder_print_cols2) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s ", $machine, $lane, $stage, $fadd, $fsadd; foreach my $col (@feeder_count_cols) { printf $log_fh "%-8d ", $totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col}; } printf $log_fh "\n"; } } } } } # ############################################################### # foreach my $product (sort keys %{$totals{by_product}}) { my $section = MOUNTPICKUPFEEDER; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nData For %s %s by Machine, Lane, Stage, FAdd, FSAdd, ReelID:\n", $product, $section; # foreach my $pcol (@feeder_print_cols) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}}) { foreach my $reelid (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s %-30s ", $machine, $lane, $stage, $fadd, $fsadd, $reelid; foreach my $col (@feeder_count_cols) { printf $log_fh "%-8d ", $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col}; } printf $log_fh "\n"; } } } } } } # printf $log_fh "\nData For %s %s by Machine, Lane, Stage, FAdd, FSAdd:\n", $product, $section; # foreach my $pcol (@feeder_print_cols2) { printf $log_fh $pcol->{format}, $pcol->{name}; } printf $log_fh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}}) { printf $log_fh "%-8s %-8s %-8s %-8s %-8s ", $machine, $lane, $stage, $fadd, $fsadd; foreach my $col (@feeder_count_cols) { printf $log_fh "%-8d ", $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col}; } printf $log_fh "\n"; } } } } } } } # sub print_u01_report { my ($pdb) = @_; # print_u01_count_report($pdb); print_u01_time_report($pdb); print_u01_nozzle_report($pdb); print_u01_feeder_report($pdb); } # ###################################################################### # # export u01 file report functions # sub export_u01_count_report { my ($pdb) = @_; # ############################################################### # my $section = COUNT; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Total Data For %s:\n", $section; # my $first_time = TRUE; # open(my $outfh, ">" , "${export_dir}/COUNT_TOTALS.csv") || die $!; # foreach my $key (sort keys %{$totals{$section}{totals}}) { if ($first_time == TRUE) { printf $outfh "%s", $key; $first_time = FALSE; } else { printf $outfh ",%s", $key; } } printf $outfh "\n"; # $first_time = TRUE; foreach my $key (sort keys %{$totals{$section}{totals}}) { if ($first_time == TRUE) { printf $outfh "%d", $totals{$section}{totals}{$key}; $first_time = FALSE; } else { printf $outfh ",%d", $totals{$section}{totals}{$key}; } } printf $outfh "\n"; close($outfh); # $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Machine:\n", $section; # $first_time = TRUE; # open($outfh, ">" , "${export_dir}/COUNT_BY_MACHINE.csv") || die $!; foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine}}) { if ($first_time == TRUE) { printf $outfh "machine"; foreach my $key (sort keys %{$totals{$section}{by_machine}{$machine}}) { printf $outfh ",%s", $key; } printf $outfh "\n"; $first_time = FALSE; } # printf $outfh "%s", $machine; foreach my $key (sort keys %{$totals{$section}{by_machine}{$machine}}) { printf $outfh ",%d", $totals{$section}{by_machine}{$machine}{$key}; } printf $outfh "\n"; } close($outfh); # $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Machine and Lane:\n", $section; # $first_time = TRUE; open($outfh, ">" , "${export_dir}/COUNT_BY_MACHINE_LANE.csv") || die $!; foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}{$machine}}) { if ($first_time == TRUE) { printf $outfh "machine,lane"; foreach my $key (sort keys %{$totals{$section}{by_machine_lane}{$machine}{$lane}}) { printf $outfh ",%s", $key; } printf $outfh "\n"; $first_time = FALSE; } # printf $outfh "%s,%s", $machine, $lane; foreach my $key (sort keys %{$totals{$section}{by_machine_lane}{$machine}{$lane}}) { printf $outfh ",%d", $totals{$section}{by_machine_lane}{$machine}{$lane}{$key}; } printf $outfh "\n"; } } close($outfh); # ############################################################### # $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Total Data For %s by Product:\n", $section; # $first_time = TRUE; open($outfh, ">" , "${export_dir}/COUNT_TOTALS_BY_PRODUCT.csv") || die $!; foreach my $product (sort keys %{$totals{by_product}}) { if ($first_time == TRUE) { printf $outfh "product"; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{totals}}) { printf $outfh ",%s", $key; } printf $outfh "\n"; $first_time = FALSE; } # printf $outfh "%s", $product; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{totals}}) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{totals}{$key}; } printf $outfh "\n"; } close($outfh); # $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Product and Machine:\n", $section; # $first_time = TRUE; open($outfh, ">" , "${export_dir}/COUNT_BY_PRODUCT_MACHINE.csv") || die $!; foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine}}) { if ($first_time == TRUE) { printf $outfh "product,machine"; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine}{$machine}}) { printf $outfh ",%s", $key; } printf $outfh "\n"; $first_time = FALSE; } # printf $outfh "%s,%s", $product, $machine; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine}{$machine}}) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine}{$machine}{$key}; } printf $outfh "\n"; } } close($outfh); # $section = COUNT; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Product, Machine and Lane:\n", $section; # $first_time = TRUE; open($outfh, ">" , "${export_dir}/COUNT_BY_PRODUCT_MACHINE_LANE.csv") || die $!; foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}}) { if ($first_time == TRUE) { printf $outfh "product,machine,lane"; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}}) { printf $outfh ",%s", $key; } printf $outfh "\n"; $first_time = FALSE; } # printf $outfh "%s,%s,%s", $product, $machine, $lane; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}}) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}{$key}; } printf $outfh "\n"; } } } close($outfh); } # sub export_u01_time_report { my ($pdb) = @_; # ############################################################### # my $section = TIME; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Machine:\n", $section; # open(my $outfh, ">" , "${export_dir}/TIME_BY_MACHINE.csv") || die $!; foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine}}) { printf $outfh "%s", $machine; foreach my $key (sort keys %{$totals{$section}{by_machine}{$machine}}) { printf $outfh ",%d", $totals{$section}{by_machine}{$machine}{$key}; } printf $outfh "\n", } close($outfh); # $section = TIME; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Machine and Lane:\n", $section; # open($outfh, ">" , "${export_dir}/TIME_BY_MACHINE_LANE.csv") || die $!; foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane}{$machine}}) { printf $outfh "%s,%s", $machine, $lane; foreach my $key (sort keys %{$totals{$section}{by_machine_lane}{$machine}{$lane}}) { printf $outfh ",%d", $totals{$section}{by_machine_lane}{$machine}{$lane}{$key}; } printf $outfh "\n"; } } close($outfh); # ############################################################### # $section = TIME; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Product and Machine:\n", $section; # open($outfh, ">" , "${export_dir}/TIME_BY_PRODUCT_MACHINE.csv") || die $!; foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine}}) { printf $outfh "%s,%s", $product, $machine; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine}{$machine}}) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine}{$machine}{$key}; } printf $outfh "\n"; } } close($outfh); # printf $log_fh "\nExport Data For %s by Product, Machine and Lane:\n", $section; # open($outfh, ">" , "${export_dir}/TIME_BY_PRODUCT_MACHINE_LANE.csv") || die $!; foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}}) { printf $outfh "%s,s,%s", $product, $machine, $lane; foreach my $key (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}}) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine_lane}{$machine}{$lane}{$key}; } printf $outfh "\n"; } } } close($outfh); } # sub export_u01_nozzle_report { my ($pdb) = @_; # ############################################################### # my $section = MOUNTPICKUPNOZZLE; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Machine, Lane, Stage, NHAdd, NCAdd, Blkserial:\n", $section; # open(my $outfh, ">" , "${export_dir}/NOZZLE_BY_MACHINE_LANE_STAGE_NHADD_NCADD_BLKSERIAL.csv") || die $!; foreach my $pcol (@nozzle_export_cols) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}}) { foreach my $blkserial (sort keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}}) { printf $outfh "%s,%s,%s,%s,%s,%s", $machine, $lane, $stage, $nhadd, $ncadd, $blkserial; foreach my $col (@nozzle_count_cols) { printf $outfh ",%d", $totals{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col}; } printf $outfh "\n"; } } } } } } close($outfh); # printf $log_fh "\nExport Data For %s by Machine, Lane, Stage, NHAdd, NCAdd:\n", $section; # open($outfh, ">" , "${export_dir}/NOZZLE_BY_MACHINE_LANE_STAGE_NHADD_NCADD.csv") || die $!; foreach my $pcol (@nozzle_export_cols2) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}}) { printf $outfh "%s,%s,%s,%s,%s", $machine, $lane, $stage, $nhadd, $ncadd; foreach my $col (@nozzle_count_cols) { printf $outfh ",%d", $totals{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col}; } printf $outfh "\n"; } } } } } close($outfh); # ############################################################### # $section = MOUNTPICKUPNOZZLE; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Product, Machine, Lane, Stage, NHAdd, NCAdd, Blkserial:\n", $section; # open($outfh, ">" , "${export_dir}/NOZZLE_BY_MACHINE_LANE_STAGE_NHADD_NCADD_BLKSERIAL.csv") || die $!; printf $outfh "product,"; foreach my $pcol (@nozzle_export_cols) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}}) { foreach my $blkserial (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}}) { printf $outfh "%s,%s,%s,%s,%s,%s,%s", $product, $machine, $lane, $stage, $nhadd, $ncadd, $blkserial; foreach my $col (@nozzle_count_cols) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd_blkserial}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$blkserial}{$col}; } printf $outfh "\n"; } } } } } } } close($outfh); # printf $log_fh "\nExport Data For %s by Product, Machine, Lane, Stage, NHAdd, NCAdd:\n", $section; # open($outfh, ">" , "${export_dir}/NOZZLE_BY_PRODUCT_MACHINE_LANE_STAGE_NHADD_NCADD.csv") || die $!; printf $outfh "product,"; foreach my $pcol (@nozzle_export_cols2) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}}) { foreach my $nhadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}}) { foreach my $ncadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}}) { printf $outfh "%s,%s,%s,%s,%s,%s", $product, $machine, $lane, $stage, $nhadd, $ncadd; foreach my $col (@nozzle_count_cols) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine_lane_stage_nhadd_ncadd}{$machine}{$lane}{$stage}{$nhadd}{$ncadd}{$col}; } printf $outfh "\n"; } } } } } } close($outfh); } # sub export_u01_feeder_report { my ($pdb) = @_; # ############################################################### # my $section = MOUNTPICKUPFEEDER; my $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Machine, Lane, Stage, FAdd, FSAdd, ReelID:\n", $section; # open(my $outfh, ">" , "${export_dir}/FEEDER_BY_MACHINE_LANE_STAGE_FADD_FSADD_REELID.csv") || die $!; foreach my $pcol (@feeder_export_cols) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}}) { foreach my $reelid (sort keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}}) { printf $outfh "%s,%s,%s,%s,%s,%s", $machine, $lane, $stage, $fadd, $fsadd, $reelid; foreach my $col (@feeder_count_cols) { printf $outfh ",%d", $totals{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col}; } printf $outfh "\n"; } } } } } } close($outfh); # printf $log_fh "\nExport Data For %s by Machine, Lane, Stage, FAdd, FSAdd:\n", $section; # open($outfh, ">" , "${export_dir}/FEEDER_BY_MACHINE_LANE_STAGE_FADD_FSADD.csv") || die $!; foreach my $pcol (@feeder_export_cols2) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $machine (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}}) { printf $outfh "%s,%s,%s,%s,%s", $machine, $lane, $stage, $fadd, $fsadd; foreach my $col (@feeder_count_cols) { printf $outfh ",%d", $totals{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col}; } printf $outfh "\n"; } } } } } close($outfh); # ############################################################### # $section = MOUNTPICKUPFEEDER; $section_precision = $report_precision{$section}{precision}; # printf $log_fh "\nExport Data For %s by Product, Machine, Lane, Stage, FAdd, FSAdd, ReelID:\n", $section; # open($outfh, ">" , "${export_dir}/FEEDER_BY_PRODUCT_MACHINE_LANE_STAGE_FADD_FSADD_REELID.csv") || die $!; printf $outfh "product,"; foreach my $pcol (@feeder_export_cols) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}}) { foreach my $reelid (sort keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}}) { printf $outfh "%s,%s,%s,%s,%s,%s,%s", $product, $machine, $lane, $stage, $fadd, $fsadd, $reelid; foreach my $col (@feeder_count_cols) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd_reelid}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$reelid}{$col}; } printf $outfh "\n"; } } } } } } } close($outfh); # printf $log_fh "\nExport Data For %s by Product, Machine, Lane, Stage, FAdd, FSAdd:\n", $section; # open($outfh, ">" , "${export_dir}/FEEDER_BY_PRODUCT_MACHINE_LANE_STAGE_FADD_FSADD.csv") || die $!; printf $outfh "product,"; foreach my $pcol (@feeder_export_cols2) { printf $outfh $pcol->{format}, $pcol->{name}; } printf $outfh "\n"; # foreach my $product (sort keys %{$totals{by_product}}) { foreach my $machine (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}}) { foreach my $lane (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}}) { foreach my $stage (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}}) { foreach my $fadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}}) { foreach my $fsadd (sort { $a <=> $b } keys %{$totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}}) { printf $outfh "%s,%s,%s,%s,%s,%s", $product, $machine, $lane, $stage, $fadd, $fsadd; foreach my $col (@feeder_count_cols) { printf $outfh ",%d", $totals{by_product}{$product}{$section}{by_machine_lane_stage_fadd_fsadd}{$machine}{$lane}{$stage}{$fadd}{$fsadd}{$col}; } printf $outfh "\n"; } } } } } } close($outfh); } # sub export_u01_report { my ($pdb) = @_; # export_u01_count_report($pdb); export_u01_time_report($pdb); export_u01_nozzle_report($pdb); export_u01_feeder_report($pdb); } # sub process_u01_files { my ($pu01s) = @_; # # any files to process? # if (scalar(@{$pu01s}) <= 0) { printf $log_fh "No U01 files to process. Returning.\n\n"; return; } # my %db = (); audit_u01_files($pu01s, \%db); # unless ($audit_only == TRUE) { if ($export_csv == TRUE) { export_u01_report(\%db); } else { print_u01_report(\%db); } } # return; } # ###################################################################### # # audit U03 files # sub load_u03_sections { my ($pu03) = @_; # load_name_value($pu03, INDEX); load_name_value($pu03, INFORMATION); # load_list($pu03, BRECG); load_list($pu03, BRECGCALC); load_list($pu03, ELAPSETIMERECOG); load_list($pu03, SBOARD); load_list($pu03, HEIGHTCORRECT); load_list($pu03, MOUNTQUALITYTRACE); load_list($pu03, MOUNTLATESTREEL); load_list($pu03, MOUNTEXCHANGEREEL); } # # don't need this. leave it for now in case that changes. # sub copy_u03_data { my ($pdb, $pu03, $section) = @_; # my $filename = $pu03->{file_name}; my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; # my $pcols = $pu03->{$section}->{column_names}; $pdb->{$section}->{$machine}{$lane}{$stage}{column_names} = $pcols; # delete $pdb->{$section}->{$machine}{$lane}{$stage}{data}; # foreach my $prow (@{$pu03->{$section}->{data}}) { unshift @{$pdb->{$section}->{$machine}{$lane}{$stage}{data}}, $prow; } } # sub tabulate_u03_quality_trace { my ($pdb, $pu03) = @_; # my $filename = $pu03->{file_name}; my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; # my $section = MOUNTQUALITYTRACE; my $product = $pdb->{product}{u03}{$machine}{$lane}{$stage}; # my $pcols = $pu03->{$section}->{column_names}; $totals{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{column_names} = $pcols; # foreach my $prow (@{$pu03->{$section}->{data}}) { unshift @{$totals{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{data}}, $prow; } # $totals{$section}{by_product_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{column_names} = $pcols; # foreach my $prow (@{$pu03->{$section}->{data}}) { unshift @{$totals{by_product}{$product}{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{data}}, $prow; } } # sub tabulate_u03_latest_reel { my ($pdb, $pu03) = @_; # my $filename = $pu03->{file_name}; my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; # my $section = MOUNTLATESTREEL; my $product = $pdb->{product}{u03}{$machine}{$lane}{$stage}; # my $pcols = $pu03->{$section}->{column_names}; $totals{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{column_names} = $pcols; # foreach my $prow (@{$pu03->{$section}->{data}}) { unshift @{$totals{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{data}}, $prow; } # $totals{$section}{by_product_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{column_names} = $pcols; # foreach my $prow (@{$pu03->{$section}->{data}}) { unshift @{$totals{by_product}{$product}{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{data}}, $prow; } } # sub tabulate_u03_exchange_reel { my ($pdb, $pu03) = @_; # my $filename = $pu03->{file_name}; my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; # my $section = MOUNTEXCHANGEREEL; my $product = $pdb->{product}{u03}{$machine}{$lane}{$stage}; # my $pcols = $pu03->{$section}->{column_names}; $totals{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{column_names} = $pcols; # foreach my $prow (@{$pu03->{$section}->{data}}) { unshift @{$totals{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{data}}, $prow; } # $totals{$section}{by_product_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{column_names} = $pcols; # foreach my $prow (@{$pu03->{$section}->{data}}) { unshift @{$totals{by_product}{$product}{$section}{by_machine_lane_stage_filename}{$machine}{$lane}{$stage}{$filename}{data}}, $prow; } } # sub audit_u03_mount_quality_trace { my ($pdb, $pu03) = @_; # set_report_quality_trace_precision($pu03); # my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; my $section = MOUNTQUALITYTRACE; my $filename = $pu03->{file_name}; # printf $log_fh "\nSECTION : %s\n", $section if ($verbose >= MAXVERBOSE); # if ($verbose >= MAXVERBOSE) { printf $log_fh "MACHINE : %s\n", $machine; printf $log_fh "LANE : %d\n", $lane; printf $log_fh "STAGE : %d\n", $stage; printf $log_fh "OUTPUT NO: %s\n", $output_no; printf $log_fh "FILE RECS : %d\n", scalar(@{$pu03->{data}}); printf $log_fh "%s RECS: %d\n", $section, scalar(@{$pu03->{$section}->{data}}) if (defined(@{$pu03->{$section}->{data}})); } # # check if the file has a quality trace section. # return unless (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER)); # tabulate_u03_quality_trace($pdb, $pu03); # return; } # sub audit_u03_mount_latest_reel { my ($pdb, $pu03) = @_; # set_report_latest_reel_precision($pu03); # my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; my $section = MOUNTLATESTREEL; my $filename = $pu03->{file_name}; # printf $log_fh "\nSECTION : %s\n", $section if ($verbose >= MAXVERBOSE); # if ($verbose >= MAXVERBOSE) { printf $log_fh "MACHINE : %s\n", $machine; printf $log_fh "LANE : %d\n", $lane; printf $log_fh "STAGE : %d\n", $stage; printf $log_fh "OUTPUT NO: %s\n", $output_no; printf $log_fh "FILE RECS : %d\n", scalar(@{$pu03->{data}}); printf $log_fh "%s RECS: %d\n", $section, scalar(@{$pu03->{$section}->{data}}) if (defined(@{$pu03->{$section}->{data}})); } # # check if the file has a latest_reel section. # return unless (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER)); # tabulate_u03_latest_reel($pdb, $pu03); # return; } # sub audit_u03_mount_exchange_reel { my ($pdb, $pu03) = @_; # set_report_exchange_reel_precision($pu03); # my $machine = $pu03->{mach_no}; my $lane = $pu03->{lane}; my $stage = $pu03->{stage}; my $output_no = $pu03->{output_no}; my $section = MOUNTEXCHANGEREEL; my $filename = $pu03->{file_name}; # printf $log_fh "\nSECTION : %s\n", $section if ($verbose >= MAXVERBOSE); # if ($verbose >= MAXVERBOSE) { printf $log_fh "MACHINE : %s\n", $machine; printf $log_fh "LANE : %d\n", $lane; printf $log_fh "STAGE : %d\n", $stage; printf $log_fh "OUTPUT NO: %s\n", $output_no; printf $log_fh "FILE RECS : %d\n", scalar(@{$pu03->{data}}); printf $log_fh "%s RECS: %d\n", $section, scalar(@{$pu03->{$section}->{data}}) if (defined(@{$pu03->{$section}->{data}})); } # # check if the file has a latest reel section. # return unless (($output_no == PROD_COMPLETE) || ($output_no == PROD_COMPLETE_LATER)); # tabulate_u03_exchange_reel($pdb, $pu03); # return; } # sub audit_u03_file { my ($pdb, $pu03) = @_; # set_product_info_u03($pdb, $pu03); # audit_u03_mount_quality_trace($pdb, $pu03); audit_u03_mount_latest_reel($pdb, $pu03); audit_u03_mount_exchange_reel($pdb, $pu03); # return; } # sub audit_u03_files { my ($pu03s, $pdb) = @_; # printf $log_fh "\nAudit U03 files:\n"; # foreach my $pu03 (@{$pu03s}) { printf $log_fh "\nAudit u03: %s\n", $pu03->{file_name} if ($verbose >= MIDVERBOSE); # next unless (load($pu03) != 0); # load_u03_sections($pu03, INDEX); # audit_u03_file($pdb, $pu03); } # return; } # sub export_u01_mount_quality_trace_report { my ($pdb) = @_; } # sub export_u01_mount_latest_reel_report { my ($pdb) = @_; } # sub export_u01_mount_exchange_reel_report { my ($pdb) = @_; } # sub export_u03_report { my ($pdb) = @_; # export_u01_mount_quality_trace_report($pdb); export_u01_mount_latest_reel_report($pdb); export_u01_mount_exchange_reel_report($pdb); } # sub print_u03_report { my ($pdb) = @_; # } # sub process_u03_files { my ($pu03s) = @_; # if (scalar(@{$pu03s}) <= 0) { printf $log_fh "\nNo U03 files to process. Returning.\n\n"; return; } # my %db = (); audit_u03_files($pu03s, \%db); # unless ($audit_only == TRUE) { if ($export_csv == TRUE) { export_u03_report(\%db); } else { print_u03_report(\%db); } } # return; } # ###################################################################### # # audit MPR files # sub load_mpr_sections { my ($pmpr) = @_; # load_name_value($pmpr, INDEX); load_name_value($pmpr, INFORMATION); # load_list($pmpr, TIMEDATASP); load_list($pmpr, COUNTDATASP); load_list($pmpr, COUNTDATASP2); load_list($pmpr, TRACEDATASP); load_list($pmpr, TRACEDATASP_2); load_list($pmpr, ISPINFODATA); load_list($pmpr, MASKISPINFODATA); } # sub audit_mpr_files { my ($pmprs, $pdb) = @_; # printf $log_fh "\nAudit MPR files:\n"; # foreach my $pmpr (@{$pmprs}) { printf $log_fh "\nAudit mpr: %s\n", $pmpr->{file_name} if ($verbose >= MIDVERBOSE); # next unless (load($pmpr) != 0); # load_mpr_sections($pmpr); } # return; } # sub process_mpr_files { my ($pmprs) = @_; # if (scalar(@{$pmprs}) <= 0) { printf $log_fh "\nNo MPR files to process. Returning.\n\n"; return; } # my %db = (); audit_mpr_files($pmprs, \%db); # return; } # ###################################################################### # # scan directories for U01, U03 and MPR files. # my %all_list = (); my $one_type = ''; # sub want_one_type { if ($_ =~ m/^.*\.${one_type}$/) { printf $log_fh "FOUND %s FILE: %s\n", $one_type, $File::Find::name if ($verbose >= MAXVERBOSE); # my $file_name = $_; # my $date = ''; my $mach_no = ''; my $stage = ''; my $lane = ''; my $pcb_serial = ''; my $pcb_id = ''; my $output_no = ''; my $pcb_id_lot_no = ''; # my @parts = split('\+-\+', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } else { @parts = split('-', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } } # unshift @{$all_list{$one_type}}, { 'file_name' => $file_name, 'full_path' => $File::Find::name, 'directory' => $File::Find::dir, 'date' => $date, 'mach_no' => $mach_no, 'stage' => $stage, 'lane' => $lane, 'pcb_serial' => $pcb_serial, 'pcb_id' => $pcb_id, 'output_no' => $output_no, 'pcb_id_lot_no' => $pcb_id_lot_no }; } } # sub want_all_types { my $dt = ''; # if ($_ =~ m/^.*\.u01$/) { printf $log_fh "FOUND u01 FILE: %s\n", $File::Find::name if ($verbose >= MAXVERBOSE); $dt = 'u01'; } elsif ($_ =~ m/^.*\.u03$/) { printf $log_fh "FOUND u03 FILE: %s\n", $File::Find::name if ($verbose >= MAXVERBOSE); $dt = 'u03'; } elsif ($_ =~ m/^.*\.mpr$/) { printf $log_fh "FOUND mpr FILE: %s\n", $File::Find::name if ($verbose >= MAXVERBOSE); $dt = 'mpr'; } # if ($dt ne '') { my $file_name = $_; # my $date = ''; my $mach_no = ''; my $stage = ''; my $lane = ''; my $pcb_serial = ''; my $pcb_id = ''; my $output_no = ''; my $pcb_id_lot_no = ''; # my @parts = split('\+-\+', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } else { @parts = split('-', $file_name); if (scalar(@parts) >= 9) { $date = $parts[0]; $mach_no = $parts[1]; $stage = $parts[2]; $lane = $parts[3]; $pcb_serial = $parts[4]; $pcb_id = $parts[5]; $output_no = $parts[6]; $pcb_id_lot_no = $parts[7]; } } # unshift @{$all_list{$dt}}, { 'file_name' => $file_name, 'full_path' => $File::Find::name, 'directory' => $File::Find::dir, 'date' => $date, 'mach_no' => $mach_no, 'stage' => $stage, 'lane' => $lane, 'pcb_serial' => $pcb_serial, 'pcb_id' => $pcb_id, 'output_no' => $output_no, 'pcb_id_lot_no' => $pcb_id_lot_no }; } } # sub get_all_files { my ($ftype, $pargv, $pu01, $pu03, $pmpr) = @_; # # optimize for file type # if ($ftype eq 'u01') { $one_type = $ftype; $all_list{$one_type} = $pu01; # find(\&want_one_type, @{$pargv}); # @{$pu01} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu01}; } elsif ($ftype eq 'u03') { $one_type = $ftype; $all_list{$one_type} = $pu03; # find(\&want_one_type, @{$pargv}); # @{$pu03} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu03}; } elsif ($ftype eq 'mpr') { $one_type = $ftype; $all_list{$one_type} = $pmpr; # find(\&want_one_type, @{$pargv}); # @{$pmpr} = sort { $a->{file_name} cmp $b->{file_name} } @{$pmpr}; } else { $all_list{u01} = $pu01; $all_list{u03} = $pu03; $all_list{mpr} = $pmpr; # find(\&want_all_types, @{$pargv}); # @{$pu01} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu01}; @{$pu03} = sort { $a->{file_name} cmp $b->{file_name} } @{$pu03}; @{$pmpr} = sort { $a->{file_name} cmp $b->{file_name} } @{$pmpr}; } } # ######################################################################### # # start of script # my %opts; if (getopts('?L:O:anxhwWv:d:t:r:', \%opts) != 1) { usage($cmd); exit 2; } # foreach my $opt (%opts) { if ($opt eq "h") { usage($cmd); exit 0; } elsif ($opt eq "w") { $verbose = MINVERBOSE; } elsif ($opt eq "W") { $verbose = MIDVERBOSE; } elsif ($opt eq "a") { $audit_only = TRUE; } elsif ($opt eq "x") { $export_csv = TRUE; } elsif ($opt eq "n") { $use_neg_delta = 1; printf $log_fh "Will USE negative delta values.\n"; } elsif ($opt eq "t") { $file_type = $opts{$opt}; $file_type =~ tr/[A-Z]/[a-z]/; if ($file_type !~ m/^(u01|u03|mpr)$/i) { printf $log_fh "\nInvalid file type: $opts{$opt}\n"; usage($cmd); exit 2; } } elsif ($opt eq "O") { my $option = $opts{$opt}; $option =~ tr/[a-z]/[A-Z]/; if ($option eq "IGN12") { $proc_option |= PROC_OPT_IGN12; } elsif ($option eq "NMVAL2") { $proc_option |= PROC_OPT_NMVAL2; } elsif ($option eq "IGNALL12") { $proc_option |= PROC_OPT_IGNALL12; } else { printf $log_fh "\nInvalid option type: $opts{$opt}\n"; usage($cmd); exit 2; } } elsif ($opt eq "L") { local *FH; $logfile = $opts{$opt}; open(FH, '>', $logfile) or die $!; $log_fh = *FH; printf $log_fh "\nLog File: %s\n", $logfile; } elsif ($opt eq "r") { $red_flag_trigger = $opts{$opt}; if (($red_flag_trigger !~ m/^[0-9][0-9]*$/) || ($red_flag_trigger < 0)) { printf $log_fh "\nInvalid Red Flag value; must be integer > 0.\n"; usage($cmd); exit 2; } printf $log_fh "\nRed Flag trigger value: %d\n", $red_flag_trigger; } elsif ($opt eq "d") { $export_dir = $opts{$opt}; mkpath($export_dir) unless ( -d $export_dir ); printf $log_fh "\nExport directory: %s\n", $export_dir; } elsif ($opt eq "v") { if ($opts{$opt} =~ m/^[0123]$/) { $verbose = $opts{$opt}; } elsif (exist($verbose_levels{$opts{$opt}})) { $verbose = $verbose_levels{$opts{$opt}}; } else { printf $log_fh "\nInvalid verbose level: $opts{$opt}\n"; usage($cmd); exit 2; } } } # if (scalar(@ARGV) == 0) { printf $log_fh "No directories given.\n"; usage($cmd); exit 2; } # printf $log_fh "\nScan directories for U01, U03 and MPR files: \n\n"; # my @u01_files = (); my @u03_files = (); my @mpr_files = (); # init_report_precision(); # get_all_files($file_type, \@ARGV, \@u01_files, \@u03_files, \@mpr_files); printf $log_fh "Number of U01 files: %d\n", scalar(@u01_files); printf $log_fh "Number of U03 files: %d\n", scalar(@u03_files); printf $log_fh "Number of MPR files: %d\n\n", scalar(@mpr_files); # process_u01_files(\@u01_files); process_u03_files(\@u03_files); process_mpr_files(\@mpr_files); # printf $log_fh "\nAll Done\n"; # exit 0;
ombt/analytics
sql/1504231330-lnb-file-audit/lnbdata2csv.pl
Perl
mit
156,399
#! /usr/bin/perl # IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/build/install/resources/cflash_perst.pl $ # # IBM Data Engine for NoSQL - Power Systems Edition User Library Project # # Contributors Listed Below - COPYRIGHT 2014,2015 # [+] International Business Machines Corp. # # # 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. # # IBM_PROLOG_END_TAG ## use strict; use warnings; use Fcntl; use Fcntl ':seek'; use Getopt::Long; #------------------------------------------------------------------------------- # Variables #------------------------------------------------------------------------------- my $target=""; my $partition0; # reload factory image my $id="2"; my $prthelp=0; my $verbose; my $v=""; my $rc; my $VM=0; if ( `cat /proc/cpuinfo | grep platform 2>/dev/null` =~ "pSeries" ) { $VM=1;} if ( $VM ) { print "\nNot Supported on VM\n\n"; exit -1;} sub runcmd { my $cmd=shift; my $rc=0; system($cmd); $rc=$?; if ($rc != 0) { print "CMD_FAIL: ($cmd), rc=$rc\n"; exit -1; } } sub usage() { print "\n"; print "Usage: cflash_perst.pl [-t <target>] \n"; print " -t or --target : Target device to perst \n"; print " -h or --help : Help - Print this message \n"; print "\n ex: cflash_perst.pl -t 000N:01:00.0 \n\n"; exit 0; } #------------------------------------------------------------------------------- # Parse Options #------------------------------------------------------------------------------- if ($#ARGV<0) {usage();} if (! GetOptions ("t|target=s" => \$target, "p0" => \$partition0, "v" => \$verbose, "h|help!" => \$prthelp )) { usage(); } if ($ARGV[0]) { print "\nUnknown Command Line Options:\n"; foreach(@ARGV) { print " $_\n"; } print "\n"; usage(); } if ($prthelp) {usage();} #check sudo permissions if (`id -u` != 0) { print "Run with sudo permissions to perst\n"; exit -2; } #check cxlflash is not loaded system("lsmod | grep cxlflash >/dev/null"); if ($? == 0) { print "rmmod cxlflash before perst\n"; exit -3; } #------------------------------------------------------------------------------- # Make stdout autoflush #------------------------------------------------------------------------------- select(STDOUT); $| = 1; #------------------------------------------------------------------------------- # list Devices #------------------------------------------------------------------------------- my $basedir=`ls -d /sys/devices/*/*/$target/cxl/card* 2>/dev/null`; my $image="user"; chomp $basedir; if (! -d $basedir) { print "bad target: $target\n"; exit -4; } my $cardN=substr $basedir,-1; if ($partition0) { $image="factory"; } runcmd("echo $image > $basedir/load_image_on_perst"); runcmd("echo 0 > $basedir/perst_reloads_same_image"); runcmd("cp /opt/ibm/capikv/afu/blacklist-cxlflash.conf /etc/modprobe.d"); runcmd("echo 1 > $basedir/reset"); #wait for image_loaded my $timer=30; my $image_loaded; my $cxlfile="/dev/cxl/afu$cardN.0m"; $rc=-9; while ($timer--) { print "."; sleep 1; if (-e $cxlfile) { $basedir=`ls -d /sys/devices/*/*/$target/cxl/card* 2>/dev/null`; chomp $basedir; if (-e "$basedir/image_loaded") { $image_loaded=`cat $basedir/image_loaded`; chomp $image_loaded; if ($image_loaded ne $image) { print "image requested was $image, but image_loaded is $image_loaded\n"; $rc=-5; last; } print "$target successfully loaded $image\n"; sleep 1; $rc=0; last; } } } if ($rc == -9) {print "timeout waiting for $target $cxlfile\n";} else {runcmd("echo 1 > $basedir/perst_reloads_same_image");} runcmd("rm /etc/modprobe.d/blacklist-cxlflash.conf"); exit 0;
odaira/capiflash
src/build/install/resources/cflash_perst.pl
Perl
apache-2.0
4,468
#!/usr/bin/perl require "/perfstat/build/serialize/create/ServiceConfig.pl"; #add create new service $service = Service->new( RRA => "RRA:AVERAGE:0.5:1:288 RRA:AVERAGE:0.5:7:288 RRA:AVERAGE:0.5:30:288 RRA:AVERAGE:0.5:365:288", rrdStep => "300", serviceName => "fs", ); #add metric 0 $obj = Metric->new( rrdIndex => 0, metricName => "inodeUsedPct", friendlyName => "Inode % Utilization", status => "nostatus", rrdDST => GAUGE, rrdHeartbeat => 600, rrdMin => 0, rrdMax => U, hasEvents => 1, warnThreshold => 80, critThreshold => 90, thresholdUnit => "Percent", ); $service->addMetric($obj); #add metric 1 $obj = Metric->new( rrdIndex => 1, metricName => "fsUsedPct", friendlyName => "File System % Utilization", status => "nostatus", rrdDST => GAUGE, rrdHeartbeat => 600, rrdMin => 0, rrdMax => U, hasEvents => 1, warnThreshold => 80, critThreshold => 90, thresholdUnit => "Percent", ); $service->addMetric($obj); #print out this service print ("Ref: ref($service)\n"); $serviceName = $service->getServiceName(); $RRA = $service->getRRA(); $rrdStep = $service->getRRDStep(); $lastUpdate = $service->getLastUpdate(); print ("serviceName: $serviceName\n"); print ("RRA: $RRA\n"); print ("rrdStep: $rrdStep\n"); print ("Last Update: $lastUpdate\n"); #print out this services metrics $arrayLength = $service->getMetricArrayLength(); print ("metric Array Length = $arrayLength\n\n"); for ($counter=0; $counter < $arrayLength; $counter++) { $metricObject = $service->{metricArray}->[$counter]; $rrdIndex = $metricObject->getRRDIndex(); $rrdDST = $metricObject->getRRDDST(); $rrdHeartbeat = $metricObject->getRRDHeartbeat(); $rrdMin = $metricObject->getRRDMin(); $rrdMax = $metricObject->getRRDMax(); $metricName = $metricObject->getMetricName(); $friendlyName = $metricObject->getFriendlyName(); $status = $metricObject->getStatus(); $hasEvents = $metricObject->getHasEvents(); $warnThreshold = $metricObject->getWarnThreshold(); $critThreshold = $metricObject->getCritThreshold(); $thresholdUnit = $metricObject->getThresholdUnit(); print ("rrdIndex: $rrdIndex\n"); print ("rrdDST: $rrdDST\n"); print ("rrdHeartbeat: $rrdHeartbeat\n"); print ("rrdMin: $rrdMin\n"); print ("rrdMax: $rrdMax\n"); print ("metricName: $metricName\n"); print ("friendlyName: $friendlyName\n"); print ("status: $status\n"); print ("hasEvents: $hasEvents\n"); print ("warnThreshold: $warnThreshold\n"); print ("critThreshold: $critThreshold\n"); print ("threshUnit: $thresholdUnit\n\n"); } #print out this services graphs $arrayLength = $service->getGraphArrayLength(); print ("graph Array Length = $arrayLength\n\n"); for ($counter=0; $counter < $arrayLength; $counter++) { $graphObject = $service->{graphArray}->[$counter]; $name = $graphObject->getName(); $title = $graphObject->getTitle(); $y_axis = $graphObject->getYaxis(); $legend = $graphObject->getLegend(); $text = $graphObject->getText(); print ("name: $name\n"); print ("title: $title\n"); print ("y_axis: $y_axis\n"); print ("legend: $legend\n"); print ("text: $text\n"); $arrayLength2 = $graphObject->getOptionsArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("option: $graphObject->{optionsArray}->[$counter2]\n"); } $arrayLength2 = $graphObject->getDefArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("def: $graphObject->{defArray}->[$counter2]\n"); } $arrayLength2 = $graphObject->getCdefArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("cdef: $graphObject->{cdefArray}->[$counter2]\n"); } $arrayLength2 = $graphObject->getLineArrayLength(); for ($counter2=0; $counter2 < $arrayLength2; $counter2++) { print ("line: $graphObject->{lineArray}->[$counter2]\n"); } } #Store the service $service->store("$perfhome/etc/configs/Linux/$service->{serviceName}.ser") or die("can't store $service->{serviceName}.ser?\n");
ktenzer/perfstat
misc/serialize/create/Linux/20904/fs.pl
Perl
apache-2.0
4,090
package # Date::Manip::Offset::off218; # Copyright (c) 2008-2014 Sullivan Beck. All rights reserved. # This program is free software; you can redistribute it and/or modify it # under the same terms as Perl itself. # This file was automatically generated. Any changes to this file will # be lost the next time 'tzdata' is run. # Generated on: Fri Nov 21 11:03:45 EST 2014 # Data version: tzdata2014j # Code version: tzcode2014j # This module contains data from the zoneinfo time zone database. The original # data was obtained from the URL: # ftp://ftp.iana.orgtz use strict; use warnings; require 5.010000; our ($VERSION); $VERSION='6.48'; END { undef $VERSION; } our ($Offset,%Offset); END { undef $Offset; undef %Offset; } $Offset = '+12:19:20'; %Offset = ( 0 => [ 'pacific/tongatapu', ], ); 1;
nriley/Pester
Source/Manip/Offset/off218.pm
Perl
bsd-2-clause
855
package WebService::VaultPress::Partner::Response; use Moose; our $VERSION = '0.05'; $VERSION = eval $VERSION; has api_call => ( is => 'ro', isa => 'Str' ); has ticket => ( is => 'ro', isa => 'Str' ); has unused => ( is => 'ro', isa => 'Int' ); has basic => ( is => 'ro', isa => 'Int' ); has premium => ( is => 'ro', isa => 'Int' ); has email => ( is => 'ro', isa => 'Str' ); has lname => ( is => 'ro', isa => 'Str' ); has fname => ( is => 'ro', isa => 'Str' ); has created => ( is => 'ro', isa => 'Str' ); has type => ( is => 'ro', isa => 'Str' ); has redeemed => ( is => 'ro', isa => 'Str' ); __PACKAGE__->meta->make_immutable; 1; =head1 NAME WebService::VaultPress::Partner::Response - The VaultPress Partner API Client Response Object =head1 VERSION version 0.05 =head1 SYNOPSIS #!/usr/bin/perl use warnings; use strict; use lib 'lib'; use WebService::VaultPress::Partner; my $vp = WebService::VaultPress::Partner->new( key => 'Your API Key Goes Here', ); my $result = eval { $vp->GetUsage }; if ( $@ ) { print "->GetUsage had an error: $@"; } else { printf( "%7s => %5d\n", $_, $result->$_ ) for qw/ unused basic premium /; } my @results = $vp->GetHistory; if ( $@ ) { print "->GetHistory had an error: $@"; } else { for my $res ( @results ) { printf( "| %-20s | %-20s | %-30s | %-19s | %-19s | %-7s |\n", $res->fname, $res->lname, $res->email, $res->created, $res->redeemed, $res->type ); } } # Give Alan Shore a 'Golden Ticket' to VaultPress my $ticket = eval { $vp->CreateGoldenTicket( fname => 'Alan', lname => 'Shore', email => 'alan.shore@gmail.com', ); }; if ( $@ ) { print "->CreateGoldenTicket had an error: $@"; } else { print "You can sign up for your VaultPress account <a href=\"" . $ticket->ticket ."\">Here!</a>\n"; } =head1 DESCRIPTION This document outlines the methods available through the WebService::VaultPress::Partner::Response class. You should not instantiate an object of this class yourself when using WebService::VaultPress::Partner, it is returned in response to a request. Please extend this class when adding new methods to WebService::VaultPress::Partner. WebService::VaultPress::Partner is a set of Perl modules that provide a simple and consistent Client API to the VaultPress Partner API. The main focus of the library is to provide classes and functions that allow you to quickly access VaultPress from Perl applications. The modules consist of the WebService::VaultPress::Partner module itself as well as a handful of WebService::VaultPress::Partner::Request modules as well as a response object, WebService::VaultPress::Partner::Response, that provides consistent error and success methods. =head1 METHODS =over 4 =item api_call =over 4 =item Set By WebService::VaultPress::Partner->CreateGoldenTicket WebService::VaultPress::Partner->GetHistory WebService::VaultPress::Partner->GetRedeemedHistory WebService::VaultPress::Partner->GetUsage =item Value Description The name of the request type for which this is a response of. "CreateGoldenTicket" or a response to ->CreateGoldenTicket, "GetHistory" for a response to ->GetHistory and so on. =back =item ticket =over 4 =item Set By WebService::VaultPress::Partner->CreateGoldenTicket =item Value Description Upon a successful execution and return of ->CreateGoldenTicket this will hold a string for whose value is theURL for the user to redeem her Golden Ticket. =back =item unused =over 4 =item Set By WebService::VaultPress::Partner->GetUsage =item Value Description Upon a successful execution and return of ->GetUsage this will hold an integer whose value is the number of Golden Tickets created for which there has yet to be a redemption. =back =item basic =over 4 =item Set By WebService::VaultPress::Partner->GetUsage =item Value Description Upon a successful execution and return of ->GetUsage this will hold an integer whose value is the number of Golden Tickets created for which there was redemption of as an account type 'basic'. =back =item premium =over 4 =item Set By WebService::VaultPress::Partner->GetUsage =item Value Description Upon a successful execution and return of ->GetUsage this will hold an integer whose value is the number of Golden Tickets created for which there was redemption of as an account type 'premium'. =back =item email =over 4 =item Set By WebService::VaultPress::Partner->GetHistory WebService::VaultPress::Partner->GetRedeemedHistory =item Value Description Upon successful execution and return of ->GetHistory or ->GetRedeemedHistory this will hold a string whose value is the email address of the user for whom a Golden Ticket was issued. =back =item fname =over 4 =item Set By WebService::VaultPress::Partner->GetHistory WebService::VaultPress::Partner->GetRedeemedHistory =item Value Description Upon successful execution and return of ->GetHistory or ->GetRedeemedHistory this will hold a string whose value is the first name of the user for whom a Golden Ticket was issued. =back =item lname =over 4 =item Set By WebService::VaultPress::Partner->GetHistory WebService::VaultPress::Partner->GetRedeemedHistory =item Value Description Upon successful execution and return of ->GetHistory or ->GetRedeemedHistory this will hold a string whose value is the last name of the user for whom a Golden Ticket was issued. =back =item created =over 4 =item Set By WebService::VaultPress::Partner->GetHistory WebService::VaultPress::Partner->GetRedeemedHistory =item Value Description Upon successful execution and return of ->GetHistory or ->GetRedeemedHistory this will hold a string whose value is the date and time when the Golden Ticket was created. The format is 'YYYY-MM-DD HH:MM:SS' =back =item <ype =over 4 =item Set By WebService::VaultPress::Partner->GetHistory WebService::VaultPress::Partner->GetRedeemedHistory =item Value Description Upon successful execution and return of ->GetHistory or ->GetRedeemedHistory this will hold a string whose value is the type of service for which the Golden Ticket was redeemed for. 'basic' or 'premium'. In a case where the Golden Ticket has not been redeemed this will be "". =back =item redeemed =over 4 =item Set By WebService::VaultPress::Partner->GetHistory WebService::VaultPress::Partner->GetRedeemedHistory =item Value Description Upon successful execution and return of ->GetHistory or ->GetRedeemedHistory this will hold a string whose value is the date and time when the Golden Ticket was created. The format is 'YYYY-MM-DD HH:MM:SS' If the Golden Ticket has not been redeemed the value will be '0000-00-00 00:00:00'. GetRedeemedHistory will not return results in the set which has not been redeemed. =back =back =head1 SEE ALSO WebService::VaultPress::Partner VaultPress::Partner::Request::History VaultPress::Partner::Usage WebService::VaultPress::Partner::GoldenTicket =head1 AUTHOR SymKat I<E<lt>symkat@symkat.comE<gt>> =head1 COPYRIGHT AND LICENSE This is free software licensed under a I<BSD-Style> License. Please see the LICENSE file included in this package for more detailed information. =head1 AVAILABILITY The latest version of this software is available through GitHub at https://github.com/mediatemple/webservice-vaultpress-partner/ =cut
gitpan/WebService-VaultPress-Partner
lib/WebService/VaultPress/Partner/Response.pm
Perl
bsd-3-clause
7,495
#!/usr/bin/perl ############################################################################### ##OCSINVENTORY-NG ##Copyleft Pascal DANEK 2005 ##Web : http://www.ocsinventory-ng.org ## ##This code is open source and may be copied and modified as long as the source ##code is always made freely available. ##Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt ################################################################################ # # use DBI; use XML::Simple; use Net::IP qw(:PROC); use strict; use Fcntl qw/:flock/; #Command line options : #-analyse : nmap analyse and files for grep, human readable and xml generation #-net : Treat machine for the specified subnet # # ################ #OPTIONS READING ################ # my $option; #Specify a subnet my $net; #Subnet name my $filter; #Analyse and class the computers my $analyse; #Net for a given ip my $iptarget; my $masktarget; #If auto flag, running for all the subnet.csv subnet and generate files my $auto; #Search for problems with computer election my $ipd; my $list; my $xml; my $cache; my $path; #Default values for database connection # my $dbhost = 'localhost'; my $dbuser = 'ocs'; my $dbpwd = 'ocs'; my $db = 'ocsweb'; my $dbp = '3306'; my $dbsocket = ''; # my %xml; my $ipdiscover; #Cleanup the directory &_cleanup(); for $option (@ARGV){ if($option=~/-a$/){ $analyse = 1; }elsif($option=~/-auto$/){ $auto = 1; }elsif($option=~/-cache$/){ $cache = 1; $analyse = 1; $xml = 1; }elsif($option=~/-path=(\S*)$/){ $path = $1; }elsif($option=~/-ipdiscover=(\d+)$/){ $ipdiscover = 1; $ipd = $1; }elsif($option=~/-xml$/){ $xml = 1; }elsif($option=~/-h=(\S+)/){ $dbhost = $1; }elsif($option=~/-d=(\S+)/){ $db = $1; }elsif($option=~/-u=(\S+)/){ $dbuser = $1; }elsif($option=~/-p=(\S+)/){ $dbpwd = $1; }elsif($option=~/-P=(\S+)/){ $dbp = $1; }elsif($option=~/-list$/){ $list = 1; }elsif($option=~/-s=(\S+)/){ $dbsocket = $1; }elsif($option=~/-net=(\S+)/){ die "Invalid subnet. Abort...\n" unless $1=~/^(\d{1,3}(?:\.\d{1,3}){3})$/; $net = 1; $filter = $1; }elsif($option=~/-ip=(\S+)/){ die "Invalid address => [IP/MASK]. Abort...\n" unless $1=~/^(\d{1,3}(?:\.\d{1,3}){3})\/(.+)$/; $iptarget = $1; $masktarget = $2; }else{ print <<EOF; Usage : -ip=X.X.X.X/X.X.X.X (ex: 10.1.1.1/255.255.240.0 or 10.1.1.1/20)-> Looks for the ip in a subnet -net=X.X.X.X -> Specify a network -a -> Launch the analyze -ipdiscover=X -> Show all the subnet with up to XX ipdiscover -xml -> xml output -list=show all the networks present in the database with "connected"/"discovered" computers #DATABASE OPTION -p=xxxx password (default ocs) -P=xxxx port (default 3306) -d=xxxx database name (default ocsweb) -u=xxxx user (default ocs) -h=xxxx host (default localhost) -s=xxxx socket (default from default mysql configuration) EOF die "Invalid options. Abort..\n"; } } if($analyse and !$net){ die "Which subnet do you want to analyse ?\n"; } if($cache or $auto){ unless(-d "$path/ipd"){ mkdir("$path/ipd") or die $!; } } #Date of the day my $date = localtime(); ####################### #Database connection... ######## # my $request; my $row; my $dbparams = {}; $dbparams->{'mysql_socket'} = $dbsocket if $dbsocket; my $dbh = DBI->connect("DBI:mysql:database=$db;host=$dbhost;port=$dbp", $dbuser, $dbpwd, $dbparams) or die $!; ############################# #We get the subnet/name pairs #### # my @subnet; $request = $dbh->prepare("SELECT * FROM subnet"); $request->execute; while($row = $request->fetchrow_hashref){ push @subnet, [ $row->{'NETID'}, $row->{'NAME'}, $row->{'ID'}, $row->{'MASK'} ]; } ########### #PROCESSING ########### # if($auto){ print "\n\n########################\n"; print "Starting scan of subnets\n"; print "########################\n"; my %subnet; for(@subnet){ my $name = $_->[1]; my $netn = $_->[0]; $name=~s/ /_/g; $name=~s/\//\\\//g; $subnet{$name} = $netn; print "Retrieving $name (".$subnet{$name}.")\n"; } my $i; print "\n\n##################\n"; print "PROCESSING SUBNETS \n"; print "##################\n\n"; for(keys(%subnet)){ print "Processing $_ (".$subnet{$_}."). ".(keys(%subnet)-$i)." networks left.\n"; open OUT, ">$path/ipd/".$subnet{$_}.".ipd" or die $!; unless(flock(OUT, LOCK_EX|LOCK_NB)){ if($xml){ print "<ERROR><MESSAGE>345</MESSAGE></ERROR>"; exit(0); }else{ die "An other analyse is in progress\n"; } } system("./ipdiscover-util.pl -net=".$subnet{$_}.($xml?' -xml':'')." -a > $path/ipd/'".$subnet{$_}.".ipd'"); $i++; } system ("rm -f ipdiscover-analyze.*"); print "Done.\n"; exit(0); } #Host subnet my $network; #Subnet mask in binary format my $binmask; if($ipdiscover){ my @networks; #get the subnets my $result; die "Invalid value\n" if $ipd<0; $request = $dbh->prepare('select distinct(ipsubnet) from networks left outer join devices on tvalue=ipsubnet where tvalue is null'); $request->execute; while($row = $request->fetchrow_hashref){ push @networks, [ $row->{'ipsubnet'}, '0' ]; } $request->finish; #If positive value, it includes other subnet if($ipd){ $request = $dbh->prepare('select count(*) nb,tvalue,name from devices group by tvalue having nb<='.$ipd.' and name="ipdiscover"'); $request->execute; while($row = $request->fetchrow_hashref){ push @networks, [ $row->{'tvalue'}, $row->{'nb'} ]; } $request->finish; } print <<EOF unless($xml); ############################ #IP DISCOVER IP/SUBNET REPORTS #$date #Subnets with max $ipd # ipdiscover computers ############################ EOF # my $output; my ($i,$j); for $network (@networks){ my $ip = $network->[0]; my $nbipd = $network->[1]; next unless $ip =~ /^\d{1,3}(?:\.\d{1,3}){3}$/; my $req = $dbh->prepare('select h.deviceid, h.id, h.name, h.quality,h.fidelity,h.lastcome,h.lastdate,osname, n.ipmask, n.ipaddress from hardware h,networks n where n.hardware_id=h.id and n.ipsubnet='.$dbh->quote($ip).' order by lastdate'); $req->execute; #Get the subnet label unless($xml){ print "#######\n"; my ($nname, $nuid) = &_getnetname($ip, ''); print "SUBNET = ".$ip."-> $nbipd ipdiscover, ".($req->rows?$req->rows:0)." host(s) connected \n[ $nname ($nuid) ]\n"; print "#\n\n"; printf(" %-25s %-9s %-9s %-25s %-15s %-15s %s\n", "<Name>","<Quality>","<Fidelity>","<LastInventory>","<IP>","<Netmask>","<OS>"); print "-----------------------------------------------------------------------------------------------------------------------\n"; while($result = $req->fetchrow_hashref){ my $r = $dbh->prepare('select * from devices where hardware_id='.$dbh->quote($result->{'id'}).' and tvalue='.$dbh->quote($ip).' and name="ipdiscover"'); $r->execute; printf("#-> %-25s %-9s %-9s %-25s %-15s %15s %s %s\n",$result->{'name'},$result->{'quality'},$result->{'fidelity'},$result->{'lastdate'},$result->{'ipaddress'}, $result->{'ipmask'},$result->{'osname'} ,$r->rows?'*':''); $r->finish; } print "\n\n\n\n"; }else{ $xml{'SUBNET'}[$i]{'IP'} = [ $ip ]; $xml{'SUBNET'}[$i]{'IPDISCOVER'} = [ $nbipd ]; $xml{'SUBNET'}[$i]{'HOSTS'} = [ $req->rows?$req->rows:0 ]; $j = 0; while($result = $req->fetchrow_hashref){ $xml{'SUBNET'}[$i]{'HOST'}[$j]{'NAME'} = [ $result->{'name'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'QUALITY'} = [ $result->{'quality'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'FIDELITY'} = [ $result->{'fidelity'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'LASTDATE'} = [ $result->{'lastdate'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'OSNAME'} = [ $result->{'osname'} ]; $xml{'SUBNET'}[$i]{'HOST'}[$j]{'IPMASK'} = [ $result->{'ipmask'} ]; $j++; } $i++; } } if($xml){ $output=XML::Simple::XMLout( \%xml, RootName => 'NET', SuppressEmpty => undef); print $output; } exit(0); } ############# ##IP resolving ############## ## if($iptarget){ my $netname; #If necessary, ascii conversion of a binary format $masktarget = _bintoascii($masktarget) if($masktarget=~/^\d\d$/); die "Invalid netmask. Abort.\n" unless $masktarget=~/^\d{1,3}(\.\d{1,3}){3}$/; $network = _network($iptarget, $masktarget); my $uid; ($netname, $uid)= &_getnetname($network, '-'); my @nmb = `nmblookup -A $iptarget`; #DNS name my $dnsname = &_getdns($iptarget); #Netbios name my $nmbname; my $inv; my $type; for(@nmb){ $nmbname = $1,last if /\s+(\S+).*<00>/; } $request = $dbh->prepare('SELECT * FROM networks WHERE IPADDRESS='.$dbh->quote($iptarget)); $request->execute; if($request->rows){ $inv = 1; $type = 'Computer'; }else{ $request = $dbh->prepare('SELECT IP,TYPE FROM netmap, network_devices WHERE MAC=MACADDR AND IP='.$dbh->quote($iptarget)); $request->execute; if(my $row = $request->fetchrow_hashref){ $inv = 1, $type = $row->{'TYPE'}; } } $request = $dbh->prepare('SELECT MAC FROM netmap WHERE IP='.$dbh->quote($iptarget)); $request->execute; my $exist = 1 if $request->rows; unless($xml){ print <<EOF; ######################### #IPDISCOVER Ver 1.0b #IP DISCOVER REPORT #$date ########################## EOF print "\n--> ".($netname).". ($uid) ($network)\n"; print <<EOF; Netbios name : $nmbname DNS name : $dnsname EOF printf("Inventoried : %s\n",$inv?'Yes':'No'); printf("Discovered : %s\n",$exist?'Yes':'No'); print "Type : $type\n" if $inv; print "\nDone.\n\n"; exit(0); }else{ my $output; $xml{'IP'} = [ $iptarget ]; $xml{'NETNAME'} = [ $netname ]; $xml{'NETNUM'} = [ $network ]; $xml{'NETBIOS'} = [ $nmbname ]; $xml{'DNS'} = [ $dnsname ]; $xml{'INVENTORIED'} = [ $inv?'yes':'no' ]; $xml{'DISCOVERED'} = [ $exist?'yes':'no' ]; $xml{'TYPE'} = [ $type ] if $inv; $output=XML::Simple::XMLout( \%xml, RootName => 'IP', SuppressEmpty => undef); print $output; exit(0); } } # #Searching non-inventoried mac addresses # my %network; my @hosts; my $null; # # Filter out already flagged MAC addresses - drich $request = $dbh->prepare('SELECT IP,MASK,MAC,DATE FROM netmap LEFT JOIN networks ON MACADDR=MAC where MACADDR IS NULL AND MAC NOT IN (SELECT MACADDR FROM network_devices)'); $request->execute; # #Determine the subnets # # my %network_ipd; # while($row = $request->fetchrow_hashref){ my $ip; my $netmask; # if($row->{'MASK'}){ $ip = $row->{'IP'}; $netmask = $row->{'MASK'}; $network = _network($ip, $netmask); $binmask = _binmask($netmask); if($net){ next unless $network eq $filter; } #Hosts count per subnet if($list and !$analyse and !$net){ $network_ipd{$network}++; }else{ $network{$network}++; push @hosts, [ $row->{'MAC'}, $ip , $row->{'DATE'}]; } }else{ $null++; } } my $total = 0; #We want ALL subnets in the database, even those that are not discovered if($list and !$analyse and !$net){ $request = $dbh->prepare('SELECT IPADDRESS,IPMASK FROM networks'); $request->execute; while($row = $request->fetchrow_hashref){ my $ip; my $netmask; # if($row->{'IPMASK'}=~/^\d{1,3}(\.\d{1,3}){3}$/ and $row->{'IPADDRESS'}=~/^\d{1,3}(\.\d{1,3}){3}$/){ $ip = $row->{'IPADDRESS'}; $netmask = $row->{'IPMASK'}; $network = _network($ip, $netmask); $network{$network}++; } #Hosts count per subnet } #We show the part of non-inventoried computers my $netnum; for $netnum (keys(%network)){ $total+=$network{$netnum}; for(keys(%network_ipd)){ $network{$netnum}.= "/".$network_ipd{$_} if($_ eq $netnum); } } } ######## #RESULTS ######## # print <<EOF unless $xml; ######################### IPDISCOVER Ver 1.0b IP DISCOVER REPORT $date ######################### EOF unless($xml){ printf("%-35s %-5s %-20s %-4s\n", "<Name>","<UID>","<Subnet>","<Nb>"); print "-------------------------------------------------------------------\n"; } #net UID my $dep; #net name my $lib; # my $line; my $netn; # my $i; my $output; for $netn (keys(%network)){ ($lib, $dep) = &_getnetname($netn,'-'); if($xml and !$analyse){ $xml{'NETWORK'}[$i]{'LABEL'} = [ $lib ]; $xml{'NETWORK'}[$i]{'UID'} = [ $dep ]; $xml{'NETWORK'}[$i]{'NETNAME'} = [ $netn ]; $xml{'NETWORK'}[$i]{'NETNUMBER'} = [ $network{$netn} ]; $i++; }elsif(!$xml){ printf("%-35s %-5s %-20s %-4s\n",$lib,$dep,$netn,$network{$netn}); $total += $network{$netn} unless $list; } } if($xml and !$net){ $output=XML::Simple::XMLout( \%xml, RootName => 'IPDISCOVER', SuppressEmpty => undef); print $output; } if($net){ # my($n, $i); #Host names my @names; # unless($xml){ print "\n---------------------------------------------\n"; print "Unknown host(s) on $filter \n"; print "---------------------------------------------\n\n"; } my $output; for $n (@hosts){ #Trying a DNS resolution push @$n, &_getdns($$n[1]); unless($analyse){ if($xml){ $xml{'HOST'}[$i]{'IP'} = [ $$n[1] ]; $xml{'HOST'}[$i]{'MAC'} = [ $$n[0] ]; $xml{'HOST'}[$i]{'DATE'} = [ $$n[2] ]; $xml{'HOST'}[$i]{'NAME'} = [ $$n[3] ]; $i++; }else{ printf("=> %-20s %-20s %-20s %s\n",$$n[1],$$n[0],$$n[2],$$n[3]); } } } if(!$analyse and $xml){ $output=XML::Simple::XMLout( \%xml, RootName => 'NET', SuppressEmpty => undef); print $output; } } ######## #ANALYZE ######## # # # #windows computers my @PCW; #Linux computers my @PCL; #Mac computers my @PCM; #net peripherals my @PR; #Phantom computers my @PH; #At least one port filtered with one port open or closed my @PF; if($analyse){ #directory creation for analyses file if($cache){ open CACHE, ">$path/ipd/$filter.ipd" or die $!; unless(flock(CACHE, LOCK_EX|LOCK_NB)){ if($xml){ print "<ERROR><MESSAGE>346</MESSAGE></ERROR>"; exit(0); }else{ die "An other analyse is in progress\n"; } } } unless(@hosts){ print "No unknown hosts of this network. Stop.\n\n" unless $xml; exit(0); } #If it's a global analyze, we don't display the results but just generate the files #Using nmap : # -> Connection on ports 135(msrpc), 80(web), 22(ssh), 23(telnet) # -> files ipdiscover-analyze.* generated (3 formats : .nmap(human), .gnmap(pour grep), .xml(xml) # -> No 'host up' detection # my @ips; push @ips, $$_[1] for(@hosts); #Check that there is no analyses of this network pending open NMAP, "+>$path/$filter.gnmap"; unless(flock(NMAP, LOCK_EX|LOCK_NB)){ if($xml){ print "<ERROR><MESSAGE>347</MESSAGE></ERROR>"; exit(0); }else{ die "An other analyse is in progress\n"; } } #Analyse system("nmap -R -v @ips -p 135,80,22,23 -oG $path/$filter.gnmap -P0 -O > /dev/null"); # my @gnmap; if($net){ @gnmap = <NMAP>; close NMAP; unlink "$path/$filter.gnmap"; # ########### # my $ref; my ($h, $w, $j, $r, $f, $l); REF: for $ref (@hosts){ $h = $$ref[1]; for(@gnmap){ next if /^#/; # Skip comments if(/Host: $h\b/){ if (/Status: Down/){ $PH[$j] = $ref; $j++; next REF; }elsif(/Status: /){ # status up is meaningless to us next; } # Try OS detection first if(/OS: .*Windows/){ $PCW[$w] = $ref; $w++; next REF; }elsif(/OS: .*Apple Mac/){ $PCM[$l] = $ref; $l++; next REF; }elsif(/OS: .*Linux/ and !/OS: .*embedded/){ $PCL[$l] = $ref; $l++; next REF; }elsif(/OS: /){ # Something else, call it network $PR[$r] = $ref; $r++; next REF; } if(/135\/o/){ $PCW[$w] = $ref; $w++; next REF; }elsif( (/22\/c.+23\/c.+80\/o.+135\/c/) or (/22\/c.+23\/o.+80\/c.+135\/c/) or (/22\/c.+23\/o.+80\/o.+135\/c/) or (/22\/o.+23\/o/) ){ $PR[$r] = $ref; $r++; next REF; }elsif(/(22\/f.+23\/f.+80\/f.+135\/c|22\/c.+23\/c.+80\/c.+135\/c)/){ $PH[$j] = $ref; $j++; next REF; }elsif(/(22\/f.+23\/f.+80\/f.+135\/f)/){ $PF[$f] = $ref; $f++; next REF; }else{ $PCL[$l] = $ref; $l++; next REF; } } } } #Display results print "<NETANALYSE>\n" if $xml; print CACHE "<NETANALYSE>\n" if $xml; &_print(\@PCW, 'WINDOWS COMPUTERS'); &_print(\@PCL, 'LINUX COMPUTERS'); &_print(\@PCM, 'MAC COMPUTERS'); &_print(\@PR, 'NETWORK DEVICES'); &_print(\@PF, 'FILTERED HOSTS'); &_print(\@PH, 'PHANTOM HOSTS'); print "</NETANALYSE>\n" if $xml; print CACHE "</NETANALYSE>\n" if $xml; } } ################## #DISLAY SUBROUTINE ################## # sub _print{ my $ref = shift; my $lib = shift; if(@$ref){ my $nb; unless($xml){ print "#" for(0..(length($lib)+3)); print "\n"; print "# ".$lib." #"; print "\n"; print "#" for(0..(length($lib)+3)); print "\n"; print "#----------------------------------------------------------------------------\n"; printf("#%-20s %-20s %-25s %s\n", "IP address", "MAC address", "DNS/Netbios", "Date"); print "#----------------------------------------------------------------------------\n#\n"; } $nb = 0; my $output; %xml = undef; for(@$ref){ $$_[3] = &_smbname($$_[1]) if $$_[3] eq "-"; if($xml){ $xml{'IP'} = [ $$_[1] ]; $xml{'MAC'} = [ $$_[0] ]; $xml{'NAME'} = [ $$_[3] ]; $xml{'DATE'} = [ $$_[2] ]; $xml{'TYPE'} = ['WINDOWS'] if $lib =~/windows/i; $xml{'TYPE'} = ['LINUX'] if $lib =~/linux/i; $xml{'TYPE'} = ['MAC'] if $lib =~/mac/i; $xml{'TYPE'} = ['FILTERED'] if $lib =~/filtered/i; $xml{'TYPE'} = ['NETWORK'] if $lib =~/network/i; $xml{'TYPE'} = ['PHANTOM'] if $lib =~/phantom/i; $output=XML::Simple::XMLout( \%xml, RootName => 'HOST', SuppressEmpty => undef); print $output; print CACHE $output if $cache; }else{ printf("#-> %-15s %-20s %-20s %s\n",$$_[1],$$_[0],$$_[3],$$_[2]); $nb++; } } unless($xml){ print "#\n#==========> $nb host(s)\n#\n\n\n"; } } } # ######################################### #ROUTINE DE RECUPERATION DES NOMS NETBIOS ######################################### # sub _smbname{ my $flag = 0; my $name; my $ip = shift; #If no dns name, we try a netbios resolution my @smb = `nmblookup -A $ip`; #On cherche un enregistrment <00> pour l'ip passee en argument for(@smb){ $name = "-"; /Looking\D+(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})$/ unless $flag; if(/<00>/){ /^\s+(\S+)/; $name = $1; return $name; } } return "-"; } ############## #CLEAN *.gnmap ############## # sub _cleanup{ my($name, @files); opendir DIR, $path; while($name = readdir DIR){ push @files, $name if $name=~/\.gnmap$/i; } closedir DIR; for(@files){ open FILE, $_ or next; unlink "$path/$_" if(flock(FILE, LOCK_EX|LOCK_NB)); } } print "|\n|\n---------------------------------------------\n|" unless $xml; if($list){ print "\n|--> TOTAL = $total valid (ips/netmask) in the database\n" unless $xml; exit(0); } unless($xml){ print "\n|--> TOTAL = $total unknown hosts\n"; print "\n|--> WARNING: $null discovered computers without netmask on all discovered machine\n\n" if $null; } #Try to get dns name sub _getdns{ my $ip = shift; my $name; chomp(my @names = `host $ip 2>/dev/null`); for(@names){ return $1 if /.+pointer (.+)/i; return $1 if /Name:\s*(\S+)/i; } return("-"); } #Retrieve the name of the subnet if available sub _getnetname{ my $network = shift; my $r = shift; for(@subnet){ if($_->[0] eq $network){ return ($_->[1], $_->[2]); last; } } return($r, $r); } #To retrieve the net ip sub _network{ my $ip = shift; my $netmask = shift; my $binip = &ip_iptobin($ip, 4); my $binmask = &ip_iptobin($netmask, 4); my $subnet = $binip & $binmask; return(&ip_bintoip($subnet, 4)) or die(Error()); } sub _bintoascii{ my $binmask = shift; my $binstring = "1" x $binmask; $binstring .= "0" for(1..(32 - $binmask)); return(&ip_bintoip($binstring, 4)) or die(Error()); } sub _binmask{ my $ip = shift; return(&ip_iptobin($ip, 4)) or die(Error()); }
himynameismax/codeigniter
ocsinventory-reports/ocsreports/ipdiscover-util.pl
Perl
mit
20,892
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is machine-generated by lib/unicore/mktables from the Unicode # database, Version 6.2.0. Any changes made here will be lost! # !!!!!!! INTERNAL PERL USE ONLY !!!!!!! # This file is for internal use by core Perl only. The format and even the # name or existence of this file are subject to change without notice. Don't # use it directly. return <<'END'; 0061 007A 00AA 00B5 00BA 00DF 00F6 00F8 00FF 0101 0103 0105 0107 0109 010B 010D 010F 0111 0113 0115 0117 0119 011B 011D 011F 0121 0123 0125 0127 0129 012B 012D 012F 0131 0133 0135 0137 0138 013A 013C 013E 0140 0142 0144 0146 0148 0149 014B 014D 014F 0151 0153 0155 0157 0159 015B 015D 015F 0161 0163 0165 0167 0169 016B 016D 016F 0171 0173 0175 0177 017A 017C 017E 0180 0183 0185 0188 018C 018D 0192 0195 0199 019B 019E 01A1 01A3 01A5 01A8 01AA 01AB 01AD 01B0 01B4 01B6 01B9 01BA 01BD 01BF 01C6 01C9 01CC 01CE 01D0 01D2 01D4 01D6 01D8 01DA 01DC 01DD 01DF 01E1 01E3 01E5 01E7 01E9 01EB 01ED 01EF 01F0 01F3 01F5 01F9 01FB 01FD 01FF 0201 0203 0205 0207 0209 020B 020D 020F 0211 0213 0215 0217 0219 021B 021D 021F 0221 0223 0225 0227 0229 022B 022D 022F 0231 0233 0239 023C 023F 0240 0242 0247 0249 024B 024D 024F 0293 0295 02B8 02C0 02C1 02E0 02E4 0371 0373 0377 037A 037D 0390 03AC 03CE 03D0 03D1 03D5 03D7 03D9 03DB 03DD 03DF 03E1 03E3 03E5 03E7 03E9 03EB 03ED 03EF 03F3 03F5 03F8 03FB 03FC 0430 045F 0461 0463 0465 0467 0469 046B 046D 046F 0471 0473 0475 0477 0479 047B 047D 047F 0481 048B 048D 048F 0491 0493 0495 0497 0499 049B 049D 049F 04A1 04A3 04A5 04A7 04A9 04AB 04AD 04AF 04B1 04B3 04B5 04B7 04B9 04BB 04BD 04BF 04C2 04C4 04C6 04C8 04CA 04CC 04CE 04CF 04D1 04D3 04D5 04D7 04D9 04DB 04DD 04DF 04E1 04E3 04E5 04E7 04E9 04EB 04ED 04EF 04F1 04F3 04F5 04F7 04F9 04FB 04FD 04FF 0501 0503 0505 0507 0509 050B 050D 050F 0511 0513 0515 0517 0519 051B 051D 051F 0521 0523 0525 0527 0561 0587 1D00 1DBF 1E01 1E03 1E05 1E07 1E09 1E0B 1E0D 1E0F 1E11 1E13 1E15 1E17 1E19 1E1B 1E1D 1E1F 1E21 1E23 1E25 1E27 1E29 1E2B 1E2D 1E2F 1E31 1E33 1E35 1E37 1E39 1E3B 1E3D 1E3F 1E41 1E43 1E45 1E47 1E49 1E4B 1E4D 1E4F 1E51 1E53 1E55 1E57 1E59 1E5B 1E5D 1E5F 1E61 1E63 1E65 1E67 1E69 1E6B 1E6D 1E6F 1E71 1E73 1E75 1E77 1E79 1E7B 1E7D 1E7F 1E81 1E83 1E85 1E87 1E89 1E8B 1E8D 1E8F 1E91 1E93 1E95 1E9D 1E9F 1EA1 1EA3 1EA5 1EA7 1EA9 1EAB 1EAD 1EAF 1EB1 1EB3 1EB5 1EB7 1EB9 1EBB 1EBD 1EBF 1EC1 1EC3 1EC5 1EC7 1EC9 1ECB 1ECD 1ECF 1ED1 1ED3 1ED5 1ED7 1ED9 1EDB 1EDD 1EDF 1EE1 1EE3 1EE5 1EE7 1EE9 1EEB 1EED 1EEF 1EF1 1EF3 1EF5 1EF7 1EF9 1EFB 1EFD 1EFF 1F07 1F10 1F15 1F20 1F27 1F30 1F37 1F40 1F45 1F50 1F57 1F60 1F67 1F70 1F7D 1F80 1F87 1F90 1F97 1FA0 1FA7 1FB0 1FB4 1FB6 1FB7 1FBE 1FC2 1FC4 1FC6 1FC7 1FD0 1FD3 1FD6 1FD7 1FE0 1FE7 1FF2 1FF4 1FF6 1FF7 2071 207F 2090 209C 210A 210E 210F 2113 212F 2134 2139 213C 213D 2146 2149 214E 2170 217F 2184 24D0 24E9 2C30 2C5E 2C61 2C65 2C66 2C68 2C6A 2C6C 2C71 2C73 2C74 2C76 2C7D 2C81 2C83 2C85 2C87 2C89 2C8B 2C8D 2C8F 2C91 2C93 2C95 2C97 2C99 2C9B 2C9D 2C9F 2CA1 2CA3 2CA5 2CA7 2CA9 2CAB 2CAD 2CAF 2CB1 2CB3 2CB5 2CB7 2CB9 2CBB 2CBD 2CBF 2CC1 2CC3 2CC5 2CC7 2CC9 2CCB 2CCD 2CCF 2CD1 2CD3 2CD5 2CD7 2CD9 2CDB 2CDD 2CDF 2CE1 2CE3 2CE4 2CEC 2CEE 2CF3 2D00 2D25 2D27 2D2D A641 A643 A645 A647 A649 A64B A64D A64F A651 A653 A655 A657 A659 A65B A65D A65F A661 A663 A665 A667 A669 A66B A66D A681 A683 A685 A687 A689 A68B A68D A68F A691 A693 A695 A697 A723 A725 A727 A729 A72B A72D A72F A731 A733 A735 A737 A739 A73B A73D A73F A741 A743 A745 A747 A749 A74B A74D A74F A751 A753 A755 A757 A759 A75B A75D A75F A761 A763 A765 A767 A769 A76B A76D A76F A778 A77A A77C A77F A781 A783 A785 A787 A78C A78E A791 A793 A7A1 A7A3 A7A5 A7A7 A7A9 A7F8 A7FA FB00 FB06 FB13 FB17 FF41 FF5A 10428 1044F 1D41A 1D433 1D44E 1D454 1D456 1D467 1D482 1D49B 1D4B6 1D4B9 1D4BB 1D4BD 1D4C3 1D4C5 1D4CF 1D4EA 1D503 1D51E 1D537 1D552 1D56B 1D586 1D59F 1D5BA 1D5D3 1D5EE 1D607 1D622 1D63B 1D656 1D66F 1D68A 1D6A5 1D6C2 1D6DA 1D6DC 1D6E1 1D6FC 1D714 1D716 1D71B 1D736 1D74E 1D750 1D755 1D770 1D788 1D78A 1D78F 1D7AA 1D7C2 1D7C4 1D7C9 1D7CB END
Bjay1435/capstone
rootfs/usr/share/perl/5.18.2/unicore/lib/SB/LO.pl
Perl
mit
5,083
#------------------------------------------------------------------------------ # File: Ogg.pm # # Description: Read Ogg meta information # # Revisions: 2011/07/13 - P. Harvey Created (split from Vorbis.pm) # 2016/07/14 - PH Added Ogg Opus support # # References: 1) http://www.xiph.org/vorbis/doc/ # 2) http://flac.sourceforge.net/ogg_mapping.html # 3) http://www.theora.org/doc/Theora.pdf #------------------------------------------------------------------------------ package Image::ExifTool::Ogg; use strict; use vars qw($VERSION); use Image::ExifTool qw(:DataAccess :Utils); $VERSION = '1.02'; my $MAX_PACKETS = 2; # maximum packets to scan from each stream at start of file # Information types recognizedi in Ogg files %Image::ExifTool::Ogg::Main = ( NOTES => q{ ExifTool extracts the following types of information from Ogg files. See L<http://www.xiph.org/vorbis/doc/> for the Ogg specification. }, # (these are for documentation purposes only, and aren't used by the code below) vorbis => { SubDirectory => { TagTable => 'Image::ExifTool::Vorbis::Main' } }, theora => { SubDirectory => { TagTable => 'Image::ExifTool::Theora::Main' } }, Opus => { SubDirectory => { TagTable => 'Image::ExifTool::Opus::Main' } }, FLAC => { SubDirectory => { TagTable => 'Image::ExifTool::FLAC::Main' } }, ID3 => { SubDirectory => { TagTable => 'Image::ExifTool::ID3::Main' } }, ); #------------------------------------------------------------------------------ # Process Ogg packet # Inputs: 0) ExifTool object ref, 1) data ref # Returns: 1 on success sub ProcessPacket($$) { my ($et, $dataPt) = @_; my $rtnVal = 0; if ($$dataPt =~ /^(.)(vorbis|theora)/s or $$dataPt =~ /^(OpusHead|OpusTags)/) { my ($tag, $type, $pos) = $2 ? (ord($1), ucfirst($2), 7) : ($1, 'Opus', 8); # this is an OGV file if it contains Theora video $et->OverrideFileType('OGV') if $type eq 'Theora' and $$et{FILE_TYPE} eq 'OGG'; $et->OverrideFileType('OPUS') if $type eq 'Opus' and $$et{FILE_TYPE} eq 'OGG'; my $tagTablePtr = GetTagTable("Image::ExifTool::${type}::Main"); my $tagInfo = $et->GetTagInfo($tagTablePtr, $tag); return 0 unless $tagInfo and $$tagInfo{SubDirectory}; my $subdir = $$tagInfo{SubDirectory}; my %dirInfo = ( DataPt => $dataPt, DirName => $$tagInfo{Name}, DirStart => $pos, ); my $table = GetTagTable($$subdir{TagTable}); # set group1 so Theoris comments can be distinguised from Vorbis comments $$et{SET_GROUP1} = $type if $type eq 'Theora'; SetByteOrder($$subdir{ByteOrder}) if $$subdir{ByteOrder}; $rtnVal = $et->ProcessDirectory(\%dirInfo, $table); SetByteOrder('II'); delete $$et{SET_GROUP1}; } return $rtnVal; } #------------------------------------------------------------------------------ # Extract information from an Ogg file # Inputs: 0) ExifTool object reference, 1) dirInfo reference # Returns: 1 on success, 0 if this wasn't a valid Ogg file sub ProcessOGG($$) { my ($et, $dirInfo) = @_; # must first check for leading/trailing ID3 information unless ($$et{DoneID3}) { require Image::ExifTool::ID3; Image::ExifTool::ID3::ProcessID3($et, $dirInfo) and return 1; } my $raf = $$dirInfo{RAF}; my $verbose = $et->Options('Verbose'); my $out = $et->Options('TextOut'); my ($success, $page, $packets, $streams, $stream) = (0,0,0,0,''); my ($buff, $flag, %val, $numFlac, %streamPage); for (;;) { # must read ahead to next page to see if it is a continuation # (this code would be a lot simpler if the continuation flag # was on the leading instead of the trailing page!) if ($raf and $raf->Read($buff, 28) == 28) { # validate magic number unless ($buff =~ /^OggS/) { $success and $et->Warn('Lost synchronization'); last; } unless ($success) { # set file type and initialize on first page $success = 1; $et->SetFileType(); SetByteOrder('II'); } $flag = Get8u(\$buff, 5); # page flag $stream = Get32u(\$buff, 14); # stream serial number if ($flag & 0x02) { ++$streams; # count start-of-stream pages $streamPage{$stream} = $page = 0; } else { $page = $streamPage{$stream}; } ++$packets unless $flag & 0x01; # keep track of packet count } else { # all done unless we have to process our last packet last unless %val; ($stream) = sort keys %val; # take a stream $flag = 0; # no continuation undef $raf; # flag for done reading } if (defined $numFlac) { # stop to process FLAC headers if we hit the end of file last unless $raf; --$numFlac; # one less header packet to read } else { # can finally process previous packet from this stream # unless this is a continuation page if (defined $val{$stream} and not $flag & 0x01) { ProcessPacket($et, \$val{$stream}); delete $val{$stream}; # only read the first $MAX_PACKETS packets from each stream if ($packets > $MAX_PACKETS * $streams or not defined $raf) { last unless %val; # all done (success!) } } # stop processing Ogg if we have scanned enough packets last if $packets > $MAX_PACKETS * $streams and not %val; } # continue processing the current page my $pageNum = Get32u(\$buff, 18); # page sequence number my $nseg = Get8u(\$buff, 26); # number of segments # calculate total data length my $dataLen = Get8u(\$buff, 27); if ($nseg) { $raf->Read($buff, $nseg-1) == $nseg-1 or last; my @segs = unpack('C*', $buff); # could check that all these (but the last) are 255... foreach (@segs) { $dataLen += $_ } } if (defined $page) { if ($page == $pageNum) { $streamPage{$stream} = ++$page; } else { $et->Warn('Missing page(s) in Ogg file'); undef $page; delete $streamPage{$stream}; } } # read page data $raf->Read($buff, $dataLen) == $dataLen or last; if ($verbose > 1) { printf $out "Page %d, stream 0x%x, flag 0x%x (%d bytes)\n", $pageNum, $stream, $flag, $dataLen; $et->VerboseDump(\$buff, DataPos => $raf->Tell() - $dataLen); } if (defined $val{$stream}) { $val{$stream} .= $buff; # add this continuation page } elsif (not $flag & 0x01) { # ignore remaining pages of a continued packet # ignore the first page of any packet we aren't parsing if ($buff =~ /^(.(vorbis|theora)|Opus(Head|Tags))/s) { $val{$stream} = $buff; # save this page } elsif ($buff =~ /^\x7fFLAC..(..)/s) { $numFlac = unpack('n',$1); $val{$stream} = substr($buff, 9); } } if (defined $numFlac) { # stop to process FLAC headers if we have them all last if $numFlac <= 0; } elsif (defined $val{$stream} and $flag & 0x04) { # process Ogg packet now if end-of-stream bit is set ProcessPacket($et, \$val{$stream}); delete $val{$stream}; } } if (defined $numFlac and defined $val{$stream}) { # process FLAC headers as if it was a complete FLAC file require Image::ExifTool::FLAC; my %dirInfo = ( RAF => new File::RandomAccess(\$val{$stream}) ); Image::ExifTool::FLAC::ProcessFLAC($et, \%dirInfo); } return $success; } 1; # end __END__ =head1 NAME Image::ExifTool::Ogg - Read Ogg meta information =head1 SYNOPSIS This module is used by Image::ExifTool =head1 DESCRIPTION This module contains definitions required by Image::ExifTool to extract meta information from Ogg bitstream container files. =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 REFERENCES =over 4 =item L<http://www.xiph.org/vorbis/doc/> =item L<http://flac.sourceforge.net/ogg_mapping.html> =item L<http://www.theora.org/doc/Theora.pdf> =back =head1 SEE ALSO L<Image::ExifTool::TagNames/Ogg Tags>, L<Image::ExifTool(3pm)|Image::ExifTool> =cut
musselwhizzle/Focus-Points
focuspoints.lrdevplugin/bin/exiftool/lib/Image/ExifTool/Ogg.pm
Perl
apache-2.0
9,020
package JobDB::MetaDataCollection; use strict; use warnings; use Data::Dumper; sub last_id { my ($self) = @_; my $dbh = $self->_master()->db_handle(); my $sth = $dbh->prepare("SELECT max(ID + 0) FROM MetaDataCollection"); $sth->execute; my $result = $sth->fetchrow_arrayref(); my ($id) = $result->[0] =~/^(\d+)/; return $id || "0" ; } =item * B<data> () Returns a hash of all MDE keys and values for a collection. If a key is given, returns only hash of specified key, value pair. Sets a value if key and value is given (return true or false if works) =cut sub data { my ($self, $tag, $value) = @_; my $dbh = $self->_master->db_handle; my $sth; if (defined($value) and $tag) { if (ref $value) { print STDERR "ERROR: invalid value type for $tag ($value) \n"; print STDERR Dumper $value; return 0; } my $jstat = $self->_master->MetaDataEntry->get_objects({ collection => $self, tag => $tag }); if (ref $jstat and scalar @$jstat) { $jstat->[0]->value($value); } else { $jstat = $self->_master->MetaDataEntry->create({ collection => $self, tag => $tag, value => $value }); } return 1; } elsif ($tag) { $sth = $dbh->prepare("SELECT tag, value FROM MetaDataEntry where collection=".$self->_id." and tag='$tag'"); } else { $sth = $dbh->prepare("SELECT tag, value FROM MetaDataEntry where collection=".$self->_id); } $sth->execute; my $results = $sth->fetchall_arrayref(); my $rhash = {}; foreach my $set (@$results) { if (defined($set->[1]) && ($set->[1] =~ /\S/)) { $set->[1] =~ s/(envo|gaz)://i; $rhash->{$set->[0]} = $set->[1]; } } return $rhash; } =item * B<value_set> () Returns a list of values for given tag =cut sub value_set { my ($self, $tag) = @_; my $set = []; my $dbh = $self->_master->db_handle; my $results = $dbh->selectcol_arrayref("SELECT value FROM MetaDataEntry where collection=".$self->_id." and tag='$tag'"); if ($results && (@$results > 0)) { foreach my $v (@$results) { if (defined($v) && ($v =~ /\S/)) { push @$set, $v; } } } return $set; } =item * B<project> () Returns project that have this collection =cut sub project { my ($self) = @_; my $proj_coll = $self->_master->ProjectCollection->get_objects({collection => $self}); return (@$proj_coll > 0) ? $proj_coll->[0]->project : undef; } =item * B<jobs> () Returns array of jobs that have this collection =cut sub jobs { my ($self) = @_; my $jobs = []; if ($self->type eq 'sample') { $jobs = $self->_master->Job->get_objects({sample => $self, viewable => 1}); } elsif ($self->type eq 'library') { $jobs = $self->_master->Job->get_objects({library => $self, viewable => 1}); } elsif (($self->type eq 'ep') && $self->parent && ref($self->parent)) { $jobs = $self->_master->Job->get_objects({sample => $self->parent, viewable => 1}); } return $jobs; } =item * B<metagenome_ids> () Returns array of metagenome_ids that have this collection =cut sub metagenome_ids { my ($self) = @_; my $mgids = []; my $dbh = $self->_master->db_handle; if ($self->type eq 'sample') { $mgids = $dbh->selectcol_arrayref("SELECT metagenome_id FROM Job where sample=".$self->_id." and viewable=1"); } elsif ($self->type eq 'library') { $mgids = $dbh->selectcol_arrayref("SELECT metagenome_id FROM Job where library=".$self->_id." and viewable=1"); } elsif (($self->type eq 'ep') && $self->parent && ref($self->parent)) { $mgids = $dbh->selectcol_arrayref("SELECT metagenome_id FROM Job where sample=".$self->parent->_id." and viewable=1"); } return $mgids; } =item * B<children> () Returns array of children collections, if type given only returns children of that type =cut sub children { my ($self, $type) = @_; my $children = []; if ($type) { $children = $self->_master->MetaDataCollection->get_objects({parent => $self, type => $type}); } else { $children = $self->_master->MetaDataCollection->get_objects({parent => $self}); } return $children; } sub category_type { my ($self, $type) = @_; my $ct = ''; if ($type eq 'library') { $ct = $self->data('investigation_type')->{'investigation_type'}; } elsif ($type eq 'ep') { $ct = $self->data('env_package')->{'env_package'} || $self->parent->data('env_package')->{'env_package'}; } else { $ct = $self->type; } return $ct; } sub lib_type { my ($self) = @_; return $self->category_type('library'); } sub ep_type { my ($self) = @_; return $self->category_type('ep'); } sub delete_all { my ($self) = @_; $self->delete_children; $self->delete_entries; $self->delete_project; $self->delete_jobentry; } sub delete_jobentry { my ($self) = @_; foreach my $job ( @{ $self->_master->Job->get_objects({sample => $self}) } ) { $job->sample(undef); $job->library(undef); } } sub delete_project { my ($self) = @_; foreach my $pc ( @{ $self->_master->ProjectCollection->get_objects({collection => $self}) } ) { $pc->delete; } } sub delete_entries { my ($self) = @_; foreach my $mde ( @{ $self->_master->MetaDataEntry->get_objects({collection => $self}) } ) { $mde->delete; } } sub delete_children { my ($self) = @_; foreach my $child ( @{ $self->children } ) { $child->delete_all; $child->delete; } } sub xml { my ($self) = @_; my $jobs = []; push @$jobs , $self->job if ($self->job) ; push @$jobs , @{ $self->_master->Job->get_objects( {sample => $self, viewable => 1} ) }; my $pjs = {}; map { map {$pjs->{ $_->project->id } = $_->project } @{ $self->_master->ProjectJob->get_objects( { job => $_ } ) } } @$jobs; my $xml = "<?xml version=\"1.0\" ?>\n" ; $xml .= "<sample>\n"; $xml .= "<name>". ($self->name || $self->data('sample_name') || "unknown" ) ."</name>\n"; $xml .= "<sample_id namespace='MG-RAST'>". $self->ID ."</sample_id>\n"; foreach my $pid (keys %$pjs){ my $p = $pjs->{$pid}; $xml .="<project>\n"; $xml .="\t<name>".$p->name."</name>\n"; $xml .="\t<project_id namespace='MG-RAST'>".$p->id."</project_id>\n"; $xml .="</project>\n"; } foreach my $j (@$jobs){ print Dumper $jobs unless (ref $j); $xml .="<metagenome>\n"; $xml .= "\t<metagenome_id namespace='MG-RAST'>". $j->metagenome_id."</metagenome_id>\n"; $xml .= "\t<name>". $j->name."</name>\n"; $xml .="</metagenome>\n"; } $xml .= "<submitter>". ( $self->creator ? $self->creator->name : 'ERROR:no submitter') ."</submitter>\n"; $xml .= "<submitted>". $self->entry_date ."</submitted>\n"; $xml .= "<source>". $self->source ."</source>\n" if ($self->source); $xml .= "<url>". $self->source ."</url>\n" if ($self->url); my $data = $self->_master->MetaDataEntry->get_objects( { collection => $self } ); foreach my $md (@$data){ $xml .= "<".$md->tag.">".$md->value."</".$md->tag.">\n"; } $xml .= "</sample>\n"; return $xml ; } 1; # this class is a stub, this file will not be automatically regenerated # all work in this module will be saved
teharrison/MG-RAST
src/MGRAST/lib/JobDB/MetaDataCollection.pm
Perl
bsd-2-clause
7,263
# $RCSfile$ # # $Log$ # Revision 1.1 2004/02/17 22:22:39 criswell # Adding GNU Makefile Malloc Benchmark input files. # # Revision 4.0.1.1 91/04/11 17:30:39 lwall # patch1: C flags are now settable on a per-file basis # # Revision 4.0 91/03/20 00:58:54 lwall # 4.0 baseline. # # YACC = /bin/yacc bin = /usr/local/bin scriptdir = /usr/local/bin privlib = /usr/local/lib/perl mansrc = /usr/man/manl manext = l LDFLAGS = CLDFLAGS = SMALL = LARGE = #mallocsrc = malloc.c #mallocobj = malloc.o SLN = ln -s libs = -lm public = perl taintperl #CFLAGS = `sh cflags.SH $@` CFLAGS = $(OTHERCFLAGS) private = scripts = h2ph MAKE = make manpages = perl.man h2ph.man util = sh = Makefile.SH makedepend.SH h2ph.SH h1 = EXTERN.h INTERN.h arg.h array.h cmd.h config.h form.h handy.h h2 = hash.h perl.h regcomp.h regexp.h spat.h stab.h str.h util.h h = $(h1) $(h2) c1 = array.c cmd.c cons.c consarg.c doarg.c doio.c dolist.c dump.c c2 = eval.c form.c hash.c $(mallocsrc) perl.c regcomp.c regexec.c c3 = stab.c str.c toke.c util.c usersub.c c = $(c1) $(c2) $(c3) obj1 = array.o cmd.o cons.o consarg.o doarg.o doio.o dolist.o dump.o obj2 = eval.o form.o hash.o $(mallocobj) perl.o regcomp.o regexec.o obj3 = stab.o str.o toke.o util.o obj = $(obj1) $(obj2) $(obj3) tobj1 = tarray.o tcmd.o tcons.o tconsarg.o tdoarg.o tdoio.o tdolist.o tdump.o tobj2 = teval.o tform.o thash.o $(mallocobj) tregcomp.o tregexec.o tobj3 = tstab.o tstr.o ttoke.o tutil.o tobj = $(tobj1) $(tobj2) $(tobj3) lintflags = -hbvxac addedbyconf = Makefile.old bsd eunice filexp loc pdp11 usg v7 # grrr SHELL = /bin/sh .c.o: $(CC) -c $(CFLAGS) $*.c #all: $(public) $(private) $(util) uperl.o $(scripts) # cd x2p; $(MAKE) all # touch all # This is the standard version that contains no "taint" checks and is # used for all scripts that aren't set-id or running under something set-id. # The $& notation is tells Sequent machines that it can do a parallel make, # and is harmless otherwise. BASETARGET = perl OBJS = perly.o $(obj) usersub.o # # This is the prototype makefile for building the memory-intensive # applications and linking them with different malloc implementations. # SHELL=csh C++=/srl/Gcc2/bin/g++ CC = gcc OFILES = $(OBJS) # possible values of CTYPE: simple (default) ifeq ($(CTYPE),) CTYPE=simple CEXT= endif # possible values of ALLOC: decos (default), knuth, bsd, gnu, # mmalloc, mmalloc4, mmalloc16, mmalloc8, mmalloc32 # gpp, cm, cminline, qf, cache, scache # bwgc, bwgc2.0, bwgc2.1 ## ff,rv ifeq ($(ALLOC),) ALLOC = decos endif # possible values of USEROPT: TRUE, FALSE ifeq ($(USEROPT),) USEROPT = FALSE endif # possible values of MEAS: NONE (default) ifeq ($(MEAS),) MEAS = NONE endif # need to add an object file if using the customalloc code ifeq ($(ALLOC),cm) OBJS := $(OBJS) customalloc.o endif ifeq ($(ALLOC),cm16) OBJS := $(OBJS) customalloc16.o endif ifeq ($(ALLOC),cm32) OBJS := $(OBJS) customalloc32.o endif ifeq ($(ALLOC),cm8) OBJS := $(OBJS) customalloc8.o endif # need to add an object file if using the customalloc code ifeq ($(ALLOC),cminline) CFLAGS := -I. $(CFLAGS) -D__INCLUDE_CUSTOMALLOC_H__=\"customalloc.h\" OBJS := $(OBJS) customalloc.o else #CFLAGS := $(CFLAGS) -D__INCLUDE_CUSTOMALLOC_H__=\<ctype.h\> endif #BASE = /homes/zorn/work/m #ALLOCBASE = /homes/zorn/work/m/dmm/lib BASE = /cs/research/gc/dec ALLOCBASE = /cs/research/gc/dec/dmm/lib MISCLIB = $(ALLOCBASE)/misc.a CONSUMER_DIR = $(BASE)/apps/consumers vpath %.c .:$(CONSUMER_DIR) #BASEFLAGS = -g -O -Winline BASEFLAGS = -g ALLOCEXT = -decos #REDEFINES = -Dcalloc=bZc -Dmalloc=bZa -Drealloc=bZr -Dfree=bZf CMINLINEOBJS = $(OBJS:.o=-cmi.o) %-cmi.o : %.c customalloc.h $(CC) -DNOMEMOPT $(CFLAGS) -o $@ -c $< NOOPTOBJS = $(OBJS:.o=-noopt.o) %-noopt.o : %.c $(CC) -DNOMEMOPT $(CFLAGS) -o $@ -c $< %-noopt.o : %.cc $(C++) -DNOMEMOPT $(CFLAGS) -o $@ -c $< BWGCOBJS = $(OBJS:.o=-bwgc.o) %-bwgc.o : %.c $(CC) -DNOMEMOPT -DIGNOREFREE -DBWGC $(CFLAGS) -o $@ -c $< # configuration for nomemopt compilation (now obsolete, instead use NOPT) ifeq ($(USEROPT),FALSE) OFILES = $(NOOPTOBJS) USEROPTEXT = endif ifeq ($(USEROPT),TRUE) OFILES = $(NOOPTOBJS) USEROPTEXT = -uopt endif # configuration for GC assisted compilation ifeq ($(USEROPT),BWGC) OFILES = $(BWGCOBJS) ARCHEXT = -bwgc.a ALLOCEXT = -bwgc ALLOCLIB = endif ifeq ($(MEAS),NONE) MEASEXT = endif # possible allocators ifeq ($(ALLOC),mmalloc) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),mmalloc4) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),mmalloc16) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),mmalloc32) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),mmalloc8) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),knuth) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),krv) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),bsd) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),gnu) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),bwgc2.0) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),bwgc) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),bwgc2.1) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),gpp) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),ff) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),rv) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),qf) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),qf32) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),qf32c) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),qfc) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),cache) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),scache) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = $(ALLOCBASE)/$(ALLOC)$(MEASEXT).a endif ifeq ($(ALLOC),cm) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = endif ifeq ($(ALLOC),cm16) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = endif ifeq ($(ALLOC),cm32) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = endif ifeq ($(ALLOC),cm8) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = endif ifeq ($(ALLOC),cminline) OFILES = $(CMINLINEOBJS) ALLOCCFLAGS = $(REDEFINES) ALLOCEXT = -$(ALLOC) ALLOCLIB = endif TARGET := $(BASETARGET)$(ALLOCEXT)$(USEROPTEXT)$(MEASEXT).exe realall: $(TARGET) OTHERFLAGS = $(BASEFLAGS) $(MEASFLAGS) $(ALLOCFLAGS) CFLAGS := $(CFLAGS) $(OTHERFLAGS) $(APPCFLAGS) $(TARGET): $(OFILES) $(ALLOCLIB) $(CC) $(CFLAGS) -o $(TARGET) $(OFILES) $(ALLOCLIB) $(MISCLIB) $(EXTRALIBS) -lm oclean: rm -f $(OBJS) $(NOOPTOBJS) $(BWGCOBJS) xclean: rm -f *.exe customalloc16.c: CUSTOMDATA-16 customalloc -f CUSTOMDATA-16 -g -o customalloc16 >& CUSTOMALLOC-16-OUTPUT customalloc8.c: CUSTOMDATA-8 customalloc -f CUSTOMDATA-8 -g -o customalloc8 >& CUSTOMALLOC-8-OUTPUT customalloc32.c: CUSTOMDATA-32 customalloc -f CUSTOMDATA-32 -g -o customalloc32 >& CUSTOMALLOC-32-OUTPUT QPT = $(HOME)/.dec-mips/bin/qpt $(TARGET).qp: $(TARGET) $(QPT) -t $^ ifeq ($(CTYPE),simple) CONSUMER_OBJS = $(CONSUMER_DIR)/adtr.o endif CREATED_HDRS = qpt_forward_decls.h CREATED_SRCS = $(wildcard $(TARGET)_sma*.c) CREATED_OBJS = $(subst .c,.o, $(CREATED_SRCS)) CREATED_OTHERS = $(TARGET).Trace $(TARGET).$(CEXT)cns: $(TARGET) $(CONSUMER_OBJS) $(CREATED_OBJS) $(CC) -o $@ $(CONSUMER_OBJS) $(CREATED_OBJS) uperl.o: $& perly.o $(obj) -ld $(LARGE) $(LDFLAGS) -r $(obj) perly.o $(libs) -o uperl.o saber: perly.c # load $(c) perly.c # This version, if specified in Configure, does ONLY those scripts which need # set-id emulation. Suidperl must be setuid root. It contains the "taint" # checks as well as the special code to validate that the script in question # has been invoked correctly. suidperl: $& tperly.o sperl.o $(tobj) usersub.o $(CC) $(LARGE) $(CLDFLAGS) sperl.o $(tobj) tperly.o usersub.o $(libs) \ -o suidperl # This version interprets scripts that are already set-id either via a wrapper # or through the kernel allowing set-id scripts (bad idea). Taintperl must # NOT be setuid to root or anything else. The only difference between it # and normal perl is the presence of the "taint" checks. taintperl: $& tperly.o tperl.o $(tobj) usersub.o $(CC) $(LARGE) $(CLDFLAGS) tperl.o $(tobj) tperly.o usersub.o $(libs) \ -o taintperl # Replicating all this junk is yucky, but I don't see a portable way to fix it. tperly.o: perly.c perly.h $(h) /bin/rm -f tperly.c $(SLN) perly.c tperly.c $(CC) -c -DTAINT $(CFLAGS) tperly.c /bin/rm -f tperly.c tperl.o: perl.c perly.h patchlevel.h perl.h $(h) /bin/rm -f tperl.c $(SLN) perl.c tperl.c $(CC) -c -DTAINT $(CFLAGS) tperl.c /bin/rm -f tperl.c sperl.o: perl.c perly.h patchlevel.h $(h) /bin/rm -f sperl.c $(SLN) perl.c sperl.c $(CC) -c -DTAINT -DIAMSUID $(CFLAGS) sperl.c /bin/rm -f sperl.c tarray.o: array.c $(h) /bin/rm -f tarray.c $(SLN) array.c tarray.c $(CC) -c -DTAINT $(CFLAGS) tarray.c /bin/rm -f tarray.c tcmd.o: cmd.c $(h) /bin/rm -f tcmd.c $(SLN) cmd.c tcmd.c $(CC) -c -DTAINT $(CFLAGS) tcmd.c /bin/rm -f tcmd.c tcons.o: cons.c $(h) perly.h /bin/rm -f tcons.c $(SLN) cons.c tcons.c $(CC) -c -DTAINT $(CFLAGS) tcons.c /bin/rm -f tcons.c tconsarg.o: consarg.c $(h) /bin/rm -f tconsarg.c $(SLN) consarg.c tconsarg.c $(CC) -c -DTAINT $(CFLAGS) tconsarg.c /bin/rm -f tconsarg.c tdoarg.o: doarg.c $(h) /bin/rm -f tdoarg.c $(SLN) doarg.c tdoarg.c $(CC) -c -DTAINT $(CFLAGS) tdoarg.c /bin/rm -f tdoarg.c tdoio.o: doio.c $(h) /bin/rm -f tdoio.c $(SLN) doio.c tdoio.c $(CC) -c -DTAINT $(CFLAGS) tdoio.c /bin/rm -f tdoio.c tdolist.o: dolist.c $(h) /bin/rm -f tdolist.c $(SLN) dolist.c tdolist.c $(CC) -c -DTAINT $(CFLAGS) tdolist.c /bin/rm -f tdolist.c tdump.o: dump.c $(h) /bin/rm -f tdump.c $(SLN) dump.c tdump.c $(CC) -c -DTAINT $(CFLAGS) tdump.c /bin/rm -f tdump.c teval.o: eval.c $(h) /bin/rm -f teval.c $(SLN) eval.c teval.c $(CC) -c -DTAINT $(CFLAGS) teval.c /bin/rm -f teval.c tform.o: form.c $(h) /bin/rm -f tform.c $(SLN) form.c tform.c $(CC) -c -DTAINT $(CFLAGS) tform.c /bin/rm -f tform.c thash.o: hash.c $(h) /bin/rm -f thash.c $(SLN) hash.c thash.c $(CC) -c -DTAINT $(CFLAGS) thash.c /bin/rm -f thash.c tregcomp.o: regcomp.c $(h) /bin/rm -f tregcomp.c $(SLN) regcomp.c tregcomp.c $(CC) -c -DTAINT $(CFLAGS) tregcomp.c /bin/rm -f tregcomp.c tregexec.o: regexec.c $(h) /bin/rm -f tregexec.c $(SLN) regexec.c tregexec.c $(CC) -c -DTAINT $(CFLAGS) tregexec.c /bin/rm -f tregexec.c tstab.o: stab.c $(h) /bin/rm -f tstab.c $(SLN) stab.c tstab.c $(CC) -c -DTAINT $(CFLAGS) tstab.c /bin/rm -f tstab.c tstr.o: str.c $(h) perly.h /bin/rm -f tstr.c $(SLN) str.c tstr.c $(CC) -c -DTAINT $(CFLAGS) tstr.c /bin/rm -f tstr.c ttoke.o: toke.c $(h) perly.h /bin/rm -f ttoke.c $(SLN) toke.c ttoke.c $(CC) -c -DTAINT $(CFLAGS) ttoke.c /bin/rm -f ttoke.c tutil.o: util.c $(h) /bin/rm -f tutil.c $(SLN) util.c tutil.c $(CC) -c -DTAINT $(CFLAGS) tutil.c /bin/rm -f tutil.c perly.h: perly.c @ echo Dummy dependency for dumb parallel make touch perly.h perly.c: perly.y @ echo 'Expect either' 29 shift/reduce and 59 reduce/reduce conflicts... @ echo ' or' 27 shift/reduce and 61 reduce/reduce conflicts... $(YACC) -d perly.y sh perly.fixer y.tab.c perly.c mv y.tab.h perly.h echo 'extern YYSTYPE yylval;' >>perly.h perly.o: perly.c perly.h $(h) $(CC) -c $(CFLAGS) perly.c install: all ./perl installperl cd x2p; $(MAKE) install clean: rm -f *.o all perl taintperl suidperl cd x2p; $(MAKE) clean realclean: clean cd x2p; $(MAKE) realclean rm -f *.orig */*.orig *~ */*~ core $(addedbyconf) h2ph h2ph.man rm -f perly.c perly.h t/perl Makefile config.h makedepend makedir rm -f x2p/Makefile # The following lint has practically everything turned on. Unfortunately, # you have to wade through a lot of mumbo jumbo that can't be suppressed. # If the source file has a /*NOSTRICT*/ somewhere, ignore the lint message # for that spot. lint: perly.c $(c) lint $(lintflags) $(defs) perly.c $(c) > perl.fuzz depend: makedepend - test -f perly.h || cp /dev/null perly.h ./makedepend - test -s perly.h || /bin/rm -f perly.h cd x2p; $(MAKE) depend test: perl - cd t && chmod +x TEST */*.t - cd t && (rm -f perl; $(SLN) ../perl .) && ./perl TEST </dev/tty clist: echo $(c) | tr ' ' '\012' >.clist hlist: echo $(h) | tr ' ' '\012' >.hlist shlist: echo $(sh) | tr ' ' '\012' >.shlist # AUTOMATICALLY GENERATED MAKE DEPENDENCIES--PUT NOTHING BELOW THIS LINE # If this runs make out of memory, delete /usr/include lines. array.o: /usr/include/ctype.h array.o: /usr/include/dirent.h array.o: /usr/include/errno.h array.o: /usr/include/machine/param.h array.o: /usr/include/machine/setjmp.h array.o: /usr/include/ndbm.h array.o: /usr/include/netinet/in.h array.o: /usr/include/setjmp.h array.o: /usr/include/stdio.h array.o: /usr/include/stdlib.h array.o: /usr/include/string.h array.o: /usr/include/sys/dirent.h array.o: /usr/include/sys/errno.h array.o: /usr/include/sys/filio.h array.o: /usr/include/sys/ioccom.h array.o: /usr/include/sys/ioctl.h array.o: /usr/include/sys/param.h array.o: /usr/include/sys/signal.h array.o: /usr/include/sys/sockio.h array.o: /usr/include/sys/stat.h array.o: /usr/include/sys/stdtypes.h array.o: /usr/include/sys/sysmacros.h array.o: /usr/include/sys/time.h array.o: /usr/include/sys/times.h array.o: /usr/include/sys/ttold.h array.o: /usr/include/sys/ttychars.h array.o: /usr/include/sys/ttycom.h array.o: /usr/include/sys/ttydev.h array.o: /usr/include/sys/types.h array.o: /usr/include/time.h array.o: /usr/include/vm/faultcode.h array.o: EXTERN.h array.o: arg.h array.o: array.c array.o: array.h array.o: cmd.h array.o: config.h array.o: form.h array.o: handy.h array.o: hash.h array.o: perl.h array.o: regexp.h array.o: spat.h array.o: stab.h array.o: str.h array.o: util.h cmd.o: /usr/include/ctype.h cmd.o: /usr/include/dirent.h cmd.o: /usr/include/errno.h cmd.o: /usr/include/machine/param.h cmd.o: /usr/include/machine/setjmp.h cmd.o: /usr/include/ndbm.h cmd.o: /usr/include/netinet/in.h cmd.o: /usr/include/setjmp.h cmd.o: /usr/include/stdio.h cmd.o: /usr/include/stdlib.h cmd.o: /usr/include/string.h cmd.o: /usr/include/sys/dirent.h cmd.o: /usr/include/sys/errno.h cmd.o: /usr/include/sys/filio.h cmd.o: /usr/include/sys/ioccom.h cmd.o: /usr/include/sys/ioctl.h cmd.o: /usr/include/sys/param.h cmd.o: /usr/include/sys/signal.h cmd.o: /usr/include/sys/sockio.h cmd.o: /usr/include/sys/stat.h cmd.o: /usr/include/sys/stdtypes.h cmd.o: /usr/include/sys/sysmacros.h cmd.o: /usr/include/sys/time.h cmd.o: /usr/include/sys/times.h cmd.o: /usr/include/sys/ttold.h cmd.o: /usr/include/sys/ttychars.h cmd.o: /usr/include/sys/ttycom.h cmd.o: /usr/include/sys/ttydev.h cmd.o: /usr/include/sys/types.h cmd.o: /usr/include/time.h cmd.o: /usr/include/vm/faultcode.h cmd.o: /usr/local/lib/gcc-include/varargs.h cmd.o: EXTERN.h cmd.o: arg.h cmd.o: array.h cmd.o: cmd.c cmd.o: cmd.h cmd.o: config.h cmd.o: form.h cmd.o: handy.h cmd.o: hash.h cmd.o: perl.h cmd.o: regexp.h cmd.o: spat.h cmd.o: stab.h cmd.o: str.h cmd.o: util.h cons.o: /usr/include/ctype.h cons.o: /usr/include/dirent.h cons.o: /usr/include/errno.h cons.o: /usr/include/machine/param.h cons.o: /usr/include/machine/setjmp.h cons.o: /usr/include/ndbm.h cons.o: /usr/include/netinet/in.h cons.o: /usr/include/setjmp.h cons.o: /usr/include/stdio.h cons.o: /usr/include/stdlib.h cons.o: /usr/include/string.h cons.o: /usr/include/sys/dirent.h cons.o: /usr/include/sys/errno.h cons.o: /usr/include/sys/filio.h cons.o: /usr/include/sys/ioccom.h cons.o: /usr/include/sys/ioctl.h cons.o: /usr/include/sys/param.h cons.o: /usr/include/sys/signal.h cons.o: /usr/include/sys/sockio.h cons.o: /usr/include/sys/stat.h cons.o: /usr/include/sys/stdtypes.h cons.o: /usr/include/sys/sysmacros.h cons.o: /usr/include/sys/time.h cons.o: /usr/include/sys/times.h cons.o: /usr/include/sys/ttold.h cons.o: /usr/include/sys/ttychars.h cons.o: /usr/include/sys/ttycom.h cons.o: /usr/include/sys/ttydev.h cons.o: /usr/include/sys/types.h cons.o: /usr/include/time.h cons.o: /usr/include/vm/faultcode.h cons.o: EXTERN.h cons.o: arg.h cons.o: array.h cons.o: cmd.h cons.o: config.h cons.o: cons.c cons.o: form.h cons.o: handy.h cons.o: hash.h cons.o: perl.h cons.o: perly.h cons.o: regexp.h cons.o: spat.h cons.o: stab.h cons.o: str.h cons.o: util.h consarg.o: /usr/include/ctype.h consarg.o: /usr/include/dirent.h consarg.o: /usr/include/errno.h consarg.o: /usr/include/machine/param.h consarg.o: /usr/include/machine/setjmp.h consarg.o: /usr/include/ndbm.h consarg.o: /usr/include/netinet/in.h consarg.o: /usr/include/setjmp.h consarg.o: /usr/include/stdio.h consarg.o: /usr/include/stdlib.h consarg.o: /usr/include/string.h consarg.o: /usr/include/sys/dirent.h consarg.o: /usr/include/sys/errno.h consarg.o: /usr/include/sys/filio.h consarg.o: /usr/include/sys/ioccom.h consarg.o: /usr/include/sys/ioctl.h consarg.o: /usr/include/sys/param.h consarg.o: /usr/include/sys/signal.h consarg.o: /usr/include/sys/sockio.h consarg.o: /usr/include/sys/stat.h consarg.o: /usr/include/sys/stdtypes.h consarg.o: /usr/include/sys/sysmacros.h consarg.o: /usr/include/sys/time.h consarg.o: /usr/include/sys/times.h consarg.o: /usr/include/sys/ttold.h consarg.o: /usr/include/sys/ttychars.h consarg.o: /usr/include/sys/ttycom.h consarg.o: /usr/include/sys/ttydev.h consarg.o: /usr/include/sys/types.h consarg.o: /usr/include/time.h consarg.o: /usr/include/vm/faultcode.h consarg.o: EXTERN.h consarg.o: arg.h consarg.o: array.h consarg.o: cmd.h consarg.o: config.h consarg.o: consarg.c consarg.o: form.h consarg.o: handy.h consarg.o: hash.h consarg.o: perl.h consarg.o: regexp.h consarg.o: spat.h consarg.o: stab.h consarg.o: str.h consarg.o: util.h doarg.o: /usr/include/ctype.h doarg.o: /usr/include/dirent.h doarg.o: /usr/include/errno.h doarg.o: /usr/include/machine/param.h doarg.o: /usr/include/machine/setjmp.h doarg.o: /usr/include/ndbm.h doarg.o: /usr/include/netinet/in.h doarg.o: /usr/include/setjmp.h doarg.o: /usr/include/stdio.h doarg.o: /usr/include/stdlib.h doarg.o: /usr/include/string.h doarg.o: /usr/include/sys/dirent.h doarg.o: /usr/include/sys/errno.h doarg.o: /usr/include/sys/filio.h doarg.o: /usr/include/sys/ioccom.h doarg.o: /usr/include/sys/ioctl.h doarg.o: /usr/include/sys/param.h doarg.o: /usr/include/sys/signal.h doarg.o: /usr/include/sys/sockio.h doarg.o: /usr/include/sys/stat.h doarg.o: /usr/include/sys/stdtypes.h doarg.o: /usr/include/sys/sysmacros.h doarg.o: /usr/include/sys/time.h doarg.o: /usr/include/sys/times.h doarg.o: /usr/include/sys/ttold.h doarg.o: /usr/include/sys/ttychars.h doarg.o: /usr/include/sys/ttycom.h doarg.o: /usr/include/sys/ttydev.h doarg.o: /usr/include/sys/types.h doarg.o: /usr/include/time.h doarg.o: /usr/include/vm/faultcode.h doarg.o: EXTERN.h doarg.o: arg.h doarg.o: array.h doarg.o: cmd.h doarg.o: config.h doarg.o: doarg.c doarg.o: form.h doarg.o: handy.h doarg.o: hash.h doarg.o: perl.h doarg.o: regexp.h doarg.o: spat.h doarg.o: stab.h doarg.o: str.h doarg.o: util.h doio.o: /usr/include/ctype.h doio.o: /usr/include/dirent.h doio.o: /usr/include/errno.h doio.o: /usr/include/grp.h doio.o: /usr/include/machine/mmu.h doio.o: /usr/include/machine/param.h doio.o: /usr/include/machine/setjmp.h doio.o: /usr/include/ndbm.h doio.o: /usr/include/netdb.h doio.o: /usr/include/netinet/in.h doio.o: /usr/include/pwd.h doio.o: /usr/include/setjmp.h doio.o: /usr/include/stdio.h doio.o: /usr/include/stdlib.h doio.o: /usr/include/string.h doio.o: /usr/include/sys/dirent.h doio.o: /usr/include/sys/errno.h doio.o: /usr/include/sys/fcntlcom.h doio.o: /usr/include/sys/file.h doio.o: /usr/include/sys/filio.h doio.o: /usr/include/sys/ioccom.h doio.o: /usr/include/sys/ioctl.h doio.o: /usr/include/sys/ipc.h doio.o: /usr/include/sys/msg.h doio.o: /usr/include/sys/param.h doio.o: /usr/include/sys/sem.h doio.o: /usr/include/sys/shm.h doio.o: /usr/include/sys/signal.h doio.o: /usr/include/sys/socket.h doio.o: /usr/include/sys/sockio.h doio.o: /usr/include/sys/stat.h doio.o: /usr/include/sys/stdtypes.h doio.o: /usr/include/sys/sysmacros.h doio.o: /usr/include/sys/time.h doio.o: /usr/include/sys/times.h doio.o: /usr/include/sys/ttold.h doio.o: /usr/include/sys/ttychars.h doio.o: /usr/include/sys/ttycom.h doio.o: /usr/include/sys/ttydev.h doio.o: /usr/include/sys/types.h doio.o: /usr/include/time.h doio.o: /usr/include/utime.h doio.o: /usr/include/vm/faultcode.h doio.o: EXTERN.h doio.o: arg.h doio.o: array.h doio.o: cmd.h doio.o: config.h doio.o: doio.c doio.o: form.h doio.o: handy.h doio.o: hash.h doio.o: perl.h doio.o: regexp.h doio.o: spat.h doio.o: stab.h doio.o: str.h doio.o: util.h dolist.o: /usr/include/ctype.h dolist.o: /usr/include/dirent.h dolist.o: /usr/include/errno.h dolist.o: /usr/include/machine/param.h dolist.o: /usr/include/machine/setjmp.h dolist.o: /usr/include/ndbm.h dolist.o: /usr/include/netinet/in.h dolist.o: /usr/include/setjmp.h dolist.o: /usr/include/stdio.h dolist.o: /usr/include/stdlib.h dolist.o: /usr/include/string.h dolist.o: /usr/include/sys/dirent.h dolist.o: /usr/include/sys/errno.h dolist.o: /usr/include/sys/filio.h dolist.o: /usr/include/sys/ioccom.h dolist.o: /usr/include/sys/ioctl.h dolist.o: /usr/include/sys/param.h dolist.o: /usr/include/sys/signal.h dolist.o: /usr/include/sys/sockio.h dolist.o: /usr/include/sys/stat.h dolist.o: /usr/include/sys/stdtypes.h dolist.o: /usr/include/sys/sysmacros.h dolist.o: /usr/include/sys/time.h dolist.o: /usr/include/sys/times.h dolist.o: /usr/include/sys/ttold.h dolist.o: /usr/include/sys/ttychars.h dolist.o: /usr/include/sys/ttycom.h dolist.o: /usr/include/sys/ttydev.h dolist.o: /usr/include/sys/types.h dolist.o: /usr/include/time.h dolist.o: /usr/include/vm/faultcode.h dolist.o: EXTERN.h dolist.o: arg.h dolist.o: array.h dolist.o: cmd.h dolist.o: config.h dolist.o: dolist.c dolist.o: form.h dolist.o: handy.h dolist.o: hash.h dolist.o: perl.h dolist.o: regexp.h dolist.o: spat.h dolist.o: stab.h dolist.o: str.h dolist.o: util.h dump.o: /usr/include/ctype.h dump.o: /usr/include/dirent.h dump.o: /usr/include/errno.h dump.o: /usr/include/machine/param.h dump.o: /usr/include/machine/setjmp.h dump.o: /usr/include/ndbm.h dump.o: /usr/include/netinet/in.h dump.o: /usr/include/setjmp.h dump.o: /usr/include/stdio.h dump.o: /usr/include/stdlib.h dump.o: /usr/include/string.h dump.o: /usr/include/sys/dirent.h dump.o: /usr/include/sys/errno.h dump.o: /usr/include/sys/filio.h dump.o: /usr/include/sys/ioccom.h dump.o: /usr/include/sys/ioctl.h dump.o: /usr/include/sys/param.h dump.o: /usr/include/sys/signal.h dump.o: /usr/include/sys/sockio.h dump.o: /usr/include/sys/stat.h dump.o: /usr/include/sys/stdtypes.h dump.o: /usr/include/sys/sysmacros.h dump.o: /usr/include/sys/time.h dump.o: /usr/include/sys/times.h dump.o: /usr/include/sys/ttold.h dump.o: /usr/include/sys/ttychars.h dump.o: /usr/include/sys/ttycom.h dump.o: /usr/include/sys/ttydev.h dump.o: /usr/include/sys/types.h dump.o: /usr/include/time.h dump.o: /usr/include/vm/faultcode.h dump.o: EXTERN.h dump.o: arg.h dump.o: array.h dump.o: cmd.h dump.o: config.h dump.o: dump.c dump.o: form.h dump.o: handy.h dump.o: hash.h dump.o: perl.h dump.o: regexp.h dump.o: spat.h dump.o: stab.h dump.o: str.h dump.o: util.h eval.o: /usr/include/ctype.h eval.o: /usr/include/dirent.h eval.o: /usr/include/errno.h eval.o: /usr/include/machine/param.h eval.o: /usr/include/machine/setjmp.h eval.o: /usr/include/ndbm.h eval.o: /usr/include/netinet/in.h eval.o: /usr/include/setjmp.h eval.o: /usr/include/stdio.h eval.o: /usr/include/stdlib.h eval.o: /usr/include/string.h eval.o: /usr/include/sys/dirent.h eval.o: /usr/include/sys/errno.h eval.o: /usr/include/sys/fcntlcom.h eval.o: /usr/include/sys/file.h eval.o: /usr/include/sys/filio.h eval.o: /usr/include/sys/ioccom.h eval.o: /usr/include/sys/ioctl.h eval.o: /usr/include/sys/param.h eval.o: /usr/include/sys/signal.h eval.o: /usr/include/sys/sockio.h eval.o: /usr/include/sys/stat.h eval.o: /usr/include/sys/stdtypes.h eval.o: /usr/include/sys/sysmacros.h eval.o: /usr/include/sys/time.h eval.o: /usr/include/sys/times.h eval.o: /usr/include/sys/ttold.h eval.o: /usr/include/sys/ttychars.h eval.o: /usr/include/sys/ttycom.h eval.o: /usr/include/sys/ttydev.h eval.o: /usr/include/sys/types.h eval.o: /usr/include/time.h eval.o: /usr/include/vfork.h eval.o: /usr/include/vm/faultcode.h eval.o: EXTERN.h eval.o: arg.h eval.o: array.h eval.o: cmd.h eval.o: config.h eval.o: eval.c eval.o: form.h eval.o: handy.h eval.o: hash.h eval.o: perl.h eval.o: regexp.h eval.o: spat.h eval.o: stab.h eval.o: str.h eval.o: util.h form.o: /usr/include/ctype.h form.o: /usr/include/dirent.h form.o: /usr/include/errno.h form.o: /usr/include/machine/param.h form.o: /usr/include/machine/setjmp.h form.o: /usr/include/ndbm.h form.o: /usr/include/netinet/in.h form.o: /usr/include/setjmp.h form.o: /usr/include/stdio.h form.o: /usr/include/stdlib.h form.o: /usr/include/string.h form.o: /usr/include/sys/dirent.h form.o: /usr/include/sys/errno.h form.o: /usr/include/sys/filio.h form.o: /usr/include/sys/ioccom.h form.o: /usr/include/sys/ioctl.h form.o: /usr/include/sys/param.h form.o: /usr/include/sys/signal.h form.o: /usr/include/sys/sockio.h form.o: /usr/include/sys/stat.h form.o: /usr/include/sys/stdtypes.h form.o: /usr/include/sys/sysmacros.h form.o: /usr/include/sys/time.h form.o: /usr/include/sys/times.h form.o: /usr/include/sys/ttold.h form.o: /usr/include/sys/ttychars.h form.o: /usr/include/sys/ttycom.h form.o: /usr/include/sys/ttydev.h form.o: /usr/include/sys/types.h form.o: /usr/include/time.h form.o: /usr/include/vm/faultcode.h form.o: EXTERN.h form.o: arg.h form.o: array.h form.o: cmd.h form.o: config.h form.o: form.c form.o: form.h form.o: handy.h form.o: hash.h form.o: perl.h form.o: regexp.h form.o: spat.h form.o: stab.h form.o: str.h form.o: util.h hash.o: /usr/include/ctype.h hash.o: /usr/include/dirent.h hash.o: /usr/include/errno.h hash.o: /usr/include/machine/param.h hash.o: /usr/include/machine/setjmp.h hash.o: /usr/include/ndbm.h hash.o: /usr/include/netinet/in.h hash.o: /usr/include/setjmp.h hash.o: /usr/include/stdio.h hash.o: /usr/include/stdlib.h hash.o: /usr/include/string.h hash.o: /usr/include/sys/dirent.h hash.o: /usr/include/sys/errno.h hash.o: /usr/include/sys/fcntlcom.h hash.o: /usr/include/sys/file.h hash.o: /usr/include/sys/filio.h hash.o: /usr/include/sys/ioccom.h hash.o: /usr/include/sys/ioctl.h hash.o: /usr/include/sys/param.h hash.o: /usr/include/sys/signal.h hash.o: /usr/include/sys/sockio.h hash.o: /usr/include/sys/stat.h hash.o: /usr/include/sys/stdtypes.h hash.o: /usr/include/sys/sysmacros.h hash.o: /usr/include/sys/time.h hash.o: /usr/include/sys/times.h hash.o: /usr/include/sys/ttold.h hash.o: /usr/include/sys/ttychars.h hash.o: /usr/include/sys/ttycom.h hash.o: /usr/include/sys/ttydev.h hash.o: /usr/include/sys/types.h hash.o: /usr/include/time.h hash.o: /usr/include/vm/faultcode.h hash.o: EXTERN.h hash.o: arg.h hash.o: array.h hash.o: cmd.h hash.o: config.h hash.o: form.h hash.o: handy.h hash.o: hash.c hash.o: hash.h hash.o: perl.h hash.o: regexp.h hash.o: spat.h hash.o: stab.h hash.o: str.h hash.o: util.h malloc.o: /usr/include/ctype.h malloc.o: /usr/include/dirent.h malloc.o: /usr/include/errno.h malloc.o: /usr/include/machine/param.h malloc.o: /usr/include/machine/setjmp.h malloc.o: /usr/include/ndbm.h malloc.o: /usr/include/netinet/in.h malloc.o: /usr/include/setjmp.h malloc.o: /usr/include/stdio.h malloc.o: /usr/include/stdlib.h malloc.o: /usr/include/string.h malloc.o: /usr/include/sys/dirent.h malloc.o: /usr/include/sys/errno.h malloc.o: /usr/include/sys/filio.h malloc.o: /usr/include/sys/ioccom.h malloc.o: /usr/include/sys/ioctl.h malloc.o: /usr/include/sys/param.h malloc.o: /usr/include/sys/signal.h malloc.o: /usr/include/sys/sockio.h malloc.o: /usr/include/sys/stat.h malloc.o: /usr/include/sys/stdtypes.h malloc.o: /usr/include/sys/sysmacros.h malloc.o: /usr/include/sys/time.h malloc.o: /usr/include/sys/times.h malloc.o: /usr/include/sys/ttold.h malloc.o: /usr/include/sys/ttychars.h malloc.o: /usr/include/sys/ttycom.h malloc.o: /usr/include/sys/ttydev.h malloc.o: /usr/include/sys/types.h malloc.o: /usr/include/time.h malloc.o: /usr/include/vm/faultcode.h malloc.o: EXTERN.h malloc.o: arg.h malloc.o: array.h malloc.o: cmd.h malloc.o: config.h malloc.o: form.h malloc.o: handy.h malloc.o: hash.h malloc.o: malloc.c malloc.o: perl.h malloc.o: regexp.h malloc.o: spat.h malloc.o: stab.h malloc.o: str.h malloc.o: util.h perl.o: /usr/include/ctype.h perl.o: /usr/include/dirent.h perl.o: /usr/include/errno.h perl.o: /usr/include/machine/param.h perl.o: /usr/include/machine/setjmp.h perl.o: /usr/include/ndbm.h perl.o: /usr/include/netinet/in.h perl.o: /usr/include/setjmp.h perl.o: /usr/include/stdio.h perl.o: /usr/include/stdlib.h perl.o: /usr/include/string.h perl.o: /usr/include/sys/dirent.h perl.o: /usr/include/sys/errno.h perl.o: /usr/include/sys/filio.h perl.o: /usr/include/sys/ioccom.h perl.o: /usr/include/sys/ioctl.h perl.o: /usr/include/sys/param.h perl.o: /usr/include/sys/signal.h perl.o: /usr/include/sys/sockio.h perl.o: /usr/include/sys/stat.h perl.o: /usr/include/sys/stdtypes.h perl.o: /usr/include/sys/sysmacros.h perl.o: /usr/include/sys/time.h perl.o: /usr/include/sys/times.h perl.o: /usr/include/sys/ttold.h perl.o: /usr/include/sys/ttychars.h perl.o: /usr/include/sys/ttycom.h perl.o: /usr/include/sys/ttydev.h perl.o: /usr/include/sys/types.h perl.o: /usr/include/time.h perl.o: /usr/include/vm/faultcode.h perl.o: EXTERN.h perl.o: arg.h perl.o: array.h perl.o: cmd.h perl.o: config.h perl.o: form.h perl.o: handy.h perl.o: hash.h perl.o: patchlevel.h perl.o: perl.c perl.o: perl.h perl.o: perly.h perl.o: regexp.h perl.o: spat.h perl.o: stab.h perl.o: str.h perl.o: util.h regcomp.o: /usr/include/ctype.h regcomp.o: /usr/include/dirent.h regcomp.o: /usr/include/errno.h regcomp.o: /usr/include/machine/param.h regcomp.o: /usr/include/machine/setjmp.h regcomp.o: /usr/include/ndbm.h regcomp.o: /usr/include/netinet/in.h regcomp.o: /usr/include/setjmp.h regcomp.o: /usr/include/stdio.h regcomp.o: /usr/include/stdlib.h regcomp.o: /usr/include/string.h regcomp.o: /usr/include/sys/dirent.h regcomp.o: /usr/include/sys/errno.h regcomp.o: /usr/include/sys/filio.h regcomp.o: /usr/include/sys/ioccom.h regcomp.o: /usr/include/sys/ioctl.h regcomp.o: /usr/include/sys/param.h regcomp.o: /usr/include/sys/signal.h regcomp.o: /usr/include/sys/sockio.h regcomp.o: /usr/include/sys/stat.h regcomp.o: /usr/include/sys/stdtypes.h regcomp.o: /usr/include/sys/sysmacros.h regcomp.o: /usr/include/sys/time.h regcomp.o: /usr/include/sys/times.h regcomp.o: /usr/include/sys/ttold.h regcomp.o: /usr/include/sys/ttychars.h regcomp.o: /usr/include/sys/ttycom.h regcomp.o: /usr/include/sys/ttydev.h regcomp.o: /usr/include/sys/types.h regcomp.o: /usr/include/time.h regcomp.o: /usr/include/vm/faultcode.h regcomp.o: EXTERN.h regcomp.o: INTERN.h regcomp.o: arg.h regcomp.o: array.h regcomp.o: cmd.h regcomp.o: config.h regcomp.o: form.h regcomp.o: handy.h regcomp.o: hash.h regcomp.o: perl.h regcomp.o: regcomp.c regcomp.o: regcomp.h regcomp.o: regexp.h regcomp.o: spat.h regcomp.o: stab.h regcomp.o: str.h regcomp.o: util.h regexec.o: /usr/include/ctype.h regexec.o: /usr/include/dirent.h regexec.o: /usr/include/errno.h regexec.o: /usr/include/machine/param.h regexec.o: /usr/include/machine/setjmp.h regexec.o: /usr/include/ndbm.h regexec.o: /usr/include/netinet/in.h regexec.o: /usr/include/setjmp.h regexec.o: /usr/include/stdio.h regexec.o: /usr/include/stdlib.h regexec.o: /usr/include/string.h regexec.o: /usr/include/sys/dirent.h regexec.o: /usr/include/sys/errno.h regexec.o: /usr/include/sys/filio.h regexec.o: /usr/include/sys/ioccom.h regexec.o: /usr/include/sys/ioctl.h regexec.o: /usr/include/sys/param.h regexec.o: /usr/include/sys/signal.h regexec.o: /usr/include/sys/sockio.h regexec.o: /usr/include/sys/stat.h regexec.o: /usr/include/sys/stdtypes.h regexec.o: /usr/include/sys/sysmacros.h regexec.o: /usr/include/sys/time.h regexec.o: /usr/include/sys/times.h regexec.o: /usr/include/sys/ttold.h regexec.o: /usr/include/sys/ttychars.h regexec.o: /usr/include/sys/ttycom.h regexec.o: /usr/include/sys/ttydev.h regexec.o: /usr/include/sys/types.h regexec.o: /usr/include/time.h regexec.o: /usr/include/vm/faultcode.h regexec.o: EXTERN.h regexec.o: arg.h regexec.o: array.h regexec.o: cmd.h regexec.o: config.h regexec.o: form.h regexec.o: handy.h regexec.o: hash.h regexec.o: perl.h regexec.o: regcomp.h regexec.o: regexec.c regexec.o: regexp.h regexec.o: spat.h regexec.o: stab.h regexec.o: str.h regexec.o: util.h stab.o: /usr/include/ctype.h stab.o: /usr/include/dirent.h stab.o: /usr/include/errno.h stab.o: /usr/include/machine/param.h stab.o: /usr/include/machine/setjmp.h stab.o: /usr/include/ndbm.h stab.o: /usr/include/netinet/in.h stab.o: /usr/include/setjmp.h stab.o: /usr/include/stdio.h stab.o: /usr/include/stdlib.h stab.o: /usr/include/string.h stab.o: /usr/include/sys/dirent.h stab.o: /usr/include/sys/errno.h stab.o: /usr/include/sys/filio.h stab.o: /usr/include/sys/ioccom.h stab.o: /usr/include/sys/ioctl.h stab.o: /usr/include/sys/param.h stab.o: /usr/include/sys/signal.h stab.o: /usr/include/sys/sockio.h stab.o: /usr/include/sys/stat.h stab.o: /usr/include/sys/stdtypes.h stab.o: /usr/include/sys/sysmacros.h stab.o: /usr/include/sys/time.h stab.o: /usr/include/sys/times.h stab.o: /usr/include/sys/ttold.h stab.o: /usr/include/sys/ttychars.h stab.o: /usr/include/sys/ttycom.h stab.o: /usr/include/sys/ttydev.h stab.o: /usr/include/sys/types.h stab.o: /usr/include/time.h stab.o: /usr/include/vm/faultcode.h stab.o: EXTERN.h stab.o: arg.h stab.o: array.h stab.o: cmd.h stab.o: config.h stab.o: form.h stab.o: handy.h stab.o: hash.h stab.o: perl.h stab.o: regexp.h stab.o: spat.h stab.o: stab.c stab.o: stab.h stab.o: str.h stab.o: util.h str.o: /usr/include/ctype.h str.o: /usr/include/dirent.h str.o: /usr/include/errno.h str.o: /usr/include/machine/param.h str.o: /usr/include/machine/setjmp.h str.o: /usr/include/ndbm.h str.o: /usr/include/netinet/in.h str.o: /usr/include/setjmp.h str.o: /usr/include/stdio.h str.o: /usr/include/stdlib.h str.o: /usr/include/string.h str.o: /usr/include/sys/dirent.h str.o: /usr/include/sys/errno.h str.o: /usr/include/sys/filio.h str.o: /usr/include/sys/ioccom.h str.o: /usr/include/sys/ioctl.h str.o: /usr/include/sys/param.h str.o: /usr/include/sys/signal.h str.o: /usr/include/sys/sockio.h str.o: /usr/include/sys/stat.h str.o: /usr/include/sys/stdtypes.h str.o: /usr/include/sys/sysmacros.h str.o: /usr/include/sys/time.h str.o: /usr/include/sys/times.h str.o: /usr/include/sys/ttold.h str.o: /usr/include/sys/ttychars.h str.o: /usr/include/sys/ttycom.h str.o: /usr/include/sys/ttydev.h str.o: /usr/include/sys/types.h str.o: /usr/include/time.h str.o: /usr/include/vm/faultcode.h str.o: EXTERN.h str.o: arg.h str.o: array.h str.o: cmd.h str.o: config.h str.o: form.h str.o: handy.h str.o: hash.h str.o: perl.h str.o: perly.h str.o: regexp.h str.o: spat.h str.o: stab.h str.o: str.c str.o: str.h str.o: util.h toke.o: /usr/include/ctype.h toke.o: /usr/include/dirent.h toke.o: /usr/include/errno.h toke.o: /usr/include/machine/param.h toke.o: /usr/include/machine/setjmp.h toke.o: /usr/include/ndbm.h toke.o: /usr/include/netinet/in.h toke.o: /usr/include/setjmp.h toke.o: /usr/include/stdio.h toke.o: /usr/include/stdlib.h toke.o: /usr/include/string.h toke.o: /usr/include/sys/dirent.h toke.o: /usr/include/sys/errno.h toke.o: /usr/include/sys/fcntlcom.h toke.o: /usr/include/sys/file.h toke.o: /usr/include/sys/filio.h toke.o: /usr/include/sys/ioccom.h toke.o: /usr/include/sys/ioctl.h toke.o: /usr/include/sys/param.h toke.o: /usr/include/sys/signal.h toke.o: /usr/include/sys/sockio.h toke.o: /usr/include/sys/stat.h toke.o: /usr/include/sys/stdtypes.h toke.o: /usr/include/sys/sysmacros.h toke.o: /usr/include/sys/time.h toke.o: /usr/include/sys/times.h toke.o: /usr/include/sys/ttold.h toke.o: /usr/include/sys/ttychars.h toke.o: /usr/include/sys/ttycom.h toke.o: /usr/include/sys/ttydev.h toke.o: /usr/include/sys/types.h toke.o: /usr/include/time.h toke.o: /usr/include/vm/faultcode.h toke.o: EXTERN.h toke.o: arg.h toke.o: array.h toke.o: cmd.h toke.o: config.h toke.o: form.h toke.o: handy.h toke.o: hash.h toke.o: perl.h toke.o: perly.h toke.o: regexp.h toke.o: spat.h toke.o: stab.h toke.o: str.h toke.o: toke.c toke.o: util.h util.o: /usr/include/ctype.h util.o: /usr/include/dirent.h util.o: /usr/include/errno.h util.o: /usr/include/machine/param.h util.o: /usr/include/machine/setjmp.h util.o: /usr/include/ndbm.h util.o: /usr/include/netinet/in.h util.o: /usr/include/setjmp.h util.o: /usr/include/stdio.h util.o: /usr/include/stdlib.h util.o: /usr/include/string.h util.o: /usr/include/sys/dirent.h util.o: /usr/include/sys/errno.h util.o: /usr/include/sys/fcntlcom.h util.o: /usr/include/sys/file.h util.o: /usr/include/sys/filio.h util.o: /usr/include/sys/ioccom.h util.o: /usr/include/sys/ioctl.h util.o: /usr/include/sys/param.h util.o: /usr/include/sys/signal.h util.o: /usr/include/sys/sockio.h util.o: /usr/include/sys/stat.h util.o: /usr/include/sys/stdtypes.h util.o: /usr/include/sys/sysmacros.h util.o: /usr/include/sys/time.h util.o: /usr/include/sys/times.h util.o: /usr/include/sys/ttold.h util.o: /usr/include/sys/ttychars.h util.o: /usr/include/sys/ttycom.h util.o: /usr/include/sys/ttydev.h util.o: /usr/include/sys/types.h util.o: /usr/include/time.h util.o: /usr/include/vfork.h util.o: /usr/include/vm/faultcode.h util.o: /usr/local/lib/gcc-include/varargs.h util.o: EXTERN.h util.o: arg.h util.o: array.h util.o: cmd.h util.o: config.h util.o: form.h util.o: handy.h util.o: hash.h util.o: perl.h util.o: regexp.h util.o: spat.h util.o: stab.h util.o: str.h util.o: util.c util.o: util.h usersub.o: /usr/include/ctype.h usersub.o: /usr/include/dirent.h usersub.o: /usr/include/errno.h usersub.o: /usr/include/machine/param.h usersub.o: /usr/include/machine/setjmp.h usersub.o: /usr/include/ndbm.h usersub.o: /usr/include/netinet/in.h usersub.o: /usr/include/setjmp.h usersub.o: /usr/include/stdio.h usersub.o: /usr/include/stdlib.h usersub.o: /usr/include/string.h usersub.o: /usr/include/sys/dirent.h usersub.o: /usr/include/sys/errno.h usersub.o: /usr/include/sys/filio.h usersub.o: /usr/include/sys/ioccom.h usersub.o: /usr/include/sys/ioctl.h usersub.o: /usr/include/sys/param.h usersub.o: /usr/include/sys/signal.h usersub.o: /usr/include/sys/sockio.h usersub.o: /usr/include/sys/stat.h usersub.o: /usr/include/sys/stdtypes.h usersub.o: /usr/include/sys/sysmacros.h usersub.o: /usr/include/sys/time.h usersub.o: /usr/include/sys/times.h usersub.o: /usr/include/sys/ttold.h usersub.o: /usr/include/sys/ttychars.h usersub.o: /usr/include/sys/ttycom.h usersub.o: /usr/include/sys/ttydev.h usersub.o: /usr/include/sys/types.h usersub.o: /usr/include/time.h usersub.o: /usr/include/vm/faultcode.h usersub.o: EXTERN.h usersub.o: arg.h usersub.o: array.h usersub.o: cmd.h usersub.o: config.h usersub.o: form.h usersub.o: handy.h usersub.o: hash.h usersub.o: perl.h usersub.o: regexp.h usersub.o: spat.h usersub.o: stab.h usersub.o: str.h usersub.o: usersub.c usersub.o: util.h Makefile: Makefile.SH config.sh ; /bin/sh Makefile.SH makedepend: makedepend.SH config.sh ; /bin/sh makedepend.SH h2ph: h2ph.SH config.sh ; /bin/sh h2ph.SH # WARNING: Put nothing here or make depend will gobble it up!
ensemblr/llvm-project-boilerplate
include/llvm/projects/test-suite/MultiSource/Benchmarks/MallocBench/make/INPUT/GNUmakefile.perl
Perl
mit
40,588
#!/usr/bin/perl -w use strict; while(<>) { my ($f, $e, $scores) = split / \|\|\| /; print "$e ||| $f ||| $scores"; }
agesmundo/cdec
word-aligner/support/invert_grammar.pl
Perl
apache-2.0
123
#!/usr/bin/perl while($line=<STDIN>) { if ($line =~ /\;\s*path\s*=\s*([^\;]+)\;/) { $filepath = $1; if ($filepath =~ /\.(h|hpp)$/) { $type = 0; } elsif ($filepath =~ /\.(c|cpp)$/) { $type = 1; } else { $type = 2; } push @{$FILES[$type]}, $filepath; } } for $type (0..$#FILES) { for $filepath (@{$FILES[$type]}) { print "$filepath\\\n"; } print "\n"; }
pslgoh/rhodes
platform/shared/qt/pbxproj2pro.pl
Perl
mit
381
#!/usr/bin/perl # # Author: Daniel Stenberg <daniel@haxx.se> # Version: 0.1 # Date: October 10, 2000 # # This is public domain. Feel free to do whatever you please with this script. # There are no warranties whatsoever! It might work, it might ruin your hard # disk. Use this on your own risk. # # PURPOSE # # This script uses a local directory to maintain a "mirror" of the curl # packages listed in the remote curl web sites package list. Files present in # the local directory that aren't present in the remote list will be removed. # Files that are present in the remote list but not in the local directory # will be downloaded and put there. Files present at both places will not # be touched. # # WARNING: don't put other files in the mirror directory, they will be removed # when this script runs if they don't exist in the remote package list! # # this is the directory to keep all the mirrored curl files in: $some_dir = $ARGV[0]; if( ! -d $some_dir ) { print "$some_dir is not a dir!\n"; exit; } # path to the curl binary $curl = "/home/danste/bin/curl"; # this is the remote file list $filelist = "http://curl.haxx.se/download/curldist.txt"; # prepend URL: $prepend = "http://curl.haxx.se/download"; opendir(DIR, $some_dir) || die "can't opendir $some_dir: $!"; @existing = grep { /^[^\.]/ } readdir(DIR); closedir DIR; $LOCAL_FILE = 1; $REMOTE_FILE = 2; # create a hash array for(@existing) { $allfiles{$_} |= $LOCAL_FILE; } # get remote file list print "Getting file list from $filelist\n"; @remotefiles=`$curl -s $filelist`; # fill in the hash array for(@remotefiles) { chomp; $allfiles{$_} |= $REMOTE_FILE; $remote++; } if($remote < 10) { print "There's something wrong. The remote file list seems too smallish!\n"; exit; } @sfiles = sort { $a cmp $b } keys %allfiles; $leftalone = $downloaded = $removed = 0; for(@sfiles) { $file = $_; $info = $allfiles{$file}; if($info == ($REMOTE_FILE|$LOCAL_FILE)) { print "$file is LOCAL and REMOTE, left alone\n"; $leftalone++; } elsif($info == $REMOTE_FILE) { print "$file is only REMOTE, getting it...\n"; system("$curl $prepend/$file -o $some_dir/$file"); $downloaded++; } elsif($info == $LOCAL_FILE) { print "$file is only LOCAL, removing it...\n"; system("rm $some_dir/$file"); $removed++; } else { print "Problem, file $file was marked $info\n"; } $loops++; } if(!$loops) { print "No remote or local files were found!\n"; exit; } print "$leftalone files were already present\n", "$downloaded files were added\n", "$removed files were removed\n";
Noah-Huppert/Website-2013
vhosts/www.noahhuppert.com/htdocs/trex/deps/curl/perl/contrib/mirror.pl
Perl
mit
2,693
#!/usr/bin/perl # 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. use strict; use warnings; use AI::MXNet qw(mx); use AI::MXNet::Function::Parameters; use AI::MXNet::Base; use Getopt::Long qw(HelpMessage); GetOptions( 'test' => \(my $do_test ), 'num-layers=i' => \(my $num_layers = 2 ), 'num-hidden=i' => \(my $num_hidden = 256 ), 'num-embed=i' => \(my $num_embed = 256 ), 'num-seq=i' => \(my $seq_size = 32 ), 'gpus=s' => \(my $gpus ), 'kv-store=s' => \(my $kv_store = 'device'), 'num-epoch=i' => \(my $num_epoch = 25 ), 'lr=f' => \(my $lr = 0.01 ), 'optimizer=s' => \(my $optimizer = 'adam' ), 'mom=f' => \(my $mom = 0 ), 'wd=f' => \(my $wd = 0.00001 ), 'batch-size=i' => \(my $batch_size = 32 ), 'disp-batches=i' => \(my $disp_batches = 50 ), 'model-prefix=s' => \(my $model_prefix = 'lstm_' ), 'load-epoch=i' => \(my $load_epoch = 0 ), 'stack-rnn' => \(my $stack_rnn ), 'bidirectional=i' => \(my $bidirectional ), 'dropout=f', => \(my $dropout = 0 ), 'help' => sub { HelpMessage(0) }, ) or HelpMessage(1); =head1 NAME char_lstm.pl - Example of training char LSTM RNN on tiny shakespeare using high level RNN interface =head1 SYNOPSIS --test Whether to test or train (default 0) --num-layers number of stacked RNN layers, default=2 --num-hidden hidden layer size, default=200 --num-seq sequence size, default=32 --gpus list of gpus to run, e.g. 0 or 0,2,5. empty means using cpu. Increase batch size when using multiple gpus for best performance. --kv-store key-value store type, default='device' --num-epochs max num of epochs, default=25 --lr initial learning rate, default=0.01 --optimizer the optimizer type, default='adam' --mom momentum for sgd, default=0.0 --wd weight decay for sgd, default=0.00001 --batch-size the batch size type, default=32 --disp-batches show progress for every n batches, default=50 --model-prefix prefix for checkpoint files for loading/saving, default='lstm_' --load-epoch load from epoch --stack-rnn stack rnn to reduce communication overhead (1,0 default 0) --bidirectional whether to use bidirectional layers (1,0 default 0) --dropout dropout probability (1.0 - keep probability), default 0 =cut $bidirectional = $bidirectional ? 1 : 0; $stack_rnn = $stack_rnn ? 1 : 0; func tokenize_text($fname, :$vocab=, :$invalid_label=-1, :$start_label=0) { open(F, $fname) or die "Can't open $fname: $!"; my @lines = map { my $l = [split(/ /)]; shift(@$l); $l } (<F>); my $sentences; ($sentences, $vocab) = mx->rnn->encode_sentences( \@lines, vocab => $vocab, invalid_label => $invalid_label, start_label => $start_label ); return ($sentences, $vocab); } my $buckets = [10, 20, 30, 40, 50, 60]; my $start_label = 1; my $invalid_label = 0; func get_data($layout) { my ($train_sentences, $vocabulary) = tokenize_text( './data/ptb.train.txt', start_label => $start_label, invalid_label => $invalid_label ); my ($validation_sentences) = tokenize_text( './data/ptb.test.txt', vocab => $vocabulary, start_label => $start_label, invalid_label => $invalid_label ); my $data_train = mx->rnn->BucketSentenceIter( $train_sentences, $batch_size, buckets => $buckets, invalid_label => $invalid_label, layout => $layout ); my $data_val = mx->rnn->BucketSentenceIter( $validation_sentences, $batch_size, buckets => $buckets, invalid_label => $invalid_label, layout => $layout ); return ($data_train, $data_val, $vocabulary); } my $train = sub { my ($data_train, $data_val, $vocab) = get_data('TN'); my $cell; if($stack_rnn) { my $stack = mx->rnn->SequentialRNNCell(); for my $i (0..$num_layers-1) { my $dropout_rate = 0; if($i < $num_layers-1) { $dropout_rate = $dropout; } $stack->add( mx->rnn->FusedRNNCell( $num_hidden, num_layers => 1, mode => 'lstm', prefix => "lstm_$i", bidirectional => $bidirectional, dropout => $dropout_rate ) ); } $cell = $stack; } else { $cell = mx->rnn->FusedRNNCell( $num_hidden, mode => 'lstm', num_layers => $num_layers, bidirectional => $bidirectional, dropout => $dropout ); } my $sym_gen = sub { my $seq_len = shift; my $data = mx->sym->Variable('data'); my $label = mx->sym->Variable('softmax_label'); my $embed = mx->sym->Embedding(data=>$data, input_dim=>scalar(keys %$vocab), output_dim=>$num_embed,name=>'embed'); my ($output) = $cell->unroll($seq_len, inputs=>$embed, merge_outputs=>1, layout=>'TNC'); my $pred = mx->sym->Reshape($output, shape=>[-1, $num_hidden*(1+$bidirectional)]); $pred = mx->sym->FullyConnected(data=>$pred, num_hidden=>scalar(keys %$vocab), name=>'pred'); $label = mx->sym->Reshape($label, shape=>[-1]); $pred = mx->sym->SoftmaxOutput(data=>$pred, label=>$label, name=>'softmax'); return ($pred, ['data'], ['softmax_label']); }; my $contexts; if(defined $gpus) { $contexts = [map { mx->gpu($_) } split(/,/, $gpus)]; } else { $contexts = mx->cpu(0); } my $model = mx->mod->BucketingModule( sym_gen => $sym_gen, default_bucket_key => $data_train->default_bucket_key, context => $contexts ); my ($arg_params, $aux_params); if($load_epoch) { (undef, $arg_params, $aux_params) = mx->rnn->load_rnn_checkpoint( $cell, $model_prefix, $load_epoch); } $model->fit( $data_train, eval_data => $data_val, eval_metric => mx->metric->Perplexity($invalid_label), kvstore => $kv_store, optimizer => $optimizer, optimizer_params => { learning_rate => $lr, momentum => $mom, wd => $wd, }, begin_epoch => $load_epoch, initializer => mx->init->Xavier(factor_type => "in", magnitude => 2.34), num_epoch => $num_epoch, batch_end_callback => mx->callback->Speedometer($batch_size, $disp_batches), ($model_prefix ? (epoch_end_callback => mx->rnn->do_rnn_checkpoint($cell, $model_prefix, 1)) : ()) ); }; my $test = sub { assert($model_prefix, "Must specifiy path to load from"); my (undef, $data_val, $vocab) = get_data('NT'); my $stack; if($stack_rnn) { $stack = mx->rnn->SequentialRNNCell(); for my $i (0..$num_layers-1) { my $cell = mx->rnn->LSTMCell(num_hidden => $num_hidden, prefix => "lstm_${i}l0_"); if($bidirectional) { $cell = mx->rnn->BidirectionalCell( $cell, mx->rnn->LSTMCell( num_hidden => $num_hidden, prefix => "lstm_${i}r0_" ), output_prefix => "bi_lstm_$i" ); } $stack->add($cell); } } else { $stack = mx->rnn->FusedRNNCell( $num_hidden, num_layers => $num_layers, mode=>'lstm', bidirectional => $bidirectional )->unfuse() } my $sym_gen = sub { my $seq_len = shift; my $data = mx->sym->Variable('data'); my $label = mx->sym->Variable('softmax_label'); my $embed = mx->sym->Embedding( data => $data, input_dim => scalar(keys %$vocab), output_dim => $num_embed, name => 'embed' ); $stack->reset; my ($outputs, $states) = $stack->unroll($seq_len, inputs => $embed, merge_outputs => 1); my $pred = mx->sym->Reshape($outputs, shape => [-1, $num_hidden*(1+$bidirectional)]); $pred = mx->sym->FullyConnected(data => $pred, num_hidden => scalar(keys %$vocab), name => 'pred'); $label = mx->sym->Reshape($label, shape => [-1]); $pred = mx->sym->SoftmaxOutput(data => $pred, label => $label, name => 'softmax'); return ($pred, ['data'], ['softmax_label']); }; my $contexts; if($gpus) { $contexts = [map { mx->gpu($_) } split(/,/, $gpus)]; } else { $contexts = mx->cpu(0); } my ($arg_params, $aux_params); if($load_epoch) { (undef, $arg_params, $aux_params) = mx->rnn->load_rnn_checkpoint( $stack, $model_prefix, $load_epoch); } my $model = mx->mod->BucketingModule( sym_gen => $sym_gen, default_bucket_key => $data_val->default_bucket_key, context => $contexts ); $model->bind( data_shapes => $data_val->provide_data, label_shapes => $data_val->provide_label, for_training => 0, force_rebind => 0 ); $model->set_params($arg_params, $aux_params); my $score = $model->score($data_val, mx->metric->Perplexity($invalid_label), batch_end_callback=>mx->callback->Speedometer($batch_size, 5) ); }; if($num_layers >= 4 and split(/,/,$gpus) >= 4 and not $stack_rnn) { print("WARNING: stack-rnn is recommended to train complex model on multiple GPUs\n"); } if($do_test) { # Demonstrates how to load a model trained with CuDNN RNN and predict # with non-fused MXNet symbol $test->(); } else { $train->(); }
weleen/mxnet
perl-package/AI-MXNet/examples/cudnn_lstm_bucketing.pl
Perl
apache-2.0
10,999
#!/usr/bin/perl print "Content-type: text/html\n\n"; my $script = $ENV{'SCRIPT_NAME'}; # Which are we looking at? my $master = $ENV{'QUERY_STRING'}; my $action = "$script?$master"; if ($master eq "" || !(-e "data/$master.dat")) { $master = "default"; $action = "ping.pl"; } my $command = "./web-collage $master ./bgcmd"; my $refresh = "<meta http-equiv=\"refresh\" content=\"1\" />"; my $pingbutton = "stop refresh"; if ($ENV{'REQUEST_METHOD'} eq "POST") { read(STDIN, $request, $ENV{'CONTENT_LENGTH'}) || die "Could not get data"; @parameter_list = split(/&/, $request); foreach (@parameter_list) { ($name, $value) = split(/=/); $name =~ s/\+/ /g; # replace "+" with spaces $name =~ s/%([0-9A-F][0-9A-F])/pack("c",hex($1))/ge; # replace %nn with characters $value =~ s/\+/ /g; # repeat for the value ... $value =~ s/%([0-9A-F][0-9A-F])/pack("c",hex($1))/ge; $passed{$name} = $value; } if (defined($passed{'url'})) { $passed{'url'} =~ s/\"/\\\"/g; # protect quotes $command .= ' "' . $passed{'url'} . '"'; } if (defined($passed{'submit'}) && $passed{'submit'} eq "stop refresh") { $refresh = ""; $pingbutton = "auto-refresh"; } } # Ping it! `rm last.log`; `nice $command > last.log`; print " <html> <head> $refresh <title>Tapestry Ping - $master</title> </head> <body> <center> <form action=\"$action\" method=\"post\"> <input type=\"submit\" name=\"submit\" value=\"$pingbutton\" /> <input type=\"text\" name=\"url\" size=\"60\" maxsize=\"120\" /> <input type=\"submit\" name=\"submit\" value=\"add new url\" /><br /> <img src=\"data/$master.jpg\" /> </form> </center> </body> </html>";
jrising/web-collage
web/ping.pl
Perl
mit
1,711
package Shodan::API::Search; =head1 NAME Shodan::API::Search =cut BEGIN { use FindBin qw($Bin); use lib "$Bin/../../../lib"; } use strict; use warnings; use parent 'Shodan::API'; sub ip { return shift->call_api({ 'arguments' => shift || {}, 'request_uri' => '/shodan/host/{ip}', 'request_type' => 'GET', 'required' => { 'ip' => { 'format' => 'string', 'types' => [ 'ipv4', 'ipv6' ], } }, 'optional' => { 'history' => {'format' => 'bool'}, 'minifty' => {'format' => 'bool'}, }, }); } sub count { return shift->call_api({ 'arguments' => shift || {}, 'request_uri' => '/shodan/host/count', 'request_type' => 'GET', 'required' => { 'query' => {'format' => 'string'} }, 'optional' => { 'facets' => {'format' => 'string'}, }, }); } sub tokens { return shift->call_api({ 'arguments' => shift || {}, 'request_uri' => '/shodan/host/search/tokens', 'request_type' => 'GET', 'required' => { 'query' => {'format' => 'string'} }, }); } sub ports { return shift->call_api({ 'arguments' => shift || {}, 'request_uri' => '/shodan/ports', 'request_type' => 'GET', 'description' => 'This method returns a list of port numbers that the crawlers are looking for.', }); } 1;
selftaught/shodancli
lib/Shodan/API/Search.pm
Perl
mit
1,579
package Tangerine::Hook; { $Tangerine::Hook::VERSION = '0.11'; } use strict; use warnings; use Mo qw(default); has type => ''; sub run { warn "Hook run() method not implemented."; } 1; __END__ =pod =encoding utf8 =head1 NAME Tangerine::Hook - A simple hook class. =head1 SYNOPSIS package MyHook; use Mo; use Tangerine::HookData; use Tangerine::Occurence; extends 'Tangerine::Hook'; sub run { my ($self, $s) = @_; if ($s->[0] eq 'use' && $self->type eq 'use' && $s->[1] && $s->[1] eq 'MyModule') { return Tangerine::HookData->new( modules => { MyModule => Tangerine::Occurence->new }, ) } return } =head1 DESCRIPTION Hooks are the workhorses of Tangerine, examining the actual code and returning L<Tangerine::HookData> where applicable. Every hook has a type, which can be one of 'prov', 'req' or 'use', set by the caller and determining what she is interested in. Every hook should implement the C<run> method which is passed an array reference containing the significant children (see L<PPI::Statement>) of the currently parsed Perl statement. The caller expects a L<Tangerine::HookData> instance defining what C<modules> of the requested C<type> we found, what C<hooks> the caller should register or what C<children> shall be examined next. Either or all these may be returned at once. =head1 METHODS =over =item C<type> Returns or sets the hook type. May be one of C<prov>, C<req> or C<use>. =item C<run> This is called by L<Tangerine> with an array reference containing the significant children of the currently parsed Perl statement. Returns a L<Tangerine::HookData> instance. Every hook needs to implement this method. =back =head1 SEE ALSO C<Tangerine>, C<PPI::Statement>, C<Tangerine::HookData> =head1 AUTHOR Petr Šabata <contyk@redhat.com> =head1 COPYRIGHT AND LICENSE Copyright (c) 2014 Petr Šabata See LICENSE for licensing details. =cut
gitpan/Tangerine
lib/Tangerine/Hook.pm
Perl
mit
2,004
#!/usr/bin/perl -w use strict; # no warnings; use lib qw(/var/www/web85/html/makiscrape/cgipan/mylib/); # use lib qw(/var/www/web85/html/makiscrape/cgipan/Crypt-SSLeay-0.58/lib/); use lib qw(/var/www/web85/html/makiscrape/cgipan/build/Web-Scraper-0.32/lib/); # use CGI; # use YAML; use Web::Scraper; use LWP::UserAgent; # use HTTP::Cookies; # use Crypt::SSLeay; # use LWP::Protocol::https; use Data::Dumper; use String::Util 'trim'; use DateTime; use Encode; use JSON; use Try::Tiny; use HTML::Entities; # use Async; # ////// Debug and Environment Settings ///////////////////////////////////////////////// my $path = '/var/www/web85/html/makiscrape/'; # my $path = ''; # local my $debug = 1; my $proxify = 0; # ///////////////////////////////////////////////////////////// PROXY //////////////////////////////////////////// sub proxify { $_[0]->agent('Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)'); $_[0]->proxy(['http'], 'http://'); return $_[0]; } # ///////////////////////////////////////////////////////////// PROXY //////////////////////////////////////////// # /////////////////////////////////////////////////////////////////////////////////////// my $changes = 0; # ////// Variable Declaration ///////////////////////////////////////////////// my $old_data; my $encoding; my $unicode_json_text; my $domain; my $extractPages; my $extractData; my $ua; my $response; my $data; my $res; my $repeat; my $oldLastLink; my $linkData; my $linkRes; my $ol; my $nl; my $server_res; my $csv_output; my $dt; my $outputbuffer; my $outputmessage; # ////// Functions ///////////////////////////////////////////////// sub ifDateAvail { if ( $_[0]->{year} ne 'n/a') { return $_[0]->{year} . '-' . $_[0]->{month} . '-' . $_[0]->{day}; } else { return ''; } }; sub getDate { my $month = -1; if ( defined $_[0] ) { if ( length($_[0]) > 2 ) { # assume string if ( index($_[0], 'jan') > -1 ) { $month = 1; } elsif ( index($_[0], 'feb') > -1 ) { $month = 2; } elsif ( index($_[0], 'mar') > -1 ) { $month = 3; } elsif ( index($_[0], 'apr') > -1 ) { $month = 4; } elsif ( index($_[0], 'may') > -1 ) { $month = 5; } elsif ( index($_[0], 'jun') > -1 ) { $month = 6; } elsif ( index($_[0], 'jul') > -1 ) { $month = 7; } elsif ( index($_[0], 'aug') > -1 ) { $month = 8; } elsif ( index($_[0], 'sep') > -1 ) { $month = 9; } elsif ( index($_[0], 'oct') > -1 ) { $month = 10; } elsif ( index($_[0], 'nov') > -1 ) { $month = 11; } elsif ( index($_[0], 'dec') > -1 ) { $month = 12; }; } else { # assume int $month = int($_[0]); }; }; if ( ($month < 1) or ($month > 12) ) { # sanity check $month = -1; }; return $month; }; sub isNumber { if ( defined $_[0] ) { if ($_[0] =~ /^[+-]?\d+$/ ) { # print "Is a number\n"; return 1; } else { # print "Is not a number\n"; return 0; } } else { return 0; } } # ////// Partitioned Program Segments (to be called asynchronously) ///////////////////////////////////////////////// sub scrape_prep { }; sub scrape_next { }; # ////// Main Program (entry point) ///////////////////////////////////////////////// BEGIN { $| = 1 } if ($debug) { $outputmessage = "scrape.pl running...\n"; print $outputmessage; $outputbuffer .= $outputmessage }; # print "Scrape preparation..."; # my $proc = Async->new(sub { # #any perl code you want executed # scrape_prep(); # }); # if ($proc->ready) { # # the code has finished executing # if ($proc->error) { # # something went wrong # print "An error occured."; # } else { # my $result = $proc->result; # The return value of the code # print "prep done."; # scrape_next(); # } # } # get old data to check for changes / calculate lastEdited date local $/; my $fileexists = 1; if ($debug) { $outputmessage = "Reading makiscrape_full.json (old raw data)..."; print $outputmessage; $outputbuffer .= $outputmessage }; open (MYFILE, '<'.$path.'makiscrape_full.json') or $fileexists = 0; # my $encoding = 'cp932'; $encoding = 'utf8'; if ($fileexists) { $unicode_json_text = decode( $encoding, <MYFILE> ); # UNICODE close (MYFILE); if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; } else { if ($debug) { $outputmessage = "no such file. (not a problem!)\n"; print $outputmessage; $outputbuffer .= $outputmessage }; } if ( defined $unicode_json_text && $unicode_json_text ne '' ) { $old_data = from_json($unicode_json_text); }; # print Dumper $old_data; #open (MYFILE, '>makiscrape.json'); #print MYFILE "Access-Control-Allow-Origin: *\n"; #print MYFILE "Content-Type: application/json\n\n"; # print "McReeds Master Scraper v0.1\n"; # print "--------------------------------------------\n"; $domain = 'http://makibox.com/'; $extractPages = scraper { process 'div.topcontrols > span > a.pagenavlink', 'links[]' => '@href'; }; $extractData = scraper { process 'div.message-container', 'messages[]' => scraper { process 'div.messagelink > a', 'link' => '@href'; process 'div.poster', 'poster' => 'TEXT'; process 'div.helpdesk-messageblock', 'content' => 'TEXT'; # scraper { # process 'b', 'type' => 'TEXT'; # process 'b+b', 'color' => 'TEXT'; # process 'b+b+b', 'notice' => 'TEXT'; # process 'b+b+b+b', 'tracking' => 'TEXT'; # process 'b+b+b+b+b', 'country' => 'TEXT'; # process 'b+b+b+b+b+b', 'shipping' => 'TEXT'; # process 'b+b+b+b+b+b+b', 'received' => 'TEXT'; # }; process 'div.bottom-left', 'postDate' => 'TEXT'; }; }; $ua = LWP::UserAgent->new; $ua->cookie_jar( {} ); if ($proxify) { $ua = proxify($ua); }; if ($debug) { $outputmessage = "Scraping first page for page links..."; print $outputmessage; $outputbuffer .= $outputmessage }; $response = $ua->get($domain . 'forum/topic/2042'); $data = $response->decoded_content; $res = $extractPages->scrape($data); if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; # print $res->{links}[ $#{$res->{links}} ] . "\n\n"; # print Dumper $res->{links}; $repeat = 1; if ($debug) { $outputmessage = "Scraping all page links of the thread"; print $outputmessage; $outputbuffer .= $outputmessage }; try { do { # save oldLastLink $oldLastLink = $res->{links}[ $#{$res->{links}} ]; # get last link $response = $ua->get($domain . $res->{links}[ $#{$res->{links}} ]); # extract pages $linkData = $response->decoded_content; $linkRes = $extractPages->scrape($linkData); # add new pages to original list $ol = 0; do { for $nl ( 0 .. $#{$linkRes->{links}} ) { # print "is " . $res->{links}[$ol] . " eq " .$linkRes->{links}[$nl]. " ?\n"; if ( $res->{links}[$ol] eq $linkRes->{links}[$nl] ) { # print "yup\n"; # link already in old list splice(@{$linkRes->{links}}, $nl, 1); last; }; }; $ol++; } while ($ol <= $#{$res->{links}}); push(@{$res->{links}}, @{$linkRes->{links}}); # if last link eq oldLastLink exit else repeat # print $res->{links}[ $#{$res->{links}} ]." eq ".$oldLastLink."?\n"; if ( $res->{links}[ $#{$res->{links}} ] eq $oldLastLink ) { $repeat = 0; }; if ($debug) { $outputmessage = "."; print $outputmessage; $outputbuffer .= $outputmessage }; } while ($repeat == 1); # print Dumper $res->{links}; # die; # print "\n\n\n"; } catch { print "caught error: $_"; # not $@ print "Error is in the scraping of pagelinks..." }; if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; if ($debug) { $outputmessage = "Fetching html content of all scraped pages"; print $outputmessage; $outputbuffer .= $outputmessage }; try { for my $i ( 0 .. $#{$res->{links}} ) { $response = $ua->get($domain . $res->{links}[$i]); $data .= $response->decoded_content; if ($debug) { $outputmessage = "."; print $outputmessage; $outputbuffer .= $outputmessage }; }; $res = $extractData->scrape($data); $server_res = $extractData->scrape($data); # prepare csv output my @header; @header = ('Name', 'Type', 'Ramen', 'Color', 'Country', 'Shipping', 'Order', 'Notice', 'Tracking', 'Received', 'Cancelled', 'LastEdited', 'Link', 'OriginalPost'); $csv_output = join(';', @header); $csv_output .= "\r\n"; # add date for reference $dt = DateTime->now(); $res->{scraped} = $dt->ymd('-') . ' ' . $dt->hms(':'); $server_res->{scraped} = $res->{scraped}; # lead post delete $res->{messages}[0]->{content}; delete $server_res->{messages}[0]->{postDate}; } catch { print "caught error: $_"; # not $@ print "Error is in the preparation block..." }; if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; try { if ($debug) { $outputmessage = "Iterating through all messages"; print $outputmessage; $outputbuffer .= $outputmessage }; for my $i ( 1 .. $#{$res->{messages}} ) { # print $res->{messages}[$i]->{content} eq $old_data->{messages}[$i]->{content}; # print Dumper $old_data; # print Dumper $unicode_json_text; if ( defined $old_data->{messages}[$i] ) { # test for changes if ( $res->{messages}[$i]->{content} ne $old_data->{messages}[$i]->{content} ) { $changes = 1; }; }; $dt = DateTime->now(); # strange bug otherwise with changing dates # try to find out if the content was altered and set new lastEdited date if ( defined $old_data->{messages}[$i]->{lastEdited} && $old_data->{messages}[$i]->{lastEdited} ne '' ) { if ( $res->{messages}[$i]->{content} eq $old_data->{messages}[$i]->{content} ) { $res->{messages}[$i]->{lastEdited} = $old_data->{messages}[$i]->{lastEdited}; $server_res->{messages}[$i]->{lastEdited} = $res->{messages}[$i]->{lastEdited}; } else { $res->{messages}[$i]->{lastEdited} = $dt->year() . '-' . $dt->month() . '-' . $dt->day(); $server_res->{messages}[$i]->{lastEdited} = $res->{messages}[$i]->{lastEdited}; }; } else { my $postDate = $res->{messages}[$i]->{postDate}; $postDate = lc( substr($postDate, 0, index($postDate, ' ')) ); if ( index($postDate, 'today') > -1 ) { $postDate = $dt; $postDate = substr($postDate, 0, index($postDate, 'T')); } if ( index($postDate, 'yesterday') > -1 ) { $postDate = $dt->subtract(days => 1); $postDate = substr($postDate, 0, index($postDate, 'T')); } my @dateparts = split('-', $postDate); $day = '-1'; $month = '-1'; $year = '-1'; # yyyy-mm-dd $year = int($dateparts[0]); $day = int($dateparts[2]); $month = &getDate($dateparts[1]); my freshLastEditedString = $year . '-' . $month . '-' . $day; $res->{messages}[$i]->{lastEdited} = freshLastEditedString; $server_res->{messages}[$i]->{lastEdited} = freshLastEditedString; }; delete $res->{messages}[$i]->{postDate}; delete $server_res->{messages}[$i]->{postDate}; # die; my $stringOrig = $res->{messages}[$i]->{content}; my $string = lc( $res->{messages}[$i]->{content} ); #type my $startstring = lc( '1. Ordered' ); my $endstring = lc( 'color' ); my $beg = index($string, $startstring); my $bl = length($startstring); my $end = index($string, $endstring); my $txt = substr($string, $beg+$bl, $end-$beg-$bl); my $type = 'n/a'; if ( index($txt, 'ht') > -1 ) { $type = 'HT'; } elsif ( index($txt, 'lt') > -1 ) { $type = 'LT'; } if ( index($txt, 'ramen') > -1 ) { $res->{messages}[$i]->{data}->{ramen} = 1; } else { $res->{messages}[$i]->{data}->{ramen} = 0; } $res->{messages}[$i]->{data}->{type} = $type; #color $startstring = lc( 'color' ); $endstring = lc( 'on' ); $beg = index($string, $startstring); $bl = length($startstring); $end = index($string, $endstring); $txt = substr($string, $beg+$bl, $end-$beg-$bl); my $color = 'n/a'; if ( (index($txt, 'cle') > -1) or (index($txt, 'transp') > -1) ) { $color = 'Clear'; } elsif ( index($txt, 'yel') > -1 ) { $color = 'Yellow'; } elsif ( index($txt, 'bl') > -1 ) { $color = 'Black'; } elsif (( index($txt, 'stainless') > -1 ) or ( index($txt, 'steel') > -1 ) or ( index($txt, 'ss') > -1 )) { $color = 'Stainless Steel'; } $res->{messages}[$i]->{data}->{color} = $color; #ordered #my $switchDate = { 0, 0, 0, 0 }; $startstring = lc( 'on' ); $endstring = lc( '2.' ); $beg = index($string, $startstring); $bl = length($startstring); $end = index($string, $endstring); $txt = substr($string, $beg+$bl, $end-$beg-$bl); $txt =~ s/://; $txt = trim($txt); my $divider = ' '; if ( index($txt, '/') > -1 ) { if ( index($txt, '/', index($txt, '/')+1) > -1 ) { $divider = '/'; } } elsif ( index($txt, '-') > -1 ) { if ( index($txt, '-', index($txt, '-')+1) > -1 ) { $divider = '-'; } } my @dateparts = split($divider, $txt); my $day = '-1'; my $month = '-1'; my $year = '-1'; if (isNumber($dateparts[0])) { if (index($dateparts[2], ' ') > -1) { $dateparts[2] = substr($dateparts[2], 0, index($dateparts[2], ' ')); } if ( length($dateparts[0]) == 4 ) { # assume yyyy-mm-dd # ISO 8601 all the way! $year = int($dateparts[0]); $day = int($dateparts[2]); $month = &getDate($dateparts[1]); } else { # assume mm-dd-yyyy if ( int($dateparts[0]) > 12 ) { # assume dd-mm-yyyy $year = int($dateparts[2]); $day = int($dateparts[0]); $month = &getDate($dateparts[1]); } else { $year = int($dateparts[2]); $day = int($dateparts[1]); $month = &getDate($dateparts[0]); } } } my $y = 'n/a'; my $m = 'n/a'; my $d = 'n/a'; if ( ($year >= 2011) and ($year <= 2014) and ($month > -1) and ($day >= 1) and ($day <= 31) ) { $y = $year; $m = $month; $d = $day; } $res->{messages}[$i]->{data}->{orderDate}->{year} = $y; $res->{messages}[$i]->{data}->{orderDate}->{month} = $m; $res->{messages}[$i]->{data}->{orderDate}->{day} = $d; # notice $startstring = lc( 'notice' ); $endstring = lc( '3.' ); $beg = index($string, $startstring); $bl = length($startstring); $end = index($string, $endstring); $txt = substr($string, $beg+$bl, $end-$beg-$bl); if ( index($txt, 'on') > -1 ) { $txt = substr($txt, index($txt, 'on')+2); } $txt =~ s/://; $txt = trim($txt); $divider = ' '; if ( index($txt, '/') > -1 ) { if ( index($txt, '/', index($txt, '/')+1) > -1 ) { $divider = '/'; } } elsif ( index($txt, '-') > -1 ) { if ( index($txt, '-', index($txt, '-')+1) > -1 ) { $divider = '-'; } } @dateparts = split($divider, $txt); $day = '-1'; $month = '-1'; $year = '-1'; if (isNumber($dateparts[0])) { if (index($dateparts[2], ' ') > -1) { $dateparts[2] = substr($dateparts[2], 0, index($dateparts[2], ' ')); } if ( length($dateparts[0]) == 4 ) { # assume yyyy-mm-dd $year = int($dateparts[0]); $day = int($dateparts[2]); $month = &getDate($dateparts[1]); } else { # assume mm-dd-yyyy if ( int($dateparts[0]) > 12 ) { # assume dd-mm-yyyy $year = int($dateparts[2]); $day = int($dateparts[0]); $month = &getDate($dateparts[1]); } else { $year = int($dateparts[2]); $day = int($dateparts[1]); $month = &getDate($dateparts[0]); } } } $y = 'n/a'; $m = 'n/a'; $d = 'n/a'; if ( ($year >= 2011) and ($year <= 2014) and ($month > -1) and ($day >= 1) and ($day <= 31) ) { $y = $year; $m = $month; $d = $day; } $res->{messages}[$i]->{data}->{notice}->{year} = $y; $res->{messages}[$i]->{data}->{notice}->{month} = $m; $res->{messages}[$i]->{data}->{notice}->{day} = $d; # $res->{messages}[$i]->{data}->{notice}->{lengthOfFirstElement} = length($dateparts[0]); # $res->{messages}[$i]->{data}->{notice}->{divider} = $divider; # $res->{messages}[$i]->{data}->{notice}->{datestring} = $txt; # tracking $startstring = lc( 'tracking' ); $endstring = lc( '4.' ); $beg = index($string, $startstring); $bl = length($startstring); $end = index($string, $endstring); $txt = substr($string, $beg+$bl, $end-$beg-$bl); if ( index($txt, 'on') > -1 ) { $txt = substr($txt, index($txt, 'on')+2); } $txt =~ s/://; $txt = trim($txt); $divider = ' '; if ( index($txt, '/') > -1 ) { if ( index($txt, '/', index($txt, '/')+1) > -1 ) { $divider = '/'; } } elsif ( index($txt, '-') > -1 ) { if ( index($txt, '-', index($txt, '-')+1) > -1 ) { $divider = '-'; } } @dateparts = split($divider, $txt); $day = '-1'; $month = '-1'; $year = '-1'; if (isNumber($dateparts[0])) { if (index($dateparts[2], ' ') > -1) { $dateparts[2] = substr($dateparts[2], 0, index($dateparts[2], ' ')); } if ( length($dateparts[0]) == 4 ) { # assume yyyy-mm-dd $year = int($dateparts[0]); $day = int($dateparts[2]); $month = &getDate($dateparts[1]); } else { # assume mm-dd-yyyy if ( int($dateparts[0]) > 12 ) { # assume dd-mm-yyyy $year = int($dateparts[2]); $day = int($dateparts[0]); $month = &getDate($dateparts[1]); } else { $year = int($dateparts[2]); $day = int($dateparts[1]); $month = &getDate($dateparts[0]); } } } $y = 'n/a'; $m = 'n/a'; $d = 'n/a'; if ( ($year >= 2011) and ($year <= 2014) and ($month > -1) and ($day >= 1) and ($day <= 31) ) { $y = $year; $m = $month; $d = $day; } $res->{messages}[$i]->{data}->{tracking}->{year} = $y; $res->{messages}[$i]->{data}->{tracking}->{month} = $m; $res->{messages}[$i]->{data}->{tracking}->{day} = $d; # country, shipping $startstring = lc( 'shipped' ); $endstring = lc( '5.' ); $beg = index($string, $startstring); $bl = length($startstring); $end = index($string, $endstring); $txt = substr($string, $beg+$bl, $end-$beg-$bl); if ( index($txt, 'to') > -1 ) { $txt = substr($txt, index($txt, 'to')+2); } $txt =~ s/://; $txt = trim($txt); $divider = 'by'; if ( index($txt, 'via') > -1 ) { $divider = 'via'; } my @parts = split($divider, $txt); my $shipping = 'n/a'; if (defined $parts[1]) { if ( (index($parts[1], 'expres') > -1) or index($parts[1], 'speed') > -1 ) { $shipping = 'Express'; } elsif ( (index($parts[1], 'standar') > -1) or (index($parts[1], 'slow') > -1) ) { $shipping = 'Standard'; } elsif ( index($parts[1], 'pick') > -1 ) { $shipping = 'Pickup' } } #$res->{messages}[$i]->{data}->{countryRaw} = $txt; my $country; $country = trim($parts[0]); if ( (!defined $country) or (length($country) > 25) or (length($country) < 2) ) { $country = 'n/a'; } else { my $posC = index( lc($stringOrig), $country ); $country = substr( $stringOrig, $posC, length($country) ); $country =~ s/\[//; $country =~ s/\]//; # $country =~ s/([\w']+)/\u\L$1/g; # capitalize first letter of each word } $res->{messages}[$i]->{data}->{country} = $country; $res->{messages}[$i]->{data}->{shipping} = $shipping; # received $startstring = lc( '5.' ); $endstring = lc( 'as of' ); $beg = index($string, $startstring); $bl = length($startstring); $end = index($string, $endstring); if ( $end == -1 ) { $endstring = lc( 'updated' ); $end = index($string, $endstring); if ( $end == -1 ) { $endstring = lc( '6.' ); $end = index($string, $endstring); if ( $end == -1 ) { $end = length($string); } } } $txt = substr($string, $beg+$bl, $end-$beg-$bl); if ( index($txt, 'on') > -1 ) { $txt = substr($txt, index($txt, 'on')+2); } $txt =~ s/://; $txt = trim($txt); $divider = ' '; if ( index($txt, '/') > -1 ) { if ( index($txt, '/', index($txt, '/')+1) > -1 ) { $divider = '/'; } } elsif ( index($txt, '-') > -1 ) { if ( index($txt, '-', index($txt, '-')+1) > -1 ) { $divider = '-'; } } @dateparts = split($divider, $txt); $day = '-1'; $month = '-1'; $year = '-1'; if (isNumber($dateparts[0])) { if (index($dateparts[2], ' ') > -1) { $dateparts[2] = substr($dateparts[2], 0, index($dateparts[2], ' ')); } if ( length($dateparts[0]) == 4 ) { # assume yyyy-mm-dd $year = int($dateparts[0]); $day = int($dateparts[2]); $month = &getDate($dateparts[1]); } else { # assume mm-dd-yyyy if ( int($dateparts[0]) > 12 ) { # assume dd-mm-yyyy $year = int($dateparts[2]); $day = int($dateparts[0]); $month = &getDate($dateparts[1]); } else { $year = int($dateparts[2]); $day = int($dateparts[1]); $month = &getDate($dateparts[0]); } } } $y = 'n/a'; $m = 'n/a'; $d = 'n/a'; if ( ($year >= 2011) and ($year <= 2014) and ($month > -1) and ($day >= 1) and ($day <= 31) and (index($string, 'cancel') == -1) ) { $y = $year; $m = $month; $d = $day; } $res->{messages}[$i]->{data}->{received}->{year} = $y; $res->{messages}[$i]->{data}->{received}->{month} = $m; $res->{messages}[$i]->{data}->{received}->{day} = $d; #$res->{messages}[$i]->{data}->{received}->{raw} = $txt; #cancelation $y = 'n/a'; $m = 'n/a'; $d = 'n/a'; $startstring = lc( 'Cancel' ); $beg = index($string, $startstring); if ( $beg > -1 ) { $bl = length($startstring); $end = length($string); $txt = substr($string, $beg+$bl, $end-$beg-$bl); if ( index($txt, 'on') > -1 ) { $txt = substr($txt, index($txt, 'on')+2); } $txt =~ s/://; $txt = trim($txt); $divider = ' '; if ( index($txt, '/') > -1 ) { if ( index($txt, '/', index($txt, '/')+1) > -1 ) { $divider = '/'; } } elsif ( index($txt, '-') > -1 ) { if ( index($txt, '-', index($txt, '-')+1) > -1 ) { $divider = '-'; } } @dateparts = split($divider, $txt); $day = '-1'; $month = '-1'; $year = '-1'; if (isNumber($dateparts[0])) { if (index($dateparts[2], ' ') > -1) { $dateparts[2] = substr($dateparts[2], 0, index($dateparts[2], ' ')); } if ( length($dateparts[0]) == 4 ) { # assume yyyy-mm-dd $year = int($dateparts[0]); $day = int($dateparts[2]); $month = &getDate($dateparts[1]); } else { # assume mm-dd-yyyy if ( int($dateparts[0]) > 12 ) { # assume dd-mm-yyyy $year = int($dateparts[2]); $day = int($dateparts[0]); $month = &getDate($dateparts[1]); } else { $year = int($dateparts[2]); $day = int($dateparts[1]); $month = &getDate($dateparts[0]); } } } if ( ($year >= 2011) and ($year <= 2014) and ($month > -1) and ($day >= 1) and ($day <= 31) ) { $y = $year; $m = $month; $d = $day; } } $res->{messages}[$i]->{data}->{cancelled}->{year} = $y; $res->{messages}[$i]->{data}->{cancelled}->{month} = $m; $res->{messages}[$i]->{data}->{cancelled}->{day} = $d; # as of $startstring = lc( 'as of' ); #$endstring = lc( ' ' ); $beg = index($string, $startstring); if ( $beg == -1 ) { $startstring = lc( 'updated' ); $beg = index($string, $startstring); } $bl = length($startstring); #$end = index($string, $endstring); $txt = substr($string, $beg+$bl); if ( $beg == -1 ) { $txt = ''; } if ( index($txt, 'on') > -1 ) { $txt = substr($txt, index($txt, 'on')+2); } if ( index($txt, 'at') > -1 ) { $txt = substr($txt, index($txt, 'at')+2); } $txt =~ s/://; $txt = trim($txt); $divider = ' '; if ( index($txt, '/') > -1 ) { if ( index($txt, '/', index($txt, '/')+1) > -1 ) { $divider = '/'; } } elsif ( index($txt, '-') > -1 ) { if ( index($txt, '-', index($txt, '-')+1) > -1 ) { $divider = '-'; } } @dateparts = split($divider, $txt); $day = '-1'; $month = '-1'; $year = '-1'; if (isNumber($dateparts[0])) { if (index($dateparts[2], ' ') > -1) { $dateparts[2] = substr($dateparts[2], 0, index($dateparts[2], ' ')); } if ( length($dateparts[0]) == 4 ) { # assume yyyy-mm-dd $year = int($dateparts[0]); $day = int($dateparts[2]); $month = &getDate($dateparts[1]); } else { # assume mm-dd-yyyy if ( int($dateparts[0]) > 12 ) { # assume dd-mm-yyyy $year = int($dateparts[2]); $day = int($dateparts[0]); $month = &getDate($dateparts[1]); } else { $year = int($dateparts[2]); $day = int($dateparts[1]); $month = &getDate($dateparts[0]); } } } $y = 'n/a'; $m = 'n/a'; $d = 'n/a'; if ( ($year >= 2011) and ($year <= 2014) and ($month > -1) and ($day >= 1) and ($day <= 31) ) { $y = $year; $m = $month; $d = $day; } $res->{messages}[$i]->{data}->{asOf}->{year} = $y; $res->{messages}[$i]->{data}->{asOf}->{month} = $m; $res->{messages}[$i]->{data}->{asOf}->{day} = $d; # $res->{messages}[$i]->{data}->{asOf}->{raw} = $txt; # my $asOf = $res->{messages}[$i]->{lastEdited}; # $asOf = lc( substr($asOf, 0, index($asOf, ' ')) ); # if ( index($asOf, 'today') > -1 ) { # $asOf = $dt; # $asOf = substr($asOf, 0, index($asOf, 'T')); # } # if ( index($asOf, 'yesterday') > -1 ) { # $asOf = $dt->subtract(days => 1); # $asOf = substr($asOf, 0, index($asOf, 'T')); # } # @dateparts = split('-', $asOf); # $y = int($dateparts[0]); # $d = int($dateparts[2]); # $m = int($dateparts[1]); # $res->{messages}[$i]->{data}->{lastEdited}->{year} = $y; # $res->{messages}[$i]->{data}->{lastEdited}->{month} = $m; # $res->{messages}[$i]->{data}->{lastEdited}->{day} = $d; # $res->{messages}[$i]->{data}->{lastEdited} = $asOf; # delete $res->{messages}[$i]->{lastEdited}; # build csv entry my $orderD = ifDateAvail( $res->{messages}[$i]->{data}->{orderDate} ); my $noticeD = ifDateAvail( $res->{messages}[$i]->{data}->{notice} ); my $trackingD = ifDateAvail( $res->{messages}[$i]->{data}->{tracking} ); my $receivedD = ifDateAvail( $res->{messages}[$i]->{data}->{received} ); my $cancelledD = ifDateAvail( $res->{messages}[$i]->{data}->{cancelled} ); if (!defined $res->{messages}[$i]->{data}->{lastEdited}) { $res->{messages}[$i]->{data}->{lastEdited} = "n/a"; } my @csv_message = ( $res->{messages}[$i]->{poster}, $res->{messages}[$i]->{data}->{type}, $res->{messages}[$i]->{data}->{ramen}, $res->{messages}[$i]->{data}->{color}, $res->{messages}[$i]->{data}->{country}, $res->{messages}[$i]->{data}->{shipping}, $orderD, $noticeD, $trackingD, $receivedD, $cancelledD, $res->{messages}[$i]->{data}->{lastEdited}, $res->{messages}[$i]->{link}, $res->{messages}[$i]->{content} ); $csv_output .= join(';', @csv_message); $csv_output .= "\r\n"; delete $res->{messages}[$i]->{content}; if ($debug) { $outputmessage = "."; print $outputmessage; $outputbuffer .= $outputmessage }; }; } catch { print "caught error: $_"; # not $@ print "Error is in that awfully long for loop..." }; if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; # print "Access-Control-Allow-Origin: *\n"; # print "Content-Type: application/json\n\n"; if ($debug) { $outputmessage = "Idlebot output:\n"; print $outputmessage; $outputbuffer .= $outputmessage; }; # output for IdleBot if ( $changes == 0 ) { $outputmessage = 'No changes since last scrape.'; print $outputmessage; $outputbuffer .= $outputmessage; } else { $outputmessage = 'Found new data!'; print $outputmessage; $outputbuffer .= $outputmessage; }; # print $changes; if ($debug) { $outputmessage = "\nWriting files to disk...\n"; print $outputmessage; $outputbuffer .= $outputmessage }; try { if ($debug) { $outputmessage = "makiscrape_full.json..."; print $outputmessage; $outputbuffer .= $outputmessage }; # writing server JSON (to later compare the content) my $json_text = encode_json($server_res); open (MYFILE, '>'.$path.'makiscrape_full.json'); print MYFILE $json_text; close (MYFILE); if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; if ($debug) { $outputmessage = "makiscrape.json..."; print $outputmessage; $outputbuffer .= $outputmessage }; # writing client JSON $json_text = encode_json($res); open (MYFILE, '>'.$path.'makiscrape.json'); print MYFILE $json_text; close (MYFILE); if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; if ($debug) { $outputmessage = "makiscrape.csv..."; print $outputmessage; $outputbuffer .= $outputmessage }; # writing CSV # open (MYFILE, '>/var/www/web85/html/makiscrape/makiscrape_' . $dt->ymd('-') . '_' . $dt->hms('') . '.csv'); open (MYFILE, '>'.$path.'makiscrape.csv'); # open (MYFILE, '>makiscrape.csv'); print MYFILE $csv_output; close (MYFILE); if ($debug) { $outputmessage = "done.\n"; print $outputmessage; $outputbuffer .= $outputmessage }; } catch { print "caught error: $_"; # not $@ print "Error occurs during file write..." }; my $callback = $ARGV[0]; if (defined $callback) { if ($debug) { $outputmessage = "Calling callback address...\n"; print $outputmessage; $outputbuffer .= $outputmessage }; if ($debug) { $outputmessage = "\nScript finished!\n"; $outputbuffer .= $outputmessage }; $response = $ua->get($callback . "?output=" . encode_entities($outputbuffer)); }; if ($debug) { print "\nScript finished!\n"; };
andrbmgi/makistats
cgi-bin/scrape.pl
Perl
mit
29,589
use strict; use TokenManager; use Bio::KBase::DeploymentConfig; our $config = Bio::KBase::DeploymentConfig->new("TokenServer"); our $url_base = $config->setting("url-base"); our $storage = $config->setting("storage"); our $mgr = TokenManager->new($storage, $url_base); @ARGV == 1 or die "Usage: make-token username\n"; my $user = shift; my $token = $mgr->create_signed_token($user); print "$token\n";
kbase/nexus_emulation
scripts/make-token.pl
Perl
mit
408
#!/usr/local/bin/perl -w # $Id: plookup.perl,v 350.3 2005-01-20 11:53:34-08 - - $ # # Perl solution to `lookup-list' assignment. # $0 =~ s|^(.*/)?([^/]+)/*$|$2|; BEGIN {$EXITCODE = 0} END {exit $EXITCODE} sub note(@) {print STDERR "$0: @_"} $SIG{'__WARN__'} = sub {note @_; $EXITCODE = 1}; $SIG{'__DIE__'} = sub {warn @_; exit}; sub trim($) {$_ = $_[0]; s/^\s*//; s/\s*$//; $_} sub printkv($) {printf "%s = %s\n", @{$LIST[$_[0]]}} sub printall() {printkv $_ for 0..$#LIST} sub printval() {printkv $_ for grep {$LIST[$_][1] eq $val} 0..$#LIST} sub printfind() { map {printkv $_ and return $_ if $LIST[$_][0] eq $key} 0..$#LIST; return undef; } sub keynull() {splice @LIST, $pos, 1 if defined ($pos = printfind)} sub keyval () { if (defined ($pos = printfind)) {$LIST[$pos][1] = $val} else {unshift @LIST, [$key, $val]} } @switch = (\&printall, \&printval, \&keynull, \&keyval); $wantecho = 1, shift if @ARGV and $ARGV[0] eq "-e"; while ($line = <>) { print "$0: $line" if $wantecho; next if $line =~ m/^\s*(#|$)/; ($key, $val) = map {trim $_} split m/=/, $line, 2; if (defined $val) {&{$switch[ ($key ne "") * 2 + ($val ne "") ]}} else {printfind} }
bcherry/bcherry
oldstuff/Java/old/lookup/plookup.perl
Perl
mit
1,227
package ExtUtils::CBuilder::Platform::dec_osf; $ExtUtils::CBuilder::Platform::dec_osf::VERSION = '0.280224'; use warnings; use strict; use ExtUtils::CBuilder::Platform::Unix; use File::Spec; use vars qw(@ISA); @ISA = qw(ExtUtils::CBuilder::Platform::Unix); sub link_executable { my $self = shift; # $Config{ld} is 'ld' but that won't work: use the cc instead. local $self->{config}{ld} = $self->{config}{cc}; return $self->SUPER::link_executable(@_); } 1;
rosiro/wasarabi
local/lib/perl5/ExtUtils/CBuilder/Platform/dec_osf.pm
Perl
mit
467
# $Id: TLUtils.pm 37234 2015-05-06 20:30:33Z siepo $ # TeXLive::TLUtils.pm - the inevitable utilities for TeX Live. # Copyright 2007-2015 Norbert Preining, Reinhard Kotucha # This file is licensed under the GNU General Public License version 2 # or any later version. package TeXLive::TLUtils; my $svnrev = '$Revision: 37234 $'; my $_modulerevision; if ($svnrev =~ m/: ([0-9]+) /) { $_modulerevision = $1; } else { $_modulerevision = "unknown"; } sub module_revision { return $_modulerevision; } =pod =head1 NAME C<TeXLive::TLUtils> -- utilities used in the TeX Live infrastructure =head1 SYNOPSIS use TeXLive::TLUtils; =head2 Platform detection TeXLive::TLUtils::platform(); TeXLive::TLUtils::platform_name($canonical_host); TeXLive::TLUtils::platform_desc($platform); TeXLive::TLUtils::win32(); TeXLive::TLUtils::unix(); =head2 System tools TeXLive::TLUtils::getenv($string); TeXLive::TLUtils::which($string); TeXLive::TLUtils::get_system_tmpdir(); TeXLive::TLUtils::tl_tmpdir(); TeXLive::TLUtils::xchdir($dir); TeXLive::TLUtils::wsystem($msg,@args); TeXLive::TLUtils::xsystem(@args); TeXLive::TLUtils::run_cmd($cmd); =head2 File utilities TeXLive::TLUtils::dirname($path); TeXLive::TLUtils::basename($path); TeXLive::TLUtils::dirname_and_basename($path); TeXLive::TLUtils::tl_abs_path($path); TeXLive::TLUtils::dir_writable($path); TeXLive::TLUtils::dir_creatable($path); TeXLive::TLUtils::mkdirhier($path); TeXLive::TLUtils::rmtree($root, $verbose, $safe); TeXLive::TLUtils::copy($file, $target_dir); TeXLive::TLUtils::touch(@files); TeXLive::TLUtils::collapse_dirs(@files); TeXLive::TLUtils::removed_dirs(@files); TeXLive::TLUtils::download_file($path, $destination [, $progs ]); TeXLive::TLUtils::setup_programs($bindir, $platform); TeXLive::TLUtils::tlcmp($file, $file); TeXLive::TLUtils::nulldev(); TeXLive::TLUtils::get_full_line($fh); =head2 Installer functions TeXLive::TLUtils::make_var_skeleton($path); TeXLive::TLUtils::make_local_skeleton($path); TeXLive::TLUtils::create_fmtutil($tlpdb,$dest); TeXLive::TLUtils::create_updmap($tlpdb,$dest); TeXLive::TLUtils::create_language_dat($tlpdb,$dest,$localconf); TeXLive::TLUtils::create_language_def($tlpdb,$dest,$localconf); TeXLive::TLUtils::create_language_lua($tlpdb,$dest,$localconf); TeXLive::TLUtils::time_estimate($totalsize, $donesize, $starttime) TeXLive::TLUtils::install_packages($from_tlpdb,$media,$to_tlpdb,$what,$opt_src, $opt_doc)>); TeXLive::TLUtils::install_package($what, $filelistref, $target, $platform); TeXLive::TLUtils::do_postaction($how, $tlpobj, $do_fileassocs, $do_menu, $do_desktop, $do_script); TeXLive::TLUtils::announce_execute_actions($how, @executes); TeXLive::TLUtils::add_symlinks($root, $arch, $sys_bin, $sys_man, $sys_info); TeXLive::TLUtils::remove_symlinks($root, $arch, $sys_bin, $sys_man, $sys_info); TeXLive::TLUtils::w32_add_to_path($bindir, $multiuser); TeXLive::TLUtils::w32_remove_from_path($bindir, $multiuser); TeXLive::TLUtils::setup_persistent_downloads(); =head2 Miscellaneous TeXLive::TLUtils::sort_uniq(@list); TeXLive::TLUtils::push_uniq(\@list, @items); TeXLive::TLUtils::member($item, @list); TeXLive::TLUtils::merge_into(\%to, \%from); TeXLive::TLUtils::texdir_check($texdir); TeXLive::TLUtils::quotify_path_with_spaces($path); TeXLive::TLUtils::conv_to_w32_path($path); TeXLive::TLUtils::native_slashify($internal_path); TeXLive::TLUtils::forward_slashify($path_from_user); TeXLive::TLUtils::give_ctan_mirror(); TeXLive::TLUtils::give_ctan_mirror_base(); TeXLive::TLUtils::tlmd5($path); TeXLive::TLUtils::compare_tlpobjs($tlpA, $tlpB); TeXLive::TLUtils::compare_tlpdbs($tlpdbA, $tlpdbB); TeXLive::TLUtils::report_tlpdb_differences(\%ret); TeXLive::TLUtils::tlnet_disabled_packages($root); TeXLive::TLUtils::mktexupd(); =head1 DESCRIPTION =cut # avoid -warnings. our $PERL_SINGLE_QUOTE; # we steal code from Text::ParseWords use vars qw( $::LOGFILENAME @::LOGLINES @::debug_hook @::ddebug_hook @::dddebug_hook @::info_hook @::warn_hook @::install_packages_hook $::latex_updated $::machinereadable $::no_execute_actions $::regenerate_all_formats $::tex_updated $TeXLive::TLDownload::net_lib_avail ); BEGIN { use Exporter (); use vars qw(@ISA @EXPORT_OK @EXPORT); @ISA = qw(Exporter); @EXPORT_OK = qw( &platform &platform_name &platform_desc &unix &getenv &which &get_system_tmpdir &dirname &basename &dirname_and_basename &tl_abs_path &dir_writable &dir_creatable &mkdirhier &rmtree &copy &touch &collapse_dirs &removed_dirs &install_package &install_packages &make_var_skeleton &make_local_skeleton &create_fmtutil &create_updmap &create_language_dat &create_language_def &create_language_lua &parse_AddFormat_line &parse_AddHyphen_line &sort_uniq &push_uniq &texdir_check &member &quotewords &quotify_path_with_spaces &conv_to_w32_path &native_slashify &forward_slashify &untar &unpack &merge_into &give_ctan_mirror &give_ctan_mirror_base &create_mirror_list &extract_mirror_entry &tlmd5 &wsystem &xsystem &run_cmd &announce_execute_actions &add_symlinks &remove_symlinks &w32_add_to_path &w32_remove_from_path &tlcmp &time_estimate &compare_tlpobjs &compare_tlpdbs &report_tlpdb_differences &setup_persistent_downloads &mktexupd &nulldev &get_full_line &sort_archs ); @EXPORT = qw(setup_programs download_file process_logging_options tldie tlwarn info log debug ddebug dddebug debug_hash win32 xchdir xsystem run_cmd sort_archs); } use Cwd; use Digest::MD5; use Getopt::Long; use File::Temp; use TeXLive::TLConfig; $::opt_verbosity = 0; # see process_logging_options =head2 Platform detection =over 4 =item C<platform> If C<$^O=~/MSWin(32|64)$/i> is true we know that we're on Windows and we set the global variable C<$::_platform_> to C<win32>. Otherwise we call C<platform_name> with the output of C<config.guess> as argument. The result is stored in a global variable C<$::_platform_>, and subsequent calls just return that value. =cut sub platform { unless (defined $::_platform_) { if ($^O =~ /^MSWin/i) { $::_platform_ = "win32"; } else { my $config_guess = "$::installerdir/tlpkg/installer/config.guess"; # We cannot rely on #! in config.guess but have to call /bin/sh # explicitly because sometimes the 'noexec' flag is set in # /etc/fstab for ISO9660 file systems. chomp (my $guessed_platform = `/bin/sh '$config_guess'`); # For example, if the disc or reader has hardware problems. die "$0: could not run $config_guess, cannot proceed, sorry" if ! $guessed_platform; $::_platform_ = platform_name($guessed_platform); } } return $::_platform_; } =item C<platform_name($canonical_host)> Convert a canonical host names as returned by C<config.guess> into TeX Live platform names. CPU type is determined by a regexp, and any C</^i.86/> name is replaced by C<i386>. For OS we need a list because what's returned is not likely to match our historical names, e.g., C<config.guess> returns C<linux-gnu> but we need C<linux>. This list might/should contain OSs which are not currently supported. If a particular platform is not found in this list we use the regexp C</.*-(.*$)/> as a last resort and hope it provides something useful. =cut sub platform_name { my ($guessed_platform) = @_; $guessed_platform =~ s/^x86_64-(.*-k?)(free|net)bsd/amd64-$1$2bsd/; my $CPU; # CPU type as reported by config.guess. my $OS; # O/S type as reported by config.guess. ($CPU = $guessed_platform) =~ s/(.*?)-.*/$1/; $CPU =~ s/^alpha(.*)/alpha/; # alphaev whatever $CPU =~ s/mips64el/mipsel/; # don't distinguish mips64 and 32 el $CPU =~ s/powerpc64/powerpc/; # don't distinguish ppc64 $CPU =~ s/sparc64/sparc/; # don't distinguish sparc64 # armv6l-unknown-linux-gnueabihf -> armhf-linux (RPi) # armv7l-unknown-linux-gnueabi -> armel-linux (Android) if ($CPU =~ /^arm/) { $CPU = $guessed_platform =~ /hf$/ ? "armhf" : "armel"; } my @OSs = qw(aix cygwin darwin freebsd hpux irix kfreebsd linux netbsd openbsd solaris); for my $os (@OSs) { # Match word boundary at the beginning of the os name so that # freebsd and kfreebsd are distinguished. # Do not match word boundary at the end of the os so that # solaris2 is matched. $OS = $os if $guessed_platform =~ /\b$os/; } if ($OS eq "darwin") { # We want to guess x86_64-darwin on new-enough systems. # Most robust approach is to check sw_vers (os version) # and sysctl (processor hardware). chomp (my $sw_vers = `sw_vers -productVersion`); my ($os_major,$os_minor) = split (/\./, $sw_vers); # chomp (my $sysctl = `PATH=/usr/sbin:\$PATH sysctl hw.cpu64bit_capable`); my (undef,$hw_64_bit) = split (" ", $sysctl); # $CPU = ($os_major >= 10 && $os_minor >= 6 && $hw_64_bit >= 1) ? "x86_64" : "universal"; } elsif ($CPU =~ /^i.86$/) { $CPU = "i386"; # 586, 686, whatever } if (! defined $OS) { ($OS = $guessed_platform) =~ s/.*-(.*)/$1/; } return "$CPU-$OS"; } =item C<platform_desc($platform)> Return a string which describes a particular platform identifier, e.g., given C<i386-linux> we return C<Intel x86 with GNU/Linux>. =cut sub platform_desc { my ($platform) = @_; my %platform_name = ( 'alpha-linux' => 'GNU/Linux on DEC Alpha', 'amd64-freebsd' => 'FreeBSD on x86_64', 'amd64-kfreebsd' => 'GNU/kFreeBSD on x86_64', 'amd64-netbsd' => 'NetBSD on x86_64', 'armel-linux' => 'GNU/Linux on ARM', 'armhf-linux' => 'GNU/Linux on ARMhf', 'hppa-hpux' => 'HP-UX', 'i386-cygwin' => 'Cygwin on Intel x86', 'i386-darwin' => 'MacOSX/Darwin on Intel x86', 'i386-freebsd' => 'FreeBSD on Intel x86', 'i386-kfreebsd' => 'GNU/kFreeBSD on Intel x86', 'i386-openbsd' => 'OpenBSD on Intel x86', 'i386-netbsd' => 'NetBSD on Intel x86', 'i386-linux' => 'GNU/Linux on Intel x86', 'i386-solaris' => 'Solaris on Intel x86', 'mips-irix' => 'SGI IRIX', 'mipsel-linux' => 'GNU/Linux on MIPSel', 'powerpc-aix' => 'AIX on PowerPC', 'powerpc-darwin' => 'MacOSX/Darwin on PowerPC', 'powerpc-linux' => 'GNU/Linux on PowerPC', 'sparc-linux' => 'GNU/Linux on Sparc', 'sparc-solaris' => 'Solaris on Sparc', 'universal-darwin' => 'MacOSX/Darwin universal binaries', 'win32' => 'Windows', 'x86_64-cygwin' => 'Cygwin on x86_64', 'x86_64-darwin' => 'MacOSX/Darwin on x86_64', 'x86_64-linux' => 'GNU/Linux on x86_64', 'x86_64-solaris' => 'Solaris on x86_64', ); # the inconsistency between amd64-freebsd and x86_64-linux is # unfortunate (it's the same hardware), but the os people say those # are the conventional names on the respective os's, so we follow suit. if (exists $platform_name{$platform}) { return "$platform_name{$platform}"; } else { my ($CPU,$OS) = split ('-', $platform); return "$CPU with " . ucfirst "$OS"; } } =item C<win32> Return C<1> if platform is Windows and C<0> otherwise. The test is currently based on the value of Perl's C<$^O> variable. =cut sub win32 { if ($^O =~ /^MSWin/i) { return 1; } else { return 0; } # the following needs config.guess, which is quite bad ... # return (&platform eq "win32")? 1:0; } =item C<unix> Return C<1> if platform is UNIX and C<0> otherwise. =cut sub unix { return (&platform eq "win32")? 0:1; } =back =head2 System Tools =over 4 =item C<getenv($string)> Get an environment variable. It is assumed that the environment variable contains a path. On Windows all backslashes are replaced by forward slashes as required by Perl. If this behavior is not desired, use C<$ENV{"$variable"}> instead. C<0> is returned if the environment variable is not set. =cut sub getenv { my $envvar=shift; my $var=$ENV{"$envvar"}; return 0 unless (defined $var); if (&win32) { $var=~s!\\!/!g; # change \ -> / (required by Perl) } return "$var"; } =item C<which($string)> C<which> does the same as the UNIX command C<which(1)>, but it is supposed to work on Windows too. On Windows we have to try all the extensions given in the C<PATHEXT> environment variable. We also try without appending an extension because if C<$string> comes from an environment variable, an extension might already be present. =cut sub which { my ($prog) = @_; my @PATH; my $PATH = getenv('PATH'); if (&win32) { my @PATHEXT = split (';', getenv('PATHEXT')); push (@PATHEXT, ''); # in case argument contains an extension @PATH = split (';', $PATH); for my $dir (@PATH) { for my $ext (@PATHEXT) { if (-f "$dir/$prog$ext") { return "$dir/$prog$ext"; } } } } else { # not windows @PATH = split (':', $PATH); for my $dir (@PATH) { if (-x "$dir/$prog") { return "$dir/$prog"; } } } return 0; } =item C<get_system_tmpdir> Evaluate the environment variables C<TMPDIR>, C<TMP>, and C<TEMP> in order to find the system temporary directory. =cut sub get_system_tmpdir { my $systmp=0; $systmp||=getenv 'TMPDIR'; $systmp||=getenv 'TMP'; $systmp||=getenv 'TEMP'; $systmp||='/tmp'; return "$systmp"; } =item C<tl_tmpdir> Create a temporary directory which is removed when the program is terminated. =cut sub tl_tmpdir { return (File::Temp::tempdir(CLEANUP => 1)); } =item C<xchdir($dir)> C<chdir($dir)> or die. =cut sub xchdir { my ($dir) = @_; chdir($dir) || die "$0: chdir($dir) failed: $!"; ddebug("xchdir($dir) ok\n"); } =item C<wsystem($msg, @args)> Call C<info> about what is being done starting with C<$msg>, then run C<system(@args)>; C<tlwarn> if unsuccessful and return the exit status. =cut sub wsystem { my ($msg,@args) = @_; info("$msg @args ...\n"); my $status = system(@args); if ($status != 0) { tlwarn("$0: command failed: @args: $!\n"); } return $status; } =item C<xsystem(@args)> Call C<ddebug> about what is being done, then run C<system(@args)>, and die if unsuccessful. =cut sub xsystem { my (@args) = @_; ddebug("running system(@args)\n"); my $retval = system(@args); if ($retval != 0) { $retval /= 256 if $retval > 0; my $pwd = cwd (); die "$0: system(@args) failed in $pwd, status $retval"; } } =item C<run_cmd($cmd)> Run shell command C<$cmd> and captures its output. Returns a list with CMD's output as the first element and the return value (exit code) as second. =cut sub run_cmd { my $cmd = shift; my $output = `$cmd`; $output = "" if ! defined ($output); # don't return undef my $retval = $?; if ($retval != 0) { $retval /= 256 if $retval > 0; } return ($output,$retval); } =back =head2 File Utilities =over 4 =item C<dirname_and_basename($path)> Return both C<dirname> and C<basename>. Example: ($dirpart,$filepart) = dirname_and_basename ($path); =cut sub dirname_and_basename { my $path=shift; my ($share, $base) = ("", ""); if (win32) { $path=~s!\\!/!g; } # do not try to make sense of paths ending with /.. return (undef, undef) if $path =~ m!/\.\.$!; if ($path=~m!/!) { # dirname("foo/bar/baz") -> "foo/bar" # eliminate `/.' path components while ($path =~ s!/\./!/!) {}; # UNC path? => first split in $share = //xxx/yy and $path = /zzzz if (win32() and $path =~ m!^(//[^/]+/[^/]+)(.*)$!) { ($share, $path) = ($1, $2); if ($path =~ m!^/?$!) { $path = $share; $base = ""; } elsif ($path =~ m!(/.*)/(.*)!) { $path = $share.$1; $base = $2; } else { $base = $path; $path = $share; } return ($path, $base); } # not a UNC path $path=~m!(.*)/(.*)!; # works because of greedy matching return ((($1 eq '') ? '/' : $1), $2); } else { # dirname("ignore") -> "." return (".", $path); } } =item C<dirname($path)> Return C<$path> with its trailing C</component> removed. =cut sub dirname { my $path = shift; my ($dirname, $basename) = dirname_and_basename($path); return $dirname; } =item C<basename($path)> Return C<$path> with any leading directory components removed. =cut sub basename { my $path = shift; my ($dirname, $basename) = dirname_and_basename($path); return $basename; } =item C<tl_abs_path($path)> # Other than Cwd::abs_path, tl_abs_path also works # if only the grandparent exists. =cut sub tl_abs_path { my $path = shift; if (win32) { $path=~s!\\!/!g; } my $ret; eval {$ret = Cwd::abs_path($path);}; # eval needed for w32 return $ret if defined $ret; # $ret undefined: probably the parent does not exist. # But we also want an answer if only the grandparent exists. my ($parent, $base) = dirname_and_basename($path); return undef unless defined $parent; eval {$ret = Cwd::abs_path($parent);}; if (defined $ret) { if ($ret =~ m!/$! or $base =~ m!^/!) { $ret = "$ret$base"; } else { $ret = "$ret/$base"; } return $ret; } else { my ($pparent, $pbase) = dirname_and_basename($parent); return undef unless defined $pparent; eval {$ret = Cwd::abs_path($pparent);}; return undef unless defined $ret; if ($ret =~ m!/$!) { $ret = "$ret$pbase/$base"; } else { $ret = "$ret/$pbase/$base"; } return $ret; } } =item C<dir_creatable($path)> Tests whether its argument is a directory where we can create a directory. =cut sub dir_slash { my $d = shift; $d = "$d/" unless $d =~ m!/!; return $d; } # test whether subdirectories can be created in the argument sub dir_creatable { my $path=shift; #print STDERR "testing $path\n"; $path =~ s!\\!/!g if win32; return 0 unless -d $path; $path =~ s!/$!!; #print STDERR "testing $path\n"; my $i = 0; my $too_large = 100000; while ((-e $path . "/" . $i) and $i<$too_large) { $i++; } return 0 if $i>=$too_large; my $d = $path."/".$i; #print STDERR "creating $d\n"; return 0 unless mkdir $d; return 0 unless -d $d; rmdir $d; return 1; } =item C<dir_writable($path)> Tests whether its argument is writable by trying to write to it. This function is necessary because the built-in C<-w> test just looks at mode and uid/guid, which on Windows always returns true and even on Unix is not always good enough for directories mounted from a fileserver. =cut # Theoretically, the test below, which uses numbers as names, might # lead to a race condition. OTOH, it should work even on a very # broken Perl. # The Unix test gives the wrong answer when used under Windows Vista # with one of the `virtualized' directories such as Program Files: # lacking administrative permissions, it would write successfully to # the virtualized Program Files rather than fail to write to the # real Program Files. Ugh. sub dir_writable { my ($path) = @_; return 0 unless -d $path; $path =~ s!\\!/!g if win32; $path =~ s!/$!!; my $i = 0; my $too_large = 100000; while ((-e "$path/$i") && $i < $too_large) { $i++; } return 0 if $ i >= $too_large; my $f = "$path/$i"; return 0 if ! open (TEST, ">$f"); my $written = 0; $written = (print TEST "\n"); close (TEST); unlink ($f); return $written; } =item C<mkdirhier($path, [$mode])> The function C<mkdirhier> does the same as the UNIX command C<mkdir -p>, and dies on failure. The optional parameter sets the permission bits. =cut sub mkdirhier { my ($tree,$mode) = @_; return if (-d "$tree"); my $subdir = ""; # win32 is special as usual: we need to separate //servername/ part # from the UNC path, since (! -d //servername/) tests true $subdir = $& if ( win32() && ($tree =~ s!^//[^/]+/!!) ); @dirs = split (/\//, $tree); for my $dir (@dirs) { $subdir .= "$dir/"; if (! -d $subdir) { if (defined $mode) { mkdir ($subdir, $mode) || die "$0: mkdir($subdir,$mode) failed, goodbye: $!\n"; } else { mkdir ($subdir) || die "$0: mkdir($subdir) failed, goodbye: $!\n"; } } } } =item C<rmtree($root, $verbose, $safe)> The C<rmtree> function provides a convenient way to delete a subtree from the directory structure, much like the Unix command C<rm -r>. C<rmtree> takes three arguments: =over 4 =item * the root of the subtree to delete, or a reference to a list of roots. All of the files and directories below each root, as well as the roots themselves, will be deleted. =item * a boolean value, which if TRUE will cause C<rmtree> to print a message each time it examines a file, giving the name of the file, and indicating whether it's using C<rmdir> or C<unlink> to remove it, or that it's skipping it. (defaults to FALSE) =item * a boolean value, which if TRUE will cause C<rmtree> to skip any files to which you do not have delete access (if running under VMS) or write access (if running under another OS). This will change in the future when a criterion for 'delete permission' under OSs other than VMS is settled. (defaults to FALSE) =back It returns the number of files successfully deleted. Symlinks are simply deleted and not followed. B<NOTE:> There are race conditions internal to the implementation of C<rmtree> making it unsafe to use on directory trees which may be altered or moved while C<rmtree> is running, and in particular on any directory trees with any path components or subdirectories potentially writable by untrusted users. Additionally, if the third parameter is not TRUE and C<rmtree> is interrupted, it may leave files and directories with permissions altered to allow deletion (and older versions of this module would even set files and directories to world-read/writable!) Note also that the occurrence of errors in C<rmtree> can be determined I<only> by trapping diagnostic messages using C<$SIG{__WARN__}>; it is not apparent from the return value. =cut #taken from File/Path.pm # my $Is_VMS = $^O eq 'VMS'; my $Is_MacOS = $^O eq 'MacOS'; # These OSes complain if you want to remove a file that you have no # write permission to: my $force_writeable = ($^O eq 'os2' || $^O eq 'dos' || $^O eq 'MSWin32' || $^O eq 'amigaos' || $^O eq 'MacOS' || $^O eq 'epoc'); sub rmtree { my($roots, $verbose, $safe) = @_; my(@files); my($count) = 0; $verbose ||= 0; $safe ||= 0; if ( defined($roots) && length($roots) ) { $roots = [$roots] unless ref $roots; } else { warn "No root path(s) specified"; return 0; } my($root); foreach $root (@{$roots}) { if ($Is_MacOS) { $root = ":$root" if $root !~ /:/; $root =~ s#([^:])\z#$1:#; } else { $root =~ s#/\z##; } (undef, undef, my $rp) = lstat $root or next; $rp &= 07777; # don't forget setuid, setgid, sticky bits if ( -d _ ) { # notabene: 0700 is for making readable in the first place, # it's also intended to change it to writable in case we have # to recurse in which case we are better than rm -rf for # subtrees with strange permissions chmod($rp | 0700, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) or warn "Can't make directory $root read+writeable: $!" unless $safe; if (opendir my $d, $root) { no strict 'refs'; if (!defined ${"\cTAINT"} or ${"\cTAINT"}) { # Blindly untaint dir names @files = map { /^(.*)$/s ; $1 } readdir $d; } else { @files = readdir $d; } closedir $d; } else { warn "Can't read $root: $!"; @files = (); } # Deleting large numbers of files from VMS Files-11 filesystems # is faster if done in reverse ASCIIbetical order @files = reverse @files if $Is_VMS; ($root = VMS::Filespec::unixify($root)) =~ s#\.dir\z## if $Is_VMS; if ($Is_MacOS) { @files = map("$root$_", @files); } else { @files = map("$root/$_", grep $_!~/^\.{1,2}\z/s,@files); } $count += rmtree(\@files,$verbose,$safe); if ($safe && ($Is_VMS ? !&VMS::Filespec::candelete($root) : !-w $root)) { print "skipped $root\n" if $verbose; next; } chmod $rp | 0700, $root or warn "Can't make directory $root writeable: $!" if $force_writeable; print "rmdir $root\n" if $verbose; if (rmdir $root) { ++$count; } else { warn "Can't remove directory $root: $!"; chmod($rp, ($Is_VMS ? VMS::Filespec::fileify($root) : $root)) or warn("and can't restore permissions to " . sprintf("0%o",$rp) . "\n"); } } else { if ($safe && ($Is_VMS ? !&VMS::Filespec::candelete($root) : !(-l $root || -w $root))) { print "skipped $root\n" if $verbose; next; } chmod $rp | 0600, $root or warn "Can't make file $root writeable: $!" if $force_writeable; print "unlink $root\n" if $verbose; # delete all versions under VMS for (;;) { unless (unlink $root) { warn "Can't unlink file $root: $!"; if ($force_writeable) { chmod $rp, $root or warn("and can't restore permissions to " . sprintf("0%o",$rp) . "\n"); } last; } ++$count; last unless $Is_VMS && lstat $root; } } } $count; } =item C<copy($file, $target_dir)> =item C<copy("-f", $file, $destfile)> Copy file C<$file> to directory C<$target_dir>, or to the C<$destfile> in the second case. No external programs are involved. Since we need C<sysopen()>, the Perl module C<Fcntl.pm> is required. The time stamps are preserved and symlinks are created on Unix systems. On Windows, C<(-l $file)> will never return 'C<true>' and so symlinks will be (uselessly) copied as regular files. C<copy> invokes C<mkdirhier> if target directories do not exist. Files have mode C<0777> if they are executable and C<0666> otherwise, with the set bits in I<umask> cleared in each case. C<$file> can begin with a file:/ prefix. If C<$file> is not readable, we return without copying anything. (This can happen when the database and files are not in perfect sync.) On the other file, if the destination is not writable, or the writing fails, that is a fatal error. =cut sub copy { my $infile = shift; my $filemode = 0; if ($infile eq "-f") { # second argument is a file $filemode = 1; $infile = shift; } my $destdir=shift; my $outfile; my @stat; my $mode; my $buffer; my $offset; my $filename; my $dirmode = 0755; my $blocksize = $TeXLive::TLConfig::BlockSize; $infile =~ s!^file://*!/!i; # remove file:/ url prefix $filename = basename "$infile"; if ($filemode) { # given a destination file $outfile = $destdir; $destdir = dirname($outfile); } else { $outfile = "$destdir/$filename"; } mkdirhier ($destdir) unless -d "$destdir"; if (-l "$infile") { symlink (readlink $infile, "$destdir/$filename"); } else { if (! open (IN, $infile)) { warn "open($infile) failed, not copying: $!"; return; } binmode IN; $mode = (-x "$infile") ? oct("0777") : oct("0666"); $mode &= ~umask; open (OUT, ">$outfile") || die "open(>$outfile) failed: $!"; binmode OUT; chmod $mode, "$outfile"; while ($read = sysread (IN, $buffer, $blocksize)) { die "read($infile) failed: $!\n" unless defined $read; $offset = 0; while ($read) { $written = syswrite (OUT, $buffer, $read, $offset); die "write($outfile) failed: $!" unless defined $written; $read -= $written; $offset += $written; } } close (OUT) || warn "close($outfile) failed: $!"; close IN || warn "close($infile) failed: $!";; @stat = lstat ("$infile"); utime ($stat[8], $stat[9], $outfile); } } =item C<touch(@files)> Update modification and access time of C<@files>. Non-existent files are created. =cut sub touch { my @files=@_; foreach my $file (@_) { if (-e $file) { utime time, time, $file; } else { if (open( TMP, ">$file")) { close(TMP); } else { warn "Can't create file $file: $!\n"; } } } } =item C<collapse_dirs(@files)> Return a (more or less) minimal list of directories and files, given an original list of files C<@files>. That is, if every file within a given directory is included in C<@files>, replace all of those files with the absolute directory name in the return list. Any files which have sibling files not included are retained and made absolute. We try to walk up the tree so that the highest-level directory containing only directories or files that are in C<@files> is returned. (This logic may not be perfect, though.) This is not just a string function; we check for other directory entries existing on disk within the directories of C<@files>. Therefore, if the entries are relative pathnames, the current directory must be set by the caller so that file tests work. As mentioned above, the returned list is absolute paths to directories and files. For example, suppose the input list is dir1/subdir1/file1 dir1/subdir2/file2 dir1/file3 If there are no other entries under C<dir1/>, the result will be C</absolute/path/to/dir1>. =cut sub collapse_dirs { my (@files) = @_; my @ret = (); my %by_dir; # construct hash of all directories mentioned, values are lists of the # files in that directory. for my $f (@files) { my $abs_f = Cwd::abs_path ($f); die ("oops, no abs_path($f) from " . `pwd`) unless $abs_f; (my $d = $abs_f) =~ s,/[^/]*$,,; my @a = exists $by_dir{$d} ? @{$by_dir{$d}} : (); push (@a, $abs_f); $by_dir{$d} = \@a; } # for each of our directories, see if we are given everything in # the directory. if so, return the directory; else return the # individual files. for my $d (sort keys %by_dir) { opendir (DIR, $d) || die "opendir($d) failed: $!"; my @dirents = readdir (DIR); closedir (DIR) || warn "closedir($d) failed: $!"; # initialize test hash with all the files we saw in this dir. # (These idioms are due to "Finding Elements in One Array and Not # Another" in the Perl Cookbook.) my %seen; my @rmfiles = @{$by_dir{$d}}; @seen{@rmfiles} = (); # see if everything is the same. my $ok_to_collapse = 1; for my $dirent (@dirents) { next if $dirent =~ /^\.(\.|svn)?$/; # ignore . .. .svn my $item = "$d/$dirent"; # prepend directory for comparison if (! exists $seen{$item}) { $ok_to_collapse = 0; last; # no need to keep looking after the first. } } push (@ret, $ok_to_collapse ? $d : @{$by_dir{$d}}); } if (@ret != @files) { @ret = &collapse_dirs (@ret); } return @ret; } =item C<removed_dirs(@files)> returns all the directories from which all content will be removed =cut # return all the directories from which all content will be removed # # idea: # - create a hashes by_dir listing all files that should be removed # by directory, i.e., key = dir, value is list of files # - for each of the dirs (keys of by_dir and ordered deepest first) # check that all actually contained files are removed # and all the contained dirs are in the removal list. If this is the # case put that directory into the removal list # - return this removal list # sub removed_dirs { my (@files) = @_; my %removed_dirs; my %by_dir; # construct hash of all directories mentioned, values are lists of the # files/dirs in that directory. for my $f (@files) { # what should we do with not existing entries???? next if (! -r "$f"); my $abs_f = Cwd::abs_path ($f); # the following is necessary because on win32, # abs_path("tl-portable") # returns # c:\tl test\... # and not forward slashes, while, if there is already a forward / # in the path, also the rest is done with forward slashes. $abs_f =~ s!\\!/!g if win32(); if (!$abs_f) { warn ("oops, no abs_path($f) from " . `pwd`); next; } (my $d = $abs_f) =~ s,/[^/]*$,,; my @a = exists $by_dir{$d} ? @{$by_dir{$d}} : (); push (@a, $abs_f); $by_dir{$d} = \@a; } # for each of our directories, see if we are removing everything in # the directory. if so, return the directory; else return the # individual files. for my $d (reverse sort keys %by_dir) { opendir (DIR, $d) || die "opendir($d) failed: $!"; my @dirents = readdir (DIR); closedir (DIR) || warn "closedir($d) failed: $!"; # initialize test hash with all the files we saw in this dir. # (These idioms are due to "Finding Elements in One Array and Not # Another" in the Perl Cookbook.) my %seen; my @rmfiles = @{$by_dir{$d}}; @seen{@rmfiles} = (); # see if everything is the same. my $cleandir = 1; for my $dirent (@dirents) { next if $dirent =~ /^\.(\.|svn)?$/; # ignore . .. .svn my $item = "$d/$dirent"; # prepend directory for comparison if ( ((-d $item) && (defined($removed_dirs{$item}))) || (exists $seen{$item}) ) { # do nothing } else { $cleandir = 0; last; } } if ($cleandir) { $removed_dirs{$d} = 1; } } return keys %removed_dirs; } =item C<time_estimate($totalsize, $donesize, $starttime)> Returns the current running time and the estimated total time based on the total size, the already done size, and the start time. =cut sub time_estimate { my ($totalsize, $donesize, $starttime) = @_; if ($donesize <= 0) { return ("??:??", "??:??"); } my $curtime = time(); my $passedtime = $curtime - $starttime; my $esttotalsecs = int ( ( $passedtime * $totalsize ) / $donesize ); # # we change the display to show that passed time instead of the # estimated remaining time. We keep the old code and naming and # only initialize the $remsecs to the $passedtime instead. # my $remsecs = $esttotalsecs - $passedtime; my $remsecs = $passedtime; my $min = int($remsecs/60); my $hour; if ($min >= 60) { $hour = int($min/60); $min %= 60; } my $sec = $remsecs % 60; $remtime = sprintf("%02d:%02d", $min, $sec); if ($hour) { $remtime = sprintf("%02d:$remtime", $hour); } my $tmin = int($esttotalsecs/60); my $thour; if ($tmin >= 60) { $thour = int($tmin/60); $tmin %= 60; } my $tsec = $esttotalsecs % 60; $tottime = sprintf("%02d:%02d", $tmin, $tsec); if ($thour) { $tottime = sprintf("%02d:$tottime", $thour); } return($remtime, $tottime); } =item C<install_packages($from_tlpdb, $media, $to_tlpdb, $what, $opt_src, $opt_doc)> Installs the list of packages found in C<@$what> (a ref to a list) into the TLPDB given by C<$to_tlpdb>. Information on files are taken from the TLPDB C<$from_tlpdb>. C<$opt_src> and C<$opt_doc> specify whether srcfiles and docfiles should be installed (currently implemented only for installation from uncompressed media). Returns 1 on success and 0 on error. =cut sub install_packages { my ($fromtlpdb,$media,$totlpdb,$what,$opt_src,$opt_doc) = @_; my $container_src_split = $fromtlpdb->config_src_container; my $container_doc_split = $fromtlpdb->config_doc_container; my $root = $fromtlpdb->root; my @packs = @$what; my $totalnr = $#packs + 1; my $td = length("$totalnr"); my $n = 0; my %tlpobjs; my $totalsize = 0; my $donesize = 0; my %tlpsizes; foreach my $p (@packs) { $tlpobjs{$p} = $fromtlpdb->get_package($p); if (!defined($tlpobjs{$p})) { die "STRANGE: $p not to be found in ", $fromtlpdb->root; } if ($media ne 'local_uncompressed') { # we use the container size as the measuring unit since probably # downloading will be the limiting factor $tlpsizes{$p} = $tlpobjs{$p}->containersize; $tlpsizes{$p} += $tlpobjs{$p}->srccontainersize if $opt_src; $tlpsizes{$p} += $tlpobjs{$p}->doccontainersize if $opt_doc; } else { # we have to add the respective sizes, that is checking for # installation of src and doc file $tlpsizes{$p} = $tlpobjs{$p}->runsize; $tlpsizes{$p} += $tlpobjs{$p}->srcsize if $opt_src; $tlpsizes{$p} += $tlpobjs{$p}->docsize if $opt_doc; my %foo = %{$tlpobjs{$p}->binsize}; for my $k (keys %foo) { $tlpsizes{$p} += $foo{$k}; } # all the packages sizes are in blocks, so transfer that to bytes $tlpsizes{$p} *= $TeXLive::TLConfig::BlockSize; } $totalsize += $tlpsizes{$p}; } my $starttime = time(); foreach my $package (@packs) { my $tlpobj = $tlpobjs{$package}; my $reloc = $tlpobj->relocated; $n++; my ($estrem, $esttot) = time_estimate($totalsize, $donesize, $starttime); my $infostr = sprintf("Installing [%0${td}d/$totalnr, " . "time/total: $estrem/$esttot]: $package [%dk]", $n, int($tlpsizes{$package}/1024) + 1); info("$infostr\n"); foreach my $h (@::install_packages_hook) { &$h($n,$totalnr); } my $real_opt_doc = $opt_doc; my $container; my @installfiles; push @installfiles, $tlpobj->runfiles; push @installfiles, $tlpobj->allbinfiles; push @installfiles, $tlpobj->srcfiles if ($opt_src); push @installfiles, $tlpobj->docfiles if ($real_opt_doc); if ($media eq 'local_uncompressed') { $container = [ $root, @installfiles ]; } elsif ($media eq 'local_compressed') { if (-r "$root/$Archive/$package.zip") { $container = "$root/$Archive/$package.zip"; } elsif (-r "$root/$Archive/$package.tar.xz") { $container = "$root/$Archive/$package.tar.xz"; } else { tlwarn("No package $package (.zip or .xz) in $root/$Archive\n"); next; } } elsif ($media eq 'NET') { $container = "$root/$Archive/$package.$DefaultContainerExtension"; } if (!install_package($container, $reloc, $tlpobj->containersize, $tlpobj->containermd5, \@installfiles, $totlpdb->root, $vars{'this_platform'})) { # we already warn in install_package that something bad happened, # so only return here return 0; } # if we are installing from compressed media we have to fetch the respective # source and doc packages $pkg.source and $pkg.doc and install them, too if (($media eq 'NET') || ($media eq 'local_compressed')) { # we install split containers under the following conditions: # - the container were split generated # - src/doc files should be installed # (- the package is not already a split one (like .i386-linux)) # the above test has been removed since that would mean that packages # with a dot like texlive.infra will never have the docfiles installed # that is already happening ...bummer. But since we already check # whether there are src/docfiles present at all that is fine # - there are actually src/doc files present if ($container_src_split && $opt_src && $tlpobj->srcfiles) { my $srccontainer = $container; $srccontainer =~ s/(\.tar\.xz|\.zip)$/.source$1/; if (!install_package($srccontainer, $reloc, $tlpobj->srccontainersize, $tlpobj->srccontainermd5, \@installfiles, $totlpdb->root, $vars{'this_platform'})) { return 0; } } if ($container_doc_split && $real_opt_doc && $tlpobj->docfiles) { my $doccontainer = $container; $doccontainer =~ s/(\.tar\.xz|\.zip)$/.doc$1/; if (!install_package($doccontainer, $reloc, $tlpobj->doccontainersize, $tlpobj->doccontainermd5, \@installfiles, $totlpdb->root, $vars{'this_platform'})) { return 0; } } } # we don't want to have wrong information in the tlpdb, so remove the # src/doc files if they are not installed ... if (!$opt_src) { $tlpobj->clear_srcfiles; } if (!$real_opt_doc) { $tlpobj->clear_docfiles; } # if a package is relocatable we have to cancel the reloc prefix # before we save it to the local tlpdb if ($tlpobj->relocated) { $tlpobj->replace_reloc_prefix; } $totlpdb->add_tlpobj($tlpobj); # we have to write out the tlpobj file since it is contained in the # archives (.tar.xz), but at uncompressed-media install time we # don't have them. my $tlpod = $totlpdb->root . "/tlpkg/tlpobj"; mkdirhier($tlpod); my $count = 0; my $tlpobj_file = ">$tlpod/" . $tlpobj->name . ".tlpobj"; until (open(TMP, $tlpobj_file)) { # The open might fail for no good reason on Windows. # Try again for a while, but not forever. if ($count++ == 100) { die "$0: open($tlpobj_file) failed: $!"; } select (undef, undef, undef, .1); # sleep briefly } $tlpobj->writeout(\*TMP); close(TMP); $donesize += $tlpsizes{$package}; } my $totaltime = time() - $starttime; my $totmin = int ($totaltime/60); my $totsec = $totaltime % 60; info(sprintf("Time used for installing the packages: %02d:%02d\n", $totmin, $totsec)); $totlpdb->save; return 1; } =item C<install_package($what, $reloc, $size, $md5, $filelistref, $target, $platform)> This function installs the files given in @$filelistref from C<$what> into C<$target>. C<$size> gives the size in bytes of the container, or -1 if we are installing from uncompressed media, i.e., from a list of files to be copied. If C<$what> is a reference to a list of files then these files are assumed to be readable and are copied to C<$target>, creating dirs on the way. In this case the list C<@$filelistref> is not taken into account. If C<$what> starts with C<http://> or C<ftp://> then C<$what> is downloaded from the net and piped through C<xzdec> and C<tar>. If $what ends with C<.tar.xz> (but does not start with C<http://> or C<ftp://>, but possibly with C<file:/>) it is assumed to be a readable file on the system and is likewise piped through C<xzdec> and C<tar>. In both of these cases currently the list C<$@filelistref> currently is not taken into account (should be fixed!). if C<$reloc> is true the container (NET or local_compressed mode) is packaged in a way that the initial texmf-dist is missing. Returns 1 on success and 0 on error. =cut sub install_package { my ($what, $reloc, $whatsize, $whatmd5, $filelistref, $target, $platform) = @_; my @filelist = @$filelistref; my $tempdir = "$target/temp"; # we assume that $::progs has been set up! my $wget = $::progs{'wget'}; my $xzdec = quotify_path_with_spaces($::progs{'xzdec'}); if (!defined($wget) || !defined($xzdec)) { tlwarn("install_package: wget/xzdec programs not set up properly.\n"); return 0; } if (ref $what) { # we are getting a ref to a list of files, so install from uncompressed media my ($root, @files) = @$what; foreach my $file (@files) { # @what is taken, not @filelist! # is this still needed? my $dn=dirname($file); mkdirhier("$target/$dn"); copy "$root/$file", "$target/$dn"; } } elsif ($what =~ m,\.tar.xz$,) { # this is the case when we install from compressed media # # in all other cases we create temp files .tar.xz (or use the present # one), xzdec them, and then call tar # if we are unpacking a relocated container we adjust the target if ($reloc) { $target .= "/$TeXLive::TLConfig::RelocTree" if $reloc; mkdir($target) if (! -d $target); } my $fn = basename($what); my $pkg = $fn; $pkg =~ s/\.tar\.xz$//; mkdirhier("$tempdir"); my $xzfile = "$tempdir/$fn"; my $tarfile = "$tempdir/$fn"; $tarfile =~ s/\.xz$//; my $xzfile_quote = $xzfile; my $tarfile_quote = $tarfile; if (win32()) { $xzfile =~ s!/!\\!g; $tarfile =~ s!/!\\!g; $target =~ s!/!\\!g; } $xzfile_quote = "\"$xzfile\""; $tarfile_quote = "\"$tarfile\""; my $gotfiledone = 0; if (-r $xzfile) { # check that the downloaded file is not partial if ($whatsize >= 0) { # we have the size given, so check that first my $size = (stat $xzfile)[7]; if ($size == $whatsize) { # we want to check also the md5sum if we have it present if ($whatmd5) { if (tlmd5($xzfile) eq $whatmd5) { $gotfiledone = 1; } else { tlwarn("Downloaded $what, size equal, but md5sum differs;\n", "downloading again.\n"); } } else { # size ok, no md5sum tlwarn("Downloaded $what, size equal, but no md5sum available;\n", "continuing, with fingers crossed."); $gotfiledone = 1; } } else { tlwarn("Partial download of $what found, removing it.\n"); unlink($tarfile, $xzfile); } } else { # ok no size information, hopefully we have md5 sums if ($whatmd5) { if (tlmd5($xzfile) eq $whatmd5) { $gotfiledone = 1; } else { tlwarn("Downloaded file, but md5sum differs, removing it.\n"); } } else { tlwarn("Container found, but cannot verify size of md5sum;\n", "continuing, with fingers crossed.\n"); $gotfiledone = 1; } } debug("Reusing already downloaded container $xzfile\n") if ($gotfiledone); } if (!$gotfiledone) { if ($what =~ m,http://|ftp://,) { # we are installing from the NET # download the file and put it into temp if (!download_file($what, $xzfile) || (! -r $xzfile)) { tlwarn("Downloading $what did not succeed.\n"); return 0; } } else { # we are installing from local compressed media # copy it to temp copy($what, $tempdir); } } debug("un-xzing $xzfile to $tarfile\n"); system("$xzdec < $xzfile_quote > $tarfile_quote"); if (! -f $tarfile) { tlwarn("Unpacking $xzfile did not succeed.\n"); return 0; } if (!TeXLive::TLUtils::untar($tarfile, $target, 1)) { tlwarn("untarring $tarfile failed, stopping install.\n"); return 0; } # we remove the created .tlpobj it is recreated anyway in # install_packages above in the right place. This way we also # get rid of the $pkg.source.tlpobj which are useless unlink ("$target/tlpkg/tlpobj/$pkg.tlpobj") if (-r "$target/tlpkg/tlpobj/$pkg.tlpobj"); if ($what =~ m,http://|ftp://,) { # we downloaded the original .tar.lzma from the net, so we keep it } else { # we are downloading it from local compressed media, so we can unlink it to save # disk space unlink($xzfile); } } else { tlwarn("Sorry, no idea how to install $what\n"); return 0; } return 1; } =item C<do_postaction($how, $tlpobj, $do_fileassocs, $do_menu, $do_desktop, $do_script)> Evaluates the C<postaction> fields in the C<$tlpobj>. The first parameter can be either C<install> or C<remove>. The second gives the TLPOBJ whos postactions should be evaluated, and the last four arguments specify what type of postactions should (or shouldn't) be evaluated. Returns 1 on success, and 0 on failure. =cut sub do_postaction { my ($how, $tlpobj, $do_fileassocs, $do_menu, $do_desktop, $do_script) = @_; my $ret = 1; if (!defined($tlpobj)) { tlwarn("do_postaction: didn't get a tlpobj\n"); return 0; } debug("running postaction=$how for " . $tlpobj->name . "\n") if $tlpobj->postactions; for my $pa ($tlpobj->postactions) { if ($pa =~ m/^\s*shortcut\s+(.*)\s*$/) { $ret &&= _do_postaction_shortcut($how, $tlpobj, $do_menu, $do_desktop, $1); } elsif ($pa =~ m/\s*filetype\s+(.*)\s*$/) { next unless $do_fileassocs; $ret &&= _do_postaction_filetype($how, $tlpobj, $1); } elsif ($pa =~ m/\s*fileassoc\s+(.*)\s*$/) { $ret &&= _do_postaction_fileassoc($how, $do_fileassocs, $tlpobj, $1); next; } elsif ($pa =~ m/\s*progid\s+(.*)\s*$/) { next unless $do_fileassocs; $ret &&= _do_postaction_progid($how, $tlpobj, $1); } elsif ($pa =~ m/\s*script\s+(.*)\s*$/) { next unless $do_script; $ret &&= _do_postaction_script($how, $tlpobj, $1); } else { tlwarn("do_postaction: don't know how to do $pa\n"); $ret = 0; } } # nothing to do return $ret; } sub _do_postaction_fileassoc { my ($how, $mode, $tlpobj, $pa) = @_; return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/extension filetype/); if ($errors) { tlwarn("parsing the postaction line >>$pa<< did not succeed!\n"); return 0; } # name can be an arbitrary string if (!defined($keyval{'extension'})) { tlwarn("extension of fileassoc postaction not given\n"); return 0; } my $extension = $keyval{'extension'}; # cmd can be an arbitrary string if (!defined($keyval{'filetype'})) { tlwarn("filetype of fileassoc postaction not given\n"); return 0; } my $filetype = $keyval{'filetype'}.'.'.$ReleaseYear; &log("postaction $how fileassoc for " . $tlpobj->name . ": $extension, $filetype\n"); if ($how eq "install") { TeXLive::TLWinGoo::register_extension($mode, $extension, $filetype); } elsif ($how eq "remove") { TeXLive::TLWinGoo::unregister_extension($mode, $extension, $filetype); } else { tlwarn("Unknown mode $how\n"); return 0; } return 1; } sub _do_postaction_filetype { my ($how, $tlpobj, $pa) = @_; return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/name cmd/); if ($errors) { tlwarn("parsing the postaction line >>$pa<< did not succeed!\n"); return 0; } # name can be an arbitrary string if (!defined($keyval{'name'})) { tlwarn("name of filetype postaction not given\n"); return 0; } my $name = $keyval{'name'}.'.'.$ReleaseYear; # cmd can be an arbitrary string if (!defined($keyval{'cmd'})) { tlwarn("cmd of filetype postaction not given\n"); return 0; } my $cmd = $keyval{'cmd'}; my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`; chomp($texdir); my $texdir_bsl = conv_to_w32_path($texdir); $cmd =~ s!^("?)TEXDIR/!$1$texdir/!g; &log("postaction $how filetype for " . $tlpobj->name . ": $name, $cmd\n"); if ($how eq "install") { TeXLive::TLWinGoo::register_file_type($name, $cmd); } elsif ($how eq "remove") { TeXLive::TLWinGoo::unregister_file_type($name); } else { tlwarn("Unknown mode $how\n"); return 0; } return 1; } # alternate filetype (= progid) for an extension; # associated program shows up in `open with' menu sub _do_postaction_progid { my ($how, $tlpobj, $pa) = @_; return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/extension filetype/); if ($errors) { tlwarn("parsing the postaction line >>$pa<< did not succeed!\n"); return 0; } if (!defined($keyval{'extension'})) { tlwarn("extension of progid postaction not given\n"); return 0; } my $extension = $keyval{'extension'}; if (!defined($keyval{'filetype'})) { tlwarn("filetype of progid postaction not given\n"); return 0; } my $filetype = $keyval{'filetype'}.'.'.$ReleaseYear; &log("postaction $how progid for " . $tlpobj->name . ": $extension, $filetype\n"); if ($how eq "install") { TeXLive::TLWinGoo::add_to_progids($extension, $filetype); } elsif ($how eq "remove") { TeXLive::TLWinGoo::remove_from_progids($extension, $filetype); } else { tlwarn("Unknown mode $how\n"); return 0; } return 1; } sub _do_postaction_script { my ($how, $tlpobj, $pa) = @_; my ($errors, %keyval) = parse_into_keywords($pa, qw/file filew32/); if ($errors) { tlwarn("parsing the postaction line >>$pa<< did not succeed!\n"); return 0; } # file can be an arbitrary string if (!defined($keyval{'file'})) { tlwarn("filename of script not given\n"); return 0; } my $file = $keyval{'file'}; if (win32() && defined($keyval{'filew32'})) { $file = $keyval{'filew32'}; } my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`; chomp($texdir); my @syscmd; if ($file =~ m/\.pl$/i) { # we got a perl script, call it via perl push @syscmd, "perl", "$texdir/$file"; } elsif ($file =~ m/\.texlua$/i) { # we got a texlua script, call it via texlua push @syscmd, "texlua", "$texdir/$file"; } else { # we got anything else, call it directly and hope it is excutable push @syscmd, "$texdir/$file"; } &log("postaction $how script for " . $tlpobj->name . ": @syscmd\n"); push @syscmd, $how, $texdir; my $ret = system (@syscmd); if ($ret != 0) { $ret /= 256 if $ret > 0; my $pwd = cwd (); warn "$0: calling post action script $file did not succeed in $pwd, status $ret"; return 0; } return 1; } sub _do_postaction_shortcut { my ($how, $tlpobj, $do_menu, $do_desktop, $pa) = @_; return 1 unless win32(); my ($errors, %keyval) = parse_into_keywords($pa, qw/type name icon cmd args hide/); if ($errors) { tlwarn("parsing the postaction line >>$pa<< did not succeed!\n"); return 0; } # type can be either menu or desktop if (!defined($keyval{'type'})) { tlwarn("type of shortcut postaction not given\n"); return 0; } my $type = $keyval{'type'}; if (($type ne "menu") && ($type ne "desktop")) { tlwarn("type of shortcut postaction $type is unknown (menu, desktop)\n"); return 0; } if (($type eq "menu") && !$do_menu) { return 1; } if (($type eq "desktop") && !$do_desktop) { return 1; } # name can be an arbitrary string if (!defined($keyval{'name'})) { tlwarn("name of shortcut postaction not given\n"); return 0; } my $name = $keyval{'name'}; # icon, cmd, args is optional my $icon = (defined($keyval{'icon'}) ? $keyval{'icon'} : ''); my $cmd = (defined($keyval{'cmd'}) ? $keyval{'cmd'} : ''); my $args = (defined($keyval{'args'}) ? $keyval{'args'} : ''); # hide can be only 0 or 1, and defaults to 1 my $hide = (defined($keyval{'hide'}) ? $keyval{'hide'} : 1); if (($hide ne "0") && ($hide ne "1")) { tlwarn("hide of shortcut postaction $hide is unknown (0, 1)\n"); return 0; } &log("postaction $how shortcut for " . $tlpobj->name . "\n"); if ($how eq "install") { my $texdir = `kpsewhich -var-value=SELFAUTOPARENT`; chomp($texdir); my $texdir_bsl = conv_to_w32_path($texdir); $icon =~ s!^TEXDIR/!$texdir/!; $cmd =~ s!^TEXDIR/!$texdir/!; # $cmd can be an URL, in which case we do NOT want to convert it to # w32 paths! if ($cmd !~ m!^\s*(http://|ftp://)!) { if (!(-e $cmd) or !(-r $cmd)) { tlwarn("Target of shortcut action does not exist: $cmd\n") if $cmd =~ /\.(exe|bat|cmd)$/i; # if not an executable, just omit shortcut silently return 0; } $cmd = conv_to_w32_path($cmd); } if ($type eq "menu" ) { TeXLive::TLWinGoo::add_menu_shortcut( $TeXLive::TLConfig::WindowsMainMenuName, $name, $icon, $cmd, $args, $hide); } elsif ($type eq "desktop") { TeXLive::TLWinGoo::add_desktop_shortcut( $name, $icon, $cmd, $args, $hide); } else { tlwarn("Unknown type of shortcut: $type\n"); return 0; } } elsif ($how eq "remove") { if ($type eq "menu") { TeXLive::TLWinGoo::remove_menu_shortcut( $TeXLive::TLConfig::WindowsMainMenuName, $name); } elsif ($type eq "desktop") { TeXLive::TLWinGoo::remove_desktop_shortcut($name); } else { tlwarn("Unknown type of shortcut: $type\n"); return 0; } } else { tlwarn("Unknown mode $how\n"); return 0; } return 1; } sub parse_into_keywords { my ($str, @keys) = @_; my @words = quotewords('\s+', 0, $str); my %ret; my $error = 0; while (@words) { $_ = shift @words; if (/^([^=]+)=(.*)$/) { $ret{$1} = $2; } else { tlwarn("parser found a invalid word in parsing keys: $_\n"); $error++; $ret{$_} = ""; } } for my $k (keys %ret) { if (!member($k, @keys)) { $error++; tlwarn("parser found invalid keyword: $k\n"); } } return($error, %ret); } =item C<announce_execute_actions($how, $tlpobj)> Announces that the actions given in C<$tlpobj> should be executed after all packages have been unpacked. =cut sub announce_execute_actions { my ($type, $tlp, $what) = @_; # do simply return immediately if execute actions are suppressed return if $::no_execute_actions; if (defined($type) && ($type eq "regenerate-formats")) { $::regenerate_all_formats = 1; return; } if (defined($type) && ($type eq "files-changed")) { $::files_changed = 1; return; } if (defined($type) && ($type eq "latex-updated")) { $::latex_updated = 1; return; } if (defined($type) && ($type eq "tex-updated")) { $::tex_updated = 1; return; } if (!defined($type) || (($type ne "enable") && ($type ne "disable"))) { die "announce_execute_actions: enable or disable, not type $type"; } my (@maps, @formats, @dats); if ($tlp->runfiles || $tlp->srcfiles || $tlp->docfiles) { $::files_changed = 1; } $what = "map format hyphen" if (!defined($what)); foreach my $e ($tlp->executes) { if ($e =~ m/^add((Mixed|Kanji)?Map)\s+([^\s]+)\s*$/) { # save the refs as we have another =~ grep in the following lines my $a = $1; my $b = $3; $::execute_actions{$type}{'maps'}{$b} = $a if ($what =~ m/map/); } elsif ($e =~ m/^AddFormat\s+(.*)\s*$/) { my %r = TeXLive::TLUtils::parse_AddFormat_line("$1"); if (defined($r{"error"})) { tlwarn ("$r{'error'} in parsing $e for return hash\n"); } else { $::execute_actions{$type}{'formats'}{$r{'name'}} = \%r if ($what =~ m/format/); } } elsif ($e =~ m/^AddHyphen\s+(.*)\s*$/) { my %r = TeXLive::TLUtils::parse_AddHyphen_line("$1"); if (defined($r{"error"})) { tlwarn ("$r{'error'} in parsing $e for return hash\n"); } else { $::execute_actions{$type}{'hyphens'}{$r{'name'}} = \%r if ($what =~ m/hyphen/); } } else { tlwarn("Unknown execute $e in ", $tlp->name, "\n"); } } } =pod =item C<add_symlinks($root, $arch, $sys_bin, $sys_man, $sys_info)> =item C<remove_symlinks($root, $arch, $sys_bin, $sys_man, $sys_info)> These two functions try to create/remove symlinks for binaries, man pages, and info files as specified by the options $sys_bin, $sys_man, $sys_info. The functions return 1 on success and 0 on error. On Windows it returns undefined. =cut sub add_link_dir_dir { my ($from,$to) = @_; mkdirhier ($to); if (-w $to) { debug ("linking files from $from to $to\n"); chomp (@files = `ls "$from"`); my $ret = 1; for my $f (@files) { # don't make a system-dir link to our special "man" link. if ($f eq "man") { debug ("not linking `man' into $to.\n"); next; } # # attempt to remove an existing symlink, but nothing else. unlink ("$to/$f") if -l "$to/$f"; # # if the destination still exists, skip it. if (-e "$to/$f") { tlwarn ("add_link_dir_dir: $to/$f exists; not making symlink.\n"); next; } # # try to make the link. if (symlink ("$from/$f", "$to/$f") == 0) { tlwarn ("add_link_dir_dir: symlink of $f from $from to $to failed: $!\n"); $ret = 0; } } return $ret; } else { tlwarn ("add_link_dir_dir: destination $to not writable, " . "no links from $from.\n"); return 0; } } sub remove_link_dir_dir { my ($from, $to) = @_; if ((-d "$to") && (-w "$to")) { debug("removing links from $from to $to\n"); chomp (@files = `ls "$from"`); my $ret = 1; foreach my $f (@files) { next if (! -r "$to/$f"); if ($f eq "man") { debug("not considering man in $to, it should not be from us!\n"); next; } if ((-l "$to/$f") && (readlink("$to/$f") =~ m;^$from/;)) { $ret = 0 unless unlink("$to/$f"); } else { $ret = 0; tlwarn ("not removing $to/$f, not a link or wrong destination!\n"); } } # trry to remove the destination directory, it might be empty and # we might have write permissions, ignore errors # `rmdir "$to" 2>/dev/null`; return $ret; } else { tlwarn ("destination $to not writable, no removal of links done!\n"); return 0; } } sub add_remove_symlinks { my ($mode, $Master, $arch, $sys_bin, $sys_man, $sys_info) = @_; my $errors = 0; my $plat_bindir = "$Master/bin/$arch"; # nothing to do with symlinks on Windows, of course. return if win32(); my $info_dir = "$Master/texmf-dist/doc/info"; if ($mode eq "add") { $errors++ unless add_link_dir_dir($plat_bindir, $sys_bin); # bin if (-d $info_dir) { $errors++ unless add_link_dir_dir($info_dir, $sys_info); } } elsif ($mode eq "remove") { $errors++ unless remove_link_dir_dir($plat_bindir, $sys_bin); # bin if (-d $info_dir) { $errors++ unless remove_link_dir_dir($info_dir, $sys_info); } } else { die ("should not happen, unknown mode $mode in add_remove_symlinks!"); } # man my $top_man_dir = "$Master/texmf-dist/doc/man"; debug("$mode symlinks for man pages to $sys_man from $top_man_dir\n"); if (! -d $top_man_dir && $mode eq "add") { ; # better to be silent? #info("skipping add of man symlinks, no source directory $top_man_dir\n"); } else { mkdirhier $sys_man if ($mode eq "add"); if (-w $sys_man) { my $foo = `(cd "$top_man_dir" && echo *)`; my @mans = split (' ', $foo); chomp (@mans); foreach my $m (@mans) { my $mandir = "$top_man_dir/$m"; next unless -d $mandir; if ($mode eq "add") { $errors++ unless add_link_dir_dir($mandir, "$sys_man/$m"); } else { $errors++ unless remove_link_dir_dir($mandir, "$sys_man/$m"); } } #`rmdir "$sys_man" 2>/dev/null` if ($mode eq "remove"); } else { tlwarn("man symlink destination ($sys_man) not writable," . "cannot $mode symlinks.\n"); $errors++; } } # we collected errors in $errors, so return the negation of it if ($errors) { info("$mode of symlinks had $errors error(s), see messages above.\n"); return 0; } else { return 1; } } sub add_symlinks { return (add_remove_symlinks("add", @_)); } sub remove_symlinks { return (add_remove_symlinks("remove", @_)); } =pod =item C<w32_add_to_path($bindir, $multiuser)> =item C<w32_remove_from_path($bindir, $multiuser)> These two functions try to add/remove the binary directory $bindir on Windows to the registry PATH variable. If running as admin user and $multiuser is set, the system path will be adjusted, otherwise the user path. After calling these functions TeXLive::TLWinGoo::broadcast_env() should be called to make the changes immediately visible. =cut sub w32_add_to_path { my ($bindir, $multiuser) = @_; return if (!win32()); my $path = TeXLive::TLWinGoo::get_system_env() -> {'/Path'}; $path =~ s/[\s\x00]+$//; &log("Old system path: $path\n"); $path = TeXLive::TLWinGoo::get_user_env() -> {'/Path'}; if ($path) { $path =~ s/[\s\x00]+$//; &log("Old user path: $path\n"); } else { &log("Old user path: none\n"); } my $mode = 'user'; if (TeXLive::TLWinGoo::admin() && $multiuser) { $mode = 'system'; } debug("TLUtils:w32_add_to_path: calling adjust_reg_path_for_texlive add $bindir $mode\n"); TeXLive::TLWinGoo::adjust_reg_path_for_texlive('add', $bindir, $mode); $path = TeXLive::TLWinGoo::get_system_env() -> {'/Path'}; $path =~ s/[\s\x00]+$//; &log("New system path: $path\n"); $path = TeXLive::TLWinGoo::get_user_env() -> {'/Path'}; if ($path) { $path =~ s/[\s\x00]+$//; &log("New user path: $path\n"); } else { &log("New user path: none\n"); } } sub w32_remove_from_path { my ($bindir, $multiuser) = @_; my $mode = 'user'; if (TeXLive::TLWinGoo::admin() && $multiuser) { $mode = 'system'; } debug("w32_remove_from_path: trying to remove $bindir in $mode\n"); TeXLive::TLWinGoo::adjust_reg_path_for_texlive('remove', $bindir, $mode); } =pod =item C<unpack($what, $targetdir> If necessary, downloads C$what>, and then unpacks it into C<$targetdir>. Returns the name of the unpacked package (determined from the name of C<$what>) in case of success, otherwise undefined. =cut sub unpack { my ($what, $target) = @_; if (!defined($what)) { tlwarn("TLUtils::unpack: nothing to unpack!\n"); return; } # we assume that $::progs has been set up! my $wget = $::progs{'wget'}; my $xzdec = TeXLive::TLUtils::quotify_path_with_spaces($::progs{'xzdec'}); if (!defined($wget) || !defined($xzdec)) { tlwarn("_install_package: programs not set up properly, strange.\n"); return; } my $type; if ($what =~ m,\.tar(\.xz)?$,) { $type = defined($what) ? "xz" : "tar"; } else { tlwarn("TLUtils::unpack: don't know how to unpack this: $what\n"); return; } my $tempdir = tl_tmpdir(); # we are still here, so something was handed in and we have either .tar or .tar.xz my $fn = basename($what); my $pkg = $fn; $pkg =~ s/\.tar(\.xz)?$//; my $tarfile; my $remove_tarfile = 1; if ($type eq "xz") { my $xzfile = "$tempdir/$fn"; $tarfile = "$tempdir/$fn"; $tarfile =~ s/\.xz$//; my $xzfile_quote = $xzfile; my $tarfile_quote = $tarfile; my $target_quote = $target; if (win32()) { $xzfile =~ s!/!\\!g; $tarfile =~ s!/!\\!g; $target =~ s!/!\\!g; } $xzfile_quote = "\"$xzfile\""; $tarfile_quote = "\"$tarfile\""; $target_quote = "\"$target\""; if ($what =~ m,http://|ftp://,) { # we are installing from the NET # download the file and put it into temp if (!download_file($what, $xzfile) || (! -r $xzfile)) { tlwarn("Downloading \n"); tlwarn(" $what\n"); tlwarn("did not succeed, please retry.\n"); unlink($tarfile, $xzfile); return; } } else { # we are installing from local compressed files # copy it to temp TeXLive::TLUtils::copy($what, $tempdir); } debug("un-xzing $xzfile to $tarfile\n"); system("$xzdec < $xzfile_quote > $tarfile_quote"); if (! -f $tarfile) { tlwarn("TLUtils::unpack: Unpacking $xzfile failed, please retry.\n"); unlink($tarfile, $xzfile); return; } unlink($xzfile); } else { $tarfile = "$tempdir/$fn"; if ($what =~ m,http://|ftp://,) { if (!download_file($what, $tarfile) || (! -r $tarfile)) { tlwarn("Downloading \n"); tlwarn(" $what\n"); tlwarn("failed, please retry.\n"); unlink($tarfile); return; } } else { $tarfile = $what; $remove_tarfile = 0; } } if (untar($tarfile, $target, $remove_tarfile)) { return "$pkg"; } else { return; } } =pod =item C<untar($tarfile, $targetdir, $remove_tarfile)> Unpacks C<$tarfile> in C<$targetdir> (changing directories to C<$targetdir> and then back to the original directory). If C<$remove_tarfile> is true, unlink C<$tarfile> after unpacking. Assumes the global C<$::progs{"tar"}> has been set up. =cut # return 1 if success, 0 if failure. sub untar { my ($tarfile, $targetdir, $remove_tarfile) = @_; my $ret; my $tar = $::progs{'tar'}; # assume it's been set up # don't use the -C option to tar since Solaris tar et al. don't support it. # don't use system("cd ... && $tar ...") since that opens us up to # quoting issues. # so fall back on chdir in Perl. # debug("unpacking $tarfile in $targetdir\n"); my $cwd = cwd(); chdir($targetdir) || die "chdir($targetdir) failed: $!"; # on w32 don't extract file modified time, because AV soft can open # files in the mean time causing time stamp modification to fail if (system($tar, win32() ? "xmf" : "xf", $tarfile) != 0) { tlwarn("untar: untarring $tarfile failed (in $targetdir)\n"); $ret = 0; } else { $ret = 1; } unlink($tarfile) if $remove_tarfile; chdir($cwd) || die "chdir($cwd) failed: $!"; return $ret; } =item C<tlcmp($file, $file)> Compare two files considering CR, LF, and CRLF as equivalent. Returns 1 if different, 0 if the same. =cut sub tlcmp { my ($filea, $fileb) = @_; if (!defined($fileb)) { die <<END_USAGE; tlcmp needs two arguments FILE1 FILE2. Compare as text files, ignoring line endings. Exit status is zero if the same, 1 if different, something else if trouble. END_USAGE } my $file1 = &read_file_ignore_cr ($filea); my $file2 = &read_file_ignore_cr ($fileb); return $file1 eq $file2 ? 0 : 1; } =item C<read_file_ignore_cr($file)> Return contents of FILE as a string, converting all of CR, LF, and CRLF to just LF. =cut sub read_file_ignore_cr { my ($fname) = @_; my $ret = ""; local *FILE; open (FILE, $fname) || die "open($fname) failed: $!"; while (<FILE>) { s/\r\n?/\n/g; #warn "line is |$_|"; $ret .= $_; } close (FILE) || warn "close($fname) failed: $!"; return $ret; } =item C<setup_programs($bindir, $platform)> Populate the global C<$::progs> hash containing the paths to the programs C<wget>, C<tar>, C<xzdec>. The C<$bindir> argument specifies the path to the location of the C<xzdec> binaries, the C<$platform> gives the TeX Live platform name, used as the extension on our executables. If a program is not present in the TeX Live tree, we also check along PATH (without the platform extension.) Return 0 if failure, nonzero if success. =cut sub setup_programs { my ($bindir, $platform) = @_; my $ok = 1; $::progs{'wget'} = "wget"; $::progs{'xzdec'} = "xzdec"; $::progs{'xz'} = "xz"; $::progs{'tar'} = "tar"; if ($^O =~ /^MSWin(32|64)$/i) { $::progs{'wget'} = conv_to_w32_path("$bindir/wget/wget.exe"); $::progs{'tar'} = conv_to_w32_path("$bindir/tar.exe"); $::progs{'xzdec'} = conv_to_w32_path("$bindir/xz/xzdec.exe"); $::progs{'xz'} = conv_to_w32_path("$bindir/xz/xz.exe"); for my $prog ("xzdec", "wget") { my $opt = $prog eq "xzdec" ? "--help" : "--version"; my $ret = system("$::progs{$prog} $opt >nul 2>&1"); # on windows if ($ret != 0) { warn "TeXLive::TLUtils::setup_programs (w32) failed"; # no nl for perl warn "$::progs{$prog} $opt failed (status $ret): $!\n"; warn "Output is:\n"; system ("$::progs{$prog} $opt"); warn "\n"; $ok = 0; } } } else { if (!defined($platform) || ($platform eq "")) { # we assume that we run from uncompressed media, so we can call platform() and # thus also the config.guess script # but we have to setup $::installerdir because the platform script # relies on it $::installerdir = "$bindir/../.."; $platform = platform(); } my $s = 0; $s += setup_unix_one('wget', "$bindir/wget/wget.$platform", "--version"); $s += setup_unix_one('xzdec',"$bindir/xz/xzdec.$platform","--help"); $s += setup_unix_one('xz', "$bindir/xz/xz.$platform", "notest"); $ok = ($s == 3); # failure return unless all are present. } return $ok; } # setup one prog on unix using the following logic: # - if the shipped one is -x and can be executed, use it # - if the shipped one is -x but cannot be executed, copy it. set -x # . if the copy is -x and executable, use it # . if the copy is not executable, GOTO fallback # - if the shipped one is not -x, copy it, set -x # . if the copy is -x and executable, use it # . if the copy is not executable, GOTO fallback # - if nothing shipped, GOTO fallback # # fallback: # if prog is found in PATH and can be executed, use it. # # Return 0 if failure, 1 if success. # sub setup_unix_one { my ($p, $def, $arg) = @_; our $tmp; my $test_fallback = 0; if (-r $def) { my $ready = 0; if (-x $def) { # checking only for the executable bit is not enough, we have # to check for actualy "executability" since a "noexec" mount # option may interfere, which is not taken into account by # perl's -x test. $::progs{$p} = $def; if ($arg ne "notest") { my $ret = system("$def $arg > /dev/null 2>&1" ); # we are on Unix if ($ret == 0) { $ready = 1; debug("Using shipped $def for $p (tested).\n"); } else { ddebug("Shipped $def has -x but cannot be executed.\n"); } } else { # do not test, just return $ready = 1; debug("Using shipped $def for $p (not tested).\n"); } } if (!$ready) { # out of some reasons we couldn't execute the shipped program # try to copy it to a temp directory and make it executable # # create tmp dir only when necessary $tmp = TeXLive::TLUtils::tl_tmpdir() unless defined($tmp); # probably we are running from uncompressed media and want to copy it to # some temporary location copy($def, $tmp); my $bn = basename($def); $::progs{$p} = "$tmp/$bn"; chmod(0755,$::progs{$p}); # we do not check the return value of chmod, but check whether # the -x bit is now set, the only thing that counts if (! -x $::progs{$p}) { # hmm, something is going really bad, not even the copy is # executable. Fall back to normal path element $test_fallback = 1; ddebug("Copied $p $::progs{$p} does not have -x bit, strange!\n"); } else { # check again for executability if ($arg ne "notest") { my $ret = system("$::progs{$p} $arg > /dev/null 2>&1"); if ($ret == 0) { # ok, the copy works debug("Using copied $::progs{$p} for $p (tested).\n"); } else { # even the copied prog is not executable, strange $test_fallback = 1; ddebug("Copied $p $::progs{$p} has x bit but not executable, strange!\n"); } } else { debug("Using copied $::progs{$p} for $p (not tested).\n"); } } } } else { # hope that we can find in in the global PATH $test_fallback = 1; } if ($test_fallback) { # all our playing around and copying did not succeed, try the # fallback $::progs{$p} = $p; if ($arg ne "notest") { my $ret = system("$p $arg > /dev/null 2>&1"); if ($ret == 0) { debug("Using system $p (tested).\n"); } else { tlwarn("$0: Initialization failed (in setup_unix_one):\n"); tlwarn("$0: could not find a usable $p.\n"); tlwarn("$0: Please install $p and try again.\n"); return 0; } } else { debug ("Using system $p (not tested).\n"); } } return 1; } =item C<download_file( $relpath, $destination [, $progs ] )> Try to download the file given in C<$relpath> from C<$TeXLiveURL> into C<$destination>, which can be either a filename of simply C<|>. In the latter case a file handle is returned. The optional argument C<$progs> is a reference to a hash giving full paths to the respective programs, at least C<wget>. If C<$progs> is not given the C<%::progs> hash is consulted, and if this also does not exist we try a literal C<wget>. Downloading honors two environment variables: C<TL_DOWNLOAD_PROGRAM> and C<TL_DOWNLOAD_ARGS>. The former overrides the above specification devolving to C<wget>, and the latter overrides the default wget arguments. C<TL_DOWNLOAD_ARGS> must be defined so that the file the output goes to is the first argument after the C<TL_DOWNLOAD_ARGS>. Thus, typically it would end in C<-O>. Use with care. =cut sub download_file { my ($relpath, $dest, $progs) = @_; my $wget; if (defined($progs) && defined($progs->{'wget'})) { $wget = $progs->{'wget'}; } elsif (defined($::progs{'wget'})) { $wget = $::progs{'wget'}; } else { tlwarn ("download_file: Programs not set up, trying literal wget\n"); $wget = "wget"; } my $url; if ($relpath =~ m;^file://*(.*)$;) { my $filetoopen = "/$1"; # $dest is a file name, we have to get the respective dirname if ($dest eq "|") { open(RETFH, "<$filetoopen") or die("Cannot open $filetoopen for reading"); # opening to a pipe always succeeds, so we return immediately return \*RETFH; } else { my $par = dirname ($dest); if (-r $filetoopen) { copy ($filetoopen, $par); return 1; } return 0; } } if ($relpath =~ /^(http|ftp):\/\//) { $url = $relpath; } else { $url = "$TeXLiveURL/$relpath"; } my $wget_retry = 0; if (defined($::tldownload_server) && $::tldownload_server->enabled) { debug("persistent connection set up, trying to get $url (for $dest)\n"); $ret = $::tldownload_server->get_file($url, $dest); if ($ret) { debug("downloading file via persistent connection succeeded\n"); return $ret; } else { tlwarn("TLUtils::download_file: persistent connection ok," . " but download failed: $url\n"); tlwarn("TLUtils::download_file: retrying with wget.\n"); $wget_retry = 1; # just so we can give another msg. } } else { if (!defined($::tldownload_server)) { debug("::tldownload_server not defined\n"); } else { debug("::tldownload_server->enabled is not set\n"); } debug("persistent connection not set up, using wget\n"); } # try again. my $ret = _download_file($url, $dest, $wget); if ($wget_retry) { tlwarn("TLUtils::download_file: retry with wget " . ($ret ? "succeeded" : "failed") . ": $url\n"); } return($ret); } sub _download_file { my ($url, $dest, $wgetdefault) = @_; if (win32()) { $dest =~ s!/!\\!g; } my $wget = $ENV{"TL_DOWNLOAD_PROGRAM"} || $wgetdefault; my $wgetargs = $ENV{"TL_DOWNLOAD_ARGS"} || "--user-agent=texlive/wget --tries=10 --timeout=$NetworkTimeout -q -O"; debug("downloading $url using $wget $wgetargs\n"); my $ret; if ($dest eq "|") { open(RETFH, "$wget $wgetargs - $url|") || die "open($url) via $wget $wgetargs failed: $!"; # opening to a pipe always succeeds, so we return immediately return \*RETFH; } else { my @wgetargs = split (" ", $wgetargs); $ret = system ($wget, @wgetargs, $dest, $url); # we have to reverse the meaning of ret because system has 0=success. $ret = ($ret ? 0 : 1); } # return false/undef in case the download did not succeed. return ($ret) unless $ret; debug("download of $url succeeded\n"); if ($dest eq "|") { return \*RETFH; } else { return 1; } } =item C<nulldev ()> Return C</dev/null> on Unix and C<nul> on Windows. =cut sub nulldev { return (&win32)? 'nul' : '/dev/null'; } =item C<get_full_line ($fh)> returns the next line from the file handle $fh, taking continuation lines into account (last character of a line is \, and no quoting is parsed). =cut # open my $f, '<', $file_name or die; # while (my $l = get_full_line($f)) { ... } # close $f or die; sub get_full_line { my ($fh) = @_; my $line = <$fh>; return undef unless defined $line; return $line unless $line =~ s/\\\r?\n$//; my $cont = get_full_line($fh); if (!defined($cont)) { tlwarn('Continuation disallowed at end of file'); $cont = ""; } $cont =~ s/^\s*//; return $line . $cont; } =back =head2 Installer Functions =over 4 =item C<make_var_skeleton($prefix)> Generate a skeleton of empty directories in the C<TEXMFSYSVAR> tree. =cut sub make_var_skeleton { my ($prefix) = @_; mkdirhier "$prefix/tex/generic/config"; mkdirhier "$prefix/fonts/map/dvipdfmx/updmap"; mkdirhier "$prefix/fonts/map/dvips/updmap"; mkdirhier "$prefix/fonts/map/pdftex/updmap"; mkdirhier "$prefix/fonts/pk"; mkdirhier "$prefix/fonts/tfm"; mkdirhier "$prefix/web2c"; mkdirhier "$prefix/xdvi"; mkdirhier "$prefix/tex/context/config"; } =item C<make_local_skeleton($prefix)> Generate a skeleton of empty directories in the C<TEXMFLOCAL> tree, unless C<TEXMFLOCAL> already exists. =cut sub make_local_skeleton { my ($prefix) = @_; return if (-d $prefix); mkdirhier "$prefix/bibtex/bib/local"; mkdirhier "$prefix/bibtex/bst/local"; mkdirhier "$prefix/doc/local"; mkdirhier "$prefix/dvips/local"; mkdirhier "$prefix/fonts/source/local"; mkdirhier "$prefix/fonts/tfm/local"; mkdirhier "$prefix/fonts/type1/local"; mkdirhier "$prefix/fonts/vf/local"; mkdirhier "$prefix/metapost/local"; mkdirhier "$prefix/tex/latex/local"; mkdirhier "$prefix/tex/plain/local"; mkdirhier "$prefix/tlpkg"; mkdirhier "$prefix/web2c"; } =item C<create_fmtutil($tlpdb, $dest)> =item C<create_updmap($tlpdb, $dest)> =item C<create_language_dat($tlpdb, $dest, $localconf)> =item C<create_language_def($tlpdb, $dest, $localconf)> =item C<create_language_lua($tlpdb, $dest, $localconf)> These five functions create C<fmtutil.cnf>, C<updmap.cfg>, C<language.dat>, C<language.def>, and C<language.dat.lua> respectively, in C<$dest> (which by default is below C<$TEXMFSYSVAR>). These functions merge the information present in the TLPDB C<$tlpdb> (formats, maps, hyphenations) with local configuration additions: C<$localconf>. Currently the merging is done by omitting disabled entries specified in the local file, and then appending the content of the local configuration files at the end of the file. We should also check for duplicates, maybe even error checking. =cut # # get_disabled_local_configs # returns the list of disabled formats/hyphenpatterns/maps # disabling is done by putting # #!NAME # or # %!NAME # into the respective foo-local.cnf/cfg file # sub get_disabled_local_configs { my $localconf = shift; my $cc = shift; my @disabled = (); if ($localconf && -r $localconf) { open (FOO, "<$localconf") || die "strange, -r ok but open($localconf) failed: $!"; my @tmp = <FOO>; close(FOO) || warn("close($localconf) failed: $!"); @disabled = map { if (m/^$cc!(\S+)\s*$/) { $1 } else { } } @tmp; } return @disabled; } sub create_fmtutil { my ($tlpdb,$dest) = @_; my @lines = $tlpdb->fmtutil_cnf_lines(); _create_config_files($tlpdb, "texmf-dist/web2c/fmtutil-hdr.cnf", $dest, undef, 0, '#', \@lines); } sub create_updmap { my ($tlpdb,$dest) = @_; check_for_old_updmap_cfg(); my @tlpdblines = $tlpdb->updmap_cfg_lines(); _create_config_files($tlpdb, "texmf-dist/web2c/updmap-hdr.cfg", $dest, undef, 0, '#', \@tlpdblines); } sub check_for_old_updmap_cfg { chomp( my $tmfsysconf = `kpsewhich -var-value=TEXMFSYSCONFIG` ) ; my $oldupd = "$tmfsysconf/web2c/updmap.cfg"; return unless -r $oldupd; # if no such file, good. open (OLDUPD, "<$oldupd") || die "open($oldupd) failed: $!"; my $firstline = <OLDUPD>; close(OLDUPD); # cygwin returns undef when reading from an empty file, we have # to make sure that this is anyway initialized $firstline = "" if (!defined($firstline)); chomp ($firstline); # if ($firstline =~ m/^# Generated by (install-tl|.*\/tlmgr) on/) { # assume it was our doing, rename it. my $nn = "$oldupd.DISABLED"; if (-r $nn) { my $fh; ($fh, $nn) = File::Temp::tempfile( "updmap.cfg.DISABLED.XXXXXX", DIR => "$tmfsysconf/web2c"); } print "Renaming old config file from $oldupd to $nn "; if (rename($oldupd, $nn)) { if (system("mktexlsr", $tmfsysconf) != 0) { die "mktexlsr $tmfsysconf failed after updmap.cfg rename, fix fix: $!"; } print "No further action should be necessary.\n"; } else { print STDERR " Renaming of $oldupd did not succeed. This config file should not be used anymore, so please do what's necessary to eliminate it. See the documentation for updmap. "; } } else { # first line did not match # that is NOT a good idea, because updmap creates updmap.cfg in # TEXMFSYSCONFIG when called with --enable Map etc, so we should # NOT warn here # print STDERR "Apparently # $oldupd # was created by hand. This config file should not be used anymore, # so please do what's necessary to eliminate it. # See the documentation for updmap. # "; } } sub check_updmap_config_value { my ($k, $v, $f) = @_; return 0 if !defined($k); return 0 if !defined($v); if (member( $k, qw/dvipsPreferOutline dvipsDownloadBase35 pdftexDownloadBase14 dvipdfmDownloadBase14/)) { if ($v eq "true" || $v eq "false") { return 1; } else { tlwarn("Unknown setting for $k in $f: $v\n"); return 0; } } elsif ($k eq "LW35") { if (member($v, qw/URW URWkb ADOBE ADOBEkb/)) { return 1; } else { tlwarn("Unknown setting for LW35 in $f: $v\n"); return 0; } } elsif ($k eq "kanjiEmbed") { # any string is fine return 1; } else { return 0; } } sub create_language_dat { my ($tlpdb,$dest,$localconf) = @_; # no checking for disabled stuff for language.dat and .def my @lines = $tlpdb->language_dat_lines( get_disabled_local_configs($localconf, '%')); _create_config_files($tlpdb, "texmf-dist/tex/generic/config/language.us", $dest, $localconf, 0, '%', \@lines); } sub create_language_def { my ($tlpdb,$dest,$localconf) = @_; # no checking for disabled stuff for language.dat and .def my @lines = $tlpdb->language_def_lines( get_disabled_local_configs($localconf, '%')); my @postlines; push @postlines, "%%% No changes may be made beyond this point.\n"; push @postlines, "\n"; push @postlines, "\\uselanguage {USenglish} %%% This MUST be the last line of the file.\n"; _create_config_files ($tlpdb,"texmf-dist/tex/generic/config/language.us.def", $dest, $localconf, 1, '%', \@lines, @postlines); } sub create_language_lua { my ($tlpdb,$dest,$localconf) = @_; # no checking for disabled stuff for language.dat and .lua my @lines = $tlpdb->language_lua_lines( get_disabled_local_configs($localconf, '--')); my @postlines = ("}\n"); _create_config_files ($tlpdb,"texmf-dist/tex/generic/config/language.us.lua", $dest, $localconf, 0, '--', \@lines, @postlines); } sub _create_config_files { my ($tlpdb, $headfile, $dest,$localconf, $keepfirstline, $cc, $tlpdblinesref, @postlines) = @_; my $root = $tlpdb->root; my @lines = (); if (-r "$root/$headfile") { # we might be in user mode and do *not* want that the generation # of the configuration file just boils out. open (INFILE, "<$root/$headfile") || die "open($root/$headfile) failed, but -r ok: $!"; @lines = <INFILE>; close (INFILE); } else { tlwarn("TLUtils::_create_config_files: $root/$headfile: " . " head file not found, ok in user mode"); } push @lines, @$tlpdblinesref; if (defined($localconf) && -r $localconf) { # # this should be done more intelligently, but for now only add those # lines without any duplication check ... open (FOO, "<$localconf") || die "strange, -r ok but cannot open $localconf: $!"; my @tmp = <FOO>; close (FOO); push @lines, @tmp; } if (@postlines) { push @lines, @postlines; } if ($#lines >= 0) { open(OUTFILE,">$dest") or die("Cannot open $dest for writing: $!"); if (!$keepfirstline) { print OUTFILE $cc; printf OUTFILE " Generated by %s on %s\n", "$0", scalar localtime; } print OUTFILE @lines; close(OUTFILE) || warn "close(>$dest) failed: $!"; } } sub parse_AddHyphen_line { my $line = shift; my %ret; # default values my $default_lefthyphenmin = 2; my $default_righthyphenmin = 3; $ret{"lefthyphenmin"} = $default_lefthyphenmin; $ret{"righthyphenmin"} = $default_righthyphenmin; $ret{"synonyms"} = []; for my $p (quotewords('\s+', 0, "$line")) { my ($a, $b) = split /=/, $p; if ($a eq "name") { if (!$b) { $ret{"error"} = "AddHyphen line needs name=something"; return %ret; } $ret{"name"} = $b; next; } if ($a eq "lefthyphenmin") { $ret{"lefthyphenmin"} = ( $b ? $b : $default_lefthyphenmin ); next; } if ($a eq "righthyphenmin") { $ret{"righthyphenmin"} = ( $b ? $b : $default_righthyphenmin ); next; } if ($a eq "file") { if (!$b) { $ret{"error"} = "AddHyphen line needs file=something"; return %ret; } $ret{"file"} = $b; next; } if ($a eq "file_patterns") { $ret{"file_patterns"} = $b; next; } if ($a eq "file_exceptions") { $ret{"file_exceptions"} = $b; next; } if ($a eq "luaspecial") { $ret{"luaspecial"} = $b; next; } if ($a eq "databases") { @{$ret{"databases"}} = split /,/, $b; next; } if ($a eq "synonyms") { @{$ret{"synonyms"}} = split /,/, $b; next; } if ($a eq "comment") { $ret{"comment"} = $b; next; } # should not be reached at all $ret{"error"} = "Unknown language directive $a"; return %ret; } # this default value couldn't be set earlier if (not defined($ret{"databases"})) { if (defined $ret{"file_patterns"} or defined $ret{"file_exceptions"} or defined $ret{"luaspecial"}) { @{$ret{"databases"}} = qw(dat def lua); } else { @{$ret{"databases"}} = qw(dat def); } } return %ret; } sub parse_AddFormat_line { my $line = shift; my %ret; $ret{"options"} = ""; $ret{"patterns"} = "-"; $ret{"mode"} = 1; for my $p (quotewords('\s+', 0, "$line")) { my ($a, $b); if ($p =~ m/^(name|engine|mode|patterns|options)=(.*)$/) { $a = $1; $b = $2; } else { $ret{"error"} = "Unknown format directive $p"; return %ret; } if ($a eq "name") { if (!$b) { $ret{"error"} = "AddFormat line needs name=something"; return %ret; } $ret{"name"} = $b; next; } if ($a eq "engine") { if (!$b) { $ret{"error"} = "AddFormat line needs engine=something"; return %ret; } $ret{"engine"} = $b; next; } if ($a eq "patterns") { $ret{"patterns"} = ( $b ? $b : "-" ); next; } if ($a eq "mode") { $ret{"mode"} = ( $b eq "disabled" ? 0 : 1 ); next; } if ($a eq "options") { $ret{"options"} = ( $b ? $b : "" ); next; } # should not be reached at all $ret{"error"} = "Unknown format directive $p"; return %ret; } return %ret; } =back =head2 Miscellaneous Ideas from Fabrice Popineau's C<FileUtils.pm>. =over 4 =item C<sort_uniq(@list)> The C<sort_uniq> function sorts the given array and throws away multiple occurrences of elements. It returns a sorted and unified array. =cut sub sort_uniq { my (@l) = @_; my ($e, $f, @r); $f = ""; @l = sort(@l); foreach $e (@l) { if ($e ne $f) { $f = $e; push @r, $e; } } return @r; } =item C<push_uniq(\@list, @items)> The C<push_uniq> function pushes the last elements on the list referenced by the first argument. =cut sub push_uniq { # can't we use $l as a reference, and then use my? later ... local (*l, @le) = @_; foreach my $e (@le) { if (! &member($e, @l)) { push @l, $e; } } } =item C<member($item, @list)> The C<member> function returns true if the the first argument is contained in the list of the remaining arguments. =cut sub member { my $what = shift; return scalar grep($_ eq $what, @_); } =item C<merge_into(\%to, \%from)> Merges the keys of %from into %to. =cut sub merge_into { my ($to, $from) = @_; foreach my $k (keys %$from) { if (defined($to->{$k})) { push @{$to->{$k}}, @{$from->{$k}}; } else { $to->{$k} = [ @{$from->{$k}} ]; } } } =item C<texdir_check($texdir)> Test whether installation with TEXDIR set to $texdir would succeed due to writing permissions. Writable or not, we will not allow installation to the root directory (Unix) or the root of a drive (Windows). =cut sub texdir_check { my $texdir = shift; return 0 unless defined $texdir; # convert to absolute/canonical, for safer parsing # tl_abs_path should work as long as grandparent exists $texdir = tl_abs_path($texdir); return 0 unless defined $texdir; # also reject the root of a drive/volume, # assuming that only the canonical form of the root ends with / return 0 if $texdir =~ m!/$!; my $texdirparent; my $texdirpparent; return dir_writable($texdir) if (-d $texdir); ($texdirparent = $texdir) =~ s!/[^/]*$!!; #print STDERR "Checking $texdirparent".'[/]'."\n"; return dir_creatable($texdirparent) if -d dir_slash($texdirparent); # try another level up the tree ($texdirpparent = $texdirparent) =~ s!/[^/]*$!!; #print STDERR "Checking $texdirpparent".'[/]'."\n"; return dir_creatable($texdirpparent) if -d dir_slash($texdirpparent); return 0; } # no newlines or spaces are added, multiple args are just concatenated. # sub logit { my ($out, $level, @rest) = @_; _logit($out, $level, @rest) unless $::opt_quiet; _logit('file', $level, @rest); } sub _logit { my ($out, $level, @rest) = @_; if ($::opt_verbosity >= $level) { # if $out is a ref/glob to STDOUT or STDERR, print it there if (ref($out) eq "GLOB") { print $out @rest; } else { # we should log it into the logfile, but that might be not initialized # so either print it to the filehandle $::LOGFILE, or push it onto # the to be printed log lines @::LOGLINES if (defined($::LOGFILE)) { print $::LOGFILE @rest; } else { push (@::LOGLINES, join ("", @rest)); } } } } =item C<info ($str1, $str2, ...)> Write a normal informational message, the concatenation of the argument strings. The message will be written unless C<-q> was specified. If the global C<$::machinereadable> is set (the C<--machine-readable> option to C<tlmgr>), then output is written to stderr, else to stdout. If the log file (see L<process_logging_options>) is defined, it also writes there. It is best to use this sparingly, mainly to give feedback during lengthy operations and for final results. =cut sub info { my $str = join("", @_); my $fh = ($::machinereadable ? \*STDERR : \*STDOUT); logit($fh, 0, $str); for my $i (@::info_hook) { &{$i}($str); } } =item C<debug ($str1, $str2, ...)> Write a debugging message, the concatenation of the argument strings. The message will be omitted unless C<-v> was specified. If the log file (see L<process_logging_options>) is defined, it also writes there. This first level debugging message reports on the overall flow of work, but does not include repeated messages about processing of each package. =cut sub debug { my $str = "D:" . join("", @_); return if ($::opt_verbosity < 1); logit(\*STDOUT, 1, $str); for my $i (@::debug_hook) { &{$i}($str); } } =item C<ddebug ($str1, $str2, ...)> Write a deep debugging message, the concatenation of the argument strings. The message will be omitted unless C<-v -v> (or higher) was specified. If the log file (see L<process_logging_options>) is defined, it also writes there. This second level debugging message reports messages about processing each package, in addition to the first level. =cut sub ddebug { my $str = "DD:" . join("", @_); return if ($::opt_verbosity < 2); logit(\*STDOUT, 2, $str); for my $i (@::ddebug_hook) { &{$i}($str); } } =item C<dddebug ($str1, $str2, ...)> Write the deepest debugging message, the concatenation of the argument strings. The message will be omitted unless C<-v -v -v> was specified. If the log file (see L<process_logging_options>) is defined, it also writes there. This third level debugging message reports messages about processing each line of any tlpdb files read, in addition to the first and second levels. =cut sub dddebug { my $str = "DDD:" . join("", @_); return if ($::opt_verbosity < 3); logit(\*STDOUT, 3, $str); for my $i (@::dddebug_hook) { &{$i}($str); } } =item C<log ($str1, $str2, ...)> Write a message to the log file (and nowhere else), the concatenation of the argument strings. =cut sub log { my $savequiet = $::opt_quiet; $::opt_quiet = 0; _logit('file', -100, @_); $::opt_quiet = $savequiet; } =item C<tlwarn ($str1, $str2, ...)> Write a warning message, the concatenation of the argument strings. This always and unconditionally writes the message to standard error; if the log file (see L<process_logging_options>) is defined, it also writes there. =cut sub tlwarn { my $savequiet = $::opt_quiet; my $str = join("", @_); $::opt_quiet = 0; logit (\*STDERR, -100, $str); $::opt_quiet = $savequiet; for my $i (@::warn_hook) { &{$i}($str); } } =item C<tldie ($str1, $str2, ...)> Uses C<tlwarn> to issue a warning, then exits with exit code 1. =cut sub tldie { tlwarn(@_); exit(1); } =item C<debug_hash ($label, hash))> Write LABEL followed by HASH elements, all on one line, to stderr. If HASH is a reference, it is followed. =cut sub debug_hash { my ($label) = shift; my (%hash) = (ref $_[0] && $_[0] =~ /.*HASH.*/) ? %{$_[0]} : @_; my $str = "$label: {"; my @items = (); for my $key (sort keys %hash) { my $val = $hash{$key}; $key =~ s/\n/\\n/g; $val =~ s/\n/\\n/g; push (@items, "$key:$val"); } $str .= join (",", @items); $str .= "}"; warn "$str\n"; } =item C<process_logging_options ($texdir)> This function handles the common logging options for TeX Live scripts. It should be called before C<GetOptions> for any program-specific option handling. For our conventional calling sequence, see (for example) the L<tlpfiles> script. These are the options handled here: =over 4 =item B<-q> Omit normal informational messages. =item B<-v> Include debugging messages. With one C<-v>, reports overall flow; with C<-v -v> (or C<-vv>), also reports per-package processing; with C<-v -v -v> (or C<-vvv>), also reports each line read from any tlpdb files. Further repeats of C<-v>, as in C<-v -v -v -v>, are accepted but ignored. C<-vvvv> is an error. The idea behind these levels is to be able to specify C<-v> to get an overall idea of what is going on, but avoid terribly voluminous output when processing many packages, as we often are. When debugging a specific problem with a specific package, C<-vv> can help. When debugging problems with parsing tlpdb files, C<-vvv> gives that too. =item B<-logfile> I<file> Write all messages (informational, debugging, warnings) to I<file>, in addition to standard output or standard error. In TeX Live, only the installer sets a log file by default; none of the other standard TeX Live scripts use this feature, but you can specify it explicitly. =back See also the L<info>, L<debug>, L<ddebug>, and L<tlwarn> functions, which actually write the messages. =cut sub process_logging_options { $::opt_verbosity = 0; $::opt_quiet = 0; my $opt_logfile; my $opt_Verbosity = 0; my $opt_VERBOSITY = 0; # check all the command line options for occurrences of -q and -v; # do not report errors. my $oldconfig = Getopt::Long::Configure(qw(pass_through permute)); GetOptions("logfile=s" => \$opt_logfile, "v+" => \$::opt_verbosity, "vv" => \$opt_Verbosity, "vvv" => \$opt_VERBOSITY, "q" => \$::opt_quiet); Getopt::Long::Configure($oldconfig); # verbosity level, forcing -v -v instead of -vv is too annoying. $::opt_verbosity = 2 if $opt_Verbosity; $::opt_verbosity = 3 if $opt_VERBOSITY; # open log file if one was requested. if ($opt_logfile) { open(TLUTILS_LOGFILE, ">$opt_logfile") || die "open(>$opt_logfile) failed: $!\n"; $::LOGFILE = \*TLUTILS_LOGFILE; $::LOGFILENAME = $opt_logfile; } } =pod This function takes a single argument I<path> and returns it with C<"> chars surrounding it on Unix. On Windows, the C<"> chars are only added if I<path> a few special characters, since unconditional quoting leads to errors there. In all cases, any C<"> chars in I<path> itself are (erroneously) eradicated. =cut sub quotify_path_with_spaces { my $p = shift; my $m = win32() ? '[+=^&();,!%\s]' : '.'; if ( $p =~ m/$m/ ) { $p =~ s/"//g; # remove any existing double quotes $p = "\"$p\""; } return($p); } =pod This function returns a "Windows-ized" version of its single argument I<path>, i.e., replaces all forward slashes with backslashes, and adds an additional C<"> at the beginning and end if I<path> contains any spaces. It also makes the path absolute. So if $path does not start with one (arbitrary) characer followed by C<:>, we add the output of C<`cd`>. The result is suitable for running in shell commands, but not file tests or other manipulations, since in such internal Perl contexts, the quotes would be considered part of the filename. =cut sub conv_to_w32_path { my $p = shift; # we need absolute paths, too my $pabs = tl_abs_path($p); if (not $pabs) { $pabs = $p; tlwarn ("sorry, could not determine absolute path of $p!\n". "using original path instead"); } $pabs =~ s!/!\\!g; $pabs = quotify_path_with_spaces($pabs); return($pabs); } =pod The next two functions are meant for user input/output in installer menus. They help making the windows user happy by turning slashes into backslashes before displaying a path, and our code happy by turning backslashes into forwars slashes after reading a path. They both are no-ops on Unix. =cut sub native_slashify { my ($r) = @_; $r =~ s!/!\\!g if win32(); return $r; } sub forward_slashify { my ($r) = @_; $r =~ s!\\!/!g if win32(); return $r; } =item C<setup_persistent_downloads()> Set up to use persistent connections using LWP/TLDownload, that is look for a download server. Return the TLDownload object if successful, else false. =cut sub setup_persistent_downloads { if ($TeXLive::TLDownload::net_lib_avail) { ddebug("setup_persistent_downloads has net_lib_avail set\n"); $::tldownload_server = TeXLive::TLDownload->new; if (!defined($::tldownload_server)) { ddebug("TLUtils:setup_persistent_downloads: failed to get ::tldownload_server\n"); } else { ddebug("TLUtils:setup_persistent_downloads: got ::tldownload_server\n"); } return $::tldownload_server; } return 0; } =item C<query_ctan_mirror()> Return a particular mirror given by the generic CTAN auto-redirecting default (specified in L<$TLConfig::TexLiveServerURL>) if we get a response, else the empty string. Neither C<TL_DOWNLOAD_PROGRAM> nor <TL_DOWNLOAD_ARGS> is honored (see L<download_file>), since certain options have to be set to do the job and the program has to be C<wget> since we parse the output. =cut sub query_ctan_mirror { my $wget = $::progs{'wget'}; if (!defined ($wget)) { tlwarn("query_ctan_mirror: Programs not set up, trying wget\n"); $wget = "wget"; } # we need the verbose output, so no -q. # do not reduce retries here, but timeout still seems desirable. my $mirror = $TeXLiveServerURL; my $cmd = "$wget $mirror --timeout=$NetworkTimeout -O " . (win32() ? "nul" : "/dev/null") . " 2>&1"; # # since we are reading the output of wget to find a mirror # we have to make sure that the locale is unset my $saved_lcall; if (defined($ENV{'LC_ALL'})) { $saved_lcall = $ENV{'LC_ALL'}; } $ENV{'LC_ALL'} = "C"; # we try 3 times to get a mirror from mirror.ctan.org in case we have # bad luck with what gets returned. my $max_trial = 3; my $mhost; for (my $i = 1; $i <= $max_trial; $i++) { my @out = `$cmd`; # analyze the output for the mirror actually selected. foreach (@out) { if (m/^Location: (\S*)\s*.*$/) { (my $mhost = $1) =~ s,/*$,,; # remove trailing slashes since we add it return $mhost; } } sleep(1); } # reset LC_ALL to undefined or the previous value if (defined($saved_lcall)) { $ENV{'LC_ALL'} = $saved_lcall; } else { delete($ENV{'LC_ALL'}); } # we are still here, so three times we didn't get a mirror, give up # and return undefined return; } =item C<check_on_working_mirror($mirror)> Check if MIRROR is functional. =cut sub check_on_working_mirror { my $mirror = shift; my $wget = $::progs{'wget'}; if (!defined ($wget)) { tlwarn ("check_on_working_mirror: Programs not set up, trying wget\n"); $wget = "wget"; } $wget = quotify_path_with_spaces($wget); # # the test is currently not completely correct, because we do not # use the LWP if it is set up for it, but I am currently too lazy # to program it, # so try wget and only check for the return value # please KEEP the / after $mirror, some ftp mirrors do give back # an error if the / is missing after ../CTAN/ my $cmd = "$wget $mirror/ --timeout=$NetworkTimeout -O " . (win32() ? "nul" : "/dev/null") . " 2>" . (win32() ? "nul" : "/dev/null"); my $ret = system($cmd); # if return value is not zero it is a failure, so switch the meanings return ($ret ? 0 : 1); } =item C<give_ctan_mirror_base()> 1. get a mirror (retries 3 times to contact mirror.ctan.org) - if no mirror found, use one of the backbone servers - if it is an http server return it (no test is done) - if it is a ftp server, continue 2. if the ftp mirror is good, return it 3. if the ftp mirror is bad, search for http mirror (5 times) 4. if http mirror is found, return it (again, no test,) 5. if no http mirror is found, return one of the backbone servers =cut sub give_ctan_mirror_base { my @backbone = qw!http://www.ctan.org/tex-archive http://www.tex.ac.uk/tex-archive http://dante.ctan.org/tex-archive!; # start by selecting a mirror and test its operationality my $mirror = query_ctan_mirror(); if (!defined($mirror)) { # three times calling mirror.ctan.org did not give anything useful, # return one of the backbone servers tlwarn("cannot contact mirror.ctan.org, returning a backbone server!\n"); return $backbone[int(rand($#backbone + 1))]; } if ($mirror =~ m!^http://!) { # if http mirror, assume good and return. return $mirror; } # we are still here, so we got a ftp mirror from mirror.ctan.org if (check_on_working_mirror($mirror)) { return $mirror; # ftp mirror is working, return. } # we are still here, so the ftp mirror failed, retry and hope for http. # theory is that if one ftp fails, probably all ftp is broken. my $max_mirror_trial = 5; for (my $try = 1; $try <= $max_mirror_trial; $try++) { my $m = query_ctan_mirror(); debug("querying mirror, got " . (defined($m) ? $m : "(nothing)") . "\n"); if (defined($m) && $m =~ m!^http://!) { return $m; # got http this time, assume ok. } # sleep to make mirror happy, but only if we are not ready to return sleep(1) if $try < $max_mirror_trial; } # 5 times contacting the mirror service did not return a http server, # use one of the backbone servers. debug("no mirror found ... randomly selecting backbone\n"); return $backbone[int(rand($#backbone + 1))]; } sub give_ctan_mirror { return (give_ctan_mirror_base(@_) . "/$TeXLiveServerPath"); } =item C<create_mirror_list()> =item C<extract_mirror_entry($listentry)> C<create_mirror_list> returns the lists of viable mirrors according to ctan-mirrors.pl, in a list which also contains continents, and country headers. C<extract_mirror_entry> extracts the actual repository data from one of these entries. # KEEP THESE TWO FUNCTIONS IN SYNC!!! =cut sub create_mirror_list { our $mirrors; my @ret = (); require("installer/ctan-mirrors.pl"); my @continents = sort keys %$mirrors; for my $continent (@continents) { # first push the name of the continent push @ret, uc($continent); my @countries = sort keys %{$mirrors->{$continent}}; for my $country (@countries) { my @mirrors = sort keys %{$mirrors->{$continent}{$country}}; my $first = 1; for my $mirror (@mirrors) { my $mfull = $mirror; $mfull =~ s!/$!!; # do not append the server path part here, but add # it down there in the extract mirror entry #$mfull .= "/" . $TeXLive::TLConfig::TeXLiveServerPath; #if ($first) { my $country_str = sprintf "%-12s", $country; push @ret, " $country_str $mfull"; # $first = 0; #} else { # push @ret, " $mfull"; #} } } } return @ret; } # extract_mirror_entry is not very intelligent, it assumes that # the last "word" is the URL sub extract_mirror_entry { my $ent = shift; my @foo = split ' ', $ent; return $foo[$#foo] . "/" . $TeXLive::TLConfig::TeXLiveServerPath; } sub tlmd5 { my ($file) = @_; if (-r $file) { open(FILE, $file) || die "open($file) failed: $!"; binmode(FILE); my $md5hash = Digest::MD5->new->addfile(*FILE)->hexdigest; close(FILE); return $md5hash; } else { tlwarn("tlmd5, given file not readable: $file\n"); return ""; } } # # compare_tlpobjs # returns a hash # $ret{'revision'} = "leftRev:rightRev" if revision differ # $ret{'removed'} = \[ list of files removed from A to B ] # $ret{'added'} = \[ list of files added from A to B ] # sub compare_tlpobjs { my ($tlpA, $tlpB) = @_; my %ret; my @rem; my @add; my $rA = $tlpA->revision; my $rB = $tlpB->revision; if ($rA != $rB) { $ret{'revision'} = "$rA:$rB"; } if ($tlpA->relocated) { $tlpA->replace_reloc_prefix; } if ($tlpB->relocated) { $tlpB->replace_reloc_prefix; } my @fA = $tlpA->all_files; my @fB = $tlpB->all_files; my %removed; my %added; for my $f (@fA) { $removed{$f} = 1; } for my $f (@fB) { delete($removed{$f}); $added{$f} = 1; } for my $f (@fA) { delete($added{$f}); } @rem = sort keys %removed; @add = sort keys %added; $ret{'removed'} = \@rem if @rem; $ret{'added'} = \@add if @add; return %ret; } # # compare_tlpdbs # return several hashes # @{$ret{'removed_packages'}} = list of removed packages from A to B # @{$ret{'added_packages'}} = list of added packages from A to B # $ret{'different_packages'}->{$package} = output of compare_tlpobjs # sub compare_tlpdbs { my ($tlpdbA, $tlpdbB, @add_ignored_packs) = @_; my @ignored_packs = qw/00texlive.installer 00texlive.image/; push @ignored_packs, @add_ignored_packs; my @inAnotinB; my @inBnotinA; my %diffpacks; my %do_compare; my %ret; for my $p ($tlpdbA->list_packages()) { my $is_ignored = 0; for my $ign (@ignored_packs) { if (($p =~ m/^$ign$/) || ($p =~ m/^$ign\./)) { $is_ignored = 1; last; } } next if $is_ignored; my $tlpB = $tlpdbB->get_package($p); if (!defined($tlpB)) { push @inAnotinB, $p; } else { $do_compare{$p} = 1; } } $ret{'removed_packages'} = \@inAnotinB if @inAnotinB; for my $p ($tlpdbB->list_packages()) { my $is_ignored = 0; for my $ign (@ignored_packs) { if (($p =~ m/^$ign$/) || ($p =~ m/^$ign\./)) { $is_ignored = 1; last; } } next if $is_ignored; my $tlpA = $tlpdbA->get_package($p); if (!defined($tlpA)) { push @inBnotinA, $p; } else { $do_compare{$p} = 1; } } $ret{'added_packages'} = \@inBnotinA if @inBnotinA; for my $p (sort keys %do_compare) { my $tlpA = $tlpdbA->get_package($p); my $tlpB = $tlpdbB->get_package($p); my %foo = compare_tlpobjs($tlpA, $tlpB); if (keys %foo) { # some diffs were found $diffpacks{$p} = \%foo; } } $ret{'different_packages'} = \%diffpacks if (keys %diffpacks); return %ret; } sub tlnet_disabled_packages { my ($root) = @_; my $disabled_pkgs = "$root/tlpkg/dev/tlnet-disabled-packages.txt"; my @ret; if (-r $disabled_pkgs) { open (DISABLED, "<$disabled_pkgs") || die "Huu, -r but cannot open: $?"; while (<DISABLED>) { chomp; next if /^\s*#/; next if /^\s*$/; $_ =~ s/^\s*//; $_ =~ s/\s*$//; push @ret, $_; } close(DISABLED) || warn ("Cannot close tlnet-disabled-packages.txt: $?"); } return @ret; } sub report_tlpdb_differences { my $rret = shift; my %ret = %$rret; if (defined($ret{'removed_packages'})) { info ("removed packages from A to B:\n"); for my $f (@{$ret{'removed_packages'}}) { info (" $f\n"); } } if (defined($ret{'added_packages'})) { info ("added packages from A to B:\n"); for my $f (@{$ret{'added_packages'}}) { info (" $f\n"); } } if (defined($ret{'different_packages'})) { info ("different packages from A to B:\n"); for my $p (keys %{$ret{'different_packages'}}) { info (" $p\n"); for my $k (keys %{$ret{'different_packages'}->{$p}}) { if ($k eq "revision") { info(" revision differ: $ret{'different_packages'}->{$p}->{$k}\n"); } elsif ($k eq "removed" || $k eq "added") { info(" $k files:\n"); for my $f (@{$ret{'different_packages'}->{$p}->{$k}}) { info(" $f\n"); } } else { info(" unknown differ $k\n"); } } } } } sub sort_archs ($$) { my $aa = $_[0]; my $bb = $_[1]; $aa =~ s/^(.*)-(.*)$/$2-$1/; $bb =~ s/^(.*)-(.*)$/$2-$1/; $aa cmp $bb ; } # Taken from Text::ParseWords # sub quotewords { my($delim, $keep, @lines) = @_; my($line, @words, @allwords); foreach $line (@lines) { @words = parse_line($delim, $keep, $line); return() unless (@words || !length($line)); push(@allwords, @words); } return(@allwords); } sub parse_line { my($delimiter, $keep, $line) = @_; my($word, @pieces); no warnings 'uninitialized'; # we will be testing undef strings $line =~ s/\s+$//; # kill trailing whitespace while (length($line)) { $line =~ s/^(["']) # a $quote ((?:\\.|(?!\1)[^\\])*) # and $quoted text \1 # followed by the same quote | # --OR-- ^((?:\\.|[^\\"'])*?) # an $unquoted text (\Z(?!\n)|(?-x:$delimiter)|(?!^)(?=["'])) # plus EOL, delimiter, or quote //xs or return; # extended layout my($quote, $quoted, $unquoted, $delim) = ($1, $2, $3, $4); return() unless( defined($quote) || length($unquoted) || length($delim)); if ($keep) { $quoted = "$quote$quoted$quote"; } else { $unquoted =~ s/\\(.)/$1/sg; if (defined $quote) { $quoted =~ s/\\(.)/$1/sg if ($quote eq '"'); $quoted =~ s/\\([\\'])/$1/g if ( $PERL_SINGLE_QUOTE && $quote eq "'"); } } $word .= substr($line, 0, 0); # leave results tainted $word .= defined $quote ? $quoted : $unquoted; if (length($delim)) { push(@pieces, $word); push(@pieces, $delim) if ($keep eq 'delimiters'); undef $word; } if (!length($line)) { push(@pieces, $word); } } return(@pieces); } =item C<mktexupd ()> Append entries to C<ls-R> files. Usage example: my $updLSR=&mktexupd(); $updLSR->{mustexist}(1); $updLSR->{add}(file1); $updLSR->{add}(file2); $updLSR->{add}(file3); $updLSR->{exec}(); The first line creates a new object. Only one such object should be created in a program in order to avoid duplicate entries in C<ls-R> files. C<add> pushes a filename or a list of filenames to a hash encapsulated in a closure. Filenames must be specified with the full (absolute) path. Duplicate entries are ignored. C<exec> checks for each component of C<$TEXMFDBS> whether there are files in the hash which have to be appended to the corresponding C<ls-R> files and eventually updates the corresponding C<ls-R> files. Files which are in directories not stated in C<$TEXMFDBS> are silently ignored. If the flag C<mustexist> is set, C<exec> aborts with an error message if a file supposed to be appended to an C<ls-R> file doesn't exist physically on the file system. This option was added for compatibility with the C<mktexupd> shell script. This option shouldn't be enabled in scripts, except for testing, because it degrades performance on non-cached file systems. =cut sub mktexupd { my %files; my $mustexist=0; my $hash={ "add" => sub { foreach my $file (@_) { $file =~ s|\\|/|g; $files{$file}=1; } }, "reset" => sub { %files=(); }, "mustexist" => sub { $mustexist=shift; }, "exec" => sub { # check whether files exist if ($mustexist) { foreach my $file (keys %files) { die "File \"$file\" doesn't exist.\n" if (! -f $file); } } my $delim= (&win32)? ';' : ':'; my $TEXMFDBS; chomp($TEXMFDBS=`kpsewhich --show-path="ls-R"`); my @texmfdbs=split ($delim, "$TEXMFDBS"); my %dbs; foreach my $path (keys %files) { foreach my $db (@texmfdbs) { $db=substr($db, -1) if ($db=~m|/$|); # strip leading / $db = lc($db) if win32(); $up = (win32() ? lc($path) : $path); if (substr($up, 0, length("$db/")) eq "$db/") { # we appended a / because otherwise "texmf" is recognized as a # substring of "texmf-dist". my $np = './' . substr($up, length("$db/")); my ($dir, $file); $_=$np; ($dir, $file) = m|(.*)/(.*)|; $dbs{$db}{$dir}{$file}=1; } } } foreach my $db (keys %dbs) { if (! -f "$db" || ! -w "$db/ls-R") { &mkdirhier ($db); } open LSR, ">>$db/ls-R"; foreach my $dir (keys %{$dbs{$db}}) { print LSR "\n$dir:\n"; foreach my $file (keys %{$dbs{$db}{$dir}}) { print LSR "$file\n"; } } close LSR; } } }; return $hash; } =back =cut 1; __END__ =head1 SEE ALSO The modules L<TeXLive::TLPSRC>, L<TeXLive::TLPOBJ>, L<TeXLive::TLPDB>, L<TeXLive::TLTREE>, and the document L<Perl-API.txt> and the specification in the TeX Live repository trunk/Master/tlpkg/doc/. =head1 AUTHORS AND COPYRIGHT This script and its documentation were written for the TeX Live distribution (L<http://tug.org/texlive>) and both are licensed under the GNU General Public License Version 2 or later. =cut ### Local Variables: ### perl-indent-level: 2 ### tab-width: 2 ### indent-tabs-mode: nil ### End: # vim:set tabstop=2 expandtab: #
milos-korenciak/heroku-buildpack-tex
buildpack/tlpkg/TeXLive/TLUtils.pm
Perl
mit
119,908
# 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. =pod =head1 NAME Date::Manip::Changes5to6 - describes differences between 5.xx and 6.00 =head1 SYNOPSIS Date::Manip 6.00 represents a complete rethink and rewrite of Date::Manip. A great deal of effort was made to make sure that 6.00 is almost backwards compatible with 5.xx whenever feasible, but some functionality has changed in backwards incompatible ways. Other parts have been deprecated and will be removed at some point in the future. This document describes the differences between the 5.xx series and version 6.00. This page primarily describes technical details, most of which do not impact how Date::Manip is used in scripts. If you want to make sure that a script which ran with 5.xx will run with 6.xx, refer to the Date::Manip::Migration5to6 document. =head1 OVERVIEW The Date::Manip 5.xx series of suffered from several weaknesses. These included: =over 4 =item B<Poor time zone support> Time zone support in 5.xx was broken. Determining a time zone, and understanding daylight saving time changes was incomplete (at best) and totally inadequate to do true timezone operations. =item B<Parsing too complicated and unstructured> The parsing routines had grown very complicated, and overly permissive over time and were in need of a complete overhaul. =item B<Lacking OO model> Date::Manip 5.xx was written as a functional module, not an OO module, but date handling would lend itself very well to being OO with different classes to handle dates, deltas, and recurrences. The OO model allows a lot of information to be stored with each date (such as time zone information) which is discarded in the functional interface. =item B<Too monolithic> The entire Date::Manip module was contained in one huge file. Breaking up the module would make it much easier to deal with. =back Date::Manip 6.00 is a complete rewrite of Date::Manip to address these and other issues. The following sections address how Date::Manip 6.00 differs from previous releases, and describes changes that might need to be made to your script in order to upgrade from 5.xx to 6.00. The most important changes are marked with asterisks. =head1 GENERAL CHANGES =over 4 =item B<(*) Requires perl 5.10.0> Please see the Date::Manip::Problems document for a discussion of this problem. It's in the KNOWN COMPLAINTS section. =item B<(*) Breaking into smaller modules> Date::Manip module has been broken up from one huge module into a large number of smaller more manageable modules. The main Date::Manip module is still present, and contains all of the functions from Date::Manip 5.xx (except that they now call functions from all the other modules to do the actual work). In general, the Date::Manip module from 6.00 is backwards compatible. A number of new modules have been created as well. These can be used directly, bypassing the main Date::Manip module. These include the following: Date::Manip::Base contains many basic date operations which may be used to do simple date manipulation tasks without all the overhead of the full Date::Manip module. Date::Manip::TZ contains time zone operations. Handling dates, deltas, and recurrences are now done in Date::Manip::Date, Date::Manip::Delta, and Date::Manip::Recur. All of these modules are object oriented, and are designed to be used directly, so if you prefer an OO interface over a functional interface, use these modules. =item B<(*) Intermediate data cached> In order to improve the performance of Date::Manip, many intermediate values are cached. This does impact the memory footprint of the module, but it has a huge impact on the performance of the module. Some types of data depend on the config variables used, and these are cached separately, and this cache is automatically cleared every time a config variable is set. As a result, it is best if you set all config variables at the start, and then leave them alone completely to get optimal use of cached data. A side effect of all this is that the Memoize module should not be used in conjunction with Date::Manip. In the version 5.xx documentation, it was mentioned that the Memoize module might be used to improve performance in some cases. This is no longer the case. It should not be used with Date::Manip, even if you use the functional interface instead of the OO interface. =item B<Taint safe> Date::Manip now contains no tainted data, and should run without problems with taint checking on provided you do not set additional methods for determining the system time zone using the curr_zone_methods function. Ideally, this should never be necessary. If it is necessary, I'd like to hear about it so that I can add whatever standard methods are needed to the built in list. =back =head1 TIME ZONE SUPPORT =over 4 =item B<(*) Complete handling of time zones> The biggest problem with Date::Manip 5.xx was it's inability to correctly handle time zones and Daylight Saving Time. That is now fixed. Version 6.00 includes support for every time zone included in the zoneinfo (aka Olson) database which includes the definitions of (hopefully) all of the time zones used in the world. =item B<Individual time zones will no longer be added> Prior to 5.55, time zones were added upon request. Since 6.00 now supports a full set of standard time zones, I will no longer add in individual time zones (Date::Manip::TZ includes functionality for adding them yourself if they are needed). With Date::Manip now having full time zone support, I'm not interested in supporting my own time zone database. However, I am interested in adding sets of time zones from various "standards". Date::Manip 6.00 includes time zones from the following standards: Olson zoneinfo database all Microsoft Windows time zones zones listed in RFC-822 If there are additional standards that include additional time zones not included here, please point me to them so they can be added. This could include published lists of time zone names supported on some operating system which have different names than the zoneinfo list. =item B<Nonstandard time zone abbreviations removed> Some of the individual standards that were added in the 5.xx series are not included in any of the standards listed above. As of 6.00, only time zones from standards will be included in the distribution (others can be added by users using the functions described in Date::Manip::TZ to add aliases for existing time zones). The following time zones were in Date::Manip 5.xx but not in 6.00. IDLW -1200 International Date Line West NT -1100 Nome SAT -0400 Chile CLDT -0300 Chile Daylight AT -0200 Azores MEWT +0100 Middle European Winter MEZ +0100 Middle European FWT +0100 French Winter GB +0100 GMT with daylight saving SWT +0100 Swedish Winter MESZ +0200 Middle European Summer FST +0200 French Summer METDST +0200 An alias for MEST used by HP-UX EETDST +0300 An alias for eest used by HP-UX EETEDT +0300 Eastern Europe, USSR Zone 1 BT +0300 Baghdad, USSR Zone 2 IT +0330 Iran ZP4 +0400 USSR Zone 3 ZP5 +0500 USSR Zone 4 IST +0530 Indian Standard ZP6 +0600 USSR Zone 5 AWST +0800 Australian Western Standard ROK +0900 Republic of Korea AEST +1000 Australian Eastern Standard ACDT +1030 Australian Central Daylight CADT +1030 Central Australian Daylight AEDT +1100 Australian Eastern Daylight EADT +1100 Eastern Australian Daylight NZT +1200 New Zealand IDLE +1200 International Date Line East =item B<A lot of support modules and files> Date::Manip now includes a large number of files and modules that are used to support time zones. A series of modules are included which are auto-generated from the zoneinfo database. The Date::Manip::Zones, Date::Manip::TZ::*, and Date::Manip::Offset::* modules are all automatically generated and are not intended to be used directly. Instead, the Date::Manip::TZ module is used to access the data stored there. A separate time zone module (Date::Manip::TZ::*) is included for every single time zone. There is also a module (Date::Manip::Offset::*) for every different offset. All told, there are almost 1000 modules. These are included to make time zone handling more efficient. Rather than calculating everything on the fly, information about each time zone and offset are included here which greatly speeds up the handling of time zones. These modules are only loaded as needed (i.e. only the modules related to the specific time zones you refer to are ever loaded), so there is no performance penalty to having them. Also included in the distribution are a script (tzdata) and additional module (Date::Manip::TZdata). These are used to automatically generate the time zone modules, and are of no use to anyone other than the maintainer of Date::Manip. They are included solely for the sake of completeness. If someone wanted to fork Date::Manip, all the tools necessary to do so are included in the distribution. =item B<(*) Meaning of $::TZ and $ENV{TZ}> In Date::Manip 5.x, you could specify what time zone you wanted to work in using either the $::TZ or $ENV{TZ} variables. Date::Manip 6.00 makes use of two different time zones: the actual local time zone the computer is running in (and which is used by the system clock), and a time zone that you want to work in. Typically, these are the same, but they do not have to be. As of Date::Manip 6.00, the $::TZ and $ENV{TZ} variables are used only to specify the actual local time zone. In order to specify an alternate time zone to work in, use the SetDate or ForceDate config variables. =back =head1 CONFIG FILES AND VARIABLES =over 4 =item B<(*) Date_Init handling of config variables> The handling of config variables has changed slightly. Previously, variables passed in to Date_Init overrode values from config files. This has changed slightly. Options to Date_Init are now parsed in the order they are listed, so the following: Date_Init("DateFormat=Other","ConfigFile=DateManip.cnf") would first set the DateFormat variable, and then it would read the config file "DateManip.cnf". If that config file included a DateFormat definition, it would override the one passed in to Date_Init. The proper way to override config files is to pass the config files in first, followed by any script-specific overrides. In other words: Date_Init("ConfigFile=DateManip.cnf","DateFormat=Other") =item B<Date_Init doesn't return the config variables> In Date::Manip::5.xx, Date_Init could return the list of all config variables. This functionality is no longer supported. Date_Init is used strictly to set config variables. =item B<(*) Config file options> Date::Manip 5.xx had the concept of a global and personal config file. In addition, the personal config file could be looked for in a path of directories. All this was specified using the config variables: GlobalCnf IgnoreGlobalCnf PersonalCnf PersonalCnfPath PathSep All of these have been removed. Instead, the single config variable: ConfigFile will be used to specify config files (with no distinction between a global and personal config file). Also, no path searching is done. Each must be specified by a complete path. Finally, any number of config files can be used. So the following is valid: Date_Init("ConfigFile=./Manip.cnf","ConfigFile=/tmp/Manip.cnf") =item B<Other config variables removed> The following config variables have been removed. TodayIsMidnight Use DefaultTime instead. ConvTZ Use SetDate or ForceDate instead. Internal Use Printable instead. DeltaSigns Use the Date::Manip::Delta::printf method to print deltas UpdateCurrTZ With real time zone handling in place, this is no longer necessary IntCharSet This has been replaced with better support for international character sets. The Encoding config variable may be used instead. =item B<Other config variables deprecated> The following config variables are deprecated and will be removed in some future version: TZ Use SetDate or ForceDate instead. =item B<Holidays> Previously, holidays could be defined as a "Date + Delta" or "Date - Delta" string. These predate recurrences, and introduce some complexity into the handling of holidays. Since recurrences are a much better way to define holidays, the "Date + Delta" and "Date - Delta" strings are no longer supported. =item B<TZ replaced (and enhanced)> The SetDate and ForceDate variables (which include the functionality of the deprecated TZ variable) are much improved as described in the Date::Manip::Config documentation. Since it is now handles time change correctly (allowing time changes to occur in the alternate time zone), parsed results may be different than in 5.x (but since 5.x didn't have proper time zone handling, this is a good thing). =back =head1 DATE PARSING AND OPERATIONS =over 4 =item B<(*) today, tomorrow, yesterday> The words "today", "tomorrow", and "yesterday" in 5.xx referred to the time now, 24 hours in the future, and 24 hours in the past respectively. As of 6.00, these are treated strictly as date strings, so they are the current day, the day before, or the day after at the time 00:00:00. The string "now" still refers to the current date and time. =item B<ISO 8601 formats> A couple of the date formats from Date::Manip 5.xx conflicted with ISO 8601 formats in the spec. These are documented in the Date::Manip::Date documentation. Dates are now parsed according to the spec (though a couple extensions have been made, which are also documented in the Date::Manip::Date documentation). There is one change with respect to Date::Manip 5.xx that results from a possible misinterpretation of the standard. In Date::Manip, there is a small amount of ambiguity in how the Www-D date formats are understood. The date: 1996-w02-3 might be interpreted in two different ways. It could be interpreted as Wednesday (day 3) of the 2nd week of 1996, or as the 3rd day of the 2nd week of 1996 (which would be Tuesday if the week begins on Sunday). Since the specification only works with weeks which begin on day 1, the two are always equivalent in the specification, and the language of the specification doesn't clearly indicate one interpretation over the other. Since Date::Manip supports the concept of weeks starting on days other than day 1 (Monday), the two interpretations are not equivalent. In Date::Manip 5.xx, the date was interpreted as Wednesday of the 2nd week, but I now believe that the other interpretation (3rd day of the week) is the interpretation intended by the specification. In addition, if this interpretation is used, it is easy to get the other interpretation. If 1996-w02-3 means the 3rd day of the 2nd week, then to get Wednesday (day 3) of the week, use the following two Date::Manip::Date methods: $err = $date->parse("1996-w02-1"); $date2 = $date->next(3,1); The first call gets the 1st day of the 2nd week, and the second call gets the next Wednesday. If 1996-w02-3 is interpreted as Wednesday of the 2nd week, then to get the 3rd day of the week involves significantly more work. In Date::Manip 6.00, the date will now be parsed as the 3rd day of the 2nd week. =item B<(*) Parsing is now more rigid> The philosophy in Date::Manip 5.xx with respect to parsing dates was "if there's any conceivable way to find a valid date in the string, do so". As a result, strings which did not look like they could contain a valid date often would. This manifested itself it two ways. First, a lot of punctuation was ignored. For example, the string "01 // 03 -. 75" was the date 1975-01-03. Second, a lot of word breaks were optional and it was often acceptable to run strings together. For example, the delta "in5seconds" would have worked. With Date::Manip 6.00, parsing now tries to find a valid date in the string, but uses a more rigidly defined set of allowed formats which should more closely match how the dates would actually be expressed in real life. The punctuation allowed is more rigidly defined, and word breaks are required. So "01/03/75" will work, but "01//03/75" and "01/03-75" won't. Also, "in5seconds" will no longer work, though "in 5 seconds" will work. These changes serve to simplify some of the regular expressions used in parsing dates, as well as simplifying the parsing routines. They also help to recognize actually dates as opposed to typos... it was too easy to pass in garbage and get a date out. =item B<Support dropped for a few formats> I've dropped support for a few very uncommon (probably never used) formats. These include (with Jan 3, 2009 as an example): DD/YYmmm 03/09Jan DD/YYYYmmm 03/2009Jan mmmYYYY/DD Jan2009/03 YYYY/DDmmm 2009/03Jan mmmYYYY Jan2009 YYYYmmm 2009Jan The last two are no longer supported since they are incomplete. With the exception of the incomplete forms, these could be added back in with very little effort. If there is ever a request to do so, I probably will. =item B<No longer parses the Apache format> Date::Manip 5.xx supported the format: DD/mmm/YYYY:HH:MN:SS used in the apache logs. Due to the stricter parsing, this format is no longer supported directly. However, the parse_format method may be used to parse the date directly from an apache log line with no need to extract the date string beforehand. =item B<Date_PrevWorkDay behavior> The behavior of Date_PrevWorkDay has changed slightly. The starting date is checked. If $timecheck was non-zero, the check failed if the date was not a business date, or if the time was not during business hours. If $timecheck was zero, the check failed if the date was not a business date, but the time was ignored. In 5.xx, if the check failed, and $timecheck was non-zero, day 0 was defined as the start of the next business day, but if $timecheck was zero, day 0 was defined as the previous business day at the same time. In 6.xx, if the check fails, and $timecheck is non-zero, the behavior is the same as before. If $timecheck is zero, day 0 is defined as the next business day at the same time. So day 0 is now always the same, where before, day 0 meant two different things depending on whether $timecheck was zero or not. =item B<(*) Default time> In Date::Manip 5.xx, the default times for dates was handled in an inconsistent manner. In the Date::Manip::Date documentation, if you parse a date from the "Common date formats" section, in Date::Manip 5.xx, if no time was included, it defaulted to "00:00:00". If you parsed a date from the "Less common formats" section, the default time was the current time. So running a program on Jun 5, 2009 at noon that parsed the following dates gave the following return values: Jun 12 => Jun 12, 2009 at 00:00:00 next week => Jun 12, 2009 at 12:00:00 This behavior is changed and now relies on the config variable DefaultTime. If DefaultTime is "curr", the default time for any date which includes no information about the time is the current time. Otherwise, the default time is midnight. =item B<%z format> In Date::Manip 5.xx, the %z format would give an offset in the form: -0500. Now it gives it in the form: -05:00:00 =back =head1 DELTAS =over 4 =item B<Dropped mixed style delta parsing> In Date::Manip 5.xx, a parsed delta could be written in the delta style 1:2:3 or in a language-specific expanded form: 1 hour 2 minutes 3 seconds or in a mixed form: 1 hour 2:3 The mixed form has been dropped since I doubt that it sees much use in real life, and by dropping the mixed form, the parsing is much simpler. =item B<Approximate date/date calculations> In Date::Manip 5.xx, the approximate delta between the two dates: Jan 10 1996 noon Jan 7 1998 noon was +1:11:4:0:0:0:0 (or 1 year, 11 months, 4 weeks). As of Date::Manip 6.00, the delta is +2:0:-0:3:0:0:0 (or 2 years minus 3 days). Although this leads to mixed-sign deltas, it is actually how more people would think about the delta. It has the additional advantage of being MUCH easier and faster to calculate. =item B<Approximate relationships in deltas> When printing parts of deltas in Date::Manip::5.xx, the approximate relationship of 1 year = 365.25 days was used. This is the correct value for the Julian calendar, but for the Gregorian calendar, a better value is 365.2425, and this is used in version 6.00. =item B<Old style formats> The formats used in the printf command are slightly different than in the old Delta_Format command. The old formats are described in the Date::Manip::DM5 manual, and the new ones are in the Date::Manip::Delta manual. The new formats are much more flexible and I encourage you to switch over, however at this point, the old style formats are officially supported for the Delta_Format command. At some point, the old style formats may be deprecated (and removed at some point beyond that), but for now, they are not. The old formats are NOT available using the printf method. =back =head1 RECURRENCES =over 4 =item B<The day field meaning changed in a few recurrences> The value of the day field can refer to several different things including the day of week number (Monday=1 to Sunday=7), day of month (1-31), day of year (1-366), etc. In Date::Manip 5.xx, it could also refer to the nth day of the week (i.e. 1 being the 1st day of the week, -1 being the last day of the week). This meaning is no longer used in 6.xx. For example, the recurrence: 1*2:3:4:0:0:0 referred to the 3rd occurence of the 4th day of the week in February. The meaning has been changed to refer to the 3rd occurence of day 4 (Thursday) in February. This is a much more useful type of recurrence. As a result of this change, the related recurrence: 1*2:3:-1:0:0:0 is invalid. Negative numbers may be used to refer to the nth day of the week, but NOT when referring to the day of week numbers. =item B<Recurrence range now inclusive> Previously, the list of dates implied by the recurrence were on or after the start date, but before the end date. This has been changed so that the dates may be on or before the end date. =item B<Dropped support for a couple English recurrences> Date::Manip 5.xx claimed support for a recurrence: every 2nd day in June [1997] In actuality, this recurrence is not practical to calculate. It requires a base date which might imply June 1,3,5,... in 1997 but June 2,4,6 in 1998. In addition, the recurrence does not fit the mold for other recurrences that are an approximate distance apart. This type of recurrence has a number of closely spaced events with 11-month gaps between groups. I no longer consider this a valid recurrence and support is now dropped for this string. I also dropped the following for a similar reason: every 6th tuesday [in 1999] =item B<Other minor recurrence changes> Previously, ParseRecur would supply default dates if the start or end were missing. This is no longer done. =back =head1 DATE::MANIP FUNCTIONS The Date::Manip module contains the same functions that Date::Manip 5.xx had (though the OO modules do all the work now). In general, the routines behave the same as before with the following exceptions: =over 4 =item B<Date_ConvTZ> Previously, Date_ConvTZ took 1 to 4 arguments and used the local time zone and the ConvTZ config variable to fill in missing arguments. Now, the Date_ConvTZ function only supports a 3 argument call: $date = Date_ConvTZ($date,$from,$to); If $from is not given, it defaults to the local time zone. If $to is not given, it defaults to the local time zone. The optional 4th argument ($errlevel) is no longer supported. If there is an error, an empty string is returned. =item B<DateCalc> In Date::Manip 5.xx, it was recommended that you pass arguments to ParseDate or ParseDateDelta. This is not recommended with 6.00 since it is much more intelligent about handling the arguments, and you'll just end up parsing the date/delta twice. =back =head1 BUGS AND QUESTIONS Please refer to the L<Date::Manip::Problems> documentation for information on submitting bug reports or questions to the author. =head1 SEE ALSO L<Date::Manip> - main module documentation =head1 LICENSE This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR Sullivan Beck (sbeck@cpan.org) =cut
jkb78/extrajnm
local/lib/perl5/Date/Manip/Changes5to6.pod
Perl
mit
24,919
package Seqplorer::Controller::View; use Mojo::Base 'Mojolicious::Controller'; use strict; # This action will render a template sub get { my $self = shift; my $viewId = $self->stash('viewid'); $self->app->log->debug("Controller: get view ".$viewId); my $viewModel = $self->model('view'); my $viewReturn = $viewModel->get({'_id' => $viewId}); $self->render( json => $viewReturn ); } sub create { my $self = shift; #my $viewId = $self->stash('viewid'); $self->app->log->debug("Controller: save new view"); my $parsedJSON=$self->req->json; unless(defined $parsedJSON->{'columns'} && defined $parsedJSON->{'collection'} && defined $parsedJSON->{'projects'} && defined $parsedJSON->{'restrict'} && defined $parsedJSON->{'dom'} && defined $parsedJSON->{'name'} ){ $self->app->log->debug("Controller: save new view failed, missing values"); $self->render( json => { 'failureNoticeHtml' => '<p>Needed values were not defined. Please try again.</p>'} ); return; } my $viewData={}; if(defined $parsedJSON->{'name'}){ $viewData->{'name'} = $parsedJSON->{'name'}; }else{ $viewData->{'name'} = 'NO NAME'; } my $viewModel = $self->model('view'); my $viewId = $viewModel->edit({ 'columns' => $parsedJSON->{'columns'}, 'collection' => $parsedJSON->{'collection'}, 'projects' => $parsedJSON->{'projects'}, 'restrict' => $parsedJSON->{'restrict'}, 'dom' => $parsedJSON->{'dom'}, 'name' => $viewData->{'name'} }); #my $viewId = $viewSaveReturn->{'_id'}; $self->app->log->debug("Controller: new view with id = ".$viewId); my $viewReturn = $viewModel->get({'_id' => $viewId}); $self->render( json => $viewReturn ); } sub edit { my $self = shift; my $viewId = $self->stash('viewid'); $self->app->log->debug("Controller: edit view"); my $parsedJSON=$self->req->json; unless(defined $parsedJSON->{'columns'} && defined $parsedJSON->{'collection'} && defined $parsedJSON->{'projects'} && defined $parsedJSON->{'restrict'} && defined $parsedJSON->{'dom'} && defined $parsedJSON->{'name'} ){ $self->app->log->debug("Controller: edit view failed, missing values"); $self->render( json => { 'failureNoticeHtml' => '<p>Needed values were not defined. Please try again.</p>'} ); return; } my $viewData={}; if(defined $parsedJSON->{'name'}){ $viewData->{'name'} = $parsedJSON->{'name'}; }else{ $viewData->{'name'} = 'NO NAME'; } my $viewModel = $self->model('view'); my $viewSaveReturn = $viewModel->edit({ '_id' => $viewId, 'columns' => $parsedJSON->{'columns'}, 'collection' => $parsedJSON->{'collection'}, 'projects' => $parsedJSON->{'projects'}, 'restrict' => $parsedJSON->{'restrict'}, 'dom' => $parsedJSON->{'dom'}, 'name' => $viewData->{'name'} }); my $viewReturn = $viewModel->get({'_id' => $viewId}); $self->render( json => $viewReturn ); } sub editname { my $self = shift; my $viewId = $self->stash('viewid'); $self->app->log->debug("Controller: edit view name"); my $parsedJSON=$self->req->json; unless(defined $parsedJSON->{'name'} ){ $self->app->log->debug("Controller: edit view failed, missing name value"); $self->render( json => { 'failureNoticeHtml' => '<p>Needed name value was not defined. Please try again.</p>'} ); return; } my $viewModel = $self->model('view'); my $viewId = $viewModel->editKey($self->stash('viewid'),'name',$parsedJSON->{'name'}); $self->app->log->debug("Controller: edit name in view = ".$viewId); my $viewReturn = $viewModel->get({'_id' => $viewId}); $self->render( json => $viewReturn ); } 1;
brdwilde/Seqplorer
api/lib/Seqplorer/Controller/View.pm
Perl
mit
3,509
#!/usr/local/bin/perl ############################################################################## # Script to convert genome-wide summary file to Mutation Position Format, # as used in pmsignature R package ############################################################################## use strict; use warnings; use POSIX; use File::Basename; use File::Path qw(make_path); # Set options and inputs my $wdir=getcwd; my $parentdir=dirname($wdir); my $outfile = "/net/bipolar/jedidiah/mutation/output/full_summ.mpf"; open(OUT, '>', $outfile) or die "can't write to $outfile: $!\n"; my $summfile = "/net/bipolar/jedidiah/mutation/output/5bp_100k/full.summary"; #main line for full processing open my $summ, '<', $summfile or die "can't open $summfile: $!"; readline($summ); #<-throws out summary header if it exists while (<$summ>) { next unless $_ =~ /^[^,]*$/; my $cutoff = 4; my $newline = join("\t", (split(/\t/, $_, $cutoff+1))[0..$cutoff-1]); print OUT "1\t$newline\n"; }
carjed/smaug-genetics
sandbox/summToMPF.pl
Perl
mit
1,018
package Acme::2zicon::NemotoNagi; use strict; use warnings; use base qw(Acme::2zicon::Base); our $VERSION = '0.7'; sub info { my $self = shift; return ( first_name_ja => '凪', family_name_ja => '根本', first_name_en => 'Nagi', family_name_en => 'Nemoto', nick => [qw(ねも)], birthday => $self->_datetime_from_date('1999.03.15'), blood_type => 'B', hometown => '茨城県', introduction => "みんなのハートをねも色に染めちゃってもよかっぺか?\n\ぺー!/\n[hometown]出身世間知らずの[age]歳。\nねもこと[name_ja]です。", twitter => 'nemoto_nagi', ); } 1;
catatsuy/acme-2zicon
lib/Acme/2zicon/NemotoNagi.pm
Perl
mit
737
package Crypt::UnixCrypt; use 5.004; # i.e. not tested under earlier versions use strict; use vars qw($VERSION @ISA @EXPORT $OVERRIDE_BUILTIN); $VERSION = '1.0'; require Exporter; @ISA = qw(Exporter); # Don't override built-in crypt() unless forced to to so use Config; @EXPORT = qw(crypt) if !defined $Config{d_crypt} || (defined $OVERRIDE_BUILTIN && $OVERRIDE_BUILTIN); my $ITERATIONS = 16; my @con_salt = ( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, 0x29, 0x2A, 0x2B, 0x2C, 0x2D, 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x3B, 0x3C, 0x3D, 0x3E, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, ); my @shifts2 = ( 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0 ); my @skb0 = ( # for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 0x00000000, 0x00000010, 0x20000000, 0x20000010, 0x00010000, 0x00010010, 0x20010000, 0x20010010, 0x00000800, 0x00000810, 0x20000800, 0x20000810, 0x00010800, 0x00010810, 0x20010800, 0x20010810, 0x00000020, 0x00000030, 0x20000020, 0x20000030, 0x00010020, 0x00010030, 0x20010020, 0x20010030, 0x00000820, 0x00000830, 0x20000820, 0x20000830, 0x00010820, 0x00010830, 0x20010820, 0x20010830, 0x00080000, 0x00080010, 0x20080000, 0x20080010, 0x00090000, 0x00090010, 0x20090000, 0x20090010, 0x00080800, 0x00080810, 0x20080800, 0x20080810, 0x00090800, 0x00090810, 0x20090800, 0x20090810, 0x00080020, 0x00080030, 0x20080020, 0x20080030, 0x00090020, 0x00090030, 0x20090020, 0x20090030, 0x00080820, 0x00080830, 0x20080820, 0x20080830, 0x00090820, 0x00090830, 0x20090820, 0x20090830, ); my @skb1 = ( # for C bits (numbered as per FIPS 46) 7 8 10 11 12 13 0x00000000, 0x02000000, 0x00002000, 0x02002000, 0x00200000, 0x02200000, 0x00202000, 0x02202000, 0x00000004, 0x02000004, 0x00002004, 0x02002004, 0x00200004, 0x02200004, 0x00202004, 0x02202004, 0x00000400, 0x02000400, 0x00002400, 0x02002400, 0x00200400, 0x02200400, 0x00202400, 0x02202400, 0x00000404, 0x02000404, 0x00002404, 0x02002404, 0x00200404, 0x02200404, 0x00202404, 0x02202404, 0x10000000, 0x12000000, 0x10002000, 0x12002000, 0x10200000, 0x12200000, 0x10202000, 0x12202000, 0x10000004, 0x12000004, 0x10002004, 0x12002004, 0x10200004, 0x12200004, 0x10202004, 0x12202004, 0x10000400, 0x12000400, 0x10002400, 0x12002400, 0x10200400, 0x12200400, 0x10202400, 0x12202400, 0x10000404, 0x12000404, 0x10002404, 0x12002404, 0x10200404, 0x12200404, 0x10202404, 0x12202404, ); my @skb2 = ( # for C bits (numbered as per FIPS 46) 14 15 16 17 19 20 0x00000000, 0x00000001, 0x00040000, 0x00040001, 0x01000000, 0x01000001, 0x01040000, 0x01040001, 0x00000002, 0x00000003, 0x00040002, 0x00040003, 0x01000002, 0x01000003, 0x01040002, 0x01040003, 0x00000200, 0x00000201, 0x00040200, 0x00040201, 0x01000200, 0x01000201, 0x01040200, 0x01040201, 0x00000202, 0x00000203, 0x00040202, 0x00040203, 0x01000202, 0x01000203, 0x01040202, 0x01040203, 0x08000000, 0x08000001, 0x08040000, 0x08040001, 0x09000000, 0x09000001, 0x09040000, 0x09040001, 0x08000002, 0x08000003, 0x08040002, 0x08040003, 0x09000002, 0x09000003, 0x09040002, 0x09040003, 0x08000200, 0x08000201, 0x08040200, 0x08040201, 0x09000200, 0x09000201, 0x09040200, 0x09040201, 0x08000202, 0x08000203, 0x08040202, 0x08040203, 0x09000202, 0x09000203, 0x09040202, 0x09040203, ); my @skb3 = ( # for C bits (numbered as per FIPS 46) 21 23 24 26 27 28 0x00000000, 0x00100000, 0x00000100, 0x00100100, 0x00000008, 0x00100008, 0x00000108, 0x00100108, 0x00001000, 0x00101000, 0x00001100, 0x00101100, 0x00001008, 0x00101008, 0x00001108, 0x00101108, 0x04000000, 0x04100000, 0x04000100, 0x04100100, 0x04000008, 0x04100008, 0x04000108, 0x04100108, 0x04001000, 0x04101000, 0x04001100, 0x04101100, 0x04001008, 0x04101008, 0x04001108, 0x04101108, 0x00020000, 0x00120000, 0x00020100, 0x00120100, 0x00020008, 0x00120008, 0x00020108, 0x00120108, 0x00021000, 0x00121000, 0x00021100, 0x00121100, 0x00021008, 0x00121008, 0x00021108, 0x00121108, 0x04020000, 0x04120000, 0x04020100, 0x04120100, 0x04020008, 0x04120008, 0x04020108, 0x04120108, 0x04021000, 0x04121000, 0x04021100, 0x04121100, 0x04021008, 0x04121008, 0x04021108, 0x04121108, ); my @skb4 = ( # for D bits (numbered as per FIPS 46) 1 2 3 4 5 6 0x00000000, 0x10000000, 0x00010000, 0x10010000, 0x00000004, 0x10000004, 0x00010004, 0x10010004, 0x20000000, 0x30000000, 0x20010000, 0x30010000, 0x20000004, 0x30000004, 0x20010004, 0x30010004, 0x00100000, 0x10100000, 0x00110000, 0x10110000, 0x00100004, 0x10100004, 0x00110004, 0x10110004, 0x20100000, 0x30100000, 0x20110000, 0x30110000, 0x20100004, 0x30100004, 0x20110004, 0x30110004, 0x00001000, 0x10001000, 0x00011000, 0x10011000, 0x00001004, 0x10001004, 0x00011004, 0x10011004, 0x20001000, 0x30001000, 0x20011000, 0x30011000, 0x20001004, 0x30001004, 0x20011004, 0x30011004, 0x00101000, 0x10101000, 0x00111000, 0x10111000, 0x00101004, 0x10101004, 0x00111004, 0x10111004, 0x20101000, 0x30101000, 0x20111000, 0x30111000, 0x20101004, 0x30101004, 0x20111004, 0x30111004, ); my @skb5 = ( # for D bits (numbered as per FIPS 46) 8 9 11 12 13 14 0x00000000, 0x08000000, 0x00000008, 0x08000008, 0x00000400, 0x08000400, 0x00000408, 0x08000408, 0x00020000, 0x08020000, 0x00020008, 0x08020008, 0x00020400, 0x08020400, 0x00020408, 0x08020408, 0x00000001, 0x08000001, 0x00000009, 0x08000009, 0x00000401, 0x08000401, 0x00000409, 0x08000409, 0x00020001, 0x08020001, 0x00020009, 0x08020009, 0x00020401, 0x08020401, 0x00020409, 0x08020409, 0x02000000, 0x0A000000, 0x02000008, 0x0A000008, 0x02000400, 0x0A000400, 0x02000408, 0x0A000408, 0x02020000, 0x0A020000, 0x02020008, 0x0A020008, 0x02020400, 0x0A020400, 0x02020408, 0x0A020408, 0x02000001, 0x0A000001, 0x02000009, 0x0A000009, 0x02000401, 0x0A000401, 0x02000409, 0x0A000409, 0x02020001, 0x0A020001, 0x02020009, 0x0A020009, 0x02020401, 0x0A020401, 0x02020409, 0x0A020409, ); my @skb6 = ( # for D bits (numbered as per FIPS 46) 16 17 18 19 20 21 0x00000000, 0x00000100, 0x00080000, 0x00080100, 0x01000000, 0x01000100, 0x01080000, 0x01080100, 0x00000010, 0x00000110, 0x00080010, 0x00080110, 0x01000010, 0x01000110, 0x01080010, 0x01080110, 0x00200000, 0x00200100, 0x00280000, 0x00280100, 0x01200000, 0x01200100, 0x01280000, 0x01280100, 0x00200010, 0x00200110, 0x00280010, 0x00280110, 0x01200010, 0x01200110, 0x01280010, 0x01280110, 0x00000200, 0x00000300, 0x00080200, 0x00080300, 0x01000200, 0x01000300, 0x01080200, 0x01080300, 0x00000210, 0x00000310, 0x00080210, 0x00080310, 0x01000210, 0x01000310, 0x01080210, 0x01080310, 0x00200200, 0x00200300, 0x00280200, 0x00280300, 0x01200200, 0x01200300, 0x01280200, 0x01280300, 0x00200210, 0x00200310, 0x00280210, 0x00280310, 0x01200210, 0x01200310, 0x01280210, 0x01280310, ); my @skb7 = ( # for D bits (numbered as per FIPS 46) 22 23 24 25 27 28 0x00000000, 0x04000000, 0x00040000, 0x04040000, 0x00000002, 0x04000002, 0x00040002, 0x04040002, 0x00002000, 0x04002000, 0x00042000, 0x04042000, 0x00002002, 0x04002002, 0x00042002, 0x04042002, 0x00000020, 0x04000020, 0x00040020, 0x04040020, 0x00000022, 0x04000022, 0x00040022, 0x04040022, 0x00002020, 0x04002020, 0x00042020, 0x04042020, 0x00002022, 0x04002022, 0x00042022, 0x04042022, 0x00000800, 0x04000800, 0x00040800, 0x04040800, 0x00000802, 0x04000802, 0x00040802, 0x04040802, 0x00002800, 0x04002800, 0x00042800, 0x04042800, 0x00002802, 0x04002802, 0x00042802, 0x04042802, 0x00000820, 0x04000820, 0x00040820, 0x04040820, 0x00000822, 0x04000822, 0x00040822, 0x04040822, 0x00002820, 0x04002820, 0x00042820, 0x04042820, 0x00002822, 0x04002822, 0x00042822, 0x04042822, ); my @SPtrans0 = ( # nibble 0 0x00820200, 0x00020000, 0x80800000, 0x80820200, 0x00800000, 0x80020200, 0x80020000, 0x80800000, 0x80020200, 0x00820200, 0x00820000, 0x80000200, 0x80800200, 0x00800000, 0x00000000, 0x80020000, 0x00020000, 0x80000000, 0x00800200, 0x00020200, 0x80820200, 0x00820000, 0x80000200, 0x00800200, 0x80000000, 0x00000200, 0x00020200, 0x80820000, 0x00000200, 0x80800200, 0x80820000, 0x00000000, 0x00000000, 0x80820200, 0x00800200, 0x80020000, 0x00820200, 0x00020000, 0x80000200, 0x00800200, 0x80820000, 0x00000200, 0x00020200, 0x80800000, 0x80020200, 0x80000000, 0x80800000, 0x00820000, 0x80820200, 0x00020200, 0x00820000, 0x80800200, 0x00800000, 0x80000200, 0x80020000, 0x00000000, 0x00020000, 0x00800000, 0x80800200, 0x00820200, 0x80000000, 0x80820000, 0x00000200, 0x80020200, ); my @SPtrans1 = ( # nibble 1 0x10042004, 0x00000000, 0x00042000, 0x10040000, 0x10000004, 0x00002004, 0x10002000, 0x00042000, 0x00002000, 0x10040004, 0x00000004, 0x10002000, 0x00040004, 0x10042000, 0x10040000, 0x00000004, 0x00040000, 0x10002004, 0x10040004, 0x00002000, 0x00042004, 0x10000000, 0x00000000, 0x00040004, 0x10002004, 0x00042004, 0x10042000, 0x10000004, 0x10000000, 0x00040000, 0x00002004, 0x10042004, 0x00040004, 0x10042000, 0x10002000, 0x00042004, 0x10042004, 0x00040004, 0x10000004, 0x00000000, 0x10000000, 0x00002004, 0x00040000, 0x10040004, 0x00002000, 0x10000000, 0x00042004, 0x10002004, 0x10042000, 0x00002000, 0x00000000, 0x10000004, 0x00000004, 0x10042004, 0x00042000, 0x10040000, 0x10040004, 0x00040000, 0x00002004, 0x10002000, 0x10002004, 0x00000004, 0x10040000, 0x00042000, ); my @SPtrans2 = ( # nibble 2 0x41000000, 0x01010040, 0x00000040, 0x41000040, 0x40010000, 0x01000000, 0x41000040, 0x00010040, 0x01000040, 0x00010000, 0x01010000, 0x40000000, 0x41010040, 0x40000040, 0x40000000, 0x41010000, 0x00000000, 0x40010000, 0x01010040, 0x00000040, 0x40000040, 0x41010040, 0x00010000, 0x41000000, 0x41010000, 0x01000040, 0x40010040, 0x01010000, 0x00010040, 0x00000000, 0x01000000, 0x40010040, 0x01010040, 0x00000040, 0x40000000, 0x00010000, 0x40000040, 0x40010000, 0x01010000, 0x41000040, 0x00000000, 0x01010040, 0x00010040, 0x41010000, 0x40010000, 0x01000000, 0x41010040, 0x40000000, 0x40010040, 0x41000000, 0x01000000, 0x41010040, 0x00010000, 0x01000040, 0x41000040, 0x00010040, 0x01000040, 0x00000000, 0x41010000, 0x40000040, 0x41000000, 0x40010040, 0x00000040, 0x01010000, ); my @SPtrans3 = ( # nibble 3 0x00100402, 0x04000400, 0x00000002, 0x04100402, 0x00000000, 0x04100000, 0x04000402, 0x00100002, 0x04100400, 0x04000002, 0x04000000, 0x00000402, 0x04000002, 0x00100402, 0x00100000, 0x04000000, 0x04100002, 0x00100400, 0x00000400, 0x00000002, 0x00100400, 0x04000402, 0x04100000, 0x00000400, 0x00000402, 0x00000000, 0x00100002, 0x04100400, 0x04000400, 0x04100002, 0x04100402, 0x00100000, 0x04100002, 0x00000402, 0x00100000, 0x04000002, 0x00100400, 0x04000400, 0x00000002, 0x04100000, 0x04000402, 0x00000000, 0x00000400, 0x00100002, 0x00000000, 0x04100002, 0x04100400, 0x00000400, 0x04000000, 0x04100402, 0x00100402, 0x00100000, 0x04100402, 0x00000002, 0x04000400, 0x00100402, 0x00100002, 0x00100400, 0x04100000, 0x04000402, 0x00000402, 0x04000000, 0x04000002, 0x04100400, ); my @SPtrans4 = ( # nibble 4 0x02000000, 0x00004000, 0x00000100, 0x02004108, 0x02004008, 0x02000100, 0x00004108, 0x02004000, 0x00004000, 0x00000008, 0x02000008, 0x00004100, 0x02000108, 0x02004008, 0x02004100, 0x00000000, 0x00004100, 0x02000000, 0x00004008, 0x00000108, 0x02000100, 0x00004108, 0x00000000, 0x02000008, 0x00000008, 0x02000108, 0x02004108, 0x00004008, 0x02004000, 0x00000100, 0x00000108, 0x02004100, 0x02004100, 0x02000108, 0x00004008, 0x02004000, 0x00004000, 0x00000008, 0x02000008, 0x02000100, 0x02000000, 0x00004100, 0x02004108, 0x00000000, 0x00004108, 0x02000000, 0x00000100, 0x00004008, 0x02000108, 0x00000100, 0x00000000, 0x02004108, 0x02004008, 0x02004100, 0x00000108, 0x00004000, 0x00004100, 0x02004008, 0x02000100, 0x00000108, 0x00000008, 0x00004108, 0x02004000, 0x02000008, ); my @SPtrans5 = ( # nibble 5 0x20000010, 0x00080010, 0x00000000, 0x20080800, 0x00080010, 0x00000800, 0x20000810, 0x00080000, 0x00000810, 0x20080810, 0x00080800, 0x20000000, 0x20000800, 0x20000010, 0x20080000, 0x00080810, 0x00080000, 0x20000810, 0x20080010, 0x00000000, 0x00000800, 0x00000010, 0x20080800, 0x20080010, 0x20080810, 0x20080000, 0x20000000, 0x00000810, 0x00000010, 0x00080800, 0x00080810, 0x20000800, 0x00000810, 0x20000000, 0x20000800, 0x00080810, 0x20080800, 0x00080010, 0x00000000, 0x20000800, 0x20000000, 0x00000800, 0x20080010, 0x00080000, 0x00080010, 0x20080810, 0x00080800, 0x00000010, 0x20080810, 0x00080800, 0x00080000, 0x20000810, 0x20000010, 0x20080000, 0x00080810, 0x00000000, 0x00000800, 0x20000010, 0x20000810, 0x20080800, 0x20080000, 0x00000810, 0x00000010, 0x20080010, ); my @SPtrans6 = ( # nibble 6 0x00001000, 0x00000080, 0x00400080, 0x00400001, 0x00401081, 0x00001001, 0x00001080, 0x00000000, 0x00400000, 0x00400081, 0x00000081, 0x00401000, 0x00000001, 0x00401080, 0x00401000, 0x00000081, 0x00400081, 0x00001000, 0x00001001, 0x00401081, 0x00000000, 0x00400080, 0x00400001, 0x00001080, 0x00401001, 0x00001081, 0x00401080, 0x00000001, 0x00001081, 0x00401001, 0x00000080, 0x00400000, 0x00001081, 0x00401000, 0x00401001, 0x00000081, 0x00001000, 0x00000080, 0x00400000, 0x00401001, 0x00400081, 0x00001081, 0x00001080, 0x00000000, 0x00000080, 0x00400001, 0x00000001, 0x00400080, 0x00000000, 0x00400081, 0x00400080, 0x00001080, 0x00000081, 0x00001000, 0x00401081, 0x00400000, 0x00401080, 0x00000001, 0x00001001, 0x00401081, 0x00400001, 0x00401080, 0x00401000, 0x00001001, ); my @SPtrans7 = ( # nibble 7 0x08200020, 0x08208000, 0x00008020, 0x00000000, 0x08008000, 0x00200020, 0x08200000, 0x08208020, 0x00000020, 0x08000000, 0x00208000, 0x00008020, 0x00208020, 0x08008020, 0x08000020, 0x08200000, 0x00008000, 0x00208020, 0x00200020, 0x08008000, 0x08208020, 0x08000020, 0x00000000, 0x00208000, 0x08000000, 0x00200000, 0x08008020, 0x08200020, 0x00200000, 0x00008000, 0x08208000, 0x00000020, 0x00200000, 0x00008000, 0x08000020, 0x08208020, 0x00008020, 0x08000000, 0x00000000, 0x00208000, 0x08200020, 0x08008020, 0x08008000, 0x00200020, 0x08208000, 0x00000020, 0x00200020, 0x08008000, 0x08208020, 0x00200000, 0x08200000, 0x08000020, 0x00208000, 0x00008020, 0x08008020, 0x08200000, 0x00000020, 0x08208000, 0x00208020, 0x00000000, 0x08000000, 0x08200020, 0x00008000, 0x00208020 ); my @cov_2char = ( 0x2E, 0x2F, 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A ); sub ushr # only for ints! (mimics the Java >>> operator) { my ($n, $s) = @_; $s &= 0x1f; return( ($n >> $s) & (~0 >> $s) ); } sub toByte { my $value = shift; $value &= 0xff; $value = - ((~$value & 0xff) + 1) if $value & 0x80; return $value; } sub toInt { my $value = shift; $value = - ((~$value & 0xffffffff) + 1) if $value & 0x80000000; return $value; } sub byteToUnsigned # int byteToUnsigned(byte b) { my $value = shift; return( $value >= 0 ? $value : $value + 256 ); } sub fourBytesToInt # int fourBytesToInt(byte b[], int offset) { my ($b, $offset) = @_; my $value; $value = byteToUnsigned($b->[$offset++]); $value |= (byteToUnsigned($b->[$offset++]) << 8); $value |= (byteToUnsigned($b->[$offset++]) << 16); $value |= (byteToUnsigned($b->[$offset++]) << 24); return toInt($value); } sub intToFourBytes # void intToFourBytes(int iValue, byte b[], int offset) { my ($iValue, $b, $offset) = @_; $b->[$offset++] = toByte(ushr($iValue, 0) & 0xff); $b->[$offset++] = toByte(ushr($iValue, 8) & 0xff); $b->[$offset++] = toByte(ushr($iValue,16) & 0xff); $b->[$offset++] = toByte(ushr($iValue,24) & 0xff); return undef; } sub PERM_OP # void PERM_OP(int a, int b, int n, int m, int results[]) { my ($a, $b, $n, $m, $results) = @_; my $t; $t = (ushr($a,$n) ^ $b) & $m; $a ^= $t << $n; $b ^= $t; $results->[0] = toInt($a); $results->[1] = toInt($b); return undef; } sub HPERM_OP # void HPERM_OP(int a, int n, int m) { my ($a, $n, $m) = @_; my $t; $t = (($a << (16 - $n)) ^ $a) & $m; $a = $a ^ $t ^ ushr($t, 16 - $n); return toInt($a); } sub des_set_key # int [] des_set_key(byte key[]) { my ($key) = @_; my @schedule; $#schedule = $ITERATIONS * 2 -1; my $c = fourBytesToInt($key, 0); my $d = fourBytesToInt($key, 4); my @results; $#results = 1; PERM_OP($d, $c, 4, 0x0f0f0f0f, \@results); $d = $results[0]; $c = $results[1]; $c = HPERM_OP($c, -2, 0xcccc0000); $d = HPERM_OP($d, -2, 0xcccc0000); PERM_OP($d, $c, 1, 0x55555555, \@results); $d = $results[0]; $c = $results[1]; PERM_OP($c, $d, 8, 0x00ff00ff, \@results); $c = $results[0]; $d = $results[1]; PERM_OP($d, $c, 1, 0x55555555, \@results); $d = $results[0]; $c = $results[1]; $d = ( (($d & 0x000000ff) << 16) | ($d & 0x0000ff00) | ushr($d & 0x00ff0000, 16) | ushr($c & 0xf0000000, 4)); $c &= 0x0fffffff; my ($s, $t); my ($i, $j); $j = 0; for($i = 0; $i < $ITERATIONS; $i++) { if($shifts2[$i]) { $c = ushr($c, 2) | ($c << 26); $d = ushr($d, 2) | ($d << 26); } else { $c = ushr($c, 1) | ($c << 27); $d = ushr($d, 1) | ($d << 27); } $c &= 0x0fffffff; $d &= 0x0fffffff; $s = $skb0[ ($c ) & 0x3f ]| $skb1[(ushr($c, 6) & 0x03) | (ushr($c, 7) & 0x3c)]| $skb2[(ushr($c,13) & 0x0f) | (ushr($c,14) & 0x30)]| $skb3[(ushr($c,20) & 0x01) | (ushr($c,21) & 0x06) | (ushr($c,22) & 0x38)]; $t = $skb4[ ($d ) & 0x3f ]| $skb5[(ushr($d, 7) & 0x03) | (ushr($d, 8) & 0x3c) ]| $skb6[ ushr($d,15) & 0x3f ]| $skb7[(ushr($d,21) & 0x0f) | (ushr($d,22) & 0x30)]; $schedule[$j++] = ( ($t << 16) | ($s & 0x0000ffff)) & 0xffffffff; $s = (ushr($s, 16) | ($t & 0xffff0000)); $s = ($s << 4) | ushr($s,28); $schedule[$j++] = $s & 0xffffffff; } return \@schedule; } sub D_ENCRYPT # int D_ENCRYPT(int L, int R, int S, int E0, int E1, int s[]) { my ($L, $R, $S, $E0, $E1, $s) = @_; my ($t, $u, $v); $v = $R ^ ushr($R,16); $u = $v & $E0; $v = $v & $E1; $u = ($u ^ ($u << 16)) ^ $R ^ $s->[$S]; $t = ($v ^ ($v << 16)) ^ $R ^ $s->[$S + 1]; $t = ushr($t, 4) | ($t << 28); $L ^= $SPtrans1[ ($t ) & 0x3f] | $SPtrans3[ushr($t, 8) & 0x3f] | $SPtrans5[ushr($t, 16) & 0x3f] | $SPtrans7[ushr($t, 24) & 0x3f] | $SPtrans0[ ($u ) & 0x3f] | $SPtrans2[ushr($u, 8) & 0x3f] | $SPtrans4[ushr($u, 16) & 0x3f] | $SPtrans6[ushr($u, 24) & 0x3f]; return $L; } sub body # int [] body(int schedule[], int Eswap0, int Eswap1) { my ($schedule, $Eswap0, $Eswap1) = @_; my $left = 0; my $right = 0; my $t = 0; my ($i, $j); for($j = 0; $j < 25; $j++) { for($i = 0; $i < $ITERATIONS * 2; $i += 4) { $left = D_ENCRYPT($left, $right, $i, $Eswap0, $Eswap1, $schedule); $right = D_ENCRYPT($right, $left, $i + 2, $Eswap0, $Eswap1, $schedule); } $t = $left; $left = $right; $right = $t; } $t = $right; $right = ushr($left, 1) | ($left << 31); $left = ushr($t , 1) | ($t << 31); $left &= 0xffffffff; $right &= 0xffffffff; my @results; $#results = 1; PERM_OP($right, $left, 1, 0x55555555, \@results); $right = $results[0]; $left = $results[1]; PERM_OP($left, $right, 8, 0x00ff00ff, \@results); $left = $results[0]; $right = $results[1]; PERM_OP($right, $left, 2, 0x33333333, \@results); $right = $results[0]; $left = $results[1]; PERM_OP($left, $right, 16, 0x0000ffff, \@results); $left = $results[0]; $right = $results[1]; PERM_OP($right, $left, 4, 0x0f0f0f0f, \@results); $right = $results[0]; $left = $results[1]; my @out; $#out = 1; $out[0] = $left; $out[1] = $right; return \@out; } sub crypt($$) # String crypt(String plaintext, String salt) { my ($plaintext, $salt) = @_; my $buffer = ''; return $buffer if !defined $salt || $salt eq ''; $salt .= $salt if length $salt < 2; $plaintext = '' if !defined $plaintext; $buffer = substr $salt,0,2; my $Eswap0 = $con_salt[ord(substr $salt,0,1)]; my $Eswap1 = $con_salt[ord(substr $salt,1,1)] << 4; my @key; @key[0..7] = (0) x 8; my @iChar = map { ord($_) << 1 } split(//, $plaintext); my $i; for (my $i = 0; $i < @key && $i < @iChar; $i++) { $key[$i] = toByte($iChar[$i]); } my $schedule = des_set_key(\@key); my $out = body($schedule, $Eswap0, $Eswap1); my @b; $#b = 8; intToFourBytes($out->[0], \@b, 0); intToFourBytes($out->[1], \@b, 4); $b[8] = 0; my ($j, $c, $y, $u); for($i = 2, $y = 0, $u = 0x80; $i < 13; $i++) { for($j = 0, $c = 0; $j < 6; $j++) { $c <<= 1; $c |= 1 if ($b[$y] & $u) != 0; $u >>= 1; if($u == 0) { $y++; $u = 0x80; } } $buffer .= chr($cov_2char[$c]); } return $buffer; } 1; __END__ =head1 NAME Crypt::UnixCrypt - perl-only implementation of the C<crypt> function. =head1 SYNOPSIS use Crypt::UnixCrypt; $hashed = crypt($plaintext,$salt); # always use this module's crypt BEGIN { $Crypt::UnixCrpyt::OVERRIDE_BUILTIN = 1 } use Crypt::UnixCrypt; =head1 DESCRIPTION This module is for all those poor souls whose perl port answers to the use of C<crypt()> with the message `The crypt() function is unimplemented due to excessive paranoia.'. This module won't overload a built-in C<crypt()> unless forced by a true value of the variable C<$Crypt::UnixCrypt::OVERRIDE_BUILTIN>. If you use this module, you probably neither have a built-in C<crypt()> function nor a L<crypt(3)> manpage; so I'll supply the appropriate portions of its description (from my Linux system) here: crypt is the password encryption function. It is based on the Data Encryption Standard algorithm with variations intended (among other things) to discourage use of hardware implementations of a key search. $plaintext is a user's typed password. $salt is a two-character string chosen from the set [a-zA-Z0-9./]. This string is used to perturb the algorithm in one of 4096 different ways. By taking the lowest 7 bit of each character of $plaintext (filling it up to 8 characters with zeros, if needed), a 56-bit key is obtained. This 56-bit key is used to encrypt repeatedly a constant string (usually a string consisting of all zeros). The returned value points to the encrypted password, a series of 13 printable ASCII characters (the first two characters represent the salt itself). Warning: The key space consists of 2**56 equal 7.2e16 possible values. Exhaustive searches of this key space are possible using massively parallel computers. Software, such as crack(1), is available which will search the portion of this key space that is generally used by humans for passwords. Hence, password selection should, at minimum, avoid common words and names. The use of a passwd(1) program that checks for crackable passwords during the selection process is recommended. The DES algorithm itself has a few quirks which make the use of the crypt(3) interface a very poor choice for anything other than password authentication. If you are planning on using the crypt(3) interface for a cryptography project, don't do it: get a good book on encryption and one of the widely available DES libraries. =head1 COPYRIGHT This module is free software; you may redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHORS Written by Martin Vorlaender, martin@radiogaga.harz.de, 11-DEC-1997. Based upon Java source code written by jdumas@zgs.com, which in turn is based upon C source code written by Eric Young, eay@psych.uq.oz.au. =head1 CAVEATS In extreme situations, this function doesn't behave like C<crypt(3)>, e.g. when called with a salt not in [A-Za-z0-9./]{2}. =head1 SEE ALSO perl(1), perlfunc(1), crypt(3).
carlgao/lenga
images/lenny64-peon/usr/share/perl5/Crypt/UnixCrypt.pm
Perl
mit
24,502
#!/usr/bin/perl package Saklient::Cloud::Models::Model_Disk; use strict; use warnings; use Carp; use Error qw(:try); use Data::Dumper; use Saklient::Cloud::Client; use Saklient::Cloud::Models::Model; use Saklient::Cloud::Resources::Resource; use Saklient::Cloud::Resources::Disk; use base qw(Saklient::Cloud::Models::Model); #** @class Saklient::Cloud::Models::Model_Disk # # @brief ディスクを検索・作成するための機能を備えたクラス。 #* #** @method private string _api_path # # @private #* sub _api_path { my $self = shift; my $_argnum = scalar @_; return "/disk"; } #** @method private string _root_key # # @private #* sub _root_key { my $self = shift; my $_argnum = scalar @_; return "Disk"; } #** @method private string _root_key_m # # @private #* sub _root_key_m { my $self = shift; my $_argnum = scalar @_; return "Disks"; } #** @method private string _class_name # # @private #* sub _class_name { my $self = shift; my $_argnum = scalar @_; return "Disk"; } #** @method private Saklient::Cloud::Resources::Resource _create_resource_impl ($obj, $wrapped) # # @private@param {bool} wrapped #* sub _create_resource_impl { my $self = shift; my $_argnum = scalar @_; my $obj = shift; my $wrapped = shift || (0); Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($wrapped, "bool"); return new Saklient::Cloud::Resources::Disk($self->{'_client'}, $obj, $wrapped); } #** @method public Saklient::Cloud::Models::Model_Disk offset ($offset) # # @brief 次に取得するリストの開始オフセットを指定します。 # # @param int $offset オフセット # @retval this #* sub offset { my $self = shift; my $_argnum = scalar @_; my $offset = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($offset, "int"); return $self->_offset($offset); } #** @method public Saklient::Cloud::Models::Model_Disk limit ($count) # # @brief 次に取得するリストの上限レコード数を指定します。 # # @param int $count 上限レコード数 # @retval this #* sub limit { my $self = shift; my $_argnum = scalar @_; my $count = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($count, "int"); return $self->_limit($count); } #** @method public Saklient::Cloud::Models::Model_Disk filter_by ($key, $value, $multiple) # # @brief Web APIのフィルタリング設定を直接指定します。 # # @param string $key キー # @param $value 値 # @param bool $multiple valueに配列を与え、OR条件で完全一致検索する場合にtrueを指定します。通常、valueはスカラ値であいまい検索されます。 #* sub filter_by { my $self = shift; my $_argnum = scalar @_; my $key = shift; my $value = shift; my $multiple = shift || (0); Saklient::Util::validate_arg_count($_argnum, 2); Saklient::Util::validate_type($key, "string"); Saklient::Util::validate_type($multiple, "bool"); return $self->_filter_by($key, $value, $multiple); } #** @method public Saklient::Cloud::Models::Model_Disk reset # # @brief 次のリクエストのために設定されているステートをすべて破棄します。 # # @retval this #* sub reset { my $self = shift; my $_argnum = scalar @_; return $self->_reset(); } #** @method public Saklient::Cloud::Resources::Disk create # # @brief 新規リソース作成用のオブジェクトを用意します。 # # 返り値のオブジェクトにパラメータを設定し、save() を呼ぶことで実際のリソースが作成されます。 # # @retval リソースオブジェクト #* sub create { my $self = shift; my $_argnum = scalar @_; return $self->_create(); } #** @method public Saklient::Cloud::Resources::Disk get_by_id ($id) # # @brief 指定したIDを持つ唯一のリソースを取得します。 # # @param string $id # @retval リソースオブジェクト #* sub get_by_id { my $self = shift; my $_argnum = scalar @_; my $id = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($id, "string"); return $self->_get_by_id($id); } #** @method public Saklient::Cloud::Resources::Disk[] find # # @brief リソースの検索リクエストを実行し、結果をリストで取得します。 # # @retval リソースオブジェクトの配列 #* sub find { my $self = shift; my $_argnum = scalar @_; return $self->_find(); } #** @method public Saklient::Cloud::Models::Model_Disk with_name_like ($name) # # @brief 指定した文字列を名前に含むリソースに絞り込みます。 # # 大文字・小文字は区別されません。 # 半角スペースで区切られた複数の文字列は、それらをすべて含むことが条件とみなされます。 # # @todo Implement test case # @param string $name #* sub with_name_like { my $self = shift; my $_argnum = scalar @_; my $name = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($name, "string"); return $self->_with_name_like($name); } #** @method public Saklient::Cloud::Models::Model_Disk with_tag ($tag) # # @brief 指定したタグを持つリソースに絞り込みます。 # # 複数のタグを指定する場合は withTags() を利用してください。 # # @todo Implement test case # @param string $tag #* sub with_tag { my $self = shift; my $_argnum = scalar @_; my $tag = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($tag, "string"); return $self->_with_tag($tag); } #** @method public Saklient::Cloud::Models::Model_Disk with_tags (@$tags) # # @brief 指定したすべてのタグを持つリソースに絞り込みます。 # # @todo Implement test case # @param string* $tags #* sub with_tags { my $self = shift; my $_argnum = scalar @_; my $tags = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($tags, "ARRAY"); return $self->_with_tags($tags); } #** @method public Saklient::Cloud::Models::Model_Disk with_tag_dnf (@$dnf) # # @brief 指定したDNFに合致するタグを持つリソースに絞り込みます。 # # @todo Implement test case # @param string[]* $dnf #* sub with_tag_dnf { my $self = shift; my $_argnum = scalar @_; my $dnf = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($dnf, "ARRAY"); return $self->_with_tag_dnf($dnf); } #** @method public Saklient::Cloud::Models::Model_Disk sort_by_name ($reverse) # # @brief 名前でソートします。 # # @todo Implement test case # @param bool $reverse #* sub sort_by_name { my $self = shift; my $_argnum = scalar @_; my $reverse = shift || (0); Saklient::Util::validate_type($reverse, "bool"); return $self->_sort_by_name($reverse); } #** @method public Saklient::Cloud::Models::Model_Disk sort_by_connection_order ($reverse) # # @brief null@param {bool} reverse #* sub sort_by_connection_order { my $self = shift; my $_argnum = scalar @_; my $reverse = shift || (0); Saklient::Util::validate_type($reverse, "bool"); return $self->_sort("ConnectionOrder", $reverse); } #** @method public void new ($client) # # @ignore @param {Saklient::Cloud::Client} client #* sub new { my $class = shift; my $self; my $_argnum = scalar @_; my $client = shift; $self = $class->SUPER::new($client); Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($client, "Saklient::Cloud::Client"); return $self; } #** @method public Saklient::Cloud::Models::Model_Disk with_size_gib ($sizeGib) # # @brief 指定したサイズのディスクに絞り込みます。 # # @param int $sizeGib #* sub with_size_gib { my $self = shift; my $_argnum = scalar @_; my $sizeGib = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($sizeGib, "int"); $self->_filter_by("SizeMB", [$sizeGib * 1024]); return $self; } #** @method public Saklient::Cloud::Models::Model_Disk with_server_id ($id) # # @brief 指定したサーバへ接続されているディスクに絞り込みます。 # # @param string $id #* sub with_server_id { my $self = shift; my $_argnum = scalar @_; my $id = shift; Saklient::Util::validate_arg_count($_argnum, 1); Saklient::Util::validate_type($id, "string"); $self->_filter_by("Server.ID", [$id]); return $self; } #** @method public Saklient::Cloud::Models::Model_Disk sort_by_size ($reverse) # # @brief サイズでソートします。 # # @param bool $reverse #* sub sort_by_size { my $self = shift; my $_argnum = scalar @_; my $reverse = shift || (0); Saklient::Util::validate_type($reverse, "bool"); $self->_sort("SizeMB", $reverse); return $self; } 1;
sakura-internet/saklient.perl
lib/Saklient/Cloud/Models/Model_Disk.pm
Perl
mit
8,763
#!/usr/bin/env perl ## NB: This is for testing new annotation features in Transposome, ## so it is probably not of interest to anyone but me. This is also ## not likely to be up to date with Transposome, sorry. use 5.010; use strict; use warnings; use autodie; use Data::Dump; use JSON; use List::MoreUtils qw(first_index); my $usage = "$0 fastadb tophit\n"; my $infile = shift or die $usage; my @top_hits = qw(BEL1_I_AG BEL2_LTR_AG GYPSY1_LTR_AG Copia_7_AG_LTR MTANGA_I GYPSY32_LTR_AG PegasusA DNA_2_AG Clu_15B_AG); my ($repeats, $type_map) = _map_repeats($infile); my (@tops, @annos); for my $top_hit (@top_hits) { my %anno_data = ( filebase => 'CL100', top_hit => $top_hit, top_hit_frac => 0.45, readct => 100000, repeat_map => $repeats, repeat_type => $type_map->{$top_hit} ); my ($top_hit_superfam, $cluster_annot) = blast_to_annotation(\%anno_data); push @annos, $cluster_annot; push @tops, $top_hit_superfam; } dd \@annos; dd \@tops; sub blast_to_annotation { my ($anno_data) = @_; my $repeats = $anno_data->{repeat_map}; my $top_hit_superfam = {}; my $cluster_annot = {}; keys %$repeats; for my $type (keys %$repeats) { if (defined $anno_data->{repeat_type} && $type eq $anno_data->{repeat_type}) { if ($type =~ /(pseudogene|integrated_virus)/) { $anno_data->{'class'} = $1; ($top_hit_superfam, $cluster_annot) = _map_hit_family($repeats->{$type}, $anno_data); } elsif ($type =~ /(satellite)/i) { $anno_data->{'class'} = $1; ($top_hit_superfam, $cluster_annot) = _map_hit_family($repeats->{$type}, $anno_data); } elsif ($type eq 'ltr_retrotransposon') { $anno_data->{'class'} = $type; ($top_hit_superfam, $cluster_annot) = _map_hit_family($repeats->{$type}, $anno_data); } elsif ($type eq 'non-ltr_retrotransposon') { $anno_data->{'class'} = $type; ($top_hit_superfam, $cluster_annot) = _map_hit_family($repeats->{$type}, $anno_data); } elsif ($type eq 'endogenous_retrovirus') { $anno_data->{'class'} = $type; ($top_hit_superfam, $cluster_annot) = _map_hit_family($repeats->{$type}, $anno_data); } elsif ($type eq 'dna_transposon') { $anno_data->{'class'} = $type; ($top_hit_superfam, $cluster_annot) = _map_hit_family($repeats->{$type}, $anno_data); } else { my $unk_fam = q{ }; $anno_data->{'class'} = 'unknown'; ($top_hit_superfam, $cluster_annot) = _map_hit_family($repeats->{$type}, $anno_data); } } } return ($top_hit_superfam, $cluster_annot); } sub _map_te_type { my ($type) = @_; my %map = ( 'ltr_retrotransposon' => 'transposable_element', 'dna_transposon' => 'transposable_element', 'non-ltr_retrotransposon' => 'transposable_element', 'endogenous_retrovirus' => 'transposable_element', 'Satellite' => 'simple_repeat', ); return $map{$type} if exists $map{$type}; return $type if !exists $map{$type}; } sub _map_hit_family { my ($arr_ref, $anno_data) = @_; my (%top_hit_superfam, %cluster_annot); my ($filebase, $top_hit, $top_hit_frac, $readct, $class) = @{$anno_data}{qw(filebase top_hit top_hit_frac readct class)}; my $type = _map_te_type($class); #say STDERR join q{ }, "DEBUG: ", $top_hit, $class, $type; if ($class =~ /pseudogene|integrated_virus/) { my $anno_val = mk_key($filebase, $type, $class, '-', '-', $top_hit, $top_hit_frac); my $anno_key = mk_key($top_hit, $readct); $cluster_annot{$anno_key} = $anno_val; return (undef, \%cluster_annot); } else { for my $superfam_h (@$arr_ref) { for my $superfam (keys %$superfam_h) { for my $family (@{$superfam_h->{$superfam}}) { if ($top_hit =~ /$family/) { #say join q{ }, $filebase, $top_hit, $type, $class, $superfam; my $family_name = _map_family_name($family); $top_hit_superfam{$top_hit} = $superfam; my $anno_key = mk_key($filebase, $type, $class, $superfam, $family_name, $top_hit, $top_hit_frac); #say $anno_key; #my $anno_key = mk_key($top_hit, $readct); $cluster_annot{$readct} = $anno_key; } } } } return (\%top_hit_superfam, \%cluster_annot); } } sub mk_key { return join "~~", map { $_ // " " } @_; } sub mk_vec { my $key = @_; return split /\~\~/, $key; } sub _map_family_name { my ($family) = @_; my $family_name; if ($family =~ /(^RL[GCX][_-][a-zA-Z]*\d*?[_-]?[a-zA-Z-]+?\d*?)/) { $family_name = $1; } elsif ($family =~ /(^D[HT][ACHMT][_-][a-zA-Z]*\d*?)/) { $family_name = $1; } elsif ($family =~ /(^PPP[_-][a-zA-Z]*\d*?)/) { $family_name = $1; } elsif ($family =~ /(^R[IS][LT][_-][a-zA-Z]*\d*?)/) { $family_name = $1; } else { $family_name = $family; } $family_name =~ s/_I// if $family_name =~ /_I_|_I$/; $family_name =~ s/_LTR// if $family_name =~ /_LTR_|_LTR$/; return $family_name; } sub _map_repeats { my ($infile) = @_; my $matches = build_repbase_hash(); my $repeats = map_repeat_types($matches); #dd $repeats and exit; open my $in, '<', $infile; my (%family_map, %type_map, %seen); while (my $line = <$in>) { chomp $line; if ($line =~ /^>/) { $line =~ s/>//; my ($f, $sf, $source) = split /\t/, $line; next unless defined $sf && defined $f; if ($sf =~ /(\s+)/) { $sf =~ s/$1/\_/; } $f =~ s/\s/\_/; push @{$family_map{$sf}}, $f; } } close $in; for my $mapped_sfam (keys %family_map) { my $mapped_sfam_cp = lc($mapped_sfam); for my $mapped_fam (@{$family_map{$mapped_sfam}}) { for my $class (keys %$repeats) { for my $sfamh (@{$repeats->{$class}}) { my $sfam_index = first_index { $_ eq $sfamh } @{$repeats->{$class}}; for my $sfamname (keys %$sfamh) { if (lc($sfamname) eq $mapped_sfam_cp) { push @{$repeats->{$class}[$sfam_index]{$sfamname}}, $mapped_fam; $type_map{$mapped_fam} = $class; #say join q{ }, "DEBUG: ", $mapped_fam, $class; } elsif ($class eq $mapped_sfam_cp) { my $unk_idx = first_index { $_ eq 'unclassified' } @{$repeats->{$class}}; push @{$repeats->{$class}[$unk_idx]{'unclassified'}}, $mapped_fam unless exists $seen{$mapped_fam}; $seen{$mapped_fam} = 1; $type_map{$mapped_fam} = $class; #say join q{ }, "Debug1: ", $mapped_fam, $class; } } } } } } return ($repeats, \%type_map); } sub map_repeat_types { my ($matches) = @_; my %repeats; for my $type (keys %$matches) { if ($type eq 'transposable_element') { for my $tes (keys %{$matches->{$type}}) { if ($tes eq 'dna_transposon') { $repeats{'dna_transposon'} = $matches->{$type}{$tes}; } elsif ($tes eq 'ltr_retrotransposon') { $repeats{'ltr_retrotransposon'} = $matches->{$type}{$tes}; } elsif ($tes eq 'non-ltr_retrotransposon') { $repeats{'non-ltr_retrotransposon'} = $matches->{$type}{$tes}; } elsif ($tes eq 'endogenous_retrovirus') { $repeats{'endogenous_retrovirus'} = $matches->{$type}{$tes}; } } } elsif ($type eq 'simple_repeat') { for my $subtype (keys %{$matches->{$type}}) { if ($subtype eq 'Satellite') { $repeats{'satellite'} = $matches->{$type}{$subtype}; } } } elsif ($type eq 'pseudogene') { $repeats{'pseudogene'} = $matches->{$type}; } elsif ($type eq 'integrated_virus') { $repeats{'integrated_virus'} = $matches->{$type}; } } return \%repeats; } sub build_repbase_hash { my $matches = {}; $matches->{'transposable_element'}{'dna_transposon'} = [{'Mariner/Tc1' => []}, {'hAT' => []}, {'MuDR' => []}, {'EnSpm' => []}, {'piggyBac' => []}, {'P' => []}, {'Merlin' => []}, {'Harbinger' => []}, {'Transib' => []}, {'Novosib' => []}, {'Helitron' => []}, {'Polinton' => []}, {'Kolobok' => []}, {'ISL2EU' => []}, {'Crypton' => []}, {'Sola' => []}, {'Zator' => []}, {'Ginger/1' => []}, {'Ginger2/TDD' => []}, {'Academ' => []}, {'Zisupton' => []}, {'IS3EU' => []}, {'unclassified' => []}]; $matches->{'transposable_element'}{'ltr_retrotransposon'} = [{'Gypsy' => []}, {'Copia' => []}, {'BEL' => []}, {'DIRS' => []}, {'unclassified' => []}]; $matches->{'transposable_element'}{'endogenous_retrovirus'} = [{'ERV1' => []}, {'ERV2' => []}, {'ERV3' => []}, {'Lentivirus' => []}, {'ERV4' => []}, {'unclassified' => []}]; $matches->{'transposable_element'}{'non-ltr_retrotransposon'} = [{'SINE1/7SL' => []}, {'SINE2/tRNA' => []}, {'SINE3/5S' => []},{'SINE4' => []}, {'CRE' => []}, {'NeSL' => []}, {'R4' => []}, {'R2' => []}, {'L1' => []}, {'RTE' => []}, {'I' => []}, {'Jockey' => []}, {'CR1' => []}, {'Rex1' => []}, {'RandI' => []}, {'Penelope' => []}, {'Tx1' => []}, {'RTEX' => []}, {'Crack' => []}, {'Nimb' => []}, {'Proto1' => []}, {'Proto2' => []}, {'RTETP' => []}, {'Hero' => []}, {'L2' => []}, {'Tad1' => []}, {'Loa' => []}, {'Ingi' => []}, {'Outcast' => []}, {'R1' => []}, {'Daphne' => []}, {'L2A' => []}, {'L2B' => []}, {'Ambal' => []}, {'Vingi' => []}, {'Kiri' => []}, {'unclassified' => []}]; $matches->{'simple_repeat'}{'Satellite'} = [{'SAT' => []}, {'MSAT' => []}]; $matches->{'pseudogene'} = [{'rRNA' => []}, {'tRNA' => []}, {'snRNA' => []}]; $matches->{'integrated_virus'} = [{'DNA_Virus' => []}, {'Caulimoviridae' => []}]; return $matches; }
sestaton/sesbio
transposon_annotation/blast_to_annotation.pl
Perl
mit
10,175
#!/usr/bin/perl -w #$w = "áàéèíìóòúùÁÀÉÈÍÌÓÒÚÙçÇñÑâêîôûÂÊÎÔÛäëïöüÄËÏÖÜãẽĩõũÃẼĨÕŨøØæ" ; #$W = "\.\,\;\:\-\«\»\"\'\&\%\+\=\~\$\@\#\|\(\)\<\>\!\¡\?\¿\\[\\]"; $separador = "<\/article>\n" ; $/ = $separador; ########Language dependent################### $LAST = "Véxase tamén|Ligazóns externas|See also|External links|Ver também|Ligações externas|Véase también|Enlaces externos|Voir aussi|Liens externes"; #######Language dependent################### $ext = "png|gif|jpg|pdf"; while ($article = <STDIN>) { #($links) = ($article =~ /<links>([^<>]+)<\/links>/); ##extraction of the wiki section: ($plaintext) = ($article); #if (defined $plaintext) { ##changes to plain text: #remove end: $plaintext =~ s/[=]+[ ]*[\{]*($LAST)[\}]*[ ]*[=]+[\w\W ]+$//; #remove weird patterns: $plaintext =~ s/\{\{pp-[^}]+\}\}//g; #clean [[link]] without | $plaintext =~ s/\[\[([^:^\|^\]]+)\]\]/$1/g; #clean [[link|link]] [[link (..)|link]] $plaintext =~ s/\[\[[^:^\|^\]]+\|([^:^\|^\]]+)\]\]/$1/g; #clean ''expr'' (italize), '''expr''' (bold), '''''expr''''' (it+bold) $plaintext =~ s/['']+([^\']+)['']+/$1/g; #remove other links [[...]]: trash $plaintext =~ s/\[\[[^\]]+\]\][\n]*//g; #clean {{link}} and place with the follwing paragraph plus ":" $plaintext =~ s/\{\{([^:^\|^}]+)\}\}[\n]*/$1: /g; #clean {{link|link}} $plaintext =~ s/\{\{[^:^\|^}]+\|([^:^\|^}]+)\}\}[\n]*/$1: /g; #remove remaining {{links}}: trash $plaintext =~ s/\{\{([^}]+)\}\}//g; #clean titles (place with the following paragraph plus ":") $plaintext =~ s/[=]+[ ]*([^\=]+)[ ]*[=]+[\n]*/$1\: /g; #lists #$plaintext =~ s/[\n ]+\*\*\*\*/ ----/g; #$plaintext =~ s/[\n ]+\*\*\*/ ---/g; #$plaintext =~ s/[\n ]+\*\*/ --/g; #$plaintext =~ s/[\n ]+\*/ -/g; # $plaintext =~ s/[\n]+([\:\#])/ - /g; #$plaintext =~ s/(\-)([^\n\ ])/$1 $2/g; $plaintext =~ s/[\n ]+(\*)/ $1/g; $plaintext =~ s/[\n]+([\:\#])/ * /g; $plaintext =~ s/(\*)([^\n\* ])/$1 $2/g; #change "----" by newline $plaintext =~ s/----[-]*/\n/g; #html tags $plaintext =~ s/<ref[^>]*>[^<^>]+<\/ref>/ /g; $plaintext =~ s/<div[^>]*>[^<^>]+<\/div>/ /g; $plaintext =~ s/<[^>]+>//g; #old versions of links: $plaintext =~ s/\[http:[^\]]+\]//g; #remove user data: $plaintext =~ s/[\~\~\~]+//g; #remove tables and text inside: $plaintext =~ s/[{]*\|[^}]+[}]+//g; #clean comments $plaintext =~ s/<\!\-\-//g; $plaintext =~ s/\-\-\>//g ; #remove empty lists $plaintext =~ s/\*[ ]+\*//g; #remove empty parantheses $plaintext =~ s/\(\)//g; #remove " == " $plaintext =~ s/([ ]+)==[=]*([ ]+)/$1$2/g; ##remove image files (extensions .png, gif,...) $plaintext =~ s/[^ ]+\.($ext)[\|\:]*//ig; $plaintext =~ s/Image:[^\n]+\n/ /g; #######Language dependent################### #ad hoc errors: $plaintext =~ s/(Ficheiro|File|Fichero|Fichier):[^\n]+\n/ /g; #######Language dependent################### print "$plaintext\n"; #} }
jacerong/normalesp
normalesp/datasets/eswiki/CorpusPedia_alfa/lib/Wiki2Plaintext.perl
Perl
mit
3,147
# <@LICENSE> # 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. # </@LICENSE> =head1 NAME Mail::SpamAssassin::Conf - SpamAssassin configuration file =head1 SYNOPSIS # a comment rewrite_header Subject *****SPAM***** full PARA_A_2_C_OF_1618 /Paragraph .a.{0,10}2.{0,10}C. of S. 1618/i describe PARA_A_2_C_OF_1618 Claims compliance with senate bill 1618 header FROM_HAS_MIXED_NUMS From =~ /\d+[a-z]+\d+\S*@/i describe FROM_HAS_MIXED_NUMS From: contains numbers mixed in with letters score A_HREF_TO_REMOVE 2.0 lang es describe FROM_FORGED_HOTMAIL Forzado From: simula ser de hotmail.com lang pt_BR report O programa detetor de Spam ZOE [...] =head1 DESCRIPTION SpamAssassin is configured using traditional UNIX-style configuration files, loaded from the C</usr/share/spamassassin> and C</etc/mail/spamassassin> directories. The following web page lists the most important configuration settings used to configure SpamAssassin; novices are encouraged to read it first: http://wiki.apache.org/spamassassin/ImportantInitialConfigItems =head1 FILE FORMAT The C<#> character starts a comment, which continues until end of line. B<NOTE:> if the C<#> character is to be used as part of a rule or configuration option, it must be escaped with a backslash. i.e.: C<\#> Whitespace in the files is not significant, but please note that starting a line with whitespace is deprecated, as we reserve its use for multi-line rule definitions, at some point in the future. Currently, each rule or configuration setting must fit on one-line; multi-line settings are not supported yet. File and directory paths can use C<~> to refer to the user's home directory, but no other shell-style path extensions such as globing or C<~user/> are supported. Where appropriate below, default values are listed in parentheses. =head1 USER PREFERENCES The following options can be used in both site-wide (C<local.cf>) and user-specific (C<user_prefs>) configuration files to customize how SpamAssassin handles incoming email messages. =cut package Mail::SpamAssassin::Conf; use strict; use warnings; use bytes; use re 'taint'; use Mail::SpamAssassin::Util; use Mail::SpamAssassin::NetSet; use Mail::SpamAssassin::Constants qw(:sa :ip); use Mail::SpamAssassin::Conf::Parser; use Mail::SpamAssassin::Logger; use Mail::SpamAssassin::Util::TieOneStringHash; use Mail::SpamAssassin::Util qw(untaint_var); use File::Spec; use vars qw{ @ISA $CONF_TYPE_STRING $CONF_TYPE_BOOL $CONF_TYPE_NUMERIC $CONF_TYPE_HASH_KEY_VALUE $CONF_TYPE_ADDRLIST $CONF_TYPE_TEMPLATE $CONF_TYPE_STRINGLIST $CONF_TYPE_IPADDRLIST $CONF_TYPE_DURATION $CONF_TYPE_NOARGS $MISSING_REQUIRED_VALUE $INVALID_VALUE $INVALID_HEADER_FIELD_NAME @MIGRATED_SETTINGS $COLLECT_REGRESSION_TESTS $TYPE_HEAD_TESTS $TYPE_HEAD_EVALS $TYPE_BODY_TESTS $TYPE_BODY_EVALS $TYPE_FULL_TESTS $TYPE_FULL_EVALS $TYPE_RAWBODY_TESTS $TYPE_RAWBODY_EVALS $TYPE_URI_TESTS $TYPE_URI_EVALS $TYPE_META_TESTS $TYPE_RBL_EVALS $TYPE_EMPTY_TESTS }; @ISA = qw(); # odd => eval test. Not constants so they can be shared with Parser # TODO: move to Constants.pm? $TYPE_HEAD_TESTS = 0x0008; $TYPE_HEAD_EVALS = 0x0009; $TYPE_BODY_TESTS = 0x000a; $TYPE_BODY_EVALS = 0x000b; $TYPE_FULL_TESTS = 0x000c; $TYPE_FULL_EVALS = 0x000d; $TYPE_RAWBODY_TESTS = 0x000e; $TYPE_RAWBODY_EVALS = 0x000f; $TYPE_URI_TESTS = 0x0010; $TYPE_URI_EVALS = 0x0011; $TYPE_META_TESTS = 0x0012; $TYPE_RBL_EVALS = 0x0013; $TYPE_EMPTY_TESTS = 0x0014; my @rule_types = ("body_tests", "uri_tests", "uri_evals", "head_tests", "head_evals", "body_evals", "full_tests", "full_evals", "rawbody_tests", "rawbody_evals", "rbl_evals", "meta_tests"); #Removed $VERSION per BUG 6422 #$VERSION = 'bogus'; # avoid CPAN.pm picking up version strings later # these are variables instead of constants so that other classes can # access them; if they're constants, they'd have to go in Constants.pm # TODO: move to Constants.pm? $CONF_TYPE_STRING = 1; $CONF_TYPE_BOOL = 2; $CONF_TYPE_NUMERIC = 3; $CONF_TYPE_HASH_KEY_VALUE = 4; $CONF_TYPE_ADDRLIST = 5; $CONF_TYPE_TEMPLATE = 6; $CONF_TYPE_NOARGS = 7; $CONF_TYPE_STRINGLIST = 8; $CONF_TYPE_IPADDRLIST = 9; $CONF_TYPE_DURATION = 10; $MISSING_REQUIRED_VALUE = '-99999999999999'; # string expected by parser $INVALID_VALUE = '-99999999999998'; $INVALID_HEADER_FIELD_NAME = '-99999999999997'; # set to "1" by the test suite code, to record regression tests # $Mail::SpamAssassin::Conf::COLLECT_REGRESSION_TESTS = 1; # search for "sub new {" to find the start of the code ########################################################################### sub set_default_commands { my($self) = @_; # see "perldoc Mail::SpamAssassin::Conf::Parser" for details on this fmt. # push each config item like this, to avoid a POD bug; it can't just accept # ( { ... }, { ... }, { ...} ) otherwise POD parsing dies. my @cmds; =head2 SCORING OPTIONS =over 4 =item required_score n.nn (default: 5) Set the score required before a mail is considered spam. C<n.nn> can be an integer or a real number. 5.0 is the default setting, and is quite aggressive; it would be suitable for a single-user setup, but if you're an ISP installing SpamAssassin, you should probably set the default to be more conservative, like 8.0 or 10.0. It is not recommended to automatically delete or discard messages marked as spam, as your users B<will> complain, but if you choose to do so, only delete messages with an exceptionally high score such as 15.0 or higher. This option was previously known as C<required_hits> and that name is still accepted, but is deprecated. =cut push (@cmds, { setting => 'required_score', aliases => ['required_hits'], # backward compatible default => 5, type => $CONF_TYPE_NUMERIC, }); =item score SYMBOLIC_TEST_NAME n.nn [ n.nn n.nn n.nn ] Assign scores (the number of points for a hit) to a given test. Scores can be positive or negative real numbers or integers. C<SYMBOLIC_TEST_NAME> is the symbolic name used by SpamAssassin for that test; for example, 'FROM_ENDS_IN_NUMS'. If only one valid score is listed, then that score is always used for a test. If four valid scores are listed, then the score that is used depends on how SpamAssassin is being used. The first score is used when both Bayes and network tests are disabled (score set 0). The second score is used when Bayes is disabled, but network tests are enabled (score set 1). The third score is used when Bayes is enabled and network tests are disabled (score set 2). The fourth score is used when Bayes is enabled and network tests are enabled (score set 3). Setting a rule's score to 0 will disable that rule from running. If any of the score values are surrounded by parenthesis '()', then all of the scores in the line are considered to be relative to the already set score. ie: '(3)' means increase the score for this rule by 3 points in all score sets. '(3) (0) (3) (0)' means increase the score for this rule by 3 in score sets 0 and 2 only. If no score is given for a test by the end of the configuration, a default score is assigned: a score of 1.0 is used for all tests, except those whose names begin with 'T_' (this is used to indicate a rule in testing) which receive 0.01. Note that test names which begin with '__' are indirect rules used to compose meta-match rules and can also act as prerequisites to other rules. They are not scored or listed in the 'tests hit' reports, but assigning a score of 0 to an indirect rule will disable it from running. =cut push (@cmds, { setting => 'score', is_frequent => 1, code => sub { my ($self, $key, $value, $line) = @_; my($rule, @scores) = split(/\s+/, $value); unless (defined $value && $value !~ /^$/ && (scalar @scores == 1 || scalar @scores == 4)) { info("config: score: requires a symbolic rule name and 1 or 4 scores"); return $MISSING_REQUIRED_VALUE; } # Figure out if we're doing relative scores, remove the parens if we are my $relative = 0; foreach (@scores) { local ($1); if (s/^\((-?\d+(?:\.\d+)?)\)$/$1/) { $relative = 1; } unless (/^-?\d+(?:\.\d+)?$/) { info("config: score: the non-numeric score ($_) is not valid, " . "a numeric score is required"); return $INVALID_VALUE; } } if ($relative && !exists $self->{scoreset}->[0]->{$rule}) { info("config: score: relative score without previous setting in " . "configuration"); return $INVALID_VALUE; } # If we're only passed 1 score, copy it to the other scoresets if (@scores) { if (@scores != 4) { @scores = ( $scores[0], $scores[0], $scores[0], $scores[0] ); } # Set the actual scoreset values appropriately for my $index (0..3) { my $score = $relative ? $self->{scoreset}->[$index]->{$rule} + $scores[$index] : $scores[$index]; $self->{scoreset}->[$index]->{$rule} = $score + 0.0; } } } }); =back =head2 WHITELIST AND BLACKLIST OPTIONS =over 4 =item whitelist_from user@example.com Used to whitelist sender addresses which send mail that is often tagged (incorrectly) as spam. Use of this setting is not recommended, since it blindly trusts the message, which is routinely and easily forged by spammers and phish senders. The recommended solution is to instead use C<whitelist_auth> or other authenticated whitelisting methods, or C<whitelist_from_rcvd>. Whitelist and blacklist addresses are now file-glob-style patterns, so C<friend@somewhere.com>, C<*@isp.com>, or C<*.domain.net> will all work. Specifically, C<*> and C<?> are allowed, but all other metacharacters are not. Regular expressions are not used for security reasons. Matching is case-insensitive. Multiple addresses per line, separated by spaces, is OK. Multiple C<whitelist_from> lines are also OK. The headers checked for whitelist addresses are as follows: if C<Resent-From> is set, use that; otherwise check all addresses taken from the following set of headers: Envelope-Sender Resent-Sender X-Envelope-From From In addition, the "envelope sender" data, taken from the SMTP envelope data where this is available, is looked up. See C<envelope_sender_header>. e.g. whitelist_from joe@example.com fred@example.com whitelist_from *@example.com =cut push (@cmds, { setting => 'whitelist_from', type => $CONF_TYPE_ADDRLIST, }); =item unwhitelist_from user@example.com Used to override a default whitelist_from entry, so for example a distribution whitelist_from can be overridden in a local.cf file, or an individual user can override a whitelist_from entry in their own C<user_prefs> file. The specified email address has to match exactly (although case-insensitively) the address previously used in a whitelist_from line, which implies that a wildcard only matches literally the same wildcard (not 'any' address). e.g. unwhitelist_from joe@example.com fred@example.com unwhitelist_from *@example.com =cut push (@cmds, { command => 'unwhitelist_from', setting => 'whitelist_from', type => $CONF_TYPE_ADDRLIST, code => \&Mail::SpamAssassin::Conf::Parser::remove_addrlist_value }); =item whitelist_from_rcvd addr@lists.sourceforge.net sourceforge.net Works similarly to whitelist_from, except that in addition to matching a sender address, a relay's rDNS name or its IP address must match too for the whitelisting rule to fire. The first parameter is a sender's e-mail address to whitelist, and the second is a string to match the relay's rDNS, or its IP address. Matching is case-insensitive. This second parameter is matched against the TCP-info information field as provided in a FROM clause of a trace information (i.e. the Received header field, see RFC 5321). Only the Received header fields inserted by trusted hosts are considered. This parameter can either be a full hostname, or the domain component of that hostname, or an IP address in square brackets. The reverse DNS lookup is done by a MTA, not by SpamAssassin. In case of an IPv4 address in brackets, it may be truncated on classful boundaries to cover whole subnets, e.g. C<[10.1.2.3]>, C<[10.1.2]>, C<[10.1]>, C<[10]>. CIDR notation is currently not supported, nor is IPv6. The matching on IP address is mainly provided to cover rare cases where whitelisting of a sending MTA is desired which does not have a correct reverse DNS configured. In other words, if the host that connected to your MX had an IP address 192.0.2.123 that mapped to 'sendinghost.example.org', you should specify C<sendinghost.example.org>, or C<example.org>, or C<[192.0.2.123]> or C<[192.0.2]> here. Note that this requires that C<internal_networks> be correct. For simple cases, it will be, but for a complex network you may get better results by setting that parameter. It also requires that your mail exchangers be configured to perform DNS reverse lookups on the connecting host's IP address, and to record the result in the generated Received header field according to RFC 5321. e.g. whitelist_from_rcvd joe@example.com example.com whitelist_from_rcvd *@axkit.org sergeant.org whitelist_from_rcvd *@axkit.org [192.0.2.123] =item def_whitelist_from_rcvd addr@lists.sourceforge.net sourceforge.net Same as C<whitelist_from_rcvd>, but used for the default whitelist entries in the SpamAssassin distribution. The whitelist score is lower, because these are often targets for spammer spoofing. =cut push (@cmds, { setting => 'whitelist_from_rcvd', type => $CONF_TYPE_ADDRLIST, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } unless ($value =~ /^\S+\s+\S+$/) { return $INVALID_VALUE; } $self->{parser}->add_to_addrlist_rcvd ('whitelist_from_rcvd', split(/\s+/, $value)); } }); push (@cmds, { setting => 'def_whitelist_from_rcvd', type => $CONF_TYPE_ADDRLIST, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } unless ($value =~ /^\S+\s+\S+$/) { return $INVALID_VALUE; } $self->{parser}->add_to_addrlist_rcvd ('def_whitelist_from_rcvd', split(/\s+/, $value)); } }); =item whitelist_allows_relays user@example.com Specify addresses which are in C<whitelist_from_rcvd> that sometimes send through a mail relay other than the listed ones. By default mail with a From address that is in C<whitelist_from_rcvd> that does not match the relay will trigger a forgery rule. Including the address in C<whitelist_allows_relay> prevents that. Whitelist and blacklist addresses are now file-glob-style patterns, so C<friend@somewhere.com>, C<*@isp.com>, or C<*.domain.net> will all work. Specifically, C<*> and C<?> are allowed, but all other metacharacters are not. Regular expressions are not used for security reasons. Matching is case-insensitive. Multiple addresses per line, separated by spaces, is OK. Multiple C<whitelist_allows_relays> lines are also OK. The specified email address does not have to match exactly the address previously used in a whitelist_from_rcvd line as it is compared to the address in the header. e.g. whitelist_allows_relays joe@example.com fred@example.com whitelist_allows_relays *@example.com =cut push (@cmds, { setting => 'whitelist_allows_relays', type => $CONF_TYPE_ADDRLIST, }); =item unwhitelist_from_rcvd user@example.com Used to override a default whitelist_from_rcvd entry, so for example a distribution whitelist_from_rcvd can be overridden in a local.cf file, or an individual user can override a whitelist_from_rcvd entry in their own C<user_prefs> file. The specified email address has to match exactly the address previously used in a whitelist_from_rcvd line. e.g. unwhitelist_from_rcvd joe@example.com fred@example.com unwhitelist_from_rcvd *@axkit.org =cut push (@cmds, { setting => 'unwhitelist_from_rcvd', type => $CONF_TYPE_ADDRLIST, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } unless ($value =~ /^(?:\S+(?:\s+\S+)*)$/) { return $INVALID_VALUE; } $self->{parser}->remove_from_addrlist_rcvd('whitelist_from_rcvd', split (/\s+/, $value)); $self->{parser}->remove_from_addrlist_rcvd('def_whitelist_from_rcvd', split (/\s+/, $value)); } }); =item blacklist_from user@example.com Used to specify addresses which send mail that is often tagged (incorrectly) as non-spam, but which the user doesn't want. Same format as C<whitelist_from>. =cut push (@cmds, { setting => 'blacklist_from', type => $CONF_TYPE_ADDRLIST, }); =item unblacklist_from user@example.com Used to override a default blacklist_from entry, so for example a distribution blacklist_from can be overridden in a local.cf file, or an individual user can override a blacklist_from entry in their own C<user_prefs> file. The specified email address has to match exactly the address previously used in a blacklist_from line. e.g. unblacklist_from joe@example.com fred@example.com unblacklist_from *@spammer.com =cut push (@cmds, { command => 'unblacklist_from', setting => 'blacklist_from', type => $CONF_TYPE_ADDRLIST, code => \&Mail::SpamAssassin::Conf::Parser::remove_addrlist_value }); =item whitelist_to user@example.com If the given address appears as a recipient in the message headers (Resent-To, To, Cc, obvious envelope recipient, etc.) the mail will be whitelisted. Useful if you're deploying SpamAssassin system-wide, and don't want some users to have their mail filtered. Same format as C<whitelist_from>. There are three levels of To-whitelisting, C<whitelist_to>, C<more_spam_to> and C<all_spam_to>. Users in the first level may still get some spammish mails blocked, but users in C<all_spam_to> should never get mail blocked. The headers checked for whitelist addresses are as follows: if C<Resent-To> or C<Resent-Cc> are set, use those; otherwise check all addresses taken from the following set of headers: To Cc Apparently-To Delivered-To Envelope-Recipients Apparently-Resent-To X-Envelope-To Envelope-To X-Delivered-To X-Original-To X-Rcpt-To X-Real-To =item more_spam_to user@example.com See above. =item all_spam_to user@example.com See above. =cut push (@cmds, { setting => 'whitelist_to', type => $CONF_TYPE_ADDRLIST, }); push (@cmds, { setting => 'more_spam_to', type => $CONF_TYPE_ADDRLIST, }); push (@cmds, { setting => 'all_spam_to', type => $CONF_TYPE_ADDRLIST, }); =item blacklist_to user@example.com If the given address appears as a recipient in the message headers (Resent-To, To, Cc, obvious envelope recipient, etc.) the mail will be blacklisted. Same format as C<blacklist_from>. =cut push (@cmds, { setting => 'blacklist_to', type => $CONF_TYPE_ADDRLIST, }); =item whitelist_auth user@example.com Used to specify addresses which send mail that is often tagged (incorrectly) as spam. This is different from C<whitelist_from> and C<whitelist_from_rcvd> in that it first verifies that the message was sent by an authorized sender for the address, before whitelisting. Authorization is performed using one of the installed sender-authorization schemes: SPF (using C<Mail::SpamAssassin::Plugin::SPF>), or DKIM (using C<Mail::SpamAssassin::Plugin::DKIM>). Note that those plugins must be active, and working, for this to operate. Using C<whitelist_auth> is roughly equivalent to specifying duplicate C<whitelist_from_spf>, C<whitelist_from_dk>, and C<whitelist_from_dkim> lines for each of the addresses specified. e.g. whitelist_auth joe@example.com fred@example.com whitelist_auth *@example.com =item def_whitelist_auth user@example.com Same as C<whitelist_auth>, but used for the default whitelist entries in the SpamAssassin distribution. The whitelist score is lower, because these are often targets for spammer spoofing. =cut push (@cmds, { setting => 'whitelist_auth', type => $CONF_TYPE_ADDRLIST, }); push (@cmds, { setting => 'def_whitelist_auth', type => $CONF_TYPE_ADDRLIST, }); =item unwhitelist_auth user@example.com Used to override a C<whitelist_auth> entry. The specified email address has to match exactly the address previously used in a C<whitelist_auth> line. e.g. unwhitelist_auth joe@example.com fred@example.com unwhitelist_auth *@example.com =cut push (@cmds, { command => 'unwhitelist_auth', setting => 'whitelist_auth', type => $CONF_TYPE_ADDRLIST, code => \&Mail::SpamAssassin::Conf::Parser::remove_addrlist_value }); =item enlist_uri_host (listname) host ... Adds one or more host names or domain names to a named list of URI domains. The named list can then be consulted through a check_uri_host_listed() eval rule implemented by the WLBLEval plugin, which takes the list name as an argument. Parenthesis around a list name are literal - a required syntax. Host names may optionally be prefixed by an exclamantion mark '!', which produces false as a result if this entry matches. This makes it easier to exclude some subdomains when their superdomain is listed, for example: enlist_uri_host (MYLIST) !sub1.example.com !sub2.example.com example.com No wildcards are supported, but subdomains do match implicitly. Lists are independent. Search for each named list starts by looking up the full hostname first, then leading fields are progressively stripped off (e.g.: sub.example.com, example.com, com) until a match is found or we run out of fields. The first matching entry (the most specific) determines if a lookup yielded a true (no '!' prefix) or a false (with a '!' prefix) result. If an URL found in a message contains an IP address in place of a host name, the given list must specify the exact same IP address (instead of a host name) in order to match. Use the delist_uri_host directive to neutralize previous enlist_uri_host settings. Enlisting to lists named 'BLACK' and 'WHITE' have their shorthand directives blacklist_uri_host and whitelist_uri_host and corresponding default rules, but the names 'BLACK' and 'WHITE' are otherwise not special or reserved. =cut push (@cmds, { command => 'enlist_uri_host', setting => 'uri_host_lists', type => $CONF_TYPE_ADDRLIST, code => sub { my($conf, $key, $value, $line) = @_; local($1,$2); if ($value !~ /^ \( (.*?) \) \s+ (.*) \z/sx) { return $MISSING_REQUIRED_VALUE; } my $listname = $1; # corresponds to arg in check_uri_host_in_wblist() # note: must not factor out dereferencing, as otherwise # subhashes would spring up in a copy and be lost foreach my $host ( split(' ', lc $2) ) { my $v = $host =~ s/^!// ? 0 : 1; $conf->{uri_host_lists}{$listname}{$host} = $v; } } }); =item delist_uri_host [ (listname) ] host ... Removes one or more specified host names from a named list of URI domains. Removing an unlisted name is ignored (is not an error). Listname is optional, if specified then just the named list is affected, otherwise hosts are removed from all URI host lists created so far. Parenthesis around a list name are a required syntax. Note that directives in configuration files are processed in sequence, the delist_uri_host only applies to previously listed entries and has no effect on enlisted entries in yet-to-be-processed directives. For convenience (similarity to the enlist_uri_host directive) hostnames may be prefixed by a an exclamation mark, which is stripped off from each name and has no meaning here. =cut push (@cmds, { command => 'delist_uri_host', setting => 'uri_host_lists', type => $CONF_TYPE_ADDRLIST, code => sub { my($conf, $key, $value, $line) = @_; local($1,$2); if ($value !~ /^ (?: \( (.*?) \) \s+ )? (.*) \z/sx) { return $MISSING_REQUIRED_VALUE; } my @listnames = defined $1 ? $1 : keys %{$conf->{uri_host_lists}}; my @args = split(' ', lc $2); foreach my $listname (@listnames) { foreach my $host (@args) { my $v = $host =~ s/^!// ? 0 : 1; delete $conf->{uri_host_lists}{$listname}{$host}; } } } }); =item blacklist_uri_host host-or-domain ... Is a shorthand for a directive: enlist_uri_host (BLACK) host ... Please see directives enlist_uri_host and delist_uri_host for details. =cut push (@cmds, { command => 'blacklist_uri_host', setting => 'uri_host_lists', type => $CONF_TYPE_ADDRLIST, code => sub { my($conf, $key, $value, $line) = @_; foreach my $host ( split(' ', lc $value) ) { my $v = $host =~ s/^!// ? 0 : 1; $conf->{uri_host_lists}{'BLACK'}{$host} = $v; } } }); =item whitelist_uri_host host-or-domain ... Is a shorthand for a directive: enlist_uri_host (BLACK) host ... Please see directives enlist_uri_host and delist_uri_host for details. =cut push (@cmds, { command => 'whitelist_uri_host', setting => 'uri_host_lists', type => $CONF_TYPE_ADDRLIST, code => sub { my($conf, $key, $value, $line) = @_; foreach my $host ( split(' ', lc $value) ) { my $v = $host =~ s/^!// ? 0 : 1; $conf->{uri_host_lists}{'WHITE'}{$host} = $v; } } }); =back =head2 BASIC MESSAGE TAGGING OPTIONS =over 4 =item rewrite_header { subject | from | to } STRING By default, suspected spam messages will not have the C<Subject>, C<From> or C<To> lines tagged to indicate spam. By setting this option, the header will be tagged with C<STRING> to indicate that a message is spam. For the From or To headers, this will take the form of an RFC 2822 comment following the address in parantheses. For the Subject header, this will be prepended to the original subject. Note that you should only use the _REQD_ and _SCORE_ tags when rewriting the Subject header if C<report_safe> is 0. Otherwise, you may not be able to remove the SpamAssassin markup via the normal methods. More information about tags is explained below in the B<TEMPLATE TAGS> section. Parentheses are not permitted in STRING if rewriting the From or To headers. (They will be converted to square brackets.) If C<rewrite_header subject> is used, but the message being rewritten does not already contain a C<Subject> header, one will be created. A null value for C<STRING> will remove any existing rewrite for the specified header. =cut push (@cmds, { setting => 'rewrite_header', type => $CONF_TYPE_HASH_KEY_VALUE, code => sub { my ($self, $key, $value, $line) = @_; my($hdr, $string) = split(/\s+/, $value, 2); $hdr = ucfirst(lc($hdr)); if ($hdr =~ /^$/) { return $MISSING_REQUIRED_VALUE; } # We only deal with From, Subject, and To ... elsif ($hdr =~ /^(?:From|Subject|To)$/) { unless (defined $string && $string =~ /\S/) { delete $self->{rewrite_header}->{$hdr}; return; } if ($hdr ne 'Subject') { $string =~ tr/()/[]/; } $self->{rewrite_header}->{$hdr} = $string; return; } else { # if we get here, note the issue, then we'll fail through for an error. info("config: rewrite_header: ignoring $hdr, not From, Subject, or To"); return $INVALID_VALUE; } } }); =item add_header { spam | ham | all } header_name string Customized headers can be added to the specified type of messages (spam, ham, or "all" to add to either). All headers begin with C<X-Spam-> (so a C<header_name> Foo will generate a header called X-Spam-Foo). header_name is restricted to the character set [A-Za-z0-9_-]. The order of C<add_header> configuration options is preserved, inserted headers will follow this order of declarations. When combining C<add_header> with C<clear_headers> and C<remove_header>, keep in mind that C<add_header> appends a new header to the current list, after first removing any existing header fields of the same name. Note also that C<add_header>, C<clear_headers> and C<remove_header> may appear in multiple .cf files, which are interpreted in alphabetic order. C<string> can contain tags as explained below in the B<TEMPLATE TAGS> section. You can also use C<\n> and C<\t> in the header to add newlines and tabulators as desired. A backslash has to be written as \\, any other escaped chars will be silently removed. All headers will be folded if fold_headers is set to C<1>. Note: Manually adding newlines via C<\n> disables any further automatic wrapping (ie: long header lines are possible). The lines will still be properly folded (marked as continuing) though. You can customize existing headers with B<add_header> (only the specified subset of messages will be changed). See also C<clear_headers> and C<remove_header> for removing headers. Here are some examples (these are the defaults, note that Checker-Version can not be changed or removed): add_header spam Flag _YESNOCAPS_ add_header all Status _YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ autolearn=_AUTOLEARN_ version=_VERSION_ add_header all Level _STARS(*)_ add_header all Checker-Version SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_ =cut push (@cmds, { setting => 'add_header', code => sub { my ($self, $key, $value, $line) = @_; local ($1,$2,$3); if ($value !~ /^(ham|spam|all)\s+([A-Za-z0-9_-]+)\s+(.*?)\s*$/) { return $INVALID_VALUE; } my ($type, $name, $hline) = ($1, $2, $3); if ($hline =~ /^"(.*)"$/) { $hline = $1; } my @line = split( /\\\\/, # split at double backslashes, $hline."\n" # newline needed to make trailing backslashes work ); foreach (@line) { s/\\t/\t/g; # expand tabs s/\\n/\n/g; # expand newlines s/\\.//g; # purge all other escapes }; $hline = join("\\", @line); chop($hline); # remove dummy newline again if (($type eq "ham") || ($type eq "all")) { $self->{headers_ham} = [ grep { lc($_->[0]) ne lc($name) } @{$self->{headers_ham}} ]; push(@{$self->{headers_ham}}, [$name, $hline]); } if (($type eq "spam") || ($type eq "all")) { $self->{headers_spam} = [ grep { lc($_->[0]) ne lc($name) } @{$self->{headers_spam}} ]; push(@{$self->{headers_spam}}, [$name, $hline]); } } }); =item remove_header { spam | ham | all } header_name Headers can be removed from the specified type of messages (spam, ham, or "all" to remove from either). All headers begin with C<X-Spam-> (so C<header_name> will be appended to C<X-Spam->). See also C<clear_headers> for removing all the headers at once. Note that B<X-Spam-Checker-Version> is not removable because the version information is needed by mail administrators and developers to debug problems. Without at least one header, it might not even be possible to determine that SpamAssassin is running. =cut push (@cmds, { setting => 'remove_header', code => sub { my ($self, $key, $value, $line) = @_; local ($1,$2); if ($value !~ /^(ham|spam|all)\s+([A-Za-z0-9_-]+)\s*$/) { return $INVALID_VALUE; } my ($type, $name) = ($1, $2); return if ( $name eq "Checker-Version" ); $name = lc($name); if (($type eq "ham") || ($type eq "all")) { $self->{headers_ham} = [ grep { lc($_->[0]) ne $name } @{$self->{headers_ham}} ]; } if (($type eq "spam") || ($type eq "all")) { $self->{headers_spam} = [ grep { lc($_->[0]) ne $name } @{$self->{headers_spam}} ]; } } }); =item clear_headers Clear the list of headers to be added to messages. You may use this before any B<add_header> options to prevent the default headers from being added to the message. C<add_header>, C<clear_headers> and C<remove_header> may appear in multiple .cf files, which are interpreted in alphabetic order, so C<clear_headers> in a later file will remove all added headers from previously interpreted configuration files, which may or may not be desired. Note that B<X-Spam-Checker-Version> is not removable because the version information is needed by mail administrators and developers to debug problems. Without at least one header, it might not even be possible to determine that SpamAssassin is running. =cut push (@cmds, { setting => 'clear_headers', type => $CONF_TYPE_NOARGS, code => sub { my ($self, $key, $value, $line) = @_; unless (!defined $value || $value eq '') { return $INVALID_VALUE; } my @h = grep { lc($_->[0]) eq "checker-version" } @{$self->{headers_ham}}; $self->{headers_ham} = !@h ? [] : [ $h[0] ]; $self->{headers_spam} = !@h ? [] : [ $h[0] ]; } }); =item report_safe ( 0 | 1 | 2 ) (default: 1) if this option is set to 1, if an incoming message is tagged as spam, instead of modifying the original message, SpamAssassin will create a new report message and attach the original message as a message/rfc822 MIME part (ensuring the original message is completely preserved, not easily opened, and easier to recover). If this option is set to 2, then original messages will be attached with a content type of text/plain instead of message/rfc822. This setting may be required for safety reasons on certain broken mail clients that automatically load attachments without any action by the user. This setting may also make it somewhat more difficult to extract or view the original message. If this option is set to 0, incoming spam is only modified by adding some C<X-Spam-> headers and no changes will be made to the body. In addition, a header named B<X-Spam-Report> will be added to spam. You can use the B<remove_header> option to remove that header after setting B<report_safe> to 0. See B<report_safe_copy_headers> if you want to copy headers from the original mail into tagged messages. =cut push (@cmds, { setting => 'report_safe', default => 1, type => $CONF_TYPE_NUMERIC, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } elsif ($value !~ /^[012]$/) { return $INVALID_VALUE; } $self->{report_safe} = $value+0; if (! $self->{report_safe} && ! (grep { lc($_->[0]) eq "report" } @{$self->{headers_spam}}) ) { push(@{$self->{headers_spam}}, ["Report", "_REPORT_"]); } } }); =back =head2 LANGUAGE OPTIONS =over 4 =item ok_locales xx [ yy zz ... ] (default: all) This option is used to specify which locales are considered OK for incoming mail. Mail using the B<character sets> that are allowed by this option will not be marked as possibly being spam in a foreign language. If you receive lots of spam in foreign languages, and never get any non-spam in these languages, this may help. Note that all ISO-8859-* character sets, and Windows code page character sets, are always permitted by default. Set this to C<all> to allow all character sets. This is the default. The rules C<CHARSET_FARAWAY>, C<CHARSET_FARAWAY_BODY>, and C<CHARSET_FARAWAY_HEADERS> are triggered based on how this is set. Examples: ok_locales all (allow all locales) ok_locales en (only allow English) ok_locales en ja zh (allow English, Japanese, and Chinese) Note: if there are multiple ok_locales lines, only the last one is used. Select the locales to allow from the list below: =over 4 =item en - Western character sets in general =item ja - Japanese character sets =item ko - Korean character sets =item ru - Cyrillic character sets =item th - Thai character sets =item zh - Chinese (both simplified and traditional) character sets =back =cut push (@cmds, { setting => 'ok_locales', default => 'all', type => $CONF_TYPE_STRING, }); =item normalize_charset ( 0 | 1) (default: 0) Whether to detect character sets and normalize message content to Unicode. Requires the Encode::Detect module, HTML::Parser version 3.46 or later, and Perl 5.8.5 or later. =cut push (@cmds, { setting => 'normalize_charset', default => 0, type => $CONF_TYPE_BOOL, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } return if $value == 0; return $INVALID_VALUE unless $value == 1; unless ($] > 5.008004) { $self->{parser}->lint_warn("config: normalize_charset requires Perl 5.8.5 or later"); return $INVALID_VALUE; } require HTML::Parser; unless ($HTML::Parser::VERSION >= 3.46) { $self->{parser}->lint_warn("config: normalize_charset requires HTML::Parser 3.46 or later"); return $INVALID_VALUE; } unless (eval 'require Encode::Detect::Detector') { $self->{parser}->lint_warn("config: normalize_charset requires Encode::Detect"); return $INVALID_VALUE; } unless (eval 'require Encode') { $self->{parser}->lint_warn("config: normalize_charset requires Encode"); return $INVALID_VALUE; } $self->{normalize_charset} = 1; } }); =back =head2 NETWORK TEST OPTIONS =over 4 =item trusted_networks IPaddress[/masklen] ... (default: none) What networks or hosts are 'trusted' in your setup. B<Trusted> in this case means that relay hosts on these networks are considered to not be potentially operated by spammers, open relays, or open proxies. A trusted host could conceivably relay spam, but will not originate it, and will not forge header data. DNS blacklist checks will never query for hosts on these networks. See C<http://wiki.apache.org/spamassassin/TrustPath> for more information. MXes for your domain(s) and internal relays should B<also> be specified using the C<internal_networks> setting. When there are 'trusted' hosts that are not MXes or internal relays for your domain(s) they should B<only> be specified in C<trusted_networks>. The C<IPaddress> can be an IPv4 address (in a dot-quad form), or an IPv6 address optionally enclosed in square brackets. Scoped link-local IPv6 addresses are syntactically recognized but the interface scope is currently ignored (e.g. [fe80::1234%eth0] ) and should be avoided. If a C</masklen> is specified, it is considered a CIDR-style 'netmask' length, specified in bits. If it is not specified, but less than 4 octets of an IPv4 address are specified with a trailing dot, an implied netmask length covers all addresses in remaining octets (i.e. implied masklen is /8 or /16 or /24). If masklen is not specified, and there is not trailing dot, then just a single IP address specified is used, as if the masklen were C</32> with an IPv4 address, or C</128> in case of an IPv6 address. If a network or host address is prefaced by a C<!> the matching network or host will be excluded from the list even if a less specific (shorter netmask length) subnet is later specified in the list. This allows a subset of a wider network to be exempt. In case of specifying overlapping subnets, specify more specific subnets first (tighter matching, i.e. with a longer netmask length), followed by less specific (shorter netmask length) subnets to get predictable results regarless of the search algorithm used - when Net::Patricia module is installed the search finds the tightest matching entry in the list, while a sequential search as used in absence of the module Net::Patricia will find the first matching entry in the list. Note: 127.0.0.0/8 and ::1 are always included in trusted_networks, regardless of your config. Examples: trusted_networks 192.168.0.0/16 # all in 192.168.*.* trusted_networks 192.168. # all in 192.168.*.* trusted_networks 212.17.35.15 # just that host trusted_networks !10.0.1.5 10.0.1/24 # all in 10.0.1.* but not 10.0.1.5 trusted_networks 2001:db8:1::1 !2001:db8:1::/64 2001:db8::/32 # 2001:db8::/32 and 2001:db8:1::1/128, except the rest of 2001:db8:1::/64 This operates additively, so a C<trusted_networks> line after another one will append new entries to the list of trusted networks. To clear out the existing entries, use C<clear_trusted_networks>. If C<trusted_networks> is not set and C<internal_networks> is, the value of C<internal_networks> will be used for this parameter. If neither C<trusted_networks> or C<internal_networks> is set, a basic inference algorithm is applied. This works as follows: =over 4 =item * If the 'from' host has an IP address in a private (RFC 1918) network range, then it's trusted =item * If there are authentication tokens in the received header, and the previous host was trusted, then this host is also trusted =item * Otherwise this host, and all further hosts, are consider untrusted. =back =cut push (@cmds, { setting => 'trusted_networks', type => $CONF_TYPE_IPADDRLIST, }); =item clear_trusted_networks Empty the list of trusted networks. =cut push (@cmds, { setting => 'clear_trusted_networks', type => $CONF_TYPE_NOARGS, code => sub { my ($self, $key, $value, $line) = @_; unless (!defined $value || $value eq '') { return $INVALID_VALUE; } $self->{trusted_networks} = $self->new_netset('trusted_networks',1); $self->{trusted_networks_configured} = 0; } }); =item internal_networks IPaddress[/masklen] ... (default: none) What networks or hosts are 'internal' in your setup. B<Internal> means that relay hosts on these networks are considered to be MXes for your domain(s), or internal relays. This uses the same syntax as C<trusted_networks>, above - see there for details. This value is used when checking 'dial-up' or dynamic IP address blocklists, in order to detect direct-to-MX spamming. Trusted relays that accept mail directly from dial-up connections (i.e. are also performing a role of mail submission agents - MSA) should not be listed in C<internal_networks>. List them only in C<trusted_networks>. If C<trusted_networks> is set and C<internal_networks> is not, the value of C<trusted_networks> will be used for this parameter. If neither C<trusted_networks> nor C<internal_networks> is set, no addresses will be considered local; in other words, any relays past the machine where SpamAssassin is running will be considered external. Every entry in C<internal_networks> must appear in C<trusted_networks>; in other words, C<internal_networks> is always a subset of the trusted set. Note: 127/8 and ::1 are always included in internal_networks, regardless of your config. =cut push (@cmds, { setting => 'internal_networks', type => $CONF_TYPE_IPADDRLIST, }); =item clear_internal_networks Empty the list of internal networks. =cut push (@cmds, { setting => 'clear_internal_networks', type => $CONF_TYPE_NOARGS, code => sub { my ($self, $key, $value, $line) = @_; unless (!defined $value || $value eq '') { return $INVALID_VALUE; } $self->{internal_networks} = $self->new_netset('internal_networks',1); $self->{internal_networks_configured} = 0; } }); =item msa_networks IPaddress[/masklen] ... (default: none) The networks or hosts which are acting as MSAs in your setup (but not also as MX relays). This uses the same syntax as C<trusted_networks>, above - see there for details. B<MSA> means that the relay hosts on these networks accept mail from your own users and authenticates them appropriately. These relays will never accept mail from hosts that aren't authenticated in some way. Examples of authentication include, IP lists, SMTP AUTH, POP-before-SMTP, etc. All relays found in the message headers after the MSA relay will take on the same trusted and internal classifications as the MSA relay itself, as defined by your I<trusted_networks> and I<internal_networks> configuration. For example, if the MSA relay is trusted and internal so will all of the relays that precede it. When using msa_networks to identify an MSA it is recommended that you treat that MSA as both trusted and internal. When an MSA is not included in msa_networks you should treat the MSA as trusted but not internal, however if the MSA is also acting as an MX or intermediate relay you must always treat it as both trusted and internal and ensure that the MSA includes visible auth tokens in its Received header to identify submission clients. B<Warning:> Never include an MSA that also acts as an MX (or is also an intermediate relay for an MX) or otherwise accepts mail from non-authenticated users in msa_networks. Doing so will result in unknown external relays being trusted. =cut push (@cmds, { setting => 'msa_networks', type => $CONF_TYPE_IPADDRLIST, }); =item clear_msa_networks Empty the list of msa networks. =cut push (@cmds, { setting => 'clear_msa_networks', type => $CONF_TYPE_NOARGS, code => sub { my ($self, $key, $value, $line) = @_; unless (!defined $value || $value eq '') { return $INVALID_VALUE; } $self->{msa_networks} = $self->new_netset('msa_networks',0); # no loopback IP $self->{msa_networks_configured} = 0; } }); =item originating_ip_headers header ... (default: X-Yahoo-Post-IP X-Originating-IP X-Apparently-From X-SenderIP) A list of header field names from which an originating IP address can be obtained. For example, webmail servers may record a client IP address in X-Originating-IP. These IP addresses are virtually appended into the Received: chain, so they are used in RBL checks where appropriate. Currently the IP addresses are not added into X-Spam-Relays-* header fields, but they may be in the future. =cut push (@cmds, { setting => 'originating_ip_headers', default => [], type => $CONF_TYPE_STRINGLIST, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } foreach my $hfname (split(/\s+/, $value)) { # avoid duplicates, consider header field names case-insensitive push(@{$self->{originating_ip_headers}}, $hfname) if !grep(lc($_) eq lc($hfname), @{$self->{originating_ip_headers}}); } } }); =item clear_originating_ip_headers Empty the list of 'originating IP address' header field names. =cut push (@cmds, { setting => 'clear_originating_ip_headers', type => $CONF_TYPE_NOARGS, code => sub { my ($self, $key, $value, $line) = @_; unless (!defined $value || $value eq '') { return $INVALID_VALUE; } $self->{originating_ip_headers} = []; } }); =item always_trust_envelope_sender ( 0 | 1 ) (default: 0) Trust the envelope sender even if the message has been passed through one or more trusted relays. See also C<envelope_sender_header>. =cut push (@cmds, { setting => 'always_trust_envelope_sender', default => 0, type => $CONF_TYPE_BOOL, }); =item skip_rbl_checks ( 0 | 1 ) (default: 0) Turning on the skip_rbl_checks setting will disable the DNSEval plugin, which implements Real-time Block List (or: Blackhole List) (RBL) lookups. By default, SpamAssassin will run RBL checks. Individual blocklists may be disabled selectively by setting a score of a corresponding rule to 0. See also a related configuration parameter skip_uribl_checks, which controls the URIDNSBL plugin (documented in the URIDNSBL man page). =cut push (@cmds, { setting => 'skip_rbl_checks', default => 0, type => $CONF_TYPE_BOOL, }); =item dns_available { yes | no | test[: domain1 domain2...] } (default: yes) Tells SpamAssassin whether DNS resolving is available or not. A value I<yes> indicates DNS resolving is available, a value I<no> indicates DNS resolving is not available - both of these values apply unconditionally and skip initial DNS tests, which can be slow or unreliable. When the option value is a I<test> (with or without arguments), SpamAssassin will query some domain names on the internet during initialization, attempting to determine if DNS resolving is working or not. A space-separated list of domain names may be specified explicitly, or left to a built-in default of a dozen or so domain names. From an explicit or a default list a subset of three domain names is picked randomly for checking. The test queries for NS records of these domain: if at least one query returns a success then SpamAssassin considers DNS resolving as available, otherwise not. The problem is that the test can introduce some startup delay if a network connection is down, and in some cases it can wrongly guess that DNS is unavailable because a test connection failed, what causes disabling several DNS-dependent tests. Please note, the DNS test queries for NS records, so specify domain names, not host names. Since version 3.4.0 of SpamAssassin a default setting for option I<dns_available> is I<yes>. A default in older versions was I<test>. =cut push (@cmds, { setting => 'dns_available', default => 'yes', type => $CONF_TYPE_STRING, code => sub { my ($self, $key, $value, $line) = @_; if ($value =~ /^test(?::\s*\S.*)?$/) { $self->{dns_available} = $value; } elsif ($value =~ /^(?:yes|1)$/) { $self->{dns_available} = 'yes'; } elsif ($value =~ /^(?:no|0)$/) { $self->{dns_available} = 'no'; } else { return $INVALID_VALUE; } } }); =item dns_server ip-addr-port (default: entries provided by Net::DNS) Specifies an IP address of a DNS server, and optionally its port number. The I<dns_server> directive may be specified multiple times, each entry adding to a list of available resolving name servers. The I<ip-addr-port> argument can either be an IPv4 or IPv6 address, optionally enclosed in brackets, and optionally followed by a colon and a port number. In absence of a port number a standard port number 53 is assumed. When an IPv6 address is specified along with a port number, the address B<must> be enclosed in brackets to avoid parsing ambiguity regarding a colon separator, Examples : dns_server 127.0.0.1 dns_server 127.0.0.1:53 dns_server [127.0.0.1]:53 dns_server [::1]:53 In absence of I<dns_server> directives, the list of name servers is provided by Net::DNS module, which typically obtains the list from /etc/resolv.conf, but this may be platform dependent. Please consult the Net::DNS::Resolver documentation for details. =cut push (@cmds, { setting => 'dns_server', type => $CONF_TYPE_STRING, code => sub { my ($self, $key, $value, $line) = @_; my($address,$port); local($1,$2,$3); if ($value =~ /^(?: \[ ([^\]]*) \] | ([^:]*) ) : (\d+) \z/sx) { $address = defined $1 ? $1 : $2; $port = $3; } elsif ($value =~ /^(?: \[ ([^\]]*) \] | ([0-9a-fA-F.:]+) ) \z/sx) { $address = defined $1 ? $1 : $2; $port = '53'; } else { return $INVALID_VALUE; } my $IP_ADDRESS = IP_ADDRESS; if ($address =~ /$IP_ADDRESS/ && $port >= 1 && $port <= 65535) { $self->{dns_servers} = [] if !$self->{dns_servers}; # checked, untainted, stored in a normalized form push(@{$self->{dns_servers}}, untaint_var("[$address]:$port")); } else { return $INVALID_VALUE; } } }); =item clear_dns_servers Empty the list of explicitly configured DNS servers through a I<dns_server> directive, falling back to Net::DNS -supplied defaults. =cut push (@cmds, { setting => 'clear_dns_servers', type => $CONF_TYPE_NOARGS, code => sub { my ($self, $key, $value, $line) = @_; unless (!defined $value || $value eq '') { return $INVALID_VALUE; } undef $self->{dns_servers}; } }); =item dns_local_ports_permit ranges... Add the specified ports or ports ranges to the set of allowed port numbers that can be used as local port numbers when sending DNS queries to a resolver. The argument is a whitespace-separated or a comma-separated list of single port numbers n, or port number pairs (i.e. m-n) delimited by a '-', representing a range. Allowed port numbers are between 1 and 65535. Directives I<dns_local_ports_permit> and I<dns_local_ports_avoid> are processed in order in which they appear in configuration files. Each directive adds (or subtracts) its subsets of ports to a current set of available ports. Whatever is left in the set by the end of configuration processing is made available to a DNS resolving client code. If the resulting set of port numbers is empty (see also the directive I<dns_local_ports_none>), then SpamAssassin does not apply its ports randomization logic, but instead leaves the operating system to choose a suitable free local port number. The initial set consists of all port numbers in the range 1024-65535. Note that system config files already modify the set and remove all the IANA registered port numbers and some other ranges, so there is rarely a need to adjust the ranges by site-specific directives. See also directives I<dns_local_ports_permit> and I<dns_local_ports_none>. =cut push (@cmds, { setting => 'dns_local_ports_permit', type => $CONF_TYPE_STRING, is_admin => 1, code => sub { my($self, $key, $value, $line) = @_; my(@port_ranges); local($1,$2); foreach my $range (split(/[ \t,]+/, $value)) { if ($range =~ /^(\d{1,5})\z/) { # don't allow adding a port number 0 if ($1 < 1 || $1 > 65535) { return $INVALID_VALUE } push(@port_ranges, [$1,$1]); } elsif ($range =~ /^(\d{1,5})-(\d{1,5})\z/) { if ($1 < 1 || $1 > 65535) { return $INVALID_VALUE } if ($2 < 1 || $2 > 65535) { return $INVALID_VALUE } push(@port_ranges, [$1,$2]); } else { return $INVALID_VALUE; } } foreach my $p (@port_ranges) { undef $self->{dns_available_portscount}; # invalidate derived data set_ports_range(\$self->{dns_available_ports_bitset}, $p->[0], $p->[1], 1); } } }); =item dns_local_ports_avoid ranges... Remove specified ports or ports ranges from the set of allowed port numbers that can be used as local port numbers when sending DNS queries to a resolver. Please see directive I<dns_local_ports_permit> for details. =cut push (@cmds, { setting => 'dns_local_ports_avoid', type => $CONF_TYPE_STRING, is_admin => 1, code => sub { my($self, $key, $value, $line) = @_; my(@port_ranges); local($1,$2); foreach my $range (split(/[ \t,]+/, $value)) { if ($range =~ /^(\d{1,5})\z/) { if ($1 > 65535) { return $INVALID_VALUE } # don't mind clearing also the port number 0 push(@port_ranges, [$1,$1]); } elsif ($range =~ /^(\d{1,5})-(\d{1,5})\z/) { if ($1 > 65535 || $2 > 65535) { return $INVALID_VALUE } push(@port_ranges, [$1,$2]); } else { return $INVALID_VALUE; } } foreach my $p (@port_ranges) { undef $self->{dns_available_portscount}; # invalidate derived data set_ports_range(\$self->{dns_available_ports_bitset}, $p->[0], $p->[1], 0); } } }); =item dns_local_ports_none Is a fast shorthand for: dns_local_ports_avoid 1-65535 leaving the set of available DNS query local port numbers empty. In all respects (apart from speed) it is equivalent to the shown directive, and can be freely mixed with I<dns_local_ports_permit> and I<dns_local_ports_avoid>. If the resulting set of port numbers is empty, then SpamAssassin does not apply its ports randomization logic, but instead leaves the operating system to choose a suitable free local port number. See also directives I<dns_local_ports_permit> and I<dns_local_ports_avoid>. =cut push (@cmds, { setting => 'dns_local_ports_none', type => $CONF_TYPE_NOARGS, is_admin => 1, code => sub { my ($self, $key, $value, $line) = @_; unless (!defined $value || $value eq '') { return $INVALID_VALUE; } undef $self->{dns_available_portscount}; # invalidate derived data wipe_ports_range(\$self->{dns_available_ports_bitset}, 0); } }); =item dns_test_interval n (default: 600 seconds) If dns_available is set to I<test>, the dns_test_interval time in number of seconds will tell SpamAssassin how often to retest for working DNS. A numeric value is optionally suffixed by a time unit (s, m, h, d, w, indicating seconds (default), minutes, hours, days, weeks). =cut push (@cmds, { setting => 'dns_test_interval', default => 600, type => $CONF_TYPE_DURATION, }); =item dns_options opts (default: norotate, nodns0x20, edns=4096) Provides a (whitespace or comma -separated) list of options applying to DNS resolving. Available options are: I<rotate>, I<dns0x20> and I<edns> (or I<edns0>). Option name may be negated by prepending a I<no> (e.g. I<norotate>, I<NoEDNS>) to counteract a previously enabled option. Option names are not case-sensitive. The I<dns_options> directive may appear in configuration files multiple times, the last setting prevails. Option I<edns> (or I<edsn0>) may take a value which specifies a requestor's acceptable UDP payload size according to EDNS0 specifications (RFC 6891, ex RFC 2671) e.g. I<edns=4096>. When EDNS0 is off (I<noedns> or I<edns=512>) a traditional implied UDP payload size is 512 bytes, which is also a minimum allowed value for this option. When the option is specified but a value is not provided, a conservative default of 1220 bytes is implied. It is recommended to keep I<edns> enabled when using a local recursive DNS server which supports EDNS0 (like most modern DNS servers do), a suitable setting in this case is I<edns=4096>, which is also a default. Allowing UDP payload size larger than 512 bytes can avoid truncation of resource records in large DNS responses (like in TXT records of some SPF and DKIM responses, or when an unreasonable number of A records is published by some domain). The option should be disabled when a recursive DNS server is only reachable through non- RFC 6891 compliant middleboxes (such as some old-fashioned firewall) which bans DNS UDP payload sizes larger than 512 bytes. A suitable value when a non-local recursive DNS server is used and a middlebox B<does> allow EDNS0 but blocks fragmented IP packets is perhaps 1220 bytes, allowing a DNS UDP packet to fit within a single IP packet in most cases (a slightly less conservative range would be 1280-1410 bytes). Option I<rotate> causes SpamAssassin to choose a DNS server at random from all servers listed in C</etc/resolv.conf> every I<dns_test_interval> seconds, effectively spreading the load over all currently available DNS servers when there are many spamd workers. Option I<dns0x20> enables randomization of letters in a DNS query label according to draft-vixie-dnsext-dns0x20, decreasing a chance of collisions of responses (by chance or by a malicious intent) by increasing spread as provided by a 16-bit query ID and up to 16 bits of a port number, with additional bits as encoded by flipping case (upper/lower) of letters in a query. The number of additional random bits corresponds to the number of letters in a query label. Should work reliably with all mainstream DNS servers - do not turn on if you see frequent info messages "dns: no callback for id:" in the log, or if RBL or URIDNS lookups do not work for no apparent reason. =cut push (@cmds, { setting => 'dns_options', type => $CONF_TYPE_HASH_KEY_VALUE, code => sub { my ($self, $key, $value, $line) = @_; foreach my $option (split (/[\s,]+/, lc $value)) { local($1,$2); if ($option =~ /^no(rotate|dns0x20)\z/) { $self->{dns_options}->{$1} = 0; } elsif ($option =~ /^no(edns)0?\z/) { $self->{dns_options}->{$1} = 0; } elsif ($option =~ /^(rotate|dns0x20)\z/) { $self->{dns_options}->{$1} = 1; } elsif ($option =~ /^(edns)0? (?: = (\d+) )? \z/x) { # RFC 6891 (ex RFC 2671) - EDNS0, value is a requestor's UDP payload # size, defaults to some UDP packet size likely to fit into a single # IP packet which is more likely to pass firewalls which choke on IP # fragments. RFC 2460: min MTU is 1280 for IPv6, minus 40 bytes for # basic header, yielding 1240. RFC 3226 prescribes a min of 1220 for # RFC 2535 compliant servers. RFC 6891: choosing between 1280 and # 1410 bytes for IP (v4 or v6) over Ethernet would be reasonable. # $self->{dns_options}->{$1} = $2 || 1220; return $INVALID_VALUE if $self->{dns_options}->{$1} < 512; } else { return $INVALID_VALUE; } } } }); =item dns_query_restriction (allow|deny) domain1 domain2 ... Option allows disabling of rules which would result in a DNS query to one of the listed domains. The first argument must be a literal C<allow> or C<deny>, remaining arguments are domains names. Most DNS queries (with some exceptions) are subject to dns_query_restriction. A domain to be queried is successively stripped-off of its leading labels (thus yielding a series of its parent domains), and on each iteration a check is made against an associative array generated by dns_query_restriction options. Search stops at the first match (i.e. the tightest match), and the matching entry with its C<allow> or C<deny> value then controls whether a DNS query is allowed to be launched. If no match is found an implicit default is to allow a query. The purpose of an explicit C<allow> entry is to be able to override a previously configured C<deny> on the same domain or to override an entry (possibly yet to be configured in subsequent config directives) on one of its parent domains. Thus an 'allow zen.spamhaus.org' with a 'deny spamhaus.org' would permit DNS queries on a specific DNS BL zone but deny queries to other zones under the same parent domain. Domains are matched case-insensitively, no wildcards are recognized, there should be no leading or trailing dot. Specifying a block on querying a domain name has a similar effect as setting a score of corresponding DNSBL and URIBL rules to zero, and can be a handy alternative to hunting for such rules when a site policy does not allow certain DNS block lists to be queried. Example: dns_query_restriction deny dnswl.org surbl.org dns_query_restriction allow zen.spamhaus.org dns_query_restriction deny spamhaus.org mailspike.net spamcop.net =cut push (@cmds, { setting => 'dns_query_restriction', type => $CONF_TYPE_STRING, code => sub { my ($self, $key, $value, $line) = @_; defined $value && $value =~ s/^(allow|deny)\s+//i or return $INVALID_VALUE; my $blocked = lc($1) eq 'deny' ? 1 : 0; foreach my $domain (split(' ', $value)) { $domain =~ s/^\.//; $domain =~ s/\.\z//; # strip dots $self->{dns_query_blocked}{lc $domain} = $blocked; } } }); =item clear_dns_query_restriction The option removes any entries entered by previous 'dns_query_restriction' options, leaving the list empty, i.e. allowing DNS queries for any domain (including any DNS BL zone). =cut push (@cmds, { setting => 'clear_dns_query_restriction', aliases => ['clear_dns_query_restrictions'], type => $CONF_TYPE_NOARGS, code => sub { my ($self, $key, $value, $line) = @_; return $INVALID_VALUE if defined $value && $value ne ''; delete $self->{dns_query_blocked}; } }); =back =head2 LEARNING OPTIONS =over 4 =item use_learner ( 0 | 1 ) (default: 1) Whether to use any machine-learning classifiers with SpamAssassin, such as the default 'BAYES_*' rules. Setting this to 0 will disable use of any and all human-trained classifiers. =cut push (@cmds, { setting => 'use_learner', default => 1, type => $CONF_TYPE_BOOL, }); =item use_bayes ( 0 | 1 ) (default: 1) Whether to use the naive-Bayesian-style classifier built into SpamAssassin. This is a master on/off switch for all Bayes-related operations. =cut push (@cmds, { setting => 'use_bayes', default => 1, type => $CONF_TYPE_BOOL, }); =item use_bayes_rules ( 0 | 1 ) (default: 1) Whether to use rules using the naive-Bayesian-style classifier built into SpamAssassin. This allows you to disable the rules while leaving auto and manual learning enabled. =cut push (@cmds, { setting => 'use_bayes_rules', default => 1, type => $CONF_TYPE_BOOL, }); =item bayes_auto_learn ( 0 | 1 ) (default: 1) Whether SpamAssassin should automatically feed high-scoring mails (or low-scoring mails, for non-spam) into its learning systems. The only learning system supported currently is a naive-Bayesian-style classifier. See the documentation for the C<Mail::SpamAssassin::Plugin::AutoLearnThreshold> plugin module for details on how Bayes auto-learning is implemented by default. =cut push (@cmds, { setting => 'bayes_auto_learn', default => 1, type => $CONF_TYPE_BOOL, }); =item bayes_ignore_header header_name If you receive mail filtered by upstream mail systems, like a spam-filtering ISP or mailing list, and that service adds new headers (as most of them do), these headers may provide inappropriate cues to the Bayesian classifier, allowing it to take a "short cut". To avoid this, list the headers using this setting. Example: bayes_ignore_header X-Upstream-Spamfilter bayes_ignore_header X-Upstream-SomethingElse =cut push (@cmds, { setting => 'bayes_ignore_header', default => [], type => $CONF_TYPE_STRINGLIST, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } push (@{$self->{bayes_ignore_headers}}, split(/\s+/, $value)); } }); =item bayes_ignore_from user@example.com Bayesian classification and autolearning will not be performed on mail from the listed addresses. Program C<sa-learn> will also ignore the listed addresses if it is invoked using the C<--use-ignores> option. One or more addresses can be listed, see C<whitelist_from>. Spam messages from certain senders may contain many words that frequently occur in ham. For example, one might read messages from a preferred bookstore but also get unwanted spam messages from other bookstores. If the unwanted messages are learned as spam then any messages discussing books, including the preferred bookstore and antiquarian messages would be in danger of being marked as spam. The addresses of the annoying bookstores would be listed. (Assuming they were halfway legitimate and didn't send you mail through myriad affiliates.) Those who have pieces of spam in legitimate messages or otherwise receive ham messages containing potentially spammy words might fear that some spam messages might be in danger of being marked as ham. The addresses of the spam mailing lists, correspondents, etc. would be listed. =cut push (@cmds, { setting => 'bayes_ignore_from', type => $CONF_TYPE_ADDRLIST, }); =item bayes_ignore_to user@example.com Bayesian classification and autolearning will not be performed on mail to the listed addresses. See C<bayes_ignore_from> for details. =cut push (@cmds, { setting => 'bayes_ignore_to', type => $CONF_TYPE_ADDRLIST, }); =item bayes_min_ham_num (Default: 200) =item bayes_min_spam_num (Default: 200) To be accurate, the Bayes system does not activate until a certain number of ham (non-spam) and spam have been learned. The default is 200 of each ham and spam, but you can tune these up or down with these two settings. =cut push (@cmds, { setting => 'bayes_min_ham_num', default => 200, type => $CONF_TYPE_NUMERIC, }); push (@cmds, { setting => 'bayes_min_spam_num', default => 200, type => $CONF_TYPE_NUMERIC, }); =item bayes_learn_during_report (Default: 1) The Bayes system will, by default, learn any reported messages (C<spamassassin -r>) as spam. If you do not want this to happen, set this option to 0. =cut push (@cmds, { setting => 'bayes_learn_during_report', default => 1, type => $CONF_TYPE_BOOL, }); =item bayes_sql_override_username Used by BayesStore::SQL storage implementation. If this options is set the BayesStore::SQL module will override the set username with the value given. This could be useful for implementing global or group bayes databases. =cut push (@cmds, { setting => 'bayes_sql_override_username', default => '', type => $CONF_TYPE_STRING, }); =item bayes_use_hapaxes (default: 1) Should the Bayesian classifier use hapaxes (words/tokens that occur only once) when classifying? This produces significantly better hit-rates. =cut push (@cmds, { setting => 'bayes_use_hapaxes', default => 1, type => $CONF_TYPE_BOOL, }); =item bayes_journal_max_size (default: 102400) SpamAssassin will opportunistically sync the journal and the database. It will do so once a day, but will sync more often if the journal file size goes above this setting, in bytes. If set to 0, opportunistic syncing will not occur. =cut push (@cmds, { setting => 'bayes_journal_max_size', default => 102400, type => $CONF_TYPE_NUMERIC, }); =item bayes_expiry_max_db_size (default: 150000) What should be the maximum size of the Bayes tokens database? When expiry occurs, the Bayes system will keep either 75% of the maximum value, or 100,000 tokens, whichever has a larger value. 150,000 tokens is roughly equivalent to a 8Mb database file. =cut push (@cmds, { setting => 'bayes_expiry_max_db_size', default => 150000, type => $CONF_TYPE_NUMERIC, }); =item bayes_auto_expire (default: 1) If enabled, the Bayes system will try to automatically expire old tokens from the database. Auto-expiry occurs when the number of tokens in the database surpasses the bayes_expiry_max_db_size value. If a bayes datastore backend does not implement individual key/value expirations, the setting is silently ignored. =cut push (@cmds, { setting => 'bayes_auto_expire', default => 1, type => $CONF_TYPE_BOOL, }); =item bayes_token_ttl (default: 3w, i.e. 3 weeks) Time-to-live / expiration time in seconds for tokens kept in a Bayes database. A numeric value is optionally suffixed by a time unit (s, m, h, d, w, indicating seconds (default), minutes, hours, days, weeks). If bayes_auto_expire is true and a Bayes datastore backend supports it (currently only Redis), this setting controls deletion of expired tokens from a bayes database. The value is observed on a best-effort basis, exact timing promises are not necessarily kept. If a bayes datastore backend does not implement individual key/value expirations, the setting is silently ignored. =cut push (@cmds, { setting => 'bayes_token_ttl', default => 3*7*24*60*60, # seconds (3 weeks) type => $CONF_TYPE_DURATION, }); =item bayes_seen_ttl (default: 8d, i.e. 8 days) Time-to-live / expiration time in seconds for 'seen' entries (i.e. mail message digests with their status) kept in a Bayes database. A numeric value is optionally suffixed by a time unit (s, m, h, d, w, indicating seconds (default), minutes, hours, days, weeks). If bayes_auto_expire is true and a Bayes datastore backend supports it (currently only Redis), this setting controls deletion of expired 'seen' entries from a bayes database. The value is observed on a best-effort basis, exact timing promises are not necessarily kept. If a bayes datastore backend does not implement individual key/value expirations, the setting is silently ignored. =cut push (@cmds, { setting => 'bayes_seen_ttl', default => 8*24*60*60, # seconds (8 days) type => $CONF_TYPE_DURATION, }); =item bayes_learn_to_journal (default: 0) If this option is set, whenever SpamAssassin does Bayes learning, it will put the information into the journal instead of directly into the database. This lowers contention for locking the database to execute an update, but will also cause more access to the journal and cause a delay before the updates are actually committed to the Bayes database. =cut push (@cmds, { setting => 'bayes_learn_to_journal', default => 0, type => $CONF_TYPE_BOOL, }); =back =head2 MISCELLANEOUS OPTIONS =over 4 =item time_limit n (default: 300) Specifies a limit on elapsed time in seconds that SpamAssassin is allowed to spend before providing a result. The value may be fractional and must not be negative, zero is interpreted as unlimited. The default is 300 seconds for consistency with the spamd default setting of --timeout-child . This is a best-effort advisory setting, processing will not be abruptly aborted at an arbitrary point in processing when the time limit is exceeded, but only on reaching one of locations in the program flow equipped with a time test. Currently equipped with the test are the main checking loop, asynchronous DNS lookups, plugins which are calling external programs. Rule evaluation is guarded by starting a timer (alarm) on each set of compiled rules. When a message is passed to Mail::SpamAssassin::parse, a deadline time is established as a sum of current time and the C<time_limit> setting. This deadline may also be specified by a caller through an option 'master_deadline' in $suppl_attrib on a call to parse(), possibly providing a more accurate deadline taking into account past and expected future processing of a message in a mail filtering setup. If both the config option as well as a 'master_deadline' option in a call are provided, the shorter time limit of the two is used (since version 3.3.2). Note that spamd (and possibly third-party callers of SpamAssassin) will supply the 'master_deadline' option in a call based on its --timeout-child option (or equivalent), unlike the command line C<spamassassin>, which has no such command line option. When a time limit is exceeded, most of the remaining tests will be skipped, as well as auto-learning. Whatever tests fired so far will determine the final score. The behaviour is similar to short-circuiting with attribute 'on', as implemented by a Shortcircuit plugin. A synthetic hit on a rule named TIME_LIMIT_EXCEEDED with a near-zero default score is generated, so that the report will reflect the event. A score for TIME_LIMIT_EXCEEDED may be provided explicitly in a configuration file, for example to achieve whitelisting or blacklisting effect for messages with long processing times. The C<time_limit> option is a useful protection against excessive processing time on certain degenerate or unusually long or complex mail messages, as well as against some DoS attacks. It is also needed in time-critical pre-queue filtering setups (e.g. milter, proxy, integration with MTA), where message processing must finish before a SMTP client times out. RFC 5321 prescribes in section 4.5.3.2.6 the 'DATA Termination' time limit of 10 minutes, although it is not unusual to see some SMTP clients abort sooner on waiting for a response. A sensible C<time_limit> for a pre-queue filtering setup is maybe 50 seconds, assuming that clients are willing to wait at least a minute. =cut push (@cmds, { setting => 'time_limit', default => 300, type => $CONF_TYPE_DURATION, }); =item lock_method type Select the file-locking method used to protect database files on-disk. By default, SpamAssassin uses an NFS-safe locking method on UNIX; however, if you are sure that the database files you'll be using for Bayes and AWL storage will never be accessed over NFS, a non-NFS-safe locking system can be selected. This will be quite a bit faster, but may risk file corruption if the files are ever accessed by multiple clients at once, and one or more of them is accessing them through an NFS filesystem. Note that different platforms require different locking systems. The supported locking systems for C<type> are as follows: =over 4 =item I<nfssafe> - an NFS-safe locking system =item I<flock> - simple UNIX C<flock()> locking =item I<win32> - Win32 locking using C<sysopen (..., O_CREAT|O_EXCL)>. =back nfssafe and flock are only available on UNIX, and win32 is only available on Windows. By default, SpamAssassin will choose either nfssafe or win32 depending on the platform in use. =cut push (@cmds, { setting => 'lock_method', default => '', type => $CONF_TYPE_STRING, code => sub { my ($self, $key, $value, $line) = @_; if ($value !~ /^(nfssafe|flock|win32)$/) { return $INVALID_VALUE; } $self->{lock_method} = $value; # recreate the locker $self->{main}->create_locker(); } }); =item fold_headers ( 0 | 1 ) (default: 1) By default, headers added by SpamAssassin will be whitespace folded. In other words, they will be broken up into multiple lines instead of one very long one and each continuation line will have a tabulator prepended to mark it as a continuation of the preceding one. The automatic wrapping can be disabled here. Note that this can generate very long lines. RFC 2822 required that header lines do not exceed 998 characters (not counting the final CRLF). =cut push (@cmds, { setting => 'fold_headers', default => 1, type => $CONF_TYPE_BOOL, }); =item report_safe_copy_headers header_name ... If using C<report_safe>, a few of the headers from the original message are copied into the wrapper header (From, To, Cc, Subject, Date, etc.) If you want to have other headers copied as well, you can add them using this option. You can specify multiple headers on the same line, separated by spaces, or you can just use multiple lines. =cut push (@cmds, { setting => 'report_safe_copy_headers', default => [], type => $CONF_TYPE_STRINGLIST, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } push(@{$self->{report_safe_copy_headers}}, split(/\s+/, $value)); } }); =item envelope_sender_header Name-Of-Header SpamAssassin will attempt to discover the address used in the 'MAIL FROM:' phase of the SMTP transaction that delivered this message, if this data has been made available by the SMTP server. This is used in the C<EnvelopeFrom> pseudo-header, and for various rules such as SPF checking. By default, various MTAs will use different headers, such as the following: X-Envelope-From Envelope-Sender X-Sender Return-Path SpamAssassin will attempt to use these, if some heuristics (such as the header placement in the message, or the absence of fetchmail signatures) appear to indicate that they are safe to use. However, it may choose the wrong headers in some mailserver configurations. (More discussion of this can be found in bug 2142 and bug 4747 in the SpamAssassin BugZilla.) To avoid this heuristic failure, the C<envelope_sender_header> setting may be helpful. Name the header that your MTA or MDA adds to messages containing the address used at the MAIL FROM step of the SMTP transaction. If the header in question contains C<E<lt>> or C<E<gt>> characters at the start and end of the email address in the right-hand side, as in the SMTP transaction, these will be stripped. If the header is not found in a message, or if it's value does not contain an C<@> sign, SpamAssassin will issue a warning in the logs and fall back to its default heuristics. (Note for MTA developers: we would prefer if the use of a single header be avoided in future, since that precludes 'downstream' spam scanning. C<http://wiki.apache.org/spamassassin/EnvelopeSenderInReceived> details a better proposal, storing the envelope sender at each hop in the C<Received> header.) example: envelope_sender_header X-SA-Exim-Mail-From =cut push (@cmds, { setting => 'envelope_sender_header', default => undef, type => $CONF_TYPE_STRING, }); =item describe SYMBOLIC_TEST_NAME description ... Used to describe a test. This text is shown to users in the detailed report. Note that test names which begin with '__' are reserved for meta-match sub-rules, and are not scored or listed in the 'tests hit' reports. Also note that by convention, rule descriptions should be limited in length to no more than 50 characters. =cut push (@cmds, { command => 'describe', setting => 'descriptions', is_frequent => 1, type => $CONF_TYPE_HASH_KEY_VALUE, }); =item report_charset CHARSET (default: unset) Set the MIME Content-Type charset used for the text/plain report which is attached to spam mail messages. =cut push (@cmds, { setting => 'report_charset', default => '', type => $CONF_TYPE_STRING, }); =item report ...some text for a report... Set the report template which is attached to spam mail messages. See the C<10_default_prefs.cf> configuration file in C</usr/share/spamassassin> for an example. If you change this, try to keep it under 78 columns. Each C<report> line appends to the existing template, so use C<clear_report_template> to restart. Tags can be included as explained above. =cut push (@cmds, { command => 'report', setting => 'report_template', default => '', type => $CONF_TYPE_TEMPLATE, }); =item clear_report_template Clear the report template. =cut push (@cmds, { command => 'clear_report_template', setting => 'report_template', type => $CONF_TYPE_NOARGS, code => \&Mail::SpamAssassin::Conf::Parser::set_template_clear }); =item report_contact ...text of contact address... Set what _CONTACTADDRESS_ is replaced with in the above report text. By default, this is 'the administrator of that system', since the hostname of the system the scanner is running on is also included. =cut push (@cmds, { setting => 'report_contact', default => 'the administrator of that system', type => $CONF_TYPE_STRING, }); =item report_hostname ...hostname to use... Set what _HOSTNAME_ is replaced with in the above report text. By default, this is determined dynamically as whatever the host running SpamAssassin calls itself. =cut push (@cmds, { setting => 'report_hostname', default => '', type => $CONF_TYPE_STRING, }); =item unsafe_report ...some text for a report... Set the report template which is attached to spam mail messages which contain a non-text/plain part. See the C<10_default_prefs.cf> configuration file in C</usr/share/spamassassin> for an example. Each C<unsafe-report> line appends to the existing template, so use C<clear_unsafe_report_template> to restart. Tags can be used in this template (see above for details). =cut push (@cmds, { command => 'unsafe_report', setting => 'unsafe_report_template', default => '', type => $CONF_TYPE_TEMPLATE, }); =item clear_unsafe_report_template Clear the unsafe_report template. =cut push (@cmds, { command => 'clear_unsafe_report_template', setting => 'unsafe_report_template', type => $CONF_TYPE_NOARGS, code => \&Mail::SpamAssassin::Conf::Parser::set_template_clear }); =item mbox_format_from_regex Set a specific regular expression to be used for mbox file From separators. For example, this setting will allow sa-learn to process emails stored in a kmail 2 mbox: mbox_format_from_regex /^From \S+ ?[[:upper:]][[:lower:]]{2}(?:, \d\d [[:upper:]][[:lower:]]{2} \d{4} [0-2]\d:\d\d:\d\d [+-]\d{4}| [[:upper:]][[:lower:]]{2} [ 1-3]\d [ 0-2]\d:\d\d:\d\d \d{4})/ =cut push (@cmds, { setting => 'mbox_format_from_regex', type => $CONF_TYPE_STRING }); =back =head1 RULE DEFINITIONS AND PRIVILEGED SETTINGS These settings differ from the ones above, in that they are considered 'privileged'. Only users running C<spamassassin> from their procmailrc's or forward files, or sysadmins editing a file in C</etc/mail/spamassassin>, can use them. C<spamd> users cannot use them in their C<user_prefs> files, for security and efficiency reasons, unless C<allow_user_rules> is enabled (and then, they may only add rules from below). =over 4 =item allow_user_rules ( 0 | 1 ) (default: 0) This setting allows users to create rules (and only rules) in their C<user_prefs> files for use with C<spamd>. It defaults to off, because this could be a severe security hole. It may be possible for users to gain root level access if C<spamd> is run as root. It is NOT a good idea, unless you have some other way of ensuring that users' tests are safe. Don't use this unless you are certain you know what you are doing. Furthermore, this option causes spamassassin to recompile all the tests each time it processes a message for a user with a rule in his/her C<user_prefs> file, which could have a significant effect on server load. It is not recommended. Note that it is not currently possible to use C<allow_user_rules> to modify an existing system rule from a C<user_prefs> file with C<spamd>. =cut push (@cmds, { setting => 'allow_user_rules', is_priv => 1, default => 0, type => $CONF_TYPE_BOOL, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } elsif ($value !~ /^[01]$/) { return $INVALID_VALUE; } $self->{allow_user_rules} = $value+0; dbg("config: " . ($self->{allow_user_rules} ? "allowing":"not allowing") . " user rules!"); } }); =item redirector_pattern /pattern/modifiers A regex pattern that matches both the redirector site portion, and the target site portion of a URI. Note: The target URI portion must be surrounded in parentheses and no other part of the pattern may create a backreference. Example: http://chkpt.zdnet.com/chkpt/whatever/spammer.domain/yo/dude redirector_pattern /^https?:\/\/(?:opt\.)?chkpt\.zdnet\.com\/chkpt\/\w+\/(.*)$/i =cut push (@cmds, { setting => 'redirector_pattern', is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } elsif (!$self->{parser}->is_delimited_regexp_valid("redirector_pattern", $value)) { return $INVALID_VALUE; } # convert to qr// while including modifiers local ($1,$2,$3); $value =~ /^m?(\W)(.*)(?:\1|>|}|\)|\])(.*?)$/; my $pattern = $2; $pattern = "(?".$3.")".$pattern if $3; $pattern = qr/$pattern/; push @{$self->{main}->{conf}->{redirector_patterns}}, $pattern; # dbg("config: adding redirector regex: " . $value); } }); =item header SYMBOLIC_TEST_NAME header op /pattern/modifiers [if-unset: STRING] Define a test. C<SYMBOLIC_TEST_NAME> is a symbolic test name, such as 'FROM_ENDS_IN_NUMS'. C<header> is the name of a mail header field, such as 'Subject', 'To', 'From', etc. Header field names are matched case-insensitively (conforming to RFC 5322 section 1.2.2), except for all-capitals metaheader fields such as ALL, MESSAGEID, ALL-TRUSTED. Appending a modifier C<:raw> to a header field name will inhibit decoding of quoted-printable or base-64 encoded strings, and will preserve all whitespace inside the header string. The C<:raw> may also be applied to pseudo-headers e.g. C<ALL:raw> will return a pristine (unmodified) header section. Appending a modifier C<:addr> to a header field name will cause everything except the first email address to be removed from the header field. It is mainly applicable to header fields 'From', 'Sender', 'To', 'Cc' along with their 'Resent-*' counterparts, and the 'Return-Path'. Appending a modifier C<:name> to a header field name will cause everything except the first display name to be removed from the header field. It is mainly applicable to header fields containing a single mail address: 'From', 'Sender', along with their 'Resent-From' and 'Resent-Sender' counterparts. It is syntactically permitted to append more than one modifier to a header field name, although currently most combinations achieve no additional effect, for example C<From:addr:raw> or C<From:raw:addr> is currently the same as C<From:addr> . For example, appending C<:addr> to a header name will result in example@foo in all of the following cases: =over 4 =item example@foo =item example@foo (Foo Blah) =item example@foo, example@bar =item display: example@foo (Foo Blah), example@bar ; =item Foo Blah <example@foo> =item "Foo Blah" <example@foo> =item "'Foo Blah'" <example@foo> =back For example, appending C<:name> to a header name will result in "Foo Blah" (without quotes) in all of the following cases: =over 4 =item example@foo (Foo Blah) =item example@foo (Foo Blah), example@bar =item display: example@foo (Foo Blah), example@bar ; =item Foo Blah <example@foo> =item "Foo Blah" <example@foo> =item "'Foo Blah'" <example@foo> =back There are several special pseudo-headers that can be specified: =over 4 =item C<ALL> can be used to mean the text of all the message's headers. Note that all whitespace inside the headers, at line folds, is currently compressed into a single space (' ') character. To obtain a pristine (unmodified) header section, use C<ALL:raw> - the :raw modifier is documented above. =item C<ToCc> can be used to mean the contents of both the 'To' and 'Cc' headers. =item C<EnvelopeFrom> is the address used in the 'MAIL FROM:' phase of the SMTP transaction that delivered this message, if this data has been made available by the SMTP server. See C<envelope_sender_header> for more information on how to set this. =item C<MESSAGEID> is a symbol meaning all Message-Id's found in the message; some mailing list software moves the real 'Message-Id' to 'Resent-Message-Id' or to 'X-Message-Id', then uses its own one in the 'Message-Id' header. The value returned for this symbol is the text from all 3 headers, separated by newlines. =item C<X-Spam-Relays-Untrusted>, C<X-Spam-Relays-Trusted>, C<X-Spam-Relays-Internal> and C<X-Spam-Relays-External> represent a portable, pre-parsed representation of the message's network path, as recorded in the Received headers, divided into 'trusted' vs 'untrusted' and 'internal' vs 'external' sets. See C<http://wiki.apache.org/spamassassin/TrustedRelays> for more details. =back C<op> is either C<=~> (contains regular expression) or C<!~> (does not contain regular expression), and C<pattern> is a valid Perl regular expression, with C<modifiers> as regexp modifiers in the usual style. Note that multi-line rules are not supported, even if you use C<x> as a modifier. Also note that the C<#> character must be escaped (C<\#>) or else it will be considered to be the start of a comment and not part of the regexp. If the C<[if-unset: STRING]> tag is present, then C<STRING> will be used if the header is not found in the mail message. Test names must not start with a number, and must contain only alphanumerics and underscores. It is suggested that lower-case characters not be used, and names have a length of no more than 22 characters, as an informal convention. Dashes are not allowed. Note that test names which begin with '__' are reserved for meta-match sub-rules, and are not scored or listed in the 'tests hit' reports. Test names which begin with 'T_' are reserved for tests which are undergoing QA, and these are given a very low score. If you add or modify a test, please be sure to run a sanity check afterwards by running C<spamassassin --lint>. This will avoid confusing error messages, or other tests being skipped as a side-effect. =item header SYMBOLIC_TEST_NAME exists:header_field_name Define a header field existence test. C<header_field_name> is the name of a header field to test for existence. Not to be confused with a test for a nonempty header field body, which can be implemented by a C<header SYMBOLIC_TEST_NAME header =~ /\S/> rule as described above. =item header SYMBOLIC_TEST_NAME eval:name_of_eval_method([arguments]) Define a header eval test. C<name_of_eval_method> is the name of a method on the C<Mail::SpamAssassin::EvalTests> object. C<arguments> are optional arguments to the function call. =item header SYMBOLIC_TEST_NAME eval:check_rbl('set', 'zone' [, 'sub-test']) Check a DNSBL (a DNS blacklist or whitelist). This will retrieve Received: headers from the message, extract the IP addresses, select which ones are 'untrusted' based on the C<trusted_networks> logic, and query that DNSBL zone. There's a few things to note: =over 4 =item duplicated or private IPs Duplicated IPs are only queried once and reserved IPs are not queried. Private IPs are those listed in <http://www.iana.org/assignments/ipv4-address-space>, <http://duxcw.com/faq/network/privip.htm>, <http://duxcw.com/faq/network/autoip.htm>, or <http://tools.ietf.org/html/rfc5735> as private. =item the 'set' argument This is used as a 'zone ID'. If you want to look up a multiple-meaning zone like SORBS, you can then query the results from that zone using it; but all check_rbl_sub() calls must use that zone ID. Also, if more than one IP address gets a DNSBL hit for a particular rule, it does not affect the score because rules only trigger once per message. =item the 'zone' argument This is the root zone of the DNSBL. The domain name is considered to be a fully qualified domain name (i.e. not subject to DNS resolver's search or default domain options). No trailing period is needed, and will be removed if specified. =item the 'sub-test' argument This optional argument behaves the same as the sub-test argument in C<check_rbl_sub()> below. =item selecting all IPs except for the originating one This is accomplished by placing '-notfirsthop' at the end of the set name. This is useful for querying against DNS lists which list dialup IP addresses; the first hop may be a dialup, but as long as there is at least one more hop, via their outgoing SMTP server, that's legitimate, and so should not gain points. If there is only one hop, that will be queried anyway, as it should be relaying via its outgoing SMTP server instead of sending directly to your MX (mail exchange). =item selecting IPs by whether they are trusted When checking a 'nice' DNSBL (a DNS whitelist), you cannot trust the IP addresses in Received headers that were not added by trusted relays. To test the first IP address that can be trusted, place '-firsttrusted' at the end of the set name. That should test the IP address of the relay that connected to the most remote trusted relay. Note that this requires that SpamAssassin know which relays are trusted. For simple cases, SpamAssassin can make a good estimate. For complex cases, you may get better results by setting C<trusted_networks> manually. In addition, you can test all untrusted IP addresses by placing '-untrusted' at the end of the set name. Important note -- this does NOT include the IP address from the most recent 'untrusted line', as used in '-firsttrusted' above. That's because we're talking about the trustworthiness of the IP address data, not the source header line, here; and in the case of the most recent header (the 'firsttrusted'), that data can be trusted. See the Wiki page at C<http://wiki.apache.org/spamassassin/TrustedRelays> for more information on this. =item Selecting just the last external IP By using '-lastexternal' at the end of the set name, you can select only the external host that connected to your internal network, or at least the last external host with a public IP. =back =item header SYMBOLIC_TEST_NAME eval:check_rbl_txt('set', 'zone') Same as check_rbl(), except querying using IN TXT instead of IN A records. If the zone supports it, it will result in a line of text describing why the IP is listed, typically a hyperlink to a database entry. =item header SYMBOLIC_TEST_NAME eval:check_rbl_sub('set', 'sub-test') Create a sub-test for 'set'. If you want to look up a multi-meaning zone like relays.osirusoft.com, you can then query the results from that zone using the zone ID from the original query. The sub-test may either be an IPv4 dotted address for RBLs that return multiple A records or a non-negative decimal number to specify a bitmask for RBLs that return a single A record containing a bitmask of results, a SenderBase test beginning with "sb:", or (if none of the preceding options seem to fit) a regular expression. Note: the set name must be exactly the same for as the main query rule, including selections like '-notfirsthop' appearing at the end of the set name. =cut push (@cmds, { setting => 'header', is_frequent => 1, is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; local ($1,$2); if ($value =~ /^(\S+)\s+(?:rbl)?eval:(.*)$/) { my ($rulename, $fn) = ($1, $2); if ($fn =~ /^check_(?:rbl|dns)/) { $self->{parser}->add_test ($rulename, $fn, $TYPE_RBL_EVALS); } else { $self->{parser}->add_test ($rulename, $fn, $TYPE_HEAD_EVALS); } } elsif ($value =~ /^(\S+)\s+exists:(.*)$/) { my ($rulename, $header_name) = ($1, $2); # RFC 5322 section 3.6.8, ftext printable US-ASCII ch not including ":" if ($header_name !~ /\S/) { return $MISSING_REQUIRED_VALUE; # } elsif ($header_name !~ /^([!-9;-\176]+)$/) { } elsif ($header_name !~ /^([^: \t]+)$/) { # be generous return $INVALID_HEADER_FIELD_NAME; } $self->{parser}->add_test ($rulename, "defined($header_name)", $TYPE_HEAD_TESTS); $self->{descriptions}->{$rulename} = "Found a $header_name header"; } else { my @values = split(/\s+/, $value, 2); if (@values != 2) { return $MISSING_REQUIRED_VALUE; } $self->{parser}->add_test (@values, $TYPE_HEAD_TESTS); } } }); =item body SYMBOLIC_TEST_NAME /pattern/modifiers Define a body pattern test. C<pattern> is a Perl regular expression. Note: as per the header tests, C<#> must be escaped (C<\#>) or else it is considered the beginning of a comment. The 'body' in this case is the textual parts of the message body; any non-text MIME parts are stripped, and the message decoded from Quoted-Printable or Base-64-encoded format if necessary. The message Subject header is considered part of the body and becomes the first paragraph when running the rules. All HTML tags and line breaks will be removed before matching. =item body SYMBOLIC_TEST_NAME eval:name_of_eval_method([args]) Define a body eval test. See above. =cut push (@cmds, { setting => 'body', is_frequent => 1, is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; local ($1,$2); if ($value =~ /^(\S+)\s+eval:(.*)$/) { $self->{parser}->add_test ($1, $2, $TYPE_BODY_EVALS); } else { my @values = split(/\s+/, $value, 2); if (@values != 2) { return $MISSING_REQUIRED_VALUE; } $self->{parser}->add_test (@values, $TYPE_BODY_TESTS); } } }); =item uri SYMBOLIC_TEST_NAME /pattern/modifiers Define a uri pattern test. C<pattern> is a Perl regular expression. Note: as per the header tests, C<#> must be escaped (C<\#>) or else it is considered the beginning of a comment. The 'uri' in this case is a list of all the URIs in the body of the email, and the test will be run on each and every one of those URIs, adjusting the score if a match is found. Use this test instead of one of the body tests when you need to match a URI, as it is more accurately bound to the start/end points of the URI, and will also be faster. =cut # we don't do URI evals yet - maybe later # if (/^uri\s+(\S+)\s+eval:(.*)$/) { # $self->{parser}->add_test ($1, $2, $TYPE_URI_EVALS); # next; # } push (@cmds, { setting => 'uri', is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; my @values = split(/\s+/, $value, 2); if (@values != 2) { return $MISSING_REQUIRED_VALUE; } $self->{parser}->add_test (@values, $TYPE_URI_TESTS); } }); =item rawbody SYMBOLIC_TEST_NAME /pattern/modifiers Define a raw-body pattern test. C<pattern> is a Perl regular expression. Note: as per the header tests, C<#> must be escaped (C<\#>) or else it is considered the beginning of a comment. The 'raw body' of a message is the raw data inside all textual parts. The text will be decoded from base64 or quoted-printable encoding, but HTML tags and line breaks will still be present. Multiline expressions will need to be used to match strings that are broken by line breaks. =item rawbody SYMBOLIC_TEST_NAME eval:name_of_eval_method([args]) Define a raw-body eval test. See above. =cut push (@cmds, { setting => 'rawbody', is_frequent => 1, is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; local ($1,$2); if ($value =~ /^(\S+)\s+eval:(.*)$/) { $self->{parser}->add_test ($1, $2, $TYPE_RAWBODY_EVALS); } else { my @values = split(/\s+/, $value, 2); if (@values != 2) { return $MISSING_REQUIRED_VALUE; } $self->{parser}->add_test (@values, $TYPE_RAWBODY_TESTS); } } }); =item full SYMBOLIC_TEST_NAME /pattern/modifiers Define a full message pattern test. C<pattern> is a Perl regular expression. Note: as per the header tests, C<#> must be escaped (C<\#>) or else it is considered the beginning of a comment. The full message is the pristine message headers plus the pristine message body, including all MIME data such as images, other attachments, MIME boundaries, etc. =item full SYMBOLIC_TEST_NAME eval:name_of_eval_method([args]) Define a full message eval test. See above. =cut push (@cmds, { setting => 'full', is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; local ($1,$2); if ($value =~ /^(\S+)\s+eval:(.*)$/) { $self->{parser}->add_test ($1, $2, $TYPE_FULL_EVALS); } else { my @values = split(/\s+/, $value, 2); if (@values != 2) { return $MISSING_REQUIRED_VALUE; } $self->{parser}->add_test (@values, $TYPE_FULL_TESTS); } } }); =item meta SYMBOLIC_TEST_NAME boolean expression Define a boolean expression test in terms of other tests that have been hit or not hit. For example: meta META1 TEST1 && !(TEST2 || TEST3) Note that English language operators ("and", "or") will be treated as rule names, and that there is no C<XOR> operator. =item meta SYMBOLIC_TEST_NAME boolean arithmetic expression Can also define an arithmetic expression in terms of other tests, with an unhit test having the value "0" and a hit test having a nonzero value. The value of a hit meta test is that of its arithmetic expression. The value of a hit eval test is that returned by its method. The value of a hit header, body, rawbody, uri, or full test which has the "multiple" tflag is the number of times the test hit. The value of any other type of hit test is "1". For example: meta META2 (3 * TEST1 - 2 * TEST2) > 0 Note that Perl builtins and functions, like C<abs()>, B<can't> be used, and will be treated as rule names. If you want to define a meta-rule, but do not want its individual sub-rules to count towards the final score unless the entire meta-rule matches, give the sub-rules names that start with '__' (two underscores). SpamAssassin will ignore these for scoring. =cut push (@cmds, { setting => 'meta', is_frequent => 1, is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; my @values = split(/\s+/, $value, 2); if (@values != 2) { return $MISSING_REQUIRED_VALUE; } if ($values[1] =~ /\*\s*\*/) { info("config: found invalid '**' or '* *' operator in meta command"); return $INVALID_VALUE; } $self->{parser}->add_test (@values, $TYPE_META_TESTS); } }); =item reuse SYMBOLIC_TEST_NAME [ OLD_SYMBOLIC_TEST_NAME_1 ... ] Defines the name of a test that should be "reused" during the scoring process. If a message has an X-Spam-Status header that shows a hit for this rule or any of the old rule names given, a hit will be added for this rule when B<mass-check --reuse> is used. Examples: C<reuse SPF_PASS> C<reuse MY_NET_RULE_V2 MY_NET_RULE_V1> The actual logic for reuse tests is done by B<Mail::SpamAssassin::Plugin::Reuse>. =cut push (@cmds, { setting => 'reuse', is_priv => 1, code => sub { my ($self, $key, $value, $line) = @_; if ($value !~ /\s*(\w+)(?:\s+(?:\w+(?:\s+\w+)*))?\s*$/) { return $INVALID_VALUE; } my $rule_name = $1; # don't overwrite tests, just define them so scores, priorities work if (!exists $self->{tests}->{$rule_name}) { $self->{parser}->add_test($rule_name, undef, $TYPE_EMPTY_TESTS); } } }); =item tflags SYMBOLIC_TEST_NAME flags Used to set flags on a test. Parameter is a space-separated list of flag names or flag name = value pairs. These flags are used in the score-determination back end system for details of the test's behaviour. Please see C<bayes_auto_learn> for more information about tflag interaction with those systems. The following flags can be set: =over 4 =item net The test is a network test, and will not be run in the mass checking system or if B<-L> is used, therefore its score should not be modified. =item nice The test is intended to compensate for common false positives, and should be assigned a negative score. =item userconf The test requires user configuration before it can be used (like language-specific tests). =item learn The test requires training before it can be used. =item noautolearn The test will explicitly be ignored when calculating the score for learning systems. =item autolearn_force The test will be subject to less stringent autolearn thresholds. Normally, SpamAssassin will require 3 points from the header and 3 points from the body to be auto-learned as spam. This option keeps the threshold at 6 points total but changes it to have no regard to the source of the points. =item multiple The test will be evaluated multiple times, for use with meta rules. Only affects header, body, rawbody, uri, and full tests. =item maxhits=N If B<multiple> is specified, limit the number of hits found to N. If the rule is used in a meta that counts the hits (e.g. __RULENAME > 5), this is a way to avoid wasted extra work (use "tflags multiple maxhits=6"). For example: uri __KAM_COUNT_URIS /^./ tflags __KAM_COUNT_URIS multiple maxhits=16 describe __KAM_COUNT_URIS A multiple match used to count URIs in a message meta __KAM_HAS_0_URIS (__KAM_COUNT_URIS == 0) meta __KAM_HAS_1_URIS (__KAM_COUNT_URIS >= 1) meta __KAM_HAS_2_URIS (__KAM_COUNT_URIS >= 2) meta __KAM_HAS_3_URIS (__KAM_COUNT_URIS >= 3) meta __KAM_HAS_4_URIS (__KAM_COUNT_URIS >= 4) meta __KAM_HAS_5_URIS (__KAM_COUNT_URIS >= 5) meta __KAM_HAS_10_URIS (__KAM_COUNT_URIS >= 10) meta __KAM_HAS_15_URIS (__KAM_COUNT_URIS >= 15) =item ips_only This flag is specific to rules invoking an URIDNSBL plugin, it is documented there. =item domains_only This flag is specific to rules invoking an URIDNSBL plugin, it is documented there. =item ns This flag is specific to rules invoking an URIDNSBL plugin, it is documented there. =item a This flag is specific to rules invoking an URIDNSBL plugin, it is documented there. =back =cut push (@cmds, { setting => 'tflags', is_frequent => 1, is_priv => 1, type => $CONF_TYPE_HASH_KEY_VALUE, }); =item priority SYMBOLIC_TEST_NAME n Assign a specific priority to a test. All tests, except for DNS and Meta tests, are run in increasing priority value order (negative priority values are run before positive priority values). The default test priority is 0 (zero). The values <-99999999999999> and <-99999999999998> have a special meaning internally, and should not be used. =cut push (@cmds, { setting => 'priority', is_priv => 1, type => $CONF_TYPE_HASH_KEY_VALUE, }); =back =head1 ADMINISTRATOR SETTINGS These settings differ from the ones above, in that they are considered 'more privileged' -- even more than the ones in the B<PRIVILEGED SETTINGS> section. No matter what C<allow_user_rules> is set to, these can never be set from a user's C<user_prefs> file when spamc/spamd is being used. However, all settings can be used by local programs run directly by the user. =over 4 =item version_tag string This tag is appended to the SA version in the X-Spam-Status header. You should include it when modify your ruleset, especially if you plan to distribute it. A good choice for I<string> is your last name or your initials followed by a number which you increase with each change. The version_tag will be lowercased, and any non-alphanumeric or period character will be replaced by an underscore. e.g. version_tag myrules1 # version=2.41-myrules1 =cut push (@cmds, { setting => 'version_tag', is_admin => 1, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } my $tag = lc($value); $tag =~ tr/a-z0-9./_/c; foreach (@Mail::SpamAssassin::EXTRA_VERSION) { if($_ eq $tag) { $tag = undef; last; } } push(@Mail::SpamAssassin::EXTRA_VERSION, $tag) if($tag); } }); =item test SYMBOLIC_TEST_NAME (ok|fail) Some string to test against Define a regression testing string. You can have more than one regression test string per symbolic test name. Simply specify a string that you wish the test to match. These tests are only run as part of the test suite - they should not affect the general running of SpamAssassin. =cut push (@cmds, { setting => 'test', is_admin => 1, code => sub { return unless defined $COLLECT_REGRESSION_TESTS; my ($self, $key, $value, $line) = @_; local ($1,$2,$3); if ($value !~ /^(\S+)\s+(ok|fail)\s+(.*)$/) { return $INVALID_VALUE; } $self->{parser}->add_regression_test($1, $2, $3); } }); =item rbl_timeout t [t_min] [zone] (default: 15 3) All DNS queries are made at the beginning of a check and we try to read the results at the end. This value specifies the maximum period of time (in seconds) to wait for a DNS query. If most of the DNS queries have succeeded for a particular message, then SpamAssassin will not wait for the full period to avoid wasting time on unresponsive server(s), but will shrink the timeout according to a percentage of queries already completed. As the number of queries remaining approaches 0, the timeout value will gradually approach a t_min value, which is an optional second parameter and defaults to 0.2 * t. If t is smaller than t_min, the initial timeout is set to t_min. Here is a chart of queries remaining versus the timeout in seconds, for the default 15 second / 3 second timeout setting: queries left 100% 90% 80% 70% 60% 50% 40% 30% 20% 10% 0% timeout 15 14.9 14.5 13.9 13.1 12.0 10.7 9.1 7.3 5.3 3 For example, if 20 queries are made at the beginning of a message check and 16 queries have returned (leaving 20%), the remaining 4 queries should finish within 7.3 seconds since their query started or they will be timed out. Note that timed out queries are only aborted when there is nothing else left for SpamAssassin to do - long evaluation of other rules may grant queries additional time. If a parameter 'zone' is specified (it must end with a letter, which distinguishes it from other numeric parametrs), then the setting only applies to DNS queries against the specified DNS domain (host, domain or RBL (sub)zone). Matching is case-insensitive, the actual domain may be a subdomain of the specified zone. =cut push (@cmds, { setting => 'rbl_timeout', is_admin => 1, default => 15, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } local ($1,$2,$3); unless ($value =~ /^ ( \+? \d+ (?: \. \d*)? [smhdw]? ) (?: \s+ ( \+? \d+ (?: \. \d*)? [smhdw]? ) )? (?: \s+ (\S* [a-zA-Z]) )? $/xsi) { return $INVALID_VALUE; } my($timeout, $timeout_min, $zone) = ($1, $2, $3); foreach ($timeout, $timeout_min) { if (defined $_ && s/\s*([smhdw])\z//i) { $_ *= { s => 1, m => 60, h => 3600, d => 24*3600, w => 7*24*3600 }->{lc $1}; } } if (!defined $zone) { # a global setting $self->{rbl_timeout} = 0 + $timeout; $self->{rbl_timeout_min} = 0 + $timeout_min if defined $timeout_min; } else { # per-zone settings $zone =~ s/^\.//; $zone =~ s/\.\z//; # strip leading and trailing dot $zone = lc $zone; $self->{by_zone}{$zone}{rbl_timeout} = 0 + $timeout; $self->{by_zone}{$zone}{rbl_timeout_min} = 0 + $timeout_min if defined $timeout_min; } }, type => $CONF_TYPE_DURATION, }); =item util_rb_tld tld1 tld2 ... This option allows the addition of new TLDs to the RegistrarBoundaries code. Updates to the list usually happen when new versions of SpamAssassin are released, but sometimes it's necessary to add in new TLDs faster than a release can occur. TLDs include things like com, net, org, etc. =cut push (@cmds, { setting => 'util_rb_tld', is_admin => 1, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } unless ($value =~ /^[a-zA-Z]+(?:\s+[a-zA-Z]+)*$/) { return $INVALID_VALUE; } foreach (split(/\s+/, $value)) { $Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS{lc $_} = 1; } } }); =item util_rb_2tld 2tld-1.tld 2tld-2.tld ... This option allows the addition of new 2nd-level TLDs (2TLD) to the RegistrarBoundaries code. Updates to the list usually happen when new versions of SpamAssassin are released, but sometimes it's necessary to add in new 2TLDs faster than a release can occur. 2TLDs include things like co.uk, fed.us, etc. =cut push (@cmds, { setting => 'util_rb_2tld', is_admin => 1, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } unless ($value =~ /^[^\s.]+\.[^\s.]+(?:\s+[^\s.]+\.[^\s.]+)*$/) { return $INVALID_VALUE; } foreach (split(/\s+/, $value)) { $Mail::SpamAssassin::Util::RegistrarBoundaries::TWO_LEVEL_DOMAINS{lc $_} = 1; } } }); =item util_rb_3tld 3tld1.some.tld 3tld2.other.tld ... This option allows the addition of new 3rd-level TLDs (3TLD) to the RegistrarBoundaries code. Updates to the list usually happen when new versions of SpamAssassin are released, but sometimes it's necessary to add in new 3TLDs faster than a release can occur. 3TLDs include things like demon.co.uk, plc.co.im, etc. =cut push (@cmds, { setting => 'util_rb_3tld', is_admin => 1, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } unless ($value =~ /^[^\s.]+\.[^\s.]+\.[^\s.]+(?:\s+[^\s.]+\.[^\s.]+)*$/) { return $INVALID_VALUE; } foreach (split(/\s+/, $value)) { $Mail::SpamAssassin::Util::RegistrarBoundaries::THREE_LEVEL_DOMAINS{lc $_} = 1; } } }); =item bayes_path /path/filename (default: ~/.spamassassin/bayes) This is the directory and filename for Bayes databases. Several databases will be created, with this as the base directory and filename, with C<_toks>, C<_seen>, etc. appended to the base. The default setting results in files called C<~/.spamassassin/bayes_seen>, C<~/.spamassassin/bayes_toks>, etc. By default, each user has their own in their C<~/.spamassassin> directory with mode 0700/0600. For system-wide SpamAssassin use, you may want to reduce disk space usage by sharing this across all users. However, Bayes appears to be more effective with individual user databases. =cut push (@cmds, { setting => 'bayes_path', is_admin => 1, default => '__userstate__/bayes', type => $CONF_TYPE_STRING, code => sub { my ($self, $key, $value, $line) = @_; unless (defined $value && $value !~ /^$/) { return $MISSING_REQUIRED_VALUE; } if (-d $value) { return $INVALID_VALUE; } $self->{bayes_path} = $value; } }); =item bayes_file_mode (default: 0700) The file mode bits used for the Bayesian filtering database files. Make sure you specify this using the 'x' mode bits set, as it may also be used to create directories. However, if a file is created, the resulting file will not have any execute bits set (the umask is set to 111). The argument is a string of octal digits, it is converted to a numeric value internally. =cut push (@cmds, { setting => 'bayes_file_mode', is_admin => 1, default => '0700', type => $CONF_TYPE_NUMERIC, code => sub { my ($self, $key, $value, $line) = @_; if ($value !~ /^0?[0-7]{3}$/) { return $INVALID_VALUE } $self->{bayes_file_mode} = untaint_var($value); } }); =item bayes_store_module Name::Of::BayesStore::Module If this option is set, the module given will be used as an alternate to the default bayes storage mechanism. It must conform to the published storage specification (see Mail::SpamAssassin::BayesStore). For example, set this to Mail::SpamAssassin::BayesStore::SQL to use the generic SQL storage module. =cut push (@cmds, { setting => 'bayes_store_module', is_admin => 1, default => '', type => $CONF_TYPE_STRING, code => sub { my ($self, $key, $value, $line) = @_; local ($1); if ($value !~ /^([_A-Za-z0-9:]+)$/) { return $INVALID_VALUE; } $self->{bayes_store_module} = $1; } }); =item bayes_sql_dsn DBI::databasetype:databasename:hostname:port Used for BayesStore::SQL storage implementation. This option give the connect string used to connect to the SQL based Bayes storage. =cut push (@cmds, { setting => 'bayes_sql_dsn', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item bayes_sql_username Used by BayesStore::SQL storage implementation. This option gives the username used by the above DSN. =cut push (@cmds, { setting => 'bayes_sql_username', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item bayes_sql_password Used by BayesStore::SQL storage implementation. This option gives the password used by the above DSN. =cut push (@cmds, { setting => 'bayes_sql_password', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item bayes_sql_username_authorized ( 0 | 1 ) (default: 0) Whether to call the services_authorized_for_username plugin hook in BayesSQL. If the hook does not determine that the user is allowed to use bayes or is invalid then then database will not be initialized. NOTE: By default the user is considered invalid until a plugin returns a true value. If you enable this, but do not have a proper plugin loaded, all users will turn up as invalid. The username passed into the plugin can be affected by the bayes_sql_override_username config option. =cut push (@cmds, { setting => 'bayes_sql_username_authorized', is_admin => 1, default => 0, type => $CONF_TYPE_BOOL, }); =item user_scores_dsn DBI:databasetype:databasename:hostname:port If you load user scores from an SQL database, this will set the DSN used to connect. Example: C<DBI:mysql:spamassassin:localhost> If you load user scores from an LDAP directory, this will set the DSN used to connect. You have to write the DSN as an LDAP URL, the components being the host and port to connect to, the base DN for the search, the scope of the search (base, one or sub), the single attribute being the multivalued attribute used to hold the configuration data (space separated pairs of key and value, just as in a file) and finally the filter being the expression used to filter out the wanted username. Note that the filter expression is being used in a sprintf statement with the username as the only parameter, thus is can hold a single __USERNAME__ expression. This will be replaced with the username. Example: C<ldap://localhost:389/dc=koehntopp,dc=de?saconfig?uid=__USERNAME__> =cut push (@cmds, { setting => 'user_scores_dsn', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item user_scores_sql_username username The authorized username to connect to the above DSN. =cut push (@cmds, { setting => 'user_scores_sql_username', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item user_scores_sql_password password The password for the database username, for the above DSN. =cut push (@cmds, { setting => 'user_scores_sql_password', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item user_scores_sql_custom_query query This option gives you the ability to create a custom SQL query to retrieve user scores and preferences. In order to work correctly your query should return two values, the preference name and value, in that order. In addition, there are several "variables" that you can use as part of your query, these variables will be substituted for the current values right before the query is run. The current allowed variables are: =over 4 =item _TABLE_ The name of the table where user scores and preferences are stored. Currently hardcoded to userpref, to change this value you need to create a new custom query with the new table name. =item _USERNAME_ The current user's username. =item _MAILBOX_ The portion before the @ as derived from the current user's username. =item _DOMAIN_ The portion after the @ as derived from the current user's username, this value may be null. =back The query must be one continuous line in order to parse correctly. Here are several example queries, please note that these are broken up for easy reading, in your config it should be one continuous line. =over 4 =item Current default query: C<SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '@GLOBAL' ORDER BY username ASC> =item Use global and then domain level defaults: C<SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '@GLOBAL' OR username = '@~'||_DOMAIN_ ORDER BY username ASC> =item Maybe global prefs should override user prefs: C<SELECT preference, value FROM _TABLE_ WHERE username = _USERNAME_ OR username = '@GLOBAL' ORDER BY username DESC> =back =cut push (@cmds, { setting => 'user_scores_sql_custom_query', is_admin => 1, default => undef, type => $CONF_TYPE_STRING, }); =item user_scores_ldap_username This is the Bind DN used to connect to the LDAP server. It defaults to the empty string (""), allowing anonymous binding to work. Example: C<cn=master,dc=koehntopp,dc=de> =cut push (@cmds, { setting => 'user_scores_ldap_username', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item user_scores_ldap_password This is the password used to connect to the LDAP server. It defaults to the empty string (""). =cut push (@cmds, { setting => 'user_scores_ldap_password', is_admin => 1, default => '', type => $CONF_TYPE_STRING, }); =item user_scores_fallback_to_global (default: 1) Fall back to global scores and settings if userprefs can't be loaded from SQL or LDAP, instead of passing the message through unprocessed. =cut push (@cmds, { setting => 'user_scores_fallback_to_global', is_admin => 1, default => 1, type => $CONF_TYPE_BOOL, }); =item loadplugin PluginModuleName [/path/module.pm] Load a SpamAssassin plugin module. The C<PluginModuleName> is the perl module name, used to create the plugin object itself. C</path/to/module.pm> is the file to load, containing the module's perl code; if it's specified as a relative path, it's considered to be relative to the current configuration file. If it is omitted, the module will be loaded using perl's search path (the C<@INC> array). See C<Mail::SpamAssassin::Plugin> for more details on writing plugins. =cut push (@cmds, { setting => 'loadplugin', is_admin => 1, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } my ($package, $path); local ($1,$2); if ($value =~ /^(\S+)\s+(\S+)$/) { ($package, $path) = ($1, $2); } elsif ($value =~ /^\S+$/) { ($package, $path) = ($value, undef); } else { return $INVALID_VALUE; } # is blindly untainting safe? it is no worse than before $_ = untaint_var($_) for ($package,$path); $self->load_plugin ($package, $path); } }); =item tryplugin PluginModuleName [/path/module.pm] Same as C<loadplugin>, but silently ignored if the .pm file cannot be found in the filesystem. =cut push (@cmds, { setting => 'tryplugin', is_admin => 1, code => sub { my ($self, $key, $value, $line) = @_; if ($value eq '') { return $MISSING_REQUIRED_VALUE; } my ($package, $path); local ($1,$2); if ($value =~ /^(\S+)\s+(\S+)$/) { ($package, $path) = ($1, $2); } elsif ($value =~ /^\S+$/) { ($package, $path) = ($value, undef); } else { return $INVALID_VALUE; } # is blindly untainting safe? it is no worse than before $_ = untaint_var($_) for ($package,$path); $self->load_plugin ($package, $path, 1); } }); =item ignore_always_matching_regexps (Default: 0) Ignore any rule which contains a regexp which always matches. Currently only catches regexps which contain '||', or which begin or end with a '|'. Also ignore rules with C<some> combinatorial explosions. =cut push (@cmds, { setting => 'ignore_always_matching_regexps', is_admin => 1, default => 0, type => $CONF_TYPE_BOOL, }); =back =head1 PREPROCESSING OPTIONS =over 4 =item include filename Include configuration lines from C<filename>. Relative paths are considered relative to the current configuration file or user preferences file. =item if (boolean perl expression) Used to support conditional interpretation of the configuration file. Lines between this and a corresponding C<else> or C<endif> line will be ignored unless the expression evaluates as true (in the perl sense; that is, defined and non-0 and non-empty string). The conditional accepts a limited subset of perl for security -- just enough to perform basic arithmetic comparisons. The following input is accepted: =over 4 =item numbers, whitespace, arithmetic operations and grouping Namely these characters and ranges: ( ) - + * / _ . , < = > ! ~ 0-9 whitespace =item version This will be replaced with the version number of the currently-running SpamAssassin engine. Note: The version used is in the internal SpamAssassin version format which is C<x.yyyzzz>, where x is major version, y is minor version, and z is maintenance version. So 3.0.0 is C<3.000000>, and 3.4.80 is C<3.004080>. =item plugin(Name::Of::Plugin) This is a function call that returns C<1> if the plugin named C<Name::Of::Plugin> is loaded, or C<undef> otherwise. =item has(Name::Of::Package::function_name) This is a function call that returns C<1> if the perl package named C<Name::Of::Package> includes a function called C<function_name>, or C<undef> otherwise. Note that packages can be SpamAssassin plugins or built-in classes, there's no difference in this respect. Internally this invokes UNIVERSAL::can. =item can(Name::Of::Package::function_name) This is a function call that returns C<1> if the perl package named C<Name::Of::Package> includes a function called C<function_name> B<and> that function returns a true value when called with no arguments, otherwise C<undef> is returned. Is similar to C<has>, except that it also calls the named function, testing its return value (unlike the perl function UNIVERSAL::can). This makes it possible for a 'feature' function to determine its result value at run time. =back If the end of a configuration file is reached while still inside a C<if> scope, a warning will be issued, but parsing will restart on the next file. For example: if (version > 3.000000) header MY_FOO ... endif loadplugin MyPlugin plugintest.pm if plugin (MyPlugin) header MY_PLUGIN_FOO eval:check_for_foo() score MY_PLUGIN_FOO 0.1 endif =item ifplugin PluginModuleName An alias for C<if plugin(PluginModuleName)>. =item else Used to support conditional interpretation of the configuration file. Lines between this and a corresponding C<endif> line, will be ignored unless the conditional expression evaluates as false (in the perl sense; that is, not defined and not 0 and non-empty string). =item require_version n.nnnnnn Indicates that the entire file, from this line on, requires a certain version of SpamAssassin to run. If a different (older or newer) version of SpamAssassin tries to read the configuration from this file, it will output a warning instead, and ignore it. Note: The version used is in the internal SpamAssassin version format which is C<x.yyyzzz>, where x is major version, y is minor version, and z is maintenance version. So 3.0.0 is C<3.000000>, and 3.4.80 is C<3.004080>. =cut push (@cmds, { setting => 'require_version', type => $CONF_TYPE_STRING, code => sub { } }); =back =head1 TEMPLATE TAGS The following C<tags> can be used as placeholders in certain options. They will be replaced by the corresponding value when they are used. Some tags can take an argument (in parentheses). The argument is optional, and the default is shown below. _YESNO_ "Yes" for spam, "No" for nonspam (=ham) _YESNO(spam_str,ham_str)_ returns the first argument ("Yes" if missing) for spam, and the second argument ("No" if missing) for ham _YESNOCAPS_ "YES" for spam, "NO" for nonspam (=ham) _YESNOCAPS(spam_str,ham_str)_ same as _YESNO(...)_, but uppercased _SCORE(PAD)_ message score, if PAD is included and is either spaces or zeroes, then pad scores with that many spaces or zeroes (default, none) ie: _SCORE(0)_ makes 2.4 become 02.4, _SCORE(00)_ is 002.4. 12.3 would be 12.3 and 012.3 respectively. _REQD_ message threshold _VERSION_ version (eg. 3.0.0 or 3.1.0-r26142-foo1) _SUBVERSION_ sub-version/code revision date (eg. 2004-01-10) _RULESVERSION_ comma-separated list of rules versions, retrieved from an '# UPDATE version' comment in rules files; if there is more than one set of rules (update channels) the order is unspecified (currently sorted by names of files); _HOSTNAME_ hostname of the machine the mail was processed on _REMOTEHOSTNAME_ hostname of the machine the mail was sent from, only available with spamd _REMOTEHOSTADDR_ ip address of the machine the mail was sent from, only available with spamd _BAYES_ bayes score _TOKENSUMMARY_ number of new, neutral, spammy, and hammy tokens found _BAYESTC_ number of new tokens found _BAYESTCLEARNED_ number of seen tokens found _BAYESTCSPAMMY_ number of spammy tokens found _BAYESTCHAMMY_ number of hammy tokens found _HAMMYTOKENS(N)_ the N most significant hammy tokens (default, 5) _SPAMMYTOKENS(N)_ the N most significant spammy tokens (default, 5) _DATE_ rfc-2822 date of scan _STARS(*)_ one "*" (use any character) for each full score point (note: limited to 50 'stars') _RELAYSTRUSTED_ relays used and deemed to be trusted (see the 'X-Spam-Relays-Trusted' pseudo-header) _RELAYSUNTRUSTED_ relays used that can not be trusted (see the 'X-Spam-Relays-Untrusted' pseudo-header) _RELAYSINTERNAL_ relays used and deemed to be internal (see the 'X-Spam-Relays-Internal' pseudo-header) _RELAYSEXTERNAL_ relays used and deemed to be external (see the 'X-Spam-Relays-External' pseudo-header) _LASTEXTERNALIP_ IP address of client in the external-to-internal SMTP handover _LASTEXTERNALRDNS_ reverse-DNS of client in the external-to-internal SMTP handover _LASTEXTERNALHELO_ HELO string used by client in the external-to-internal SMTP handover _AUTOLEARN_ autolearn status ("ham", "no", "spam", "disabled", "failed", "unavailable") _AUTOLEARNSCORE_ portion of message score used by autolearn _TESTS(,)_ tests hit separated by "," (or other separator) _TESTSSCORES(,)_ as above, except with scores appended (eg. AWL=-3.0,...) _SUBTESTS(,)_ subtests (start with "__") hit separated by "," (or other separator) _DCCB_ DCC's "Brand" _DCCR_ DCC's results _PYZOR_ Pyzor results _RBL_ full results for positive RBL queries in DNS URI format _LANGUAGES_ possible languages of mail _PREVIEW_ content preview _REPORT_ terse report of tests hit (for header reports) _SUMMARY_ summary of tests hit for standard report (for body reports) _CONTACTADDRESS_ contents of the 'report_contact' setting _HEADER(NAME)_ includes the value of a message header. value is the same as is found for header rules (see elsewhere in this doc) _TIMING_ timing breakdown report _ADDEDHEADERHAM_ resulting header fields as requested by add_header for spam _ADDEDHEADERSPAM_ resulting header fields as requested by add_header for ham _ADDEDHEADER_ same as ADDEDHEADERHAM for ham or ADDEDHEADERSPAM for spam If a tag reference uses the name of a tag which is not in this list or defined by a loaded plugin, the reference will be left intact and not replaced by any value. The C<HAMMYTOKENS> and C<SPAMMYTOKENS> tags have an optional second argument which specifies a format. See the B<HAMMYTOKENS/SPAMMYTOKENS TAG FORMAT> section, below, for details. =head2 HAMMYTOKENS/SPAMMYTOKENS TAG FORMAT The C<HAMMYTOKENS> and C<SPAMMYTOKENS> tags have an optional second argument which specifies a format: C<_SPAMMYTOKENS(N,FMT)_>, C<_HAMMYTOKENS(N,FMT)_> The following formats are available: =over 4 =item short Only the tokens themselves are listed. I<For example, preference file entry:> C<add_header all Spammy _SPAMMYTOKENS(2,short)_> I<Results in message header:> C<X-Spam-Spammy: remove.php, UD:jpg> Indicating that the top two spammy tokens found are C<remove.php> and C<UD:jpg>. (The token itself follows the last colon, the text before the colon indicates something about the token. C<UD> means the token looks like it might be part of a domain name.) =item compact The token probability, an abbreviated declassification distance (see example), and the token are listed. I<For example, preference file entry:> C<add_header all Spammy _SPAMMYTOKENS(2,compact)_> I<Results in message header:> C<0.989-6--remove.php, 0.988-+--UD:jpg> Indicating that the probabilities of the top two tokens are 0.989 and 0.988, respectively. The first token has a declassification distance of 6, meaning that if the token had appeared in at least 6 more ham messages it would not be considered spammy. The C<+> for the second token indicates a declassification distance greater than 9. =item long Probability, declassification distance, number of times seen in a ham message, number of times seen in a spam message, age and the token are listed. I<For example, preference file entry:> C<add_header all Spammy _SPAMMYTOKENS(2,long)_> I<Results in message header:> C<X-Spam-Spammy: 0.989-6--0h-4s--4d--remove.php, 0.988-33--2h-25s--1d--UD:jpg> In addition to the information provided by the compact option, the long option shows that the first token appeared in zero ham messages and four spam messages, and that it was last seen four days ago. The second token appeared in two ham messages, 25 spam messages and was last seen one day ago. (Unlike the C<compact> option, the long option shows declassification distances that are greater than 9.) =back =cut return \@cmds; } ########################################################################### # settings that were once part of core, but are now in (possibly-optional) # bundled plugins. These will be warned about, but do not generate a fatal # error when "spamassassin --lint" is run like a normal syntax error would. @MIGRATED_SETTINGS = qw{ ok_languages }; ########################################################################### sub new { my $class = shift; $class = ref($class) || $class; my $self = { main => shift, registered_commands => [], }; bless ($self, $class); $self->{parser} = Mail::SpamAssassin::Conf::Parser->new($self); $self->{parser}->register_commands($self->set_default_commands()); $self->{errors} = 0; $self->{plugins_loaded} = { }; $self->{tests} = { }; $self->{test_types} = { }; $self->{scoreset} = [ {}, {}, {}, {} ]; $self->{scoreset_current} = 0; $self->set_score_set (0); $self->{tflags} = { }; $self->{source_file} = { }; # keep descriptions in a slow but space-efficient single-string # data structure tie %{$self->{descriptions}}, 'Mail::SpamAssassin::Util::TieOneStringHash' or warn "tie failed"; # after parsing, tests are refiled into these hashes for each test type. # this allows e.g. a full-text test to be rewritten as a body test in # the user's user_prefs file. $self->{body_tests} = { }; $self->{uri_tests} = { }; $self->{uri_evals} = { }; # not used/implemented yet $self->{head_tests} = { }; $self->{head_evals} = { }; $self->{body_evals} = { }; $self->{full_tests} = { }; $self->{full_evals} = { }; $self->{rawbody_tests} = { }; $self->{rawbody_evals} = { }; $self->{meta_tests} = { }; $self->{eval_plugins} = { }; $self->{duplicate_rules} = { }; # testing stuff $self->{regression_tests} = { }; $self->{rewrite_header} = { }; $self->{want_rebuild_for_type} = { }; $self->{user_defined_rules} = { }; $self->{headers_spam} = [ ]; $self->{headers_ham} = [ ]; $self->{bayes_ignore_headers} = [ ]; $self->{bayes_ignore_from} = { }; $self->{bayes_ignore_to} = { }; $self->{whitelist_auth} = { }; $self->{def_whitelist_auth} = { }; $self->{whitelist_from} = { }; $self->{whitelist_allows_relays} = { }; $self->{blacklist_from} = { }; $self->{whitelist_from_rcvd} = { }; $self->{def_whitelist_from_rcvd} = { }; $self->{blacklist_to} = { }; $self->{whitelist_to} = { }; $self->{more_spam_to} = { }; $self->{all_spam_to} = { }; $self->{trusted_networks} = $self->new_netset('trusted_networks',1); $self->{internal_networks} = $self->new_netset('internal_networks',1); $self->{msa_networks} = $self->new_netset('msa_networks',0); # no loopback IP $self->{trusted_networks_configured} = 0; $self->{internal_networks_configured} = 0; # Make sure we add in X-Spam-Checker-Version { my $r = [ "Checker-Version", "SpamAssassin _VERSION_ (_SUBVERSION_) on _HOSTNAME_" ]; push(@{$self->{headers_spam}}, $r); push(@{$self->{headers_ham}}, $r); } # RFC 6891: A good compromise may be the use of an EDNS maximum payload size # of 4096 octets as a starting point. $self->{dns_options}->{edns} = 4096; # these should potentially be settable by end-users # perhaps via plugin? $self->{num_check_received} = 9; $self->{bayes_expiry_pct} = 0.75; $self->{bayes_expiry_period} = 43200; $self->{bayes_expiry_max_exponent} = 9; $self->{encapsulated_content_description} = 'original message before SpamAssassin'; $self; } sub mtime { my $self = shift; if (@_) { $self->{mtime} = shift; } return $self->{mtime}; } ########################################################################### sub parse_scores_only { my ($self) = @_; $_[0]->{parser}->parse ($_[1], 1); } sub parse_rules { my ($self) = @_; $_[0]->{parser}->parse ($_[1], 0); } ########################################################################### sub set_score_set { my ($self, $set) = @_; $self->{scores} = $self->{scoreset}->[$set]; $self->{scoreset_current} = $set; dbg("config: score set $set chosen."); } sub get_score_set { my($self) = @_; return $self->{scoreset_current}; } sub get_rule_types { my ($self) = @_; return @rule_types; } sub get_rule_keys { my ($self, $test_type, $priority) = @_; # special case rbl_evals since they do not have a priority if ($test_type eq 'rbl_evals') { return keys(%{$self->{$test_type}}); } if (defined($priority)) { return keys(%{$self->{$test_type}->{$priority}}); } else { my @rules; foreach my $pri (keys(%{$self->{priorities}})) { push(@rules, keys(%{$self->{$test_type}->{$pri}})); } return @rules; } } sub get_rule_value { my ($self, $test_type, $rulename, $priority) = @_; # special case rbl_evals since they do not have a priority if ($test_type eq 'rbl_evals') { return keys(%{$self->{$test_type}->{$rulename}}); } if (defined($priority)) { return $self->{$test_type}->{$priority}->{$rulename}; } else { foreach my $pri (keys(%{$self->{priorities}})) { if (exists($self->{$test_type}->{$pri}->{$rulename})) { return $self->{$test_type}->{$pri}->{$rulename}; } } return; # if we get here we didn't find the rule } } sub delete_rule { my ($self, $test_type, $rulename, $priority) = @_; # special case rbl_evals since they do not have a priority if ($test_type eq 'rbl_evals') { return delete($self->{$test_type}->{$rulename}); } if (defined($priority)) { return delete($self->{$test_type}->{$priority}->{$rulename}); } else { foreach my $pri (keys(%{$self->{priorities}})) { if (exists($self->{$test_type}->{$pri}->{$rulename})) { return delete($self->{$test_type}->{$pri}->{$rulename}); } } return; # if we get here we didn't find the rule } } # trim_rules ($regexp) # # Remove all rules that don't match the given regexp (or are sub-rules of # meta-tests that match the regexp). sub trim_rules { my ($self, $regexp) = @_; my @all_rules; foreach my $rule_type ($self->get_rule_types()) { push(@all_rules, $self->get_rule_keys($rule_type)); } my @rules_to_keep = grep(/$regexp/, @all_rules); if (@rules_to_keep == 0) { die "config: trim_rules: all rules excluded, nothing to test\n"; } my @meta_tests = grep(/$regexp/, $self->get_rule_keys('meta_tests')); foreach my $meta (@meta_tests) { push(@rules_to_keep, $self->add_meta_depends($meta)) } my %rules_to_keep_hash; foreach my $rule (@rules_to_keep) { $rules_to_keep_hash{$rule} = 1; } foreach my $rule_type ($self->get_rule_types()) { foreach my $rulekey ($self->get_rule_keys($rule_type)) { $self->delete_rule($rule_type, $rulekey) if (!$rules_to_keep_hash{$rulekey}); } } } # trim_rules() sub add_meta_depends { my ($self, $meta) = @_; my @rules; my @tokens = $self->get_rule_value('meta_tests', $meta) =~ m/(\w+)/g; @tokens = grep(!/^\d+$/, @tokens); # @tokens now only consists of sub-rules foreach my $token (@tokens) { die "config: meta test $meta depends on itself\n" if $token eq $meta; push(@rules, $token); # If the sub-rule is a meta-test, recurse if ($self->get_rule_value('meta_tests', $token)) { push(@rules, $self->add_meta_depends($token)); } } # foreach my $token (@tokens) return @rules; } # add_meta_depends() sub is_rule_active { my ($self, $test_type, $rulename, $priority) = @_; # special case rbl_evals since they do not have a priority if ($test_type eq 'rbl_evals') { return 0 unless ($self->{$test_type}->{$rulename}); return ($self->{scores}->{$rulename}); } # first determine if the rule is defined if (defined($priority)) { # we have a specific priority return 0 unless ($self->{$test_type}->{$priority}->{$rulename}); } else { # no specific priority so we must loop over all currently defined # priorities to see if the rule is defined my $found_p = 0; foreach my $pri (keys %{$self->{priorities}}) { if ($self->{$test_type}->{$pri}->{$rulename}) { $found_p = 1; last; } } return 0 unless ($found_p); } return ($self->{scores}->{$rulename}); } ########################################################################### # treats a bitset argument as a bit vector of all possible port numbers (8 kB) # and sets bit values to $value (0 or 1) in the specified range of port numbers # sub set_ports_range { my($bitset_ref, $port_range_lo, $port_range_hi, $value) = @_; $port_range_lo = 0 if $port_range_lo < 0; $port_range_hi = 65535 if $port_range_hi > 65535; if (!defined $$bitset_ref) { # provide a sensible default wipe_ports_range($bitset_ref, 1); # turn on all bits 0..65535 vec($$bitset_ref,$_,1) = 0 for 0..1023; # avoid 0 and privileged ports } elsif ($$bitset_ref eq '') { # repopulate the bitset (late configuration) wipe_ports_range($bitset_ref, 0); # turn off all bits 0..65535 } $value = !$value ? 0 : 1; for (my $j = $port_range_lo; $j <= $port_range_hi; $j++) { vec($$bitset_ref,$j,1) = $value; } } sub wipe_ports_range { my($bitset_ref, $value) = @_; $value = !$value ? "\000" : "\377"; $$bitset_ref = $value x 8192; # quickly turn all bits 0..65535 on or off } ########################################################################### sub add_to_addrlist { my $self = shift; $self->{parser}->add_to_addrlist(@_); } sub add_to_addrlist_rcvd { my $self = shift; $self->{parser}->add_to_addrlist_rcvd(@_); } sub remove_from_addrlist { my $self = shift; $self->{parser}->remove_from_addrlist(@_); } sub remove_from_addrlist_rcvd { my $self = shift; $self->{parser}->remove_from_addrlist_rcvd(@_); } ########################################################################### sub regression_tests { my $self = shift; if (@_ == 1) { # we specified a symbolic name, return the strings my $name = shift; my $tests = $self->{regression_tests}->{$name}; return @$tests; } else { # no name asked for, just return the symbolic names we have tests for return keys %{$self->{regression_tests}}; } } ########################################################################### sub finish_parsing { my ($self, $user) = @_; $self->{parser}->finish_parsing($user); } ########################################################################### sub found_any_rules { my ($self) = @_; if (!defined $self->{found_any_rules}) { $self->{found_any_rules} = (scalar keys %{$self->{tests}} > 0); } return $self->{found_any_rules}; } ########################################################################### sub get_description_for_rule { my ($self, $rule) = @_; # as silly as it looks, localized $1 here prevents an outer $1 from getting # tainted by the expression or assignment in the next line, bug 6148 local($1); my $rule_descr = $self->{descriptions}->{$rule}; return $rule_descr; } ########################################################################### sub maybe_header_only { my($self,$rulename) = @_; my $type = $self->{test_types}->{$rulename}; if ($rulename =~ /AUTOLEARNTEST/i) { dbg("config: auto-learn: $rulename - Test type is $self->{test_types}->{$rulename}."); } return 0 if (!defined ($type)); if (($type == $TYPE_HEAD_TESTS) || ($type == $TYPE_HEAD_EVALS)) { return 1; } elsif ($type == $TYPE_META_TESTS) { my $tflags = $self->{tflags}->{$rulename}; $tflags ||= ''; if ($tflags =~ m/\bnet\b/i) { return 0; } else { return 1; } } return 0; } sub maybe_body_only { my($self,$rulename) = @_; my $type = $self->{test_types}->{$rulename}; if ($rulename =~ /AUTOLEARNTEST/i) { dbg("config: auto-learn: $rulename - Test type is $self->{test_types}->{$rulename}."); } return 0 if (!defined ($type)); if (($type == $TYPE_BODY_TESTS) || ($type == $TYPE_BODY_EVALS) || ($type == $TYPE_URI_TESTS) || ($type == $TYPE_URI_EVALS)) { # some rawbody go off of headers... return 1; } elsif ($type == $TYPE_META_TESTS) { my $tflags = $self->{tflags}->{$rulename}; $tflags ||= ''; if ($tflags =~ m/\bnet\b/i) { return 0; } else { return 1; } } return 0; } ########################################################################### sub load_plugin { my ($self, $package, $path, $silent) = @_; if ($path) { $path = $self->{parser}->fix_path_relative_to_current_file($path); } # it wouldn't hurt to do some checking on validity of $package # and $path before untainting them $self->{main}->{plugins}->load_plugin(untaint_var($package), $path, $silent); } sub load_plugin_succeeded { my ($self, $plugin, $package, $path) = @_; $self->{plugins_loaded}->{$package} = 1; } sub register_eval_rule { my ($self, $pluginobj, $nameofsub) = @_; $self->{eval_plugins}->{$nameofsub} = $pluginobj; } ########################################################################### sub clone { my ($self, $source, $dest) = @_; unless (defined $source) { $source = $self; } unless (defined $dest) { $dest = $self; } my %done; # keys that should not be copied in ->clone(). # bug 4179: include want_rebuild_for_type, so that if a user rule # is defined, its method will be recompiled for future scans in # order to *remove* the generated method calls my @NON_COPIED_KEYS = qw( main eval_plugins plugins_loaded registered_commands sed_path_cache parser scoreset scores want_rebuild_for_type ); # special cases. first, skip anything that cannot be changed # by users, and the stuff we take care of here foreach my $var (@NON_COPIED_KEYS) { $done{$var} = undef; } # keys that should can be copied using a ->clone() method, in ->clone() my @CLONABLE_KEYS = qw( internal_networks trusted_networks msa_networks ); foreach my $key (@CLONABLE_KEYS) { $dest->{$key} = $source->{$key}->clone(); $done{$key} = undef; } # two-level hashes foreach my $key (qw(uri_host_lists askdns)) { my $v = $source->{$key}; my $dest_key_ref = $dest->{$key} = {}; # must start from scratch! while(my($k2,$v2) = each %{$v}) { %{$dest_key_ref->{$k2}} = %{$v2}; } $done{$key} = undef; } # bug 4179: be smarter about cloning the rule-type structures; # some are like this: $self->{type}->{priority}->{name} = 'value'; # which is an extra level that the below code won't deal with foreach my $t (@rule_types) { foreach my $k (keys %{$source->{$t}}) { my $v = $source->{$t}->{$k}; my $i = ref $v; if ($i eq 'HASH') { %{$dest->{$t}->{$k}} = %{$v}; } elsif ($i eq 'ARRAY') { @{$dest->{$t}->{$k}} = @{$v}; } else { $dest->{$t}->{$k} = $v; } } $done{$t} = undef; } # and now, copy over all the rest -- the less complex cases. while(my($k,$v) = each %{$source}) { next if exists $done{$k}; # we handled it above $done{$k} = undef; my $i = ref($v); # Not a reference, or a scalar? Just copy the value over. if ($i eq '') { $dest->{$k} = $v; } elsif ($i eq 'SCALAR') { $dest->{$k} = $$v; } elsif ($i eq 'ARRAY') { @{$dest->{$k}} = @{$v}; } elsif ($i eq 'HASH') { %{$dest->{$k}} = %{$v}; } else { # throw a warning for debugging -- should never happen in normal usage warn "config: dup unknown type $k, $i\n"; } } foreach my $cmd (@{$self->{registered_commands}}) { my $k = $cmd->{setting}; next if exists $done{$k}; # we handled it above $done{$k} = undef; $dest->{$k} = $source->{$k}; } # scoresets delete $dest->{scoreset}; for my $i (0 .. 3) { %{$dest->{scoreset}->[$i]} = %{$source->{scoreset}->[$i]}; } # deal with $conf->{scores}, it needs to be a reference into the scoreset # hash array dealy. Do it at the end since scoreset_current isn't set # otherwise. $dest->{scores} = $dest->{scoreset}->[$dest->{scoreset_current}]; # ensure we don't copy the path cache from the master delete $dest->{sed_path_cache}; return 1; } ########################################################################### sub free_uncompiled_rule_source { my ($self) = @_; if (!$self->{main}->{keep_config_parsing_metadata} && !$self->{allow_user_rules}) { delete $self->{if_stack}; #delete $self->{source_file}; #delete $self->{meta_dependencies}; } } sub new_netset { my ($self, $netset_name, $add_loopback) = @_; my $set = Mail::SpamAssassin::NetSet->new($netset_name); if ($add_loopback) { $set->add_cidr('127.0.0.0/8'); $set->add_cidr('::1'); } return $set; } ########################################################################### sub finish { my ($self) = @_; untie %{$self->{descriptions}}; %{$self} = (); } ########################################################################### sub sa_die { Mail::SpamAssassin::sa_die(@_); } ########################################################################### # subroutines available to conditionalize rules, for example: # if (can(Mail::SpamAssassin::Conf::feature_originating_ip_headers)) sub feature_originating_ip_headers { 1 } sub feature_dns_local_ports_permit_avoid { 1 } sub feature_bayes_auto_learn_on_error { 1 } sub feature_uri_host_listed { 1 } sub feature_yesno_takes_args { 1 } sub feature_bug6558_free { 1 } sub feature_edns { 1 } # supports 'dns_options edns' config option sub feature_dns_query_restriction { 1 } # supported config option ########################################################################### 1; __END__ =head1 LOCALI[SZ]ATION A line starting with the text C<lang xx> will only be interpreted if the user is in that locale, allowing test descriptions and templates to be set for that language. The locales string should specify either both the language and country, e.g. C<lang pt_BR>, or just the language, e.g. C<lang de>. =head1 SEE ALSO C<Mail::SpamAssassin> C<spamassassin> C<spamd> =cut
gitpan/Mail-SpamAssassin
lib/Mail/SpamAssassin/Conf.pm
Perl
apache-2.0
156,911
# # 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. # # Copyright (c) 2016 by Delphix. All rights reserved. # # Program Name : dx_ctl_jobs.pl # Description : Control jobs # Author : Marcin Przepiorowski # Created : 04 Jan 2016 (v2.2.0) # use warnings; use strict; use JSON; use Getopt::Long qw(:config no_ignore_case no_auto_abbrev); #avoids conflicts with ex host and help use File::Basename; use Pod::Usage; use FindBin; use Data::Dumper; my $abspath = $FindBin::Bin; use lib '../lib'; use Engine; use Formater; use Toolkit_helpers; use Jobs; use User_obj; my $version = $Toolkit_helpers::version; GetOptions( 'help|?' => \(my $help), 'd|engine=s' => \(my $dx_host), 'st=s' => \(my $st), 'et=s' => \(my $et), 'state=s' => \(my $state), 'jobref=s' => \(my $jobref), 'action=s' => \(my $action), 'format=s' => \(my $format), 'all' => (\my $all), 'version' => \(my $print_version), 'dever=s' => \(my $dever), 'nohead' => \(my $nohead), 'debug:i' => \(my $debug), 'configfile|c=s' => \(my $config_file) ) or pod2usage(-verbose => 1, -input=>\*DATA); pod2usage(-verbose => 2, -input=>\*DATA) && exit if $help; die "$version\n" if $print_version; my $engine_obj = new Engine ($dever, $debug); $engine_obj->load_config($config_file); if (defined($all) && defined($dx_host)) { print "Option all (-all) and engine (-d|engine) are mutually exclusive \n"; pod2usage(-verbose => 1, -input=>\*DATA); exit (1); } if (defined($state) && ( ! ( (uc $state eq 'COMPLETED') || (uc $state eq 'FAILED') || (uc $state eq 'RUNNING') || (uc $state eq 'SUSPENDED') || (uc $state eq 'CANCELED') ) ) ) { print "Option state can have only COMPLETED, WAITING and FAILED value\n"; pod2usage(-verbose => 1, -input=>\*DATA); exit (1); } if (! defined($action)) { print "Action is required\n"; pod2usage(-verbose => 1, -input=>\*DATA); exit (1); } if ( ( ! ( (uc $action eq 'CANCEL') || (uc $action eq 'RESUME') || (uc $action eq 'SUSPEND') ) ) ) { print "Argument action can have only CANCEL, RESUME and SUSPEND value\n"; pod2usage(-verbose => 1, -input=>\*DATA); exit (1); } my $ret = 0; # this array will have all engines to go through (if -d is specified it will be only one engine) my $engine_list = Toolkit_helpers::get_engine_list($all, $dx_host, $engine_obj); for my $engine ( sort (@{$engine_list}) ) { # main loop for all work if ($engine_obj->dlpx_connect($engine)) { print "Can't connect to Dephix Engine $dx_host\n\n"; $ret = $ret + 1; next; }; my $st_timestamp; my $et_timestamp; if (! defined($st_timestamp = Toolkit_helpers::timestamp($st, $engine_obj))) { print "Wrong start time (st) format \n"; pod2usage(-verbose => 1, -input=>\*DATA); exit (1); } if (defined($et)) { $et = Toolkit_helpers::timestamp_to_timestamp_with_de_timezone($et, $engine_obj); if (! defined($et_timestamp = Toolkit_helpers::timestamp($et, $engine_obj))) { print "Wrong end time (et) format \n"; pod2usage(-verbose => 1, -input=>\*DATA); exit (1); } } my $jobs = new Jobs($engine_obj, $st_timestamp, $et_timestamp, $state, undef, undef, $jobref, undef, undef, undef, $debug); my @jobsarr; @jobsarr = @{$jobs->getJobList('asc')}; for my $jobitem ( @jobsarr ) { my $jobobj = $jobs->getJob($jobitem); if (uc $action eq 'CANCEL') { if ($jobobj->cancel() ) { print "Error while canceling job - $jobitem\n"; $ret = $ret + 1; } else { print "Job - $jobitem - cancelled\n" } } elsif (uc $action eq 'SUSPEND') { if ($jobobj->suspend() ) { print "Error while suspending job - $jobitem\n"; $ret = $ret + 1; } else { print "Job - $jobitem - suspended\n" } } elsif (uc $action eq 'RESUME') { if ($jobobj->resume() ) { print "Error while resuming job - $jobitem\n"; $ret = $ret + 1; } else { print "Job - $jobitem - resumed\n" } } } } exit $ret; __DATA__ =head1 SYNOPSIS dx_ctl_jobs [ -engine|d <delphix identifier> | -all ] [ -configfile file ] -action CANCEL|SUSPEND|RESUME [-jobref ref] [-st timestamp] [-et timestamp] [-state state] [-help|? ] [-debug ] =head1 DESCRIPTION Run an action for a list of jobs from Delphix Engine. =head1 ARGUMENTS Delphix Engine selection - if not specified a default host(s) from dxtools.conf will be used. =over 10 =item B<-engine|d> Specify Delphix Engine name from dxtools.conf file =item B<-all> Display databases on all Delphix appliance =item B<-configfile file> Location of the configuration file. A config file search order is as follow: - configfile parameter - DXTOOLKIT_CONF variable - dxtools.conf from dxtoolkit location =back =head2 Filters Filter faults using one of the following filters =over 4 =item B<-state> Job state - COMPLETED / FAILED / RUNNING / SUSPENDED / CANCELED =item B<-jobref ref> Job reference =back =head1 OPTIONS =over 3 =item B<-action actionname> Run a particular action for a list of jobs - CANCEL | RESUME | SUSPEND =item B<-st timestamp> Start time for faults list - default value is 7 days =item B<-et timestamp> End time for faults list =item B<-help> Print this screen =item B<-debug> Turn on debugging =back =head1 EXAMPLES Cancel a job JOB-267199 dx_ctl_jobs -d Delphix32 -action cancel -jobref JOB-267199 Job - JOB-267199 - cancelled =cut
delphix/dxtoolkit
bin/dx_ctl_jobs.pl
Perl
apache-2.0
6,063
# # 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::kubernetes::mode::listingresses; use base qw(centreon::plugins::templates::counter); 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' }, "filter-namespace:s" => { name => 'filter_namespace' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); } sub manage_selection { my ($self, %options) = @_; my $results = $options{custom}->kubernetes_list_ingresses(); foreach my $ingress (@{$results->{items}}) { if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' && $ingress->{metadata}->{name} !~ /$self->{option_results}->{filter_name}/) { $self->{output}->output_add(long_msg => "skipping '" . $ingress->{metadata}->{name} . "': no matching filter name.", debug => 1); next; } if (defined($self->{option_results}->{filter_namespace}) && $self->{option_results}->{filter_namespace} ne '' && $ingress->{metadata}->{namespace} !~ /$self->{option_results}->{filter_namespace}/) { $self->{output}->output_add(long_msg => "skipping '" . $ingress->{metadata}->{namespace} . "': no matching filter namespace.", debug => 1); next; } $self->{ingresses}->{$ingress->{metadata}->{uid}} = { uid => $ingress->{metadata}->{uid}, name => $ingress->{metadata}->{name}, namespace => $ingress->{metadata}->{namespace}, } } } sub run { my ($self, %options) = @_; $self->manage_selection(%options); foreach my $ingress (sort keys %{$self->{ingresses}}) { $self->{output}->output_add(long_msg => sprintf("[uid = %s] [name = %s] [namespace = %s]", $self->{ingresses}->{$ingress}->{uid}, $self->{ingresses}->{$ingress}->{name}, $self->{ingresses}->{$ingress}->{namespace})); } $self->{output}->output_add(severity => 'OK', short_msg => 'List ingresses:'); $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 => ['uid', 'name', 'namespace']); } sub disco_show { my ($self, %options) = @_; $self->manage_selection(%options); foreach my $ingress (sort keys %{$self->{ingresses}}) { $self->{output}->add_disco_entry( uid => $self->{ingresses}->{$ingress}->{uid}, name => $self->{ingresses}->{$ingress}->{name}, namespace => $self->{ingresses}->{$ingress}->{namespace}, ); } } 1; __END__ =head1 MODE List ingresses. =over 8 =item B<--filter-name> Filter ingress name (can be a regexp). =item B<--filter-namespace> Filter ingress namespace (can be a regexp). =back =cut
Sims24/centreon-plugins
cloud/kubernetes/mode/listingresses.pm
Perl
apache-2.0
4,081
package Paws::CloudHSM::DeleteLunaClient; use Moose; has ClientArn => (is => 'ro', isa => 'Str', required => 1); use MooseX::ClassAttribute; class_has _api_call => (isa => 'Str', is => 'ro', default => 'DeleteLunaClient'); class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::CloudHSM::DeleteLunaClientResponse'); class_has _result_key => (isa => 'Str', is => 'ro'); 1; ### main pod documentation begin ### =head1 NAME Paws::CloudHSM::DeleteLunaClient - Arguments for method DeleteLunaClient on Paws::CloudHSM =head1 DESCRIPTION This class represents the parameters used for calling the method DeleteLunaClient on the Amazon CloudHSM service. Use the attributes of this class as arguments to method DeleteLunaClient. You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to DeleteLunaClient. As an example: $service_obj->DeleteLunaClient(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> ClientArn => Str The ARN of the client to delete. =head1 SEE ALSO This class forms part of L<Paws>, documenting arguments for method DeleteLunaClient in L<Paws::CloudHSM> =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/CloudHSM/DeleteLunaClient.pm
Perl
apache-2.0
1,615
# # Copyright 2016 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package centreon::common::fortinet::fortigate::mode::sessions; use base qw(centreon::plugins::mode); use strict; use warnings; sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $self->{version} = '1.0'; $options{options}->add_options(arguments => { "warning:s" => { name => 'warning', }, "critical:s" => { name => 'critical', }, "warning-avg:s" => { name => 'warning_avg', default => '' }, "critical-avg:s" => { name => 'critical_avg', default => '' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::init(%options); if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning threshold '" . $self->{option_results}->{warning} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical threshold '" . $self->{option_results}->{critical} . "'."); $self->{output}->option_exit(); } ($self->{warn1}, $self->{warn10}, $self->{warn30}, $self->{warn60}) = split /,/, $self->{option_results}->{warning_avg}; ($self->{crit1}, $self->{crit10}, $self->{crit30}, $self->{warn60}) = split /,/, $self->{option_results}->{critical_avg}; if (($self->{perfdata}->threshold_validate(label => 'warn1', value => $self->{warn1})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning (1min) threshold '" . $self->{warn1} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'warn10', value => $self->{warn10})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning (10min) threshold '" . $self->{warn10} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'warn30', value => $self->{warn30})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning (30min) threshold '" . $self->{warn30} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'warn60', value => $self->{warn60})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong warning (60min) threshold '" . $self->{warn60} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'crit1', value => $self->{crit1})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical (1min) threshold '" . $self->{crit1} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'crit10', value => $self->{crit10})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical (10min) threshold '" . $self->{crit10} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'crit30', value => $self->{crit30})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical (30min) threshold '" . $self->{crit30} . "'."); $self->{output}->option_exit(); } if (($self->{perfdata}->threshold_validate(label => 'crit60', value => $self->{crit60})) == 0) { $self->{output}->add_option_msg(short_msg => "Wrong critical (60min) threshold '" . $self->{crit60} . "'."); $self->{output}->option_exit(); } } sub run { my ($self, %options) = @_; # $options{snmp} = snmp object $self->{snmp} = $options{snmp}; my $oid_fgSysSesCount = '.1.3.6.1.4.1.12356.101.4.1.8.0'; my $oid_fgSysSesRate1 = '.1.3.6.1.4.1.12356.101.4.1.11.0'; my $oid_fgSysSesRate10 = '.1.3.6.1.4.1.12356.101.4.1.12.0'; my $oid_fgSysSesRate30 = '.1.3.6.1.4.1.12356.101.4.1.13.0'; my $oid_fgSysSesRate60 = '.1.3.6.1.4.1.12356.101.4.1.14.0'; my $result = $self->{snmp}->get_leef(oids => [$oid_fgSysSesCount, $oid_fgSysSesRate1, $oid_fgSysSesRate10, $oid_fgSysSesRate30, $oid_fgSysSesRate60], nothing_quit => 1); my $exit = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesCount}, threshold => [ { label => 'critical', 'exit_litteral' => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]); $self->{output}->output_add(severity => $exit, short_msg => sprintf("Current active sessions: %d", $result->{$oid_fgSysSesCount})); $self->{output}->perfdata_add(label => "sessions", value => $result->{$oid_fgSysSesCount}, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'), min => 0); my $exit1 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate1}, threshold => [ { label => 'crit1', 'exit_litteral' => 'critical' }, { label => 'warn1', exit_litteral => 'warning' } ]); my $exit2 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate10}, threshold => [ { label => 'crit10', 'exit_litteral' => 'critical' }, { label => 'warn10', exit_litteral => 'warning' } ]); my $exit3 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate30}, threshold => [ { label => 'crit30', 'exit_litteral' => 'critical' }, { label => 'warn30', exit_litteral => 'warning' } ]); my $exit4 = $self->{perfdata}->threshold_check(value => $result->{$oid_fgSysSesRate60}, threshold => [ { label => 'crit60', 'exit_litteral' => 'critical' }, { label => 'warn60', exit_litteral => 'warning' } ]); $exit = $self->{output}->get_most_critical(status => [ $exit1, $exit2, $exit3, $exit4 ]); $self->{output}->output_add(severity => $exit, short_msg => sprintf("Averate session setup rate: %s, %s, %s, %s (1min, 10min, 30min, 60min)", $result->{$oid_fgSysSesRate1}, $result->{$oid_fgSysSesRate10}, $result->{$oid_fgSysSesRate30}, $result->{$oid_fgSysSesRate60})); $self->{output}->perfdata_add(label => 'session_avg_setup1', value => $result->{$oid_fgSysSesRate1}, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn1'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit1'), min => 0); $self->{output}->perfdata_add(label => 'session_avg_setup10', value => $result->{$oid_fgSysSesRate10}, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn10'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit10'), min => 0); $self->{output}->perfdata_add(label => 'session_avg_setup30', value => $result->{$oid_fgSysSesRate30}, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn30'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit30'), min => 0); $self->{output}->perfdata_add(label => 'session_avg_setup60', value => $result->{$oid_fgSysSesRate60}, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warn60'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'crit60'), min => 0); $self->{output}->display(); $self->{output}->exit(); } 1; __END__ =head1 MODE Check sessions (FORTINET-FORTIGATE-MIB). =over 8 =item B<--warning> Threshold warning of current active sessions. =item B<--critical> Threshold critical of current active sessions. =item B<--warning-avg> Threshold warning of average setup rate (1min,10min,30min,60min). =item B<--critical-avg> Threshold critical of average setup rate (1min,10min,30min,60min). =back =cut
golgoth31/centreon-plugins
centreon/common/fortinet/fortigate/mode/sessions.pm
Perl
apache-2.0
9,722
:- use_package([assertions]). :- comment(nodoc,assertions). :- comment(title,"Enabling operators at run-time"). :- comment(author, "Daniel Cabeza"). :- comment(module,"This library package allows the use of the statically defined operators of a module for the reading performed at run-time by the program that uses the module. Simply by using this package the operator definitions appearing in the module are enabled during the execution of the program."). :- include(library(runtime_ops)).
leuschel/ecce
www/CiaoDE/ciao/lib/runtime_ops_doc.pl
Perl
apache-2.0
509
% preprocessing phase to eliminate disjunctions from the code % takes a list of clauses of the form source(Name,Clause) % returns these clauses with disjunctions replaced by dummy calls % and a list of NewClauses corresponding to those dummy calls % Link is the uninstantiated last cdr of this list top:- eliminate_disjunctions([(a(A,B,C):-(b(A);c(C)))],X,Y,[]), inst_vars((X,Y)). % write((X,Y)), nl, % (X,Y) == ([(a:-'_dummy_0')],[('_dummy_0':-b),('_dummy_0':-c)]), % write(ok), nl. top :- true. %write(wrong), nl. eliminate_disjunctions(OneProc,NewProc,NewClauses,Link) :- gather_disj(OneProc,NewProc,Disj,[]), treat_disj(Disj,NewClauses,Link). gather_disj([],[],Link,Link). gather_disj([C|Cs],NewProc,Disj,Link) :- extract_disj(C, NewC, Disj, Rest), NewProc = [NewC|NewCs], gather_disj(Cs,NewCs,Rest,Link). % given a clause, find in Disj the list of disj((A;B),N,X,C) % where N is a unique ID, X is a var that takes the place of % (A;B) in the code, NewC is the clause modified in such a way that % the disjunctions are replaced by the corresponding vars % Link is the last (uninstantiated) cdr of the list Disj. % do the work of pretrans for nots, -> etc... % put all those guys inside disjunctions extract_disj(C, (Head:-NewBody), Disj, Link) :- C = (Head:-Body), !, CtrIn = 0, extract_disj(Body, NewBody, Disj, Link, C, CtrIn, CtrOut). extract_disj(Head, Head, Link, Link). extract_disj((C1,C2), (NewC1,NewC2), Disj, Link, C, CtrIn, CtrOut) :- extract_disj(C1, NewC1, Disj, Link1, C, CtrIn, Ctr), extract_disj(C2, NewC2, Link1, Link, C, Ctr, CtrOut). extract_disj(Goal, X, Disj, Link, C, CtrIn, CtrOut) :- is_disj(Goal,NewGoal), !, Disj = [disj(NewGoal,CtrIn,X,C)|Link], CtrOut is CtrIn + 1. extract_disj(Goal, Goal, Link, Link, _, CtrIn, CtrIn). is_disj(((C1 -> C2); C3),((C1, !, C2); C3)) :- !. is_disj((C1;C2),(C1;C2)). is_disj(not(C),((C,!,fail);true)). is_disj(\+(C),((C,!,fail);true)). is_disj(\=(C1,C2),((C1 = C2,!,fail);true)). % given a list of disj((A;B),N,X,C), for each, do the following: % 1) find vars in (A;B) % 2) find the vars in C % 3) intersect the two sets of vars into one list % 4) make a predicate name using N as a part of it ('dummy_disjN') % 5) put a structure with that name and those vars as args % 6) binds X to this call % 7) add new clauses [(dummy:-A)),(dummy:-B))] treat_disj([], Link, Link). treat_disj([disj((A;B),N,X,C)|Disjs], DummyClauses, Link) :- find_vars((A;B),Vars), find_vars(C,CVars), intersect_vars(Vars,CVars,Args), make_dummy_name(N,Name), X =.. [Name|Args], make_dummy_clauses((A;B),X,DummyClauses,Rest), treat_disj(Disjs, Rest, Link). make_dummy_clauses((A;B),X,[NewC|Cs],Link) :- !, copy((X:-A), NewC), make_dummy_clauses(B,X,Cs,Link). make_dummy_clauses(A,X,[NewC|Link],Link) :- copy((X:-A),NewC). find_vars(X,Y) :- find_vars(X,Y,Link), Link = []. find_vars(Var,[Var|Link],Link) :- var(Var), !. find_vars(Cst,Link,Link) :- atomic(Cst), !. find_vars([T|Ts],Vars,NewLink) :- !, find_vars(T,Vars,Link), find_vars(Ts,Link,NewLink). find_vars(Term,Vars,Link) :- Term =.. [_|Args], find_vars(Args,Vars,Link). intersect_vars(V1,V2,Out) :- sort_vars(V1,Sorted1), sort_vars(V2,Sorted2), intersect_sorted_vars(Sorted1,Sorted2,Out). make_dummy_name(N,Name) :- name('_dummy_',L1), name(N,L2), my_append(L1,L2,L), name(Name,L). my_append([], L, L). my_append([H|L1], L2, [H|Res]) :- my_append(L1, L2, Res). % copy_term using a symbol table. copy(Term1, Term2) :- varset(Term1, Set), make_sym(Set, Sym), copy2(Term1, Term2, Sym), !. copy2(V1, V2, Sym) :- var(V1), !, retrieve_sym(V1, Sym, V2). copy2(X1, X2, Sym) :- nonvar(X1), !, functor(X1,Name,Arity), functor(X2,Name,Arity), copy2(X1, X2, Sym, 1, Arity). copy2(_X1,_X2,_Sym, N, Arity) :- N>Arity, !. copy2(X1, X2, Sym, N, Arity) :- N=<Arity, !, arg(N, X1, Arg1), arg(N, X2, Arg2), copy2(Arg1, Arg2, Sym), N1 is N+1, copy2(X1, X2, Sym, N1, Arity). retrieve_sym(V, [p(W,X)|_Sym], X) :- V==W, !. retrieve_sym(V, [_|Sym], X) :- retrieve_sym(V, Sym, X). make_sym([], []). make_sym([V|L], [p(V,_)|S]) :- make_sym(L, S). % *** Gather all variables used in a term: (in a set or a bag) varset(Term, VarSet) :- varbag(Term, VB), sort(VB, VarSet). varbag(Term, VarBag) :- varbag(Term, VarBag, []). varbag(Var) --> {var(Var)}, !, [Var]. varbag(Str) --> {nonvar(Str), !, functor(Str,_,Arity)}, varbag(Str, 1, Arity). varbag(_Str, N, Arity) --> {N>Arity}, !. varbag(Str, N, Arity) --> {N=<Arity}, !, {arg(N, Str, Arg)}, varbag(Arg), {N1 is N+1}, varbag(Str, N1, Arity). inst_vars(Term) :- varset(Term, Vars), [A]=`A`, inst_vars_list(Vars, A). inst_vars_list([], _). inst_vars_list([T|L], N) :- name(T, [N]), N1 is N+1, inst_vars_list(L, N1). sort_vars(V,Out) :- sort_vars(V,Out,[]). sort_vars([],Link,Link). sort_vars([V|Vs],Result,Link) :- split_vars(Vs,V,Smaller,Bigger), sort_vars(Smaller,Result,[V|SLink]), sort_vars(Bigger,SLink,Link). intersect_sorted_vars([],_,[]) :- !. intersect_sorted_vars(_,[],[]). intersect_sorted_vars([X|Xs],[Y|Ys],[X|Rs]) :- X == Y, !, intersect_sorted_vars(Xs,Ys,Rs). intersect_sorted_vars([X|Xs],[Y|Ys],Rs) :- X @< Y, !, intersect_sorted_vars(Xs,[Y|Ys],Rs). intersect_sorted_vars([X|Xs],[Y|Ys],Rs) :- X @> Y, !, intersect_sorted_vars([X|Xs],Ys,Rs). split_vars([],_,[],[]). split_vars([V|Vs],A,[V|Ss],Bs) :- V @< A, !, split_vars(Vs,A,Ss,Bs). split_vars([V|Vs],A,Ss,Bs) :- V == A, !, split_vars(Vs,A,Ss,Bs). split_vars([V|Vs],A,Ss,[V|Bs]) :- V @> A, !, split_vars(Vs,A,Ss,Bs).
LogtalkDotOrg/logtalk3
examples/bench/flatten.pl
Perl
apache-2.0
5,602
###########################################$ # 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::DescribeAddressesRequest; use base qw (Amazon::EC2::Model); # # Amazon::EC2::Model::DescribeAddressesRequest # # Properties: # # # PublicIp: string # # # sub new { my ($class, $data) = @_; my $self = {}; $self->{_fields} = { PublicIp => {FieldValue => [], FieldType => ["string"]}, }; bless ($self, $class); if (defined $data) { $self->_fromHashRef($data); } return $self; } sub getPublicIp { return shift->{_fields}->{PublicIp}->{FieldValue}; } sub setPublicIp { my ($self, $value) = @_; $self->{_fields}->{PublicIp}->{FieldValue} = $value; return $self; } sub withPublicIp { my $self = shift; my $list = $self->{_fields}->{PublicIp}->{FieldValue}; for (@_) { push (@$list, $_); } return $self; } sub isSetPublicIp { return scalar (@{shift->{_fields}->{PublicIp}->{FieldValue}}) > 0; } 1;
electric-cloud/EC-EC2
src/main/resources/project/lib/Amazon/EC2/Model/DescribeAddressesRequest.pm
Perl
apache-2.0
2,013
# # Copyright 2021 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package storage::dell::me4::restapi::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} = { 'controller-statistics' => 'storage::dell::me4::restapi::mode::controllerstatistics', 'hardware' => 'storage::dell::me4::restapi::mode::hardware', 'interfaces' => 'storage::dell::me4::restapi::mode::interfaces', 'list-controllers' => 'storage::dell::me4::restapi::mode::listcontrollers', 'list-volumes' => 'storage::dell::me4::restapi::mode::listvolumes', 'volume-statistics' => 'storage::dell::me4::restapi::mode::volumestatistics' }; $self->{custom_modes}->{api} = 'storage::dell::me4::restapi::custom::api'; return $self; } 1; __END__ =head1 PLUGIN DESCRIPTION Check Dell ME4 series using API. =cut
Tpo76/centreon-plugins
storage/dell/me4/restapi/plugin.pm
Perl
apache-2.0
1,784
#!/usr/bin/env perl #version 0.9.1 Changed to using xml creation packages (xml::writer) instead of writing out xml myself #version 0.9.1 Removed dat file parser (not used anymore) #version 0.9.1 Remove a bunch of commented out stuff #version 0.9.2 no changes #version 0.9.5 added an xml comment that holds the database name, for future use with gnns and all around good practice #version 0.9.5 changed -log10E edge attribue to be named alignment_score #this program creates an xgmml with all nodes and edges use List::MoreUtils qw{apply uniq any} ; use DBD::mysql; use IO; use XML::Writer; use XML::LibXML; use Getopt::Long; $result=GetOptions ("blast=s" => \$blast, "fasta=s" => \$fasta, "struct=s" => \$struct, "output=s" => \$output, "title=s" => \$title, "maxfull=i" => \$maxfull, "dbver=s" => \$dbver); if(defined $maxfull){ unless($maxfull=~/^\d+$/){ die "maxfull must be an integer\n"; } }else{ $maxfull=10000000; } $edge=$node=0; %sequence=(); %uprot=(); @uprotnumbers=(); $blastlength=`wc -l $blast`; @blastlength=split( "\s+" , $blastlength); if(int(@blastlength[0])>$maxfull){ open(OUTPUT, ">$output") or die "cannot write to $output\n"; chomp @blastlength[0]; print OUTPUT "Too many edges (@blastlength[0]) not creating file\n"; print OUTPUT "Maximum edges is $maxfull\n"; exit; } $parser=XML::LibXML->new(); $output=new IO::File(">$output"); $writer=new XML::Writer(DATA_MODE => 'true', DATA_INDENT => 2, OUTPUT => $output); print time."check length of 2.out file\n"; print time."Reading in uniprot numbers from fasta file\n"; open(FASTA, $fasta) or die "could not open $fasta\n"; foreach $line (<FASTA>){ if($line=~/>([A-Za-z0-9:]+)/){ push @uprotnumbers, $1; } } close FASTA; print time."Finished reading in uniprot numbers\n"; print time."Read in annotation data\n"; #if struct file (annotation information) exists, use that to generate annotation information if(-e $struct){ print "populating annotation structure from file\n"; open STRUCT, $struct or die "could not open $struct\n"; foreach $line (<STRUCT>){ chomp $line; if($line=~/^([A-Za-z0-9\:]+)/){ $id=$1; }else{ @lineary=split "\t",$line; unless(@lineary[2]){ @lineary[2]='None'; } unless(@lineary[1] eq "IPRO" or @lineary[1] eq "GI" or @lineary[1] eq "PDB" or @lineary[1] eq "PFAM" or @lineary[1] eq "GO" or @lineary[1] eq "HMP_Body_Site" or @lineary[1] eq "CAZY"){ $uprot{$id}{@lineary[1]}=@lineary[2]; }else{ my @tmpline=split ",", @lineary[2]; push @{$uprot{$id}{@lineary[1]}}, @tmpline; } } } close STRUCT; } print time."done reading in annotation data\n"; print time."Open struct file and get a annotation keys\n"; open STRUCT, $struct or die "could not open $struct\n"; <STRUCT>; @metas=(); while (<STRUCT>){ last if /^\w/; $line=$_; chomp $line; if($line=~/^\s/){ @lineary=split /\t/, $line; push @metas, @lineary[1]; } } $metaline=join ',', @metas; print time."Metadata keys are $metaline\n"; print time."Start nodes\n"; $writer->comment("Database: $dbver"); $writer->startTag('graph', 'label' => "$title Full Network", 'xmlns' => 'http://www.cs.rpi.edu/XGMML'); foreach my $element (@uprotnumbers){ #print "$element\n";; $origelement=$element; $node++; $writer->startTag('node', 'id' => $element, 'label' => $element); if($element=~/(\w{6,10}):/){ $element=$1; } foreach my $key (@metas){ #print "\t$key\t$uprot{$element}{$key}\n"; if($key eq "IPRO" or $key eq "GI" or $key eq "PDB" or $key eq "PFAM" or $key eq "GO" or $key eq "HMP_Body_Site" or $key eq "CAZY"){ $writer->startTag('att', 'type' => 'list', 'name' => $key); foreach my $piece (@{$uprot{$element}{$key}}){ $piece=~s/[\x00-\x08\x0B-\x0C\x0E-\x1F]//g; $writer->emptyTag('att', 'type' => 'string', 'name' => $key, 'value' => $piece); } $writer->endTag(); }else{ $uprot{$element}{$key}=~s/[\x00-\x08\x0B-\x0C\x0E-\x1F]//g; if($key eq "Sequence_Length" and $origelement=~/\w{6,10}:(\d+):(\d+)/){ my $piece=$2-$1+1; print "start:$1\tend$2\ttotal:$piece\n"; $writer->emptyTag('att', 'name' => $key, 'type' => 'integer', 'value' => $piece); }else{ if($key eq "Sequence_Length"){ $writer->emptyTag('att', 'name' => $key, 'type' => 'integer', 'value' => $uprot{$element}{$key}); }else{ $writer->emptyTag('att', 'name' => $key, 'type' => 'string', 'value' => $uprot{$element}{$key}); } } } } $writer->endTag(); } print time."Writing Edges\n"; open BLASTFILE, $blast or die "could not open blast file $blast\n"; while (<BLASTFILE>){ my $line=$_; $edge++; chomp $line; my @line=split /\t/, $line; #my $log=-(log(@line[3])/log(10))+@line[2]*log(2)/log(10); my $log=int(-(log(@line[5]*@line[6])/log(10))+@line[4]*log(2)/log(10)); $writer->startTag('edge', 'id' => "@line[0],@line[1]", 'label' => "@line[0],@line[1]", 'source' => @line[0], 'target' => @line[1]); $writer->emptyTag('att', 'name' => '%id', 'type' => 'real', 'value' => @line[2]); $writer->emptyTag('att', 'name' => 'alignment_score', 'type'=> 'real', 'value' => $log); $writer->emptyTag('att', 'name' => 'alignment_len', 'type' => 'integer', 'value' => @line[3]); $writer->endTag(); } close BLASTFILE; print time."Finished writing edges\n"; #print the footer $writer->endTag; print "finished writing xgmml file\n"; print "\t$node\t$edge\n";
EnzymeFunctionInitiative/est-precompute-bw
include/efiest-0.9.5/xgmml_100_create.pl
Perl
apache-2.0
5,466
# # Copyright 2021 Centreon (http://www.centreon.com/) # # Centreon is a full-fledged industry-strength solution that meets # the needs in IT infrastructure and application monitoring for # service performance. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # package cloud::prometheus::direct::kubernetes::mode::containerstatus; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use centreon::plugins::templates::catalog_functions qw(catalog_status_threshold); sub custom_status_output { my ($self, %options) = @_; my $msg = sprintf("state is '%s', status is '%s'", $self->{result_values}->{state}, $self->{result_values}->{status}); $msg .= " [reason: " . $self->{result_values}->{reason} . "]" if (defined($self->{result_values}->{reason}) && $self->{result_values}->{reason} ne ""); return $msg; } sub custom_status_calc { my ($self, %options) = @_; $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_container'}; $self->{result_values}->{pod} = $options{new_datas}->{$self->{instance} . '_pod'}; $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_status'}; $self->{result_values}->{state} = ($options{new_datas}->{$self->{instance} . '_state'} == 1) ? "ready" : "not ready"; $self->{result_values}->{reason} = $options{new_datas}->{$self->{instance} . '_reason'}; return 0; } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'containers', type => 1, cb_prefix_output => 'prefix_container_output', message_multiple => 'All containers status are ok', message_separator => ' - ', skipped_code => { -11 => 1 } }, ]; $self->{maps_counters}->{containers} = [ { label => 'status', set => { key_values => [ { name => 'status' }, { name => 'state' }, { name => 'reason' }, { name => 'pod' }, { name => 'container' } ], 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 => 'restarts-count', nlabel => 'containers.restarts.count', set => { key_values => [ { name => 'restarts' }, { name => 'perf' } ], output_template => 'Restarts count : %d', perfdatas => [ { label => 'restarts_count', value => 'restarts', template => '%d', min => 0, label_extra_instance => 1, instance_use => 'perf' }, ], } }, ]; } sub prefix_container_output { my ($self, %options) = @_; return "Container '" . $options{instance_value}->{container} . "' [pod: " . $options{instance_value}->{pod} . ", namespace: " . $options{instance_value}->{namespace} . "] "; } sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $options{options}->add_options(arguments => { "container:s" => { name => 'container', default => 'container=~".*"' }, "pod:s" => { name => 'pod', default => 'pod=~".*"' }, "warning-status:s" => { name => 'warning_status', default => '' }, "critical-status:s" => { name => 'critical_status', default => '%{status} !~ /running/ || %{state} !~ /ready/' }, "extra-filter:s@" => { name => 'extra_filter' }, "metric-overload:s@" => { name => 'metric_overload' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); $self->{metrics} = { 'ready' => '^kube_pod_container_status_ready$', 'running' => '^kube_pod_container_status_running$', 'terminated' => '^kube_pod_container_status_terminated$', 'terminated_reason' => '^kube_pod_container_status_terminated_reason$', 'waiting' => '^kube_pod_container_status_waiting$', 'waiting_reason' => '^kube_pod_container_status_waiting_reason$', 'restarts' => '^kube_pod_container_status_restarts_total$', }; foreach my $metric (@{$self->{option_results}->{metric_overload}}) { next if ($metric !~ /(.*),(.*)/); $self->{metrics}->{$1} = $2 if (defined($self->{metrics}->{$1})); } $self->{labels} = {}; foreach my $label (('container', 'pod')) { if ($self->{option_results}->{$label} !~ /^(\w+)[!~=]+\".*\"$/) { $self->{output}->add_option_msg(short_msg => "Need to specify --" . $label . " option as a PromQL filter."); $self->{output}->option_exit(); } $self->{labels}->{$label} = $1; } $self->{extra_filter} = ''; foreach my $filter (@{$self->{option_results}->{extra_filter}}) { $self->{extra_filter} .= ',' . $filter; } $self->change_macros(macros => ['warning_status', 'critical_status']); } sub manage_selection { my ($self, %options) = @_; $self->{containers} = {}; my $results = $options{custom}->query( queries => [ 'label_replace({__name__=~"' . $self->{metrics}->{ready} . '",' . $self->{option_results}->{container} . ',' . $self->{option_results}->{pod} . $self->{extra_filter} . '}, "__name__", "ready", "", "")', 'label_replace({__name__=~"' . $self->{metrics}->{running} . '",' . $self->{option_results}->{container} . ',' . $self->{option_results}->{pod} . $self->{extra_filter} . '}, "__name__", "running", "", "")', 'label_replace({__name__=~"' . $self->{metrics}->{terminated} . '",' . $self->{option_results}->{container} . ',' . $self->{option_results}->{pod} . $self->{extra_filter} . '}, "__name__", "terminated", "", "")', 'label_replace({__name__=~"' . $self->{metrics}->{terminated_reason} . '",' . $self->{option_results}->{container} . ',' . $self->{option_results}->{pod} . $self->{extra_filter} . '}, "__name__", "terminated_reason", "", "")', 'label_replace({__name__=~"' . $self->{metrics}->{waiting} . '",' . $self->{option_results}->{container} . ',' . $self->{option_results}->{pod} . $self->{extra_filter} . '}, "__name__", "waiting", "", "")', 'label_replace({__name__=~"' . $self->{metrics}->{waiting_reason} . '",' . $self->{option_results}->{container} . ',' . $self->{option_results}->{pod} . $self->{extra_filter} . '}, "__name__", "waiting_reason", "", "")', 'label_replace({__name__=~"' . $self->{metrics}->{restarts} . '",' . $self->{option_results}->{container} . ',' . $self->{option_results}->{pod} . $self->{extra_filter} . '}, "__name__", "restarts", "", "")' ] ); foreach my $result (@{$results}) { next if (!defined($result->{metric}->{$self->{labels}->{pod}}) || !defined($result->{metric}->{$self->{labels}->{container}})); $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{container} = $result->{metric}->{$self->{labels}->{container}}; $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{pod} = $result->{metric}->{$self->{labels}->{pod}}; $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{perf} = $result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}; $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{restarts} = ${$result->{value}}[1] if ($result->{metric}->{__name__} =~ /restarts/); $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{state} = ${$result->{value}}[1] if ($result->{metric}->{__name__} =~ /ready/); $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{status} = $result->{metric}->{__name__} if ($result->{metric}->{__name__} =~ /running|terminated|waiting/ && ${$result->{value}}[1] == 1); $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{reason} = ""; $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{reason} = $result->{metric}->{reason} if ($result->{metric}->{__name__} =~ /reason/ && ${$result->{value}}[1] == 1); $self->{containers}->{$result->{metric}->{$self->{labels}->{pod}} . "_" . $result->{metric}->{$self->{labels}->{container}}}->{namespace} = $result->{metric}->{namespace}; } if (scalar(keys %{$self->{containers}}) <= 0) { $self->{output}->add_option_msg(short_msg => "No containers found."); $self->{output}->option_exit(); } } 1; __END__ =head1 MODE Check container status. =over 8 =item B<--container> Filter on a specific container (Must be a PromQL filter, Default: 'container=~".*"') =item B<--pod> Filter on a specific pod (Must be a PromQL filter, Default: 'pod=~".*"') =item B<--warning-status> Set warning threshold for status (Default: '') Can used special variables like: %{status}, %{state}, %{reason} =item B<--critical-status> Set critical threshold for status (Default: '%{status} !~ /running/ || %{state} !~ /ready/'). Can used special variables like: %{status}, %{state}, %{reason} =item B<--warning-restarts-count> Threshold warning for container restarts count. =item B<--critical-restarts-count> Threshold critical for container restarts count. =item B<--extra-filter> Add a PromQL filter (Can be multiple) Example : --extra-filter='name=~".*pretty.*"' =item B<--metric-overload> Overload default metrics name (Can be multiple) Example : --metric-overload='metric,^my_metric_name$' Default : - ready: ^kube_pod_container_status_ready$ - running: ^kube_pod_container_status_running$ - terminated: ^kube_pod_container_status_terminated$ - terminated_reason: ^kube_pod_container_status_terminated_reason$ - waiting: ^kube_pod_container_status_waiting$ - waiting_reason: ^kube_pod_container_status_waiting_reason$ - restarts: ^kube_pod_container_status_restarts_total$ =item B<--filter-counters> Only display some counters (regexp can be used). Example: --filter-counters='status' =back =cut
Tpo76/centreon-plugins
cloud/prometheus/direct/kubernetes/mode/containerstatus.pm
Perl
apache-2.0
11,553
package Fixtures::Profile; # # # 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 Moose; extends 'DBIx::Class::EasyFixture'; use namespace::autoclean; my %definition_for = ( EDGE1 => { new => 'Profile', using => { id => 1, name => 'EDGE1', description => 'edge description', }, }, MID1 => { new => 'Profile', using => { id => 2, name => 'MID1', description => 'mid description', }, }, CCR1 => { new => 'Profile', using => { id => 3, name => 'CCR1', description => 'ccr description', }, }, RIAK1 => { new => 'Profile', using => { id => 5, name => 'RIAK1', description => 'riak description', }, }, RASCAL1 => { new => 'Profile', using => { id => 6, name => 'RASCAL1', description => 'rascal description', }, }, RASCAL2 => { new => 'Profile', using => { id => 7, name => 'RASCAL2', description => 'rascal2 description', }, }, ); sub get_definition { my ( $self, $name ) = @_; return $definition_for{$name}; } sub all_fixture_names { return keys %definition_for; } __PACKAGE__->meta->make_immutable; 1;
knutsel/traffic_control-1
traffic_ops/app/lib/Fixtures/Profile.pm
Perl
apache-2.0
1,716
# # 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 cloud::azure::management::monitor::mode::getmetrics; use base qw(centreon::plugins::templates::counter); use strict; use warnings; use Data::Dumper; sub custom_metric_perfdata { my ($self, %options) = @_; $self->{output}->perfdata_add(label => $self->{result_values}->{perf_label}, value => $self->{result_values}->{value}, warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning-metric'), critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical-metric'), ); } sub custom_metric_threshold { my ($self, %options) = @_; my $exit = $self->{perfdata}->threshold_check(value => $self->{result_values}->{value}, threshold => [ { label => 'critical-metric', exit_litteral => 'critical' }, { label => 'warning-metric', exit_litteral => 'warning' } ]); return $exit; } sub custom_metric_output { my ($self, %options) = @_; my $msg = "Metric '" . $self->{result_values}->{label} . "' of resource '" . $self->{result_values}->{display} . "' value is " . $self->{result_values}->{value}; return $msg; } sub custom_metric_calc { my ($self, %options) = @_; $self->{result_values}->{value} = $options{new_datas}->{$self->{instance} . '_value'}; $self->{result_values}->{label} = $options{new_datas}->{$self->{instance} . '_label'}; $self->{result_values}->{aggregation} = $options{new_datas}->{$self->{instance} . '_aggregation'}; $self->{result_values}->{perf_label} = $options{new_datas}->{$self->{instance} . '_perf_label'}; $self->{result_values}->{display} = $options{new_datas}->{$self->{instance} . '_display'}; return 0; } sub set_counters { my ($self, %options) = @_; $self->{maps_counters_type} = [ { name => 'metrics', type => 0 }, ]; $self->{maps_counters}->{metrics} = [ { label => 'metric', set => { key_values => [ { name => 'value' }, { name => 'label' }, { name => 'aggregation' }, { name => 'perf_label' }, { name => 'display' } ], closure_custom_calc => $self->can('custom_metric_calc'), closure_custom_output => $self->can('custom_metric_output'), closure_custom_perfdata => $self->can('custom_metric_perfdata'), closure_custom_threshold_check => $self->can('custom_metric_threshold'), } } ]; } 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 => { "resource:s" => { name => 'resource' }, "resource-group:s" => { name => 'resource_group' }, "resource-type:s" => { name => 'resource_type' }, "resource-namespace:s" => { name => 'resource_namespace' }, "metric:s@" => { name => 'metric' }, }); return $self; } sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); if (!defined($self->{option_results}->{resource})) { $self->{output}->add_option_msg(short_msg => "Need to specify either --resource <name> with --resource-group and --resource-type options or --resource <id>."); $self->{output}->option_exit(); } $self->{az_resource} = $self->{option_results}->{resource}; if ($self->{az_resource} =~ /^\/subscriptions\/.*\/resourceGroups\/.*\/providers\/Microsoft\..*\/.*\/.*$/) { $self->{az_resource_group} = ''; $self->{az_resource_type} = ''; $self->{az_resource_namespace} = ''; } else { $self->{az_resource_group} = $self->{option_results}->{resource_group}; $self->{az_resource_type} = $self->{option_results}->{resource_type}; $self->{az_resource_namespace} = $self->{option_results}->{resource_namespace}; } $self->{az_metrics} = []; if (defined($self->{option_results}->{metric})) { $self->{az_metrics} = $self->{option_results}->{metric}; } if (scalar(@{$self->{az_metrics}}) <= 0) { $self->{output}->add_option_msg(short_msg => "Need to specify --metric option."); $self->{output}->option_exit(); } $self->{az_timeframe} = defined($self->{option_results}->{timeframe}) ? $self->{option_results}->{timeframe} : 600; $self->{az_interval} = defined($self->{option_results}->{interval}) ? $self->{option_results}->{interval} : "PT1M"; $self->{az_aggregation} = ['Average']; if (defined($self->{option_results}->{aggregation})) { $self->{az_aggregation} = []; foreach my $aggregation (@{$self->{option_results}->{aggregation}}) { if ($aggregation ne '') { push @{$self->{az_aggregation}}, ucfirst(lc($aggregation)); } } } } sub manage_selection { my ($self, %options) = @_; my ($results, $raw_results, $command_line) = $options{custom}->azure_get_metrics( resource => $self->{az_resource}, resource_group => $self->{az_resource_group}, resource_type => $self->{az_resource_type}, resource_namespace => $self->{az_resource_namespace}, metrics => $self->{az_metrics}, aggregations => $self->{az_aggregation}, timeframe => $self->{az_timeframe}, interval => $self->{az_interval}, ); $self->{metrics} = {}; foreach my $label (keys %{$results}) { foreach my $aggregation (('minimum', 'maximum', 'average', 'total')) { next if (!defined($results->{$label}->{$aggregation})); $self->{metrics} = { display => $self->{az_resource}, label => $label, aggregation => $aggregation, value => $results->{$label}->{$aggregation}, perf_label => $label . '_' . $aggregation, }; } } $self->{output}->output_add(long_msg => sprintf("Command line: %s", $command_line), debug => 1); $self->{output}->output_add(long_msg => sprintf("Raw data:\n%s", Dumper($raw_results)), debug => 1); } 1; __END__ =head1 MODE Check Azure metrics. Examples: perl centreon_plugins.pl --plugin=cloud::azure::management::monitor::plugin --custommode=azcli --mode=get-metrics --resource=MYSQLINSTANCE --resource-group=MYHOSTGROUP --resource-namespace='Microsoft.Compute' --resource-type='virtualMachines' --metric='Percentage CPU' --aggregation=average –-interval=PT1M --timeframe=600 --warning-metric= --critical-metric= perl centreon_plugins.pl --plugin=cloud::azure::management::monitor::plugin --custommode=azcli --mode=get-metrics --resource='/subscriptions/d29fe431/resourceGroups/MYHOSTGROUP/providers/Microsoft.Compute/virtualMachines/MYSQLINSTANCE' --metric='Percentage CPU' --aggregation=average –-interval=PT1M --timeframe=600 --warning-metric= --critical-metric= =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-namespace> Set resource namespace (Required if resource's name is used). =item B<--resource-type> Set resource type (Required if resource's name is used). =item B<--metric> Set monitor metrics (Required). =item B<--warning-metric> Threshold warning. =item B<--critical-metric> Threshold critical. =back =cut
wilfriedcomte/centreon-plugins
cloud/azure/management/monitor/mode/getmetrics.pm
Perl
apache-2.0
8,626
=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 # Ensembl module for Bio::EnsEMBL::Variation::Phenotype # # =head1 NAME Bio::EnsEMBL::Variation::Phenotype - Ensembl representation of a phenotype. =head1 SYNOPSIS my $phenotype = Bio::EnsEMBL::Variation::Phenotype->new(-NAME => 'Type I diabetes'); =head1 DESCRIPTION This is a class representing a phenotype from the ensembl-variation database. =head1 METHODS =cut use strict; use warnings; package Bio::EnsEMBL::Variation::Phenotype; use Bio::EnsEMBL::Storable; use Bio::EnsEMBL::Utils::Exception qw(throw warning); use Bio::EnsEMBL::Utils::Argument qw(rearrange); our @ISA = ('Bio::EnsEMBL::Storable'); =head2 new Arg [-DESCRIPTION] : phenotype description Example : $phenotype = Bio::EnsEMBL::Variation::Phenotype->new(-DESCRIPTION => 'Hemostatic factors and hematological phenotypes'); Description: Constructor. Instantiates a new Phenotype object. Returntype : Bio::EnsEMBL::Variation::Phenotype Exceptions : none Caller : general Status : Stable =cut sub new { my $caller = shift; my $class = ref($caller) || $caller; my $self = $class->SUPER::new(@_); my ($dbID, $description, $name) = rearrange([qw(dbID DESCRIPTION NAME)], @_); $self = { 'dbID' => $dbID, 'description' => $description, 'name' => $name, }; return bless $self, $class; } sub new_fast { my $class = shift; my $hashref = shift; return bless $hashref, $class; } =head2 dbID Example : $name = $obj->dbID() Description: Getter/Setter for the dbIDattribute Returntype : integer Exceptions : none Caller : general Status : Stable =cut sub dbID { my $self = shift; return $self->{'dbID'} = shift if(@_); return $self->{'dbID'}; } =head2 name Example : $name = $obj->name() Description: Getter/Setter for the name attribute Returntype : string Exceptions : none Caller : general Status : Stable =cut sub name { my $self = shift; return $self->{'name'} = shift if(@_); return $self->{'name'}; } =head2 description Example : $name = $obj->description() Description: Getter/Setter for the description attribute Returntype : string Exceptions : none Caller : general Status : Stable =cut sub description { my $self = shift; return $self->{'description'} = shift if(@_); return $self->{'description'}; }
dbolser-ebi/ensembl-variation
modules/Bio/EnsEMBL/Variation/Phenotype.pm
Perl
apache-2.0
3,321
# # 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 apps::iis::local::plugin; use strict; use warnings; use base qw(centreon::plugins::script_simple); sub new { my ($class, %options) = @_; my $self = $class->SUPER::new(package => __PACKAGE__, %options); bless $self, $class; $self->{version} = '0.1'; %{$self->{modes}} = ( 'applicationpool-state' => 'apps::iis::local::mode::applicationpoolstate', 'list-applicationpools' => 'apps::iis::local::mode::listapplicationpools', 'list-sites' => 'apps::iis::local::mode::listsites', 'webservice-statistics' => 'apps::iis::local::mode::webservicestatistics', ); return $self; } 1; __END__ =head1 PLUGIN DESCRIPTION Check Windows IIS locally. =cut
wilfriedcomte/centreon-plugins
apps/iis/local/plugin.pm
Perl
apache-2.0
1,586
=head1 LICENSE Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2022] EMBL-European Bioinformatics Institute Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. =head1 CONTACT Please email comments or questions to the public Ensembl developers list at <http://lists.ensembl.org/mailman/listinfo/dev>. Questions may also be sent to the Ensembl help desk at <http://www.ensembl.org/Help/Contact>. =cut package HiveRNASeqStar_conf; use strict; use warnings; use feature 'say'; use Bio::EnsEMBL::Analysis::Tools::Utilities qw (get_analysis_settings); use parent ('Bio::EnsEMBL::Analysis::Hive::Config::HiveBaseConfig_conf'); use Bio::EnsEMBL::ApiVersion qw/software_version/; sub default_options { my ($self) = @_; return { # inherit other stuff from the base class %{ $self->SUPER::default_options() }, ########################################################################## # # # CHANGE STUFF HERE # # # ########################################################################## 'pipeline_name' => '', 'user_r' => '', 'user' => '', 'password' => '', 'port' => '', species => '', 'pipe_db_name' => $self->o('dbowner').'_'.$self->o('pipeline_name').'_hive', 'dna_db_name' => '', 'blast_db_name' => $self->o('dbowner').'_'.$self->o('pipeline_name').'_'.$self->o('species').'_blast', 'refine_db_name' => $self->o('dbowner').'_'.$self->o('pipeline_name').'_'.$self->o('species').'_refine', 'rough_db_name' => $self->o('dbowner').'_'.$self->o('pipeline_name').'_'.$self->o('species').'_rough', 'pipe_db_server' => '', 'dna_db_server' => '', 'blast_db_server' => '', 'refine_db_server' => '', 'rough_db_server' => '', 'genome_file' => 'genome/genome.fa', 'use_ucsc_naming' => 0, 'create_type' => 'clone', 'rnaseq_summary_file' => '', 'samtools' => 'samtools', 'picard_lib_jar' => 'picard.jar', 'short_read_aligner' => 'bwa', 'short_read_aligner_base_options' => '--outSAMtype BAM SortedByCoordinate', 'input_dir' => '', output_dir => '', 'merge_dir' => '', 'sam_dir' => '', 'sequence_dump_script' => $ENV{ENSCODE}.'/ensembl-analysis/scripts/sequence_dump.pl', # Use this option to change the delimiter for your summary data # file. summary_file_delimiter => '\t', summary_csv_table => 'csv_data', assembly_name => '', # Blast database for comparing the final models to. uniprotdb => '', # Index for the blast database. uniprotindex => '', blastp => 'blastp', # blast used, it can be either ncbi or wu, it is overriding the -type value from BLAST_PARAMS blast_type => 'wu', splicing_aligner => 'exonerate-0.9.0', # If your reads are unpaired you may want to run on slices to avoid # making overlong rough models. If you want to do this, specify a # slice length here otherwise it will default to whole chromosomes. slice_length => 10000000, # Regular expression to allow FastQ files to be correctly paired, # for example: file_1.fastq and file_2.fastq could be paired using # the expression "\S+_(\d)\.\S+". Need to identify the read number # in brackets; the name the read number (1, 2) and the # extension. pairing_regex => '\S+_(\d)\.\S+', paired => 1, # Do you want to make models for the each individual sample as well # as for the pooled samples (1/0)? single_tissue => 1, # What Read group tag would you like to group your samples # by? Default = ID read_group_tag => 'SM', read_id_tag => 'ID', use_threads => 3, read_min_paired => 50, read_min_mapped => 50, # Please assign some or all columns from the summary file to the # some or all of the following categories. Multiple values can be # separted with commas. ID, SM, DS, CN, is_paired, filename, read_length, is_13plus, # is_mate_1 are required. If pairing_regex can work for you, set is_mate_1 to -1. # You can use any other tag specified in the SAM specification: # http://samtools.github.io/hts-specs/SAMv1.pdf #################################################################### # This is just an example based on the file snippet shown below. It # will vary depending on how your data looks. #################################################################### file_columns => ['SM', 'ID', 'is_paired', 'filename', 'is_mate_1', 'read_length', 'is_13plus', 'CN', 'PL', 'DS'], ########################################################################## # # # MOSTLY STAYS CONSTANT, MOSTLY # # # ########################################################################## sam_attributes => 'NH HI AS MD XS', 'blast_db' => { -dbname => $self->o('blast_db_name'), -host => $self->o('blast_db_server'), -port => $self->o('port'), -user => $self->o('user'), -pass => $self->o('password'), }, 'refine_db' => { -dbname => $self->o('refine_db_name'), -host => $self->o('refine_db_server'), -port => $self->o('port'), -user => $self->o('user'), -pass => $self->o('password'), }, 'rough_db' => { -dbname => $self->o('rough_db_name'), -host => $self->o('rough_db_server'), -port => $self->o('port'), -user => $self->o('user'), -pass => $self->o('password'), }, }; } sub pipeline_wide_parameters { my ($self) = @_; my $output_sam_dir = $self->o('sam_dir') ? $self->o('sam_dir') :$self->o('output_dir').'/SAM'; my $merge_dir = $self->o('merge_dir') ? $self->o('merge_dir') : $self->o('output_dir').'/merge_out'; my $genome_file = $self->o('genome_file') =~ /^\// ? $self->o('genome_file') : $self->o('input_dir').'/'.$self->o('genome_file'); return { %{ $self->SUPER::pipeline_wide_parameters() }, # inherit other stuff from the base class wide_genome_file => $genome_file, wide_input_dir => $self->o('input_dir'), wide_output_dir => $self->o('output_dir'), wide_merge_dir => $merge_dir, wide_short_read_aligner => $self->o('short_read_aligner'), wide_samtools => $self->o('samtools'), wide_output_sam_dir => $output_sam_dir, wide_species => $self->o('species'), wide_use_ucsc_naming => $self->o('use_ucsc_naming'), wide_intron_bam_file => $self->o('output_dir').'/introns', }; } sub pipeline_create_commands { my ($self) = @_; my $tables; my %small_columns = ( paired => 1, read_length => 1, is_13plus => 1, is_mate_1 => 1, ); # We need to store the values of the csv file to easily process it. It will be used at different stages foreach my $key (@{$self->default_options->{'file_columns'}}) { if (exists $small_columns{$key}) { $tables .= $key.' SMALLINT UNSIGNED NOT NULL,' } elsif ($key eq 'DS') { $tables .= $key.' VARCHAR(255) NOT NULL,' } else { $tables .= $key.' VARCHAR(50) NOT NULL,' } } $tables .= ' KEY(SM), KEY(ID)'; return [ # inheriting database and hive tables' creation @{$self->SUPER::pipeline_create_commands}, $self->db_cmd('CREATE TABLE '.$self->default_options->{'summary_csv_table'}." ($tables)"), ]; } =head2 create_header_line Arg [1] : Arrayref String, it will contains the values of 'file_columns' Example : create_header_line($self->o('file_columns'); Description: It will create a RG line using only the keys present in your csv file Returntype : String representing the RG line in a BAM file Exceptions : None =cut sub create_header_line { my ($items) = shift; my @read_tags = qw(ID SM DS CN DT FO KS LB PG PI PL PM PU); my $read_line = '@RG'; foreach my $rt (@read_tags) { $read_line .= "\t$rt:#$rt#" if (grep($rt eq $_, @$items)); } return $read_line."\n"; } ## See diagram for pipeline structure sub pipeline_analyses { my ($self) = @_; my $header_line = create_header_line($self->default_options->{'file_columns'}); my @analysis = ( { -logic_name => 'checking_file_path', -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd', -rc_name => '1GB', -parameters => { cmd => 'EXIT_CODE=0; for F in #wide_short_read_aligner# #wide_samtools# '.join (' ', $self->o('splicing_aligner'), $self->o('sequence_dump_script'), $self->o('blastp')).'; do which "$F"; if [ "$?" == 1 ]; then EXIT_CODE=1;fi; done; for D in #wide_output_dir# #wide_input_dir# #wide_merge_dir# #wide_output_sam_dir# `dirname #wide_genome_file#`; do mkdir -p "$D"; done; exit $EXIT_CODE', }, -input_ids => [{}], -flow_into => { '1->A' => ['create_rnaseq_genome_file'], 'A->1' => ['parse_summary_file'], }, }, { -logic_name => 'create_rnaseq_genome_file', -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd', -rc_name => '1GB', -parameters => { cmd => 'if [ ! -e "#wide_genome_file#" ]; then perl '.$self->o('sequence_dump_script').' -dbhost '.$self->o('dna_db_server').' -dbuser '.$self->o('user_r').' -dbport '.$self->o('port').' -dbname '.$self->o('dna_db_name').' -coord_system_name '.$self->o('assembly_name').' -toplevel -onefile -header rnaseq -filename #wide_genome_file#;fi; if [ ! -e ', }, -flow_into => { 1 => [ 'index_genome_file'], }, }, { -logic_name => 'index_genome_file', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveIndexGenome', -rc_name => '5GB', -parameters => { use_threading => $self->o('use_threads'), }, }, { -logic_name => 'parse_summary_file', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveParseCsvIntoTable', -rc_name => '1GB', -parameters => { column_names => $self->o('file_columns'), sample_column => $self->o('read_group_tag'), inputfile => $self->o('rnaseq_summary_file'), delimiter => $self->o('summary_file_delimiter'), csvfile_table => $self->o('summary_csv_table'), pairing_regex => $self->o('pairing_regex'), }, -flow_into => { '2->A' => [ 'create_tissue_jobs'], 'A->1' => [ 'merged_bam_file' ], }, }, { -logic_name => 'create_tissue_jobs', -module => 'Bio::EnsEMBL::Hive::RunnableDB::JobFactory', -parameters => { inputquery => join(' ', 'SELECT', $self->o('read_group_tag'), ',', $self->o('read_id_tag'), ', is_paired', 'FROM', $self->o('summary_csv_table'), 'WHERE', $self->o('read_group_tag'), '= "#sample_name#"'), column_names => [$self->o('read_group_tag'), $self->o('read_id_tag'), 'is_paired'], }, -rc_name => '1GB', -flow_into => { '2->A' => ['create_star_jobs'], 'A->1' => ['merged_tissue_file'], }, }, { -logic_name => 'create_star_jobs', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveCreateBWAJobs', -parameters => { sample_column => $self->o('read_group_tag'), sample_id_column => $self->o('read_id_tag'), csvfile_table => $self->o('summary_csv_table'), column_names => $self->o('file_columns'), use_threading => $self->o('use_threads'), base_options => $self->o('short_read_aligner_base_options'), }, -rc_name => '1GB', -flow_into => { '2' => ['star'], }, }, { -logic_name => 'create_header_files', -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd', -meadow_type => 'LOCAL', -parameters => { cmd => 'if [ ! -e "#wide_output_dir#/#'.$self->o('read_id_tag').'#_header.h" ]; then printf "'.$header_line.'" > #wide_output_dir#/#'.$self->o('read_id_tag').'#_header.h; fi', }, }, { -logic_name => 'star', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveStar', -parameters => { sam_attributes => $self->o('sam_attributes'), temp_dir => , }, -flow_into => { 1 => [ ':////accu?filename=[]' ], -1 => [ 'star_failed' ], -2 => [ 'star_failed' ], }, -rc_name => '30GB_multithread', }, { -logic_name => 'bwa_failed', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveBWA', -can_be_empty => 1, -flow_into => { 1 => [ ':////accu?filename=[]' ], }, -rc_name => '60GB_multithread', }, { -logic_name => 'create_rough_db', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveCreateDatabase', -parameters => { source_db => $self->o('dna_db'), target_db => $self->o('rough_db'), create_type => $self->o('create_type'), }, -meadow_type => 'LOCAL', -input_ids => [{}], }, { -logic_name => 'create_refine_db', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveCreateDatabase', -parameters => { source_db => $self->o('dna_db'), target_db => $self->o('refine_db'), create_type => $self->o('create_type'), }, -meadow_type => 'LOCAL', -input_ids => [{}], }, { -logic_name => 'create_blast_db', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveCreateDatabase', -parameters => { source_db => $self->o('dna_db'), target_db => $self->o('blast_db'), create_type => $self->o('create_type'), }, -meadow_type => 'LOCAL', -input_ids => [{}], }, { -logic_name => 'merged_tissue_file', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveMergeBamFiles', -parameters => { java => 'java', java_options => '-Xmx2g', # If 0, do not use multithreading, faster but can use more memory. # If > 0, tells how many cpu to use for samtools or just to use multiple cpus for picard use_threading => $self->o('use_threads'), # Path to MergeSamFiles.jar picard_lib => $self->o('picard_lib_jar'), # Use this default options for Picard: 'MAX_RECORDS_IN_RAM=20000000 CREATE_INDEX=true SORT_ORDER=coordinate ASSUME_SORTED=true VALIDATION_STRINGENCY=LENIENT' # You will need to change the options if you want to use samtools for merging options => 'MAX_RECORDS_IN_RAM=20000000 CREATE_INDEX=true SORT_ORDER=coordinate ASSUME_SORTED=true VALIDATION_STRINGENCY=LENIENT', }, -rc_name => '3GB_multithread', -flow_into => { 1 => [ ':////accu?filename=[]' ], }, }, { -logic_name => 'merged_bam_file', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveMergeBamFiles', -parameters => { java => 'java', java_options => '-Xmx2g', # If 0, do not use multithreading, faster but can use more memory. # If > 0, tells how many cpu to use for samtools or just to use multiple cpus for picard use_threading => $self->o('use_threads'), # Path to MergeSamFiles.jar picard_lib => $self->o('picard_lib_jar'), # Use this default options for Picard: 'MAX_RECORDS_IN_RAM=20000000 CREATE_INDEX=true SORT_ORDER=coordinate ASSUME_SORTED=true VALIDATION_STRINGENCY=LENIENT' # You will need to change the options if you want to use samtools for merging options => 'MAX_RECORDS_IN_RAM=20000000 CREATE_INDEX=true SORT_ORDER=coordinate ASSUME_SORTED=true VALIDATION_STRINGENCY=LENIENT', }, -rc_name => '3GB_multithread', -flow_into => { 1 => ['create_header_intron', 'clean_sai_files'], }, }, { -logic_name => 'clean_sai_files', -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd', -meadow_type => 'LOCAL', -parameters => { cmd => 'rm #wide_output_dir#/*.sai', }, }, { -logic_name => 'create_header_intron', -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd', -rc_name => '1GB', -parameters => { cmd => '#wide_samtools# view -H #filename# | grep -v @SQ | grep -v @HD > #wide_output_dir#/merged_header.h', }, -flow_into => { '1->A' => [ 'create_top_level_input_ids'], 'A->1' => ['sam2bam'], }, }, { -logic_name => 'create_top_level_input_ids', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveSubmitAnalysis', -rc_name => '1GB', -parameters => { iid_type => 'slice', coord_system_name => 'toplevel', slice => 1, include_non_reference => 0, top_level => 1, target_db => $self->o('rough_db'), }, -wait_for => ['create_rough_db'], -flow_into => { 2 => {'dispatch_toplevel' => {'iid' => '#iid#', alignment_bam_file => '#filename#'}}, }, }, { -logic_name => 'dispatch_toplevel', -module => 'Bio::EnsEMBL::Hive::RunnableDB::SystemCmd', -rc_name => '1GB', -batch_size => 1000, -parameters => { cmd => 'EXIT_CODE=1; if [ "`echo #iid# | cut -d \':\' -f1`" = "chromosome" ]; then EXIT_CODE=2; else EXIT_CODE=0;fi; exit $EXIT_CODE', return_codes_2_branches => {'2' => 2}, }, -flow_into => { 1 => ['rough_transcripts'], 2 => ['rough_transcripts_5GB'], }, }, { -logic_name => 'rough_transcripts', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveBam2Genes', -parameters => { logic_name => 'rough_transcripts', output_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), alignment_bam_file => '#wide_merge_dir#/merged.bam', min_length => 300, min_exons => 1, max_intron_length => 200000, min_single_exon_length => 1000, min_span => 1.5, paired => $self->o('paired'), pairing_regex => $self->o('pairing_regex'), }, -rc_name => '2GB_rough', -flow_into => { 1 => ['create_bam2introns_input_ids'], -1 => {'rough_transcripts_5GB' => {'iid' => '#iid#', alignment_bam_file => '#alignment_bam_file#'}}, -2 => {'rough_transcripts_5GB' => {'iid' => '#iid#', alignment_bam_file => '#alignment_bam_file#'}}, }, }, { -logic_name => 'rough_transcripts_5GB', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveBam2Genes', -can_be_empty => 1, -parameters => { logic_name => 'rough_transcripts', output_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), alignment_bam_file => '#wide_merge_dir#/merged.bam', min_length => 300, min_exons => 1, max_intron_length => 200000, min_single_exon_length => 1000, min_span => 1.5, paired => $self->o('paired'), pairing_regex => $self->o('pairing_regex'), }, -rc_name => '5GB_rough', -flow_into => { 1 => ['create_bam2introns_input_ids'], -1 => {'rough_transcripts_15GB' => {'iid' => '#iid#', alignment_bam_file => '#alignment_bam_file#'}}, -2 => {'rough_transcripts_15GB' => {'iid' => '#iid#', alignment_bam_file => '#alignment_bam_file#'}}, }, }, { -logic_name => 'rough_transcripts_15GB', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveBam2Genes', -can_be_empty => 1, -parameters => { logic_name => 'rough_transcripts', output_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), alignment_bam_file => '#wide_merge_dir#/merged.bam', min_length => 300, min_exons => 1, max_intron_length => 200000, min_single_exon_length => 1000, min_span => 1.5, paired => $self->o('paired'), pairing_regex => $self->o('pairing_regex'), }, -rc_name => '15GB_rough', -flow_into => { 1 => ['create_bam2introns_input_ids'], }, }, { -logic_name => 'create_top_level_input_ids_again', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveSubmitAnalysis', -rc_name => '1GB', -parameters => { iid_type => 'slice', coord_system_name => 'toplevel', slice => 1, include_non_reference => 0, top_level => 1, target_db => $self->o('rough_db'), }, -flow_into => { 2 => ['create_refine_genes_jobs'], }, }, { -logic_name => 'create_refine_genes_jobs', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveCreateRefineGenesJobs', -parameters => { single_tissue => $self->o('single_tissue'), sample_column => $self->o('read_group_tag'), sample_id_column => $self->o('read_id_tag'), csvfile_table => $self->o('summary_csv_table'), }, -rc_name => '1GB', -batch_size => 100, -flow_into => { 2 => ['refine_genes'], }, }, { -logic_name => 'refine_genes', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveRefineSolexaGenes', -parameters => { input_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), output_db => $self->o('refine_db'), # write the intron features into the OUTPUT_DB along with the models write_introns => 1, # maximum number of times to loop when building all possible paths through the transcript max_recursions => 100000, # analysis logic_name for the dna_align_features to fetch from the INTRON_DB # If left blank all features will be fetched logicname => [], # logic name of the gene models to fetch model_ln => '', # penalty for removing a retined intron retained_intron_penalty => 2, #Remove introns that overlap X introns filter_on_overlap => 0, # minimum size for an intron min_intron_size => 30, max_intron_size => 200000, # biotype to give to single exon models if left blank single exons are ignored # minimum single exon size (bp) min_single_exon => 1000, # minimum percentage of single exon length that is coding single_exon_cds => 66, # Intron with most support determines the splice sites for an internal exon # lower scoring introns with different splice sites are rejected strict_internal_splice_sites => 1, # In some species alternate splice sites for end exons seem to be common strict_internal_end_exon_splice_sites => 1, # biotypes to give gene models if left blank these models will not get written to the output database # best score - model with most supporting intron features # all other possible models # max number of other models to make - blank = all other_num => '10', # max number of other models to process - blank = all max_num => '1000', # biotype to label bad models ( otherwise they are not written ) # do you want to trim UTR trim_utr => 1, # config for trimming UTR max_3prime_exons => 2, max_3prime_length => 5000, max_5prime_exons => 3, max_5prime_length => 1000, # % of average intron score that a UTR intron must have reject_intron_cutoff => 5, }, -rc_name => '2GB_refine', -wait_for => ['create_refine_db'], -flow_into => { 1 => ['blast_rnaseq'], -1 => ['refine_genes_5GB'], -2 => {'create_10MB_slices'=> {"bad_models" => "#bad_models#", "best_score" => "#best_score#", "iid" => "#iid#", "intron_bam_files" => "#intron_bam_files#", "introns_logic_name" => "#introns_logic_name#", "logic_name" => "#logic_name#", "other_isoforms" => "#other_isoforms#", "single_exon_model" => "#single_exon_model#"}}, }, }, { -logic_name => 'refine_genes_5GB', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveRefineSolexaGenes', -can_be_empty => 1, -parameters => { input_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), output_db => $self->o('refine_db'), # write the intron features into the OUTPUT_DB along with the models write_introns => 1, # maximum number of times to loop when building all possible paths through the transcript max_recursions => 100000, # analysis logic_name for the dna_align_features to fetch from the INTRON_DB # If left blank all features will be fetched logicname => [], # logic name of the gene models to fetch model_ln => '', # penalty for removing a retined intron retained_intron_penalty => 2, #Remove introns that overlap X introns filter_on_overlap => 0, # minimum size for an intron min_intron_size => 30, max_intron_size => 200000, # biotype to give to single exon models if left blank single exons are ignored # minimum single exon size (bp) min_single_exon => 1000, # minimum percentage of single exon length that is coding single_exon_cds => 66, # Intron with most support determines the splice sites for an internal exon # lower scoring introns with different splice sites are rejected strict_internal_splice_sites => 1, # In some species alternate splice sites for end exons seem to be common strict_internal_end_exon_splice_sites => 1, # biotypes to give gene models if left blank these models will not get written to the output database # best score - model with most supporting intron features # all other possible models # max number of other models to make - blank = all other_num => '10', # max number of other models to process - blank = all max_num => '1000', # biotype to label bad models ( otherwise they are not written ) # do you want to trim UTR trim_utr => 1, # config for trimming UTR max_3prime_exons => 2, max_3prime_length => 5000, max_5prime_exons => 3, max_5prime_length => 1000, # % of average intron score that a UTR intron must have reject_intron_cutoff => 5, }, -rc_name => '5GB_refine', -flow_into => { 1 => ['blast_rnaseq'], -1 => {'create_10MB_slices'=> {"bad_models" => "#bad_models#", "best_score" => "#best_score#", "iid" => "#iid#", "intron_bam_files" => "#intron_bam_files#", "introns_logic_name" => "#introns_logic_name#", "logic_name" => "#logic_name#", "other_isoforms" => "#other_isoforms#", "single_exon_model" => "#single_exon_model#"}}, -2 => {'create_10MB_slices'=> {"bad_models" => "#bad_models#", "best_score" => "#best_score#", "iid" => "#iid#", "intron_bam_files" => "#intron_bam_files#", "introns_logic_name" => "#introns_logic_name#", "logic_name" => "#logic_name#", "other_isoforms" => "#other_isoforms#", "single_exon_model" => "#single_exon_model#"}}, }, }, { -logic_name => 'create_10MB_slices', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveSubmitAnalysis', -can_be_empty => 1, -rc_name => '1GB', -parameters => { iid_type => 'split_slice', coord_system_name => 'toplevel', slice => 1, slice_size => 10000000, include_non_reference => 0, top_level => 1, target_db => $self->o('refine_db'), }, -flow_into => { 2 => {'refine_slice' => {"bad_models" => "#bad_models#", "best_score" => "#best_score#", "iid" => "#iid#", "intron_bam_files" => "#intron_bam_files#", "introns_logic_name" => "#introns_logic_name#", "logic_name" => "#logic_name#", "other_isoforms" => "#other_isoforms#", "single_exon_model" => "#single_exon_model#"}}, }, }, { -logic_name => 'refine_slice', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveRefineSolexaGenes', -can_be_empty => 1, -parameters => { input_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), output_db => $self->o('refine_db'), # write the intron features into the OUTPUT_DB along with the models write_introns => 1, # maximum number of times to loop when building all possible paths through the transcript max_recursions => 100000, # analysis logic_name for the dna_align_features to fetch from the INTRON_DB # If left blank all features will be fetched logicname => [], # logic name of the gene models to fetch model_ln => '', # penalty for removing a retined intron retained_intron_penalty => 2, #Remove introns that overlap X introns filter_on_overlap => 0, # minimum size for an intron min_intron_size => 30, max_intron_size => 200000, # biotype to give to single exon models if left blank single exons are ignored # minimum single exon size (bp) min_single_exon => 1000, # minimum percentage of single exon length that is coding single_exon_cds => 66, # Intron with most support determines the splice sites for an internal exon # lower scoring introns with different splice sites are rejected strict_internal_splice_sites => 1, # In some species alternate splice sites for end exons seem to be common strict_internal_end_exon_splice_sites => 1, # biotypes to give gene models if left blank these models will not get written to the output database # best score - model with most supporting intron features # all other possible models # max number of other models to make - blank = all other_num => '10', # max number of other models to process - blank = all max_num => '1000', # biotype to label bad models ( otherwise they are not written ) # do you want to trim UTR trim_utr => 1, # config for trimming UTR max_3prime_exons => 2, max_3prime_length => 5000, max_5prime_exons => 3, max_5prime_length => 1000, # % of average intron score that a UTR intron must have reject_intron_cutoff => 5, }, -rc_name => '5GB_refine', -flow_into => { 1 => ['blast_rnaseq'], -1 => {'refine_genes_20GB' => {"bad_models" => "#bad_models#", "best_score" => "#best_score#", "iid" => "#iid#", "intron_bam_files" => "#intron_bam_files#", "introns_logic_name" => "#introns_logic_name#", "logic_name" => "#logic_name#", "other_isoforms" => "#other_isoforms#", "single_exon_model" => "#single_exon_model#"}}, -2 => {'refine_slice_low_recursion' => {"bad_models" => "#bad_models#", "best_score" => "#best_score#", "iid" => "#iid#", "intron_bam_files" => "#intron_bam_files#", "introns_logic_name" => "#introns_logic_name#", "logic_name" => "#logic_name#", "other_isoforms" => "#other_isoforms#", "single_exon_model" => "#single_exon_model#"}}, }, }, { -logic_name => 'refine_slice_low_recursion', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveRefineSolexaGenes', -can_be_empty => 1, -parameters => { input_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), output_db => $self->o('refine_db'), # write the intron features into the OUTPUT_DB along with the models write_introns => 1, # maximum number of times to loop when building all possible paths through the transcript max_recursions => 10000, # analysis logic_name for the dna_align_features to fetch from the INTRON_DB # If left blank all features will be fetched logicname => [], # logic name of the gene models to fetch model_ln => '', # penalty for removing a retined intron retained_intron_penalty => 2, #Remove introns that overlap X introns filter_on_overlap => 0, # minimum size for an intron min_intron_size => 30, max_intron_size => 200000, # biotype to give to single exon models if left blank single exons are ignored # minimum single exon size (bp) min_single_exon => 1000, # minimum percentage of single exon length that is coding single_exon_cds => 66, # Intron with most support determines the splice sites for an internal exon # lower scoring introns with different splice sites are rejected strict_internal_splice_sites => 1, # In some species alternate splice sites for end exons seem to be common strict_internal_end_exon_splice_sites => 1, # biotypes to give gene models if left blank these models will not get written to the output database # best score - model with most supporting intron features # all other possible models # max number of other models to make - blank = all other_num => '10', # max number of other models to process - blank = all max_num => '1000', # biotype to label bad models ( otherwise they are not written ) # do you want to trim UTR trim_utr => 1, # config for trimming UTR max_3prime_exons => 2, max_3prime_length => 5000, max_5prime_exons => 3, max_5prime_length => 1000, # % of average intron score that a UTR intron must have reject_intron_cutoff => 5, }, -rc_name => '5GB_refine', -flow_into => { 1 => ['blast_rnaseq'], -1 => {'refine_slice_low_recursion_20GB' => {"bad_models" => "#bad_models#", "best_score" => "#best_score#", "iid" => "#iid#", "intron_bam_files" => "#intron_bam_files#", "introns_logic_name" => "#introns_logic_name#", "logic_name" => "#logic_name#", "other_isoforms" => "#other_isoforms#", "single_exon_model" => "#single_exon_model#"}}, }, }, { -logic_name => 'refine_genes_20GB', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveRefineSolexaGenes', -can_be_empty => 1, -parameters => { input_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), output_db => $self->o('refine_db'), # write the intron features into the OUTPUT_DB along with the models write_introns => 1, # maximum number of times to loop when building all possible paths through the transcript max_recursions => 100000, # analysis logic_name for the dna_align_features to fetch from the INTRON_DB # If left blank all features will be fetched logicname => [], # logic name of the gene models to fetch model_ln => '', # penalty for removing a retined intron retained_intron_penalty => 2, #Remove introns that overlap X introns filter_on_overlap => 0, # minimum size for an intron min_intron_size => 30, max_intron_size => 200000, # biotype to give to single exon models if left blank single exons are ignored # minimum single exon size (bp) min_single_exon => 1000, # minimum percentage of single exon length that is coding single_exon_cds => 66, # Intron with most support determines the splice sites for an internal exon # lower scoring introns with different splice sites are rejected strict_internal_splice_sites => 1, # In some species alternate splice sites for end exons seem to be common strict_internal_end_exon_splice_sites => 1, # biotypes to give gene models if left blank these models will not get written to the output database # best score - model with most supporting intron features # all other possible models # max number of other models to make - blank = all other_num => '10', # max number of other models to process - blank = all max_num => '1000', # biotype to label bad models ( otherwise they are not written ) # do you want to trim UTR trim_utr => 1, # config for trimming UTR max_3prime_exons => 2, max_3prime_length => 5000, max_5prime_exons => 3, max_5prime_length => 1000, # % of average intron score that a UTR intron must have reject_intron_cutoff => 5, }, -rc_name => '20GB_refine', -flow_into => { 1 => ['blast_rnaseq'], }, }, { -logic_name => 'refine_slice_low_recursion_20GB', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveRefineSolexaGenes', -can_be_empty => 1, -parameters => { input_db => $self->o('rough_db'), dna_db => $self->o('dna_db'), output_db => $self->o('refine_db'), # write the intron features into the OUTPUT_DB along with the models write_introns => 1, # maximum number of times to loop when building all possible paths through the transcript max_recursions => 10000, # analysis logic_name for the dna_align_features to fetch from the INTRON_DB # If left blank all features will be fetched logicname => [], # logic name of the gene models to fetch model_ln => '', # penalty for removing a retined intron retained_intron_penalty => 2, #Remove introns that overlap X introns filter_on_overlap => 0, # minimum size for an intron min_intron_size => 30, max_intron_size => 200000, # biotype to give to single exon models if left blank single exons are ignored # minimum single exon size (bp) min_single_exon => 1000, # minimum percentage of single exon length that is coding single_exon_cds => 66, # Intron with most support determines the splice sites for an internal exon # lower scoring introns with different splice sites are rejected strict_internal_splice_sites => 1, # In some species alternate splice sites for end exons seem to be common strict_internal_end_exon_splice_sites => 1, # biotypes to give gene models if left blank these models will not get written to the output database # best score - model with most supporting intron features # all other possible models # max number of other models to make - blank = all other_num => '10', # max number of other models to process - blank = all max_num => '1000', # biotype to label bad models ( otherwise they are not written ) # do you want to trim UTR trim_utr => 1, # config for trimming UTR max_3prime_exons => 2, max_3prime_length => 5000, max_5prime_exons => 3, max_5prime_length => 1000, # % of average intron score that a UTR intron must have reject_intron_cutoff => 5, }, -rc_name => '20GB_refine', -flow_into => { 1 => ['blast_rnaseq'], }, }, { -logic_name => 'blast_rnaseq', -module => 'Bio::EnsEMBL::Analysis::Hive::RunnableDB::HiveBlastRNASeqPep', -parameters => { input_db => $self->o('refine_db'), output_db => $self->o('blast_db'), dna_db => $self->o('dna_db'), # path to index to fetch the sequence of the blast hit to calculate % coverage indicate_index => $self->o('uniprotindex'), uniprot_index => [$self->o('uniprotdb')], blast_program => $self->o('blastp'), %{get_analysis_settings('Bio::EnsEMBL::Analysis::Hive::Config::BlastStatic','BlastGenscanPep', {BLAST_PARAMS => {-type => $self->o('blast_type')}})}, commandline_params => $self->o('blast_type') eq 'wu' ? '-cpus='.$self->default_options->{'use_threads'}.' -hitdist=40' : '-p blastp -A 40', }, -rc_name => '2GB_blast', -wait_for => ['create_blast_db'], }, ); foreach my $analyses (@analysis) { $analyses->{-max_retry_count} = 1 unless (exists $analyses->{-max_retry_count}); } return \@analysis; } sub resource_classes { my $self = shift; return { %{ $self->SUPER::resource_classes() }, # inherit other stuff from the base class '1GB' => { LSF => $self->lsf_resource_builder('normal', 1000, [$self->default_options->{'pipe_db_server'}])}, '1GB_rough' => { LSF => $self->lsf_resource_builder('normal', 1000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}])}, '2GB_rough' => { LSF => $self->lsf_resource_builder('normal', 2000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}])}, '5GB_rough' => { LSF => $self->lsf_resource_builder('long', 5000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}])}, '15GB_rough' => { LSF => $self->lsf_resource_builder('long', 15000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}])}, '2GB_blast' => { LSF => $self->lsf_resource_builder('normal', 2000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'refine_db_server'}, $self->default_options->{'blast_db_server'}], undef, ($self->default_options->{'use_threads'}+1))}, '2GB' => { LSF => $self->lsf_resource_builder('normal', 2000, [$self->default_options->{'pipe_db_server'}])}, '4GB' => { LSF => $self->lsf_resource_builder('normal', 4000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'dna_db_server'}])}, '5GB' => { LSF => $self->lsf_resource_builder('normal', 5000, [$self->default_options->{'pipe_db_server'}])}, '2GB_introns' => { LSF => $self->lsf_resource_builder('normal', 2000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}, $self->default_options->{'dna_db_server'}])}, '2GB_refine' => { LSF => $self->lsf_resource_builder('normal', 2000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}, $self->default_options->{'dna_db_server'}, $self->default_options->{'refine_db_server'}])}, '5GB_introns' => { LSF => $self->lsf_resource_builder('long', 5000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}, $self->default_options->{'dna_db_server'}])}, '10GB_introns' => { LSF => $self->lsf_resource_builder('long', 10000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}, $self->default_options->{'dna_db_server'}])}, '3GB_multithread' => { LSF => $self->lsf_resource_builder('long', 3000, [$self->default_options->{'pipe_db_server'}], undef, $self->default_options->{'use_threads'})}, '5GB_multithread' => { LSF => $self->lsf_resource_builder('normal', 5000, [$self->default_options->{'pipe_db_server'}], undef, ($self->default_options->{'use_threads'}+1))}, '10GB_multithread' => { LSF => $self->lsf_resource_builder('long', 10000, [$self->default_options->{'pipe_db_server'}], undef, ($self->default_options->{'use_threads'}+1))}, '20GB_multithread' => { LSF => $self->lsf_resource_builder('long', 20000, [$self->default_options->{'pipe_db_server'}], undef, ($self->default_options->{'use_threads'}+1))}, '5GB' => { LSF => $self->lsf_resource_builder('normal', 5000, [$self->default_options->{'pipe_db_server'}])}, '10GB' => { LSF => $self->lsf_resource_builder('long', 10000, [$self->default_options->{'pipe_db_server'}])}, '5GB_refine' => { LSF => $self->lsf_resource_builder('normal', 5000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}, $self->default_options->{'dna_db_server'}, $self->default_options->{'refine_db_server'}])}, '20GB_refine' => { LSF => $self->lsf_resource_builder('normal', 20000, [$self->default_options->{'pipe_db_server'}, $self->default_options->{'rough_db_server'}, $self->default_options->{'dna_db_server'}, $self->default_options->{'refine_db_server'}])}, }; } 1;
Ensembl/ensembl-analysis
modules/Bio/EnsEMBL/Analysis/Hive/Config/HiveRNASeqStar_conf.pm
Perl
apache-2.0
51,704
# # 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 centreon::common::adic::tape::snmp::mode::components::fan; use strict; use warnings; my %map_status = ( 1 => 'nominal', 2 => 'warningLow', 3 => 'warningHigh', 4 => 'alarmLow', 5 => 'alarmHigh', 6 => 'notInstalled', 7 => 'noData', ); my $mapping = { coolingFanName => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.2' }, coolingFanStatus => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.3', map => \%map_status }, coolingFanRPM => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.4' }, coolingFanWarningHi => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.8' }, coolingFanNominalHi => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.6' }, coolingFanNominalLo => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.5' }, coolingFanWarningLo => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.7' }, coolingFanLocation => { oid => '.1.3.6.1.4.1.3764.1.1.200.200.40.1.9' }, }; my $oid_coolingFanEntry = '.1.3.6.1.4.1.3764.1.1.200.200.40.1'; sub load { my ($self) = @_; push @{$self->{request}}, { oid => $oid_coolingFanEntry }; } sub check { my ($self) = @_; $self->{output}->output_add(long_msg => "Checking fans"); $self->{components}->{fan} = {name => 'fans', total => 0, skip => 0}; return if ($self->check_filter(section => 'fan')); foreach my $oid ($self->{snmp}->oid_lex_sort(keys %{$self->{results}->{$oid_coolingFanEntry}})) { next if ($oid !~ /^$mapping->{coolingFanStatus}->{oid}\.(.*)$/); my $instance = $1; my $result = $self->{snmp}->map_instance(mapping => $mapping, results => $self->{results}->{$oid_coolingFanEntry}, instance => $instance); $result->{coolingFanName} =~ s/\s+/ /g; $result->{coolingFanName} = centreon::plugins::misc::trim($result->{coolingFanName}); $result->{coolingFanLocation} =~ s/,/_/g; my $id = $result->{coolingFanName} . '_' . $result->{coolingFanLocation}; next if ($self->check_filter(section => 'fan', instance => $id)); $self->{components}->{fan}->{total}++; $self->{output}->output_add(long_msg => sprintf("fan '%s' status is '%s' [instance = %s] [value = %s]", $id, $result->{coolingFanStatus}, $id, $result->{coolingFanRPM})); my $exit = $self->get_severity(label => 'sensor', section => 'fan', value => $result->{coolingFanStatus}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("fan '%s' status is '%s'", $id, $result->{coolingFanStatus})); next; } if (defined($result->{coolingFanRPM}) && $result->{coolingFanRPM} =~ /[0-9]/) { my ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'fan', instance => $instance, value => $result->{coolingFanRPM}); if ($checked == 0) { $result->{coolingFanNominalLo} = (defined($result->{coolingFanNominalLo}) && $result->{coolingFanNominalLo} =~ /[0-9]/) ? $result->{coolingFanNominalLo} : ''; $result->{coolingFanWarningLo} = (defined($result->{coolingFanWarningLo}) && $result->{coolingFanWarningLo} =~ /[0-9]/) ? $result->{coolingFanWarningLo} : ''; $result->{coolingFanNominalHi} = (defined($result->{coolingFanNominalHi}) && $result->{coolingFanNominalHi} =~ /[0-9]/) ? $result->{coolingFanNominalHi} : ''; $result->{coolingFanWarningHi} = (defined($result->{coolingFanWarningHi}) && $result->{coolingFanWarningHi} =~ /[0-9]/) ? $result->{coolingFanWarningHi} : ''; my $warn_th = $result->{coolingFanNominalLo} . ':' . $result->{coolingFanNominalHi}; my $crit_th = $result->{coolingFanWarningLo} . ':' . $result->{coolingFanWarningHi}; $self->{perfdata}->threshold_validate(label => 'warning-fan-instance-' . $instance, value => $warn_th); $self->{perfdata}->threshold_validate(label => 'critical-fan-instance-' . $instance, value => $crit_th); $exit = $self->{perfdata}->threshold_check(value => $result->{coolingFanRPM}, threshold => [ { label => 'critical-fan-instance-' . $instance, exit_litteral => 'critical' }, { label => 'warning-fan-instance-' . $instance, exit_litteral => 'warning' } ]); $warn = $self->{perfdata}->get_perfdata_for_output(label => 'warning-fan-instance-' . $instance); $crit = $self->{perfdata}->get_perfdata_for_output(label => 'critical-fan-instance-' . $instance); } if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, short_msg => sprintf("Fan '%s' is %s rpm", $id, $result->{coolingFanRPM})); } $self->{output}->perfdata_add(label => 'fan_' . $id, unit => 'rpm', value => $result->{coolingFanRPM}, warning => $warn, critical => $crit, ); } } } 1;
wilfriedcomte/centreon-plugins
centreon/common/adic/tape/snmp/mode/components/fan.pm
Perl
apache-2.0
6,315
package Moose::Exception::CannotGenerateInlineConstraint; our $VERSION = '2.1404'; use Moose; extends 'Moose::Exception'; with 'Moose::Exception::Role::TypeConstraint'; has 'parameterizable_type_object_name' => ( is => 'ro', isa => 'Str', required => 1, documentation => "This attribute can be used for fetching parameterizable type constraint(Moose::Meta::TypeConstraint::Parameterizable):\n". " my \$type_constraint = Moose::Util::TypeConstraints::find_type_constraint( \$exception->type_name );\n", ); has 'value' => ( is => 'ro', isa => 'Str', required => 1 ); sub _build_message { my $self = shift; my $type = $self->type_name; return "Can't generate an inline constraint for $type, since none was defined"; } 1;
ray66rus/vndrv
local/lib/perl5/x86_64-linux-thread-multi/Moose/Exception/CannotGenerateInlineConstraint.pm
Perl
apache-2.0
826
package VMOMI::HostOpaqueSwitch; use parent 'VMOMI::DynamicData'; use strict; use warnings; our @class_ancestors = ( 'DynamicData', ); our @class_members = ( ['key', undef, 0, ], ['name', undef, 0, 1], ['pnic', undef, 1, 1], ['pnicZone', 'HostOpaqueSwitchPhysicalNicZone', 1, 1], ['status', undef, 0, 1], ['vtep', 'HostVirtualNic', 1, 1], ['extraConfig', 'OptionValue', 1, 1], ); 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/HostOpaqueSwitch.pm
Perl
apache-2.0
634
rev(List1, List2) :- rev(List1, [], List2). rev([], Accumulator, Accumulator). rev([Head|Tail], Accumulator, List2) :- rev(Tail, [Head|Accumulator], List2).
frankiesardo/seven-languages-in-seven-weeks
src/main/prolog/day2/reverse.pl
Perl
apache-2.0
159
% --------------------------------------------------------------------------- % Messages (based on flag/1 options) verbose_message(Xs) :- ( flag(verbose) -> write_list(Xs) ; true ). debug_message(Xs) :- ( flag(debug_print) -> write_list(Xs) ; true ). write_list([]) :- nl. write_list([X|Xs]) :- write(X), write_list(Xs).
bishoksan/chclibs
src/messages.pl
Perl
apache-2.0
349