', Comment = '%1 is an email address, such as user@domain.com; %2 is the name of a connector, such as SMTP;';\n TestEmailSuccessMsg: Label 'Test email has been sent to %1.\\Check your email for messages to make sure that the email was delivered successfully.', Comment = '%1 is an email address.';\n TestEmailFailedMsg: Label 'An error has occured while sending the email, please look at the Outbox to find the error.';\n TestEmailOtherTxt: Label 'Other...';\n\n trigger OnRun()\n var\n Email: Codeunit Email;\n Message: Codeunit \"Email Message\";\n EmailUserSpecifiedAddress: Page \"Email User-Specified Address\";\n EmailRecipient: Text;\n EmailChoices: Text;\n SelectedEmailChoice: Integer;\n EmailBody: Text;\n EmailChoicesSubLbl: Label '%1,%2', Locked = true;\n begin\n EmailChoices := StrSubstNo(EmailChoicesSubLbl, Rec.\"Email Address\", TestEmailOtherTxt);\n SelectedEmailChoice := StrMenu(EmailChoices, 2, TestEmailChoiceTxt);\n\n if SelectedEmailChoice = 0 then\n exit;\n if SelectedEmailChoice = 1 then\n EmailRecipient := Rec.\"Email Address\"\n else\n if EmailUserSpecifiedAddress.RunModal() = Action::OK then\n EmailRecipient := EmailUserSpecifiedAddress.GetEmailAddress()\n else\n exit;\n \n#if not CLEAN17\n Email.OnGetTestEmailBody(Rec.Connector, EmailBody);\n#endif\n Email.OnGetBodyForTestEmail(Rec.Connector, Rec.\"Account Id\", EmailBody);\n\n if EmailBody = '' then\n EmailBody := StrSubstNo(TestEmailBodyTxt, UserId(), Rec.Connector);\n\n Message.Create(EmailRecipient, TestEmailSubjectTxt, EmailBody, true);\n if Email.Send(Message, Rec) then\n Message(StrSubstNo(TestEmailSuccessMsg, EmailRecipient))\n else\n Error(TestEmailFailedMsg);\n end;\n}\n"},"avg_line_length":{"kind":"number","value":47.9666666667,"string":"47.966667"},"max_line_length":{"kind":"number","value":411,"string":"411"},"alphanum_fraction":{"kind":"number","value":0.6243919388,"string":"0.624392"}}},{"rowIdx":463240,"cells":{"hexsha":{"kind":"string","value":"eda5cf82be6051d81930641e357cb425d6e62f7c"},"size":{"kind":"number","value":5868,"string":"5,868"},"ext":{"kind":"string","value":"al"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"Apps/W1/MSWalletPayments/app/src/pages/MerchSetupInv.Page.al"},"max_stars_repo_name":{"kind":"string","value":"manjulchauhan/ALAppExtensions"},"max_stars_repo_head_hexsha":{"kind":"string","value":"3f2f1d6e5337188b1af9c0275420f1c1de036a7f"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":127,"string":"127"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2018-04-17T18:03:03.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2019-05-06T18:54:17.000Z"},"max_issues_repo_path":{"kind":"string","value":"Apps/W1/MSWalletPayments/app/src/pages/MerchSetupInv.Page.al"},"max_issues_repo_name":{"kind":"string","value":"snu-development/ALAppExtensions"},"max_issues_repo_head_hexsha":{"kind":"string","value":"371a27fe48483be776642dde19483a87ae27289c"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":2279,"string":"2,279"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2018-09-12T12:01:49.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2019-05-06T13:59:35.000Z"},"max_forks_repo_path":{"kind":"string","value":"Apps/W1/MSWalletPayments/app/src/pages/MerchSetupInv.Page.al"},"max_forks_repo_name":{"kind":"string","value":"snu-development/ALAppExtensions"},"max_forks_repo_head_hexsha":{"kind":"string","value":"371a27fe48483be776642dde19483a87ae27289c"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":41,"string":"41"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2018-05-17T11:19:52.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2019-04-30T17:30:38.000Z"},"content":{"kind":"string","value":"#if not CLEAN20\npage 1087 \"MS - Wallet Merch. Setup Inv\"\n{\n ObsoleteState = Pending;\n ObsoleteReason = 'MS Wallet have been deprecated';\n ObsoleteTag = '20.0';\n Caption = 'Set up Microsoft Pay Payments';\n DataCaptionExpression = '';\n DeleteAllowed = false;\n InsertAllowed = false;\n PageType = Card;\n SourceTable = \"MS - Wallet Merchant Account\";\n\n layout\n {\n area(content)\n {\n group(General)\n {\n InstructionalText = 'With Microsoft Pay Payments, your customers can pay you using credit cards and PayPal.';\n field(LogoControlDetails; MSWalletMerchantTemplate.Logo)\n {\n ApplicationArea = Basic, Suite;\n Caption = 'Logo';\n ShowCaption = false;\n Editable = false;\n ToolTip = 'Specifies the logo that will be included on all invoices.';\n }\n field(TermsOfServiceControlSetup; TermsOfServiceLbl)\n {\n ApplicationArea = Basic, Suite;\n Editable = false;\n ShowCaption = false;\n ToolTip = 'Specifies the Microsoft Pay Payments terms of service.';\n\n trigger OnDrillDown();\n begin\n if \"Terms of Service\" <> '' then\n Hyperlink(\"Terms of Service\")\n else\n Hyperlink(MSWalletMerchantTemplate.\"Terms of Service\");\n end;\n }\n group(MsPayMerchantDetails)\n {\n ShowCaption = false;\n Visible = \"Merchant ID\" <> '';\n group(Details)\n {\n group(AccountEnabledGroup)\n {\n ShowCaption = false;\n InstructionalText = 'Your Microsoft Pay Payments merchant profile is configured and active. All the invoices you send will contain a link for your customers to pay you using Microsoft Pay Payments.';\n }\n field(MerchantIDControl; \"Merchant ID\")\n {\n ApplicationArea = Basic, Suite;\n Editable = false;\n ToolTip = 'Specifies the Merchant ID of the Microsoft Pay Payments merchant account.';\n }\n\n group(TestModeGroup)\n {\n ShowCaption = false;\n Visible = \"Test Mode\";\n\n field(TestModeControl; \"Test Mode\")\n {\n ApplicationArea = Invoicing;\n ToolTip = 'Specifies if test mode is enabled. If you send invoices and get payments while your are in test mode, no actual money transfer will be made.';\n Editable = \"Test Mode\";\n }\n }\n field(ConfigureMsPayControl; ConfigureMsPayLbl)\n {\n ApplicationArea = Basic, Suite;\n Editable = false;\n ShowCaption = false;\n ToolTip = 'Specifies a link to Microsoft Pay Payments so you can configure your Microsoft Pay Payments merchant profile.';\n\n trigger OnDrillDown();\n var\n MSWalletMerchantMgt: Codeunit \"MS - Wallet Merchant Mgt\";\n begin\n Hyperlink(MSWalletMerchantMgt.GetMerchantSignupUrl());\n\n ConfigureEmailLinkCount += 1;\n\n if ConfigureEmailLinkCount >= 4 then\n Message(EnablePopUpMsg);\n end;\n }\n field(RemoveAccountControl; RemoveAccountLbl)\n {\n ApplicationArea = Basic, Suite;\n Editable = false;\n ShowCaption = false;\n ToolTip = 'Specifies that you want to disconnect your Microsoft Pay Payments account from Invoicing.';\n\n trigger OnDrillDown();\n begin\n if Confirm(ConfirmDeleteQst, false) then\n Delete(true);\n end;\n }\n }\n }\n }\n }\n }\n\n trigger OnAfterGetCurrRecord();\n begin\n MSWalletMerchantTemplate.RefreshLogoIfNeeded();\n end;\n\n trigger OnOpenPage();\n var\n MSWalletMgt: Codeunit \"MS - Wallet Mgt.\";\n begin\n MSWalletMgt.GetTemplate(MSWalletMerchantTemplate);\n MSWalletMerchantTemplate.RefreshLogoIfNeeded();\n end;\n\n var\n MSWalletMerchantTemplate: Record \"MS - Wallet Merchant Template\";\n ConfigureEmailLinkCount: Integer;\n ConfirmDeleteQst: Label 'If you disconnect Invoicing from Microsoft Pay Payments, your customers will not be able to pay existing invoices using online payments.\\Are you sure you want to remove the connection?';\n TermsOfServiceLbl: Label 'Terms of Service';\n RemoveAccountLbl: Label 'Disconnect from Microsoft Pay Payments';\n ConfigureMsPayLbl: Label 'Configure Microsoft Pay Payments (opens in a new window)';\n EnablePopUpMsg: Label 'If you cannot see the Microsoft Pay Payments setup window, make sure your browser allows pop-ups.';\n\n}\n#endif"},"avg_line_length":{"kind":"number","value":43.4666666667,"string":"43.466667"},"max_line_length":{"kind":"number","value":227,"string":"227"},"alphanum_fraction":{"kind":"number","value":0.4855146558,"string":"0.485515"}}},{"rowIdx":463241,"cells":{"hexsha":{"kind":"string","value":"edd010da1361310e1db38fa41043ada7ae8438ac"},"size":{"kind":"number","value":1528,"string":"1,528"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"nfsroot/usr/share/doc/libparse-recdescent-perl/examples/demo_lisplike.pl"},"max_stars_repo_name":{"kind":"string","value":"simontakite/FAI"},"max_stars_repo_head_hexsha":{"kind":"string","value":"077f94c83700cdd29433d09372f916f9e277497b"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2019-02-26T16:02:06.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2019-02-26T16:02:06.000Z"},"max_issues_repo_path":{"kind":"string","value":"nfsroot/usr/share/doc/libparse-recdescent-perl/examples/demo_lisplike.pl"},"max_issues_repo_name":{"kind":"string","value":"simontakite/FAI"},"max_issues_repo_head_hexsha":{"kind":"string","value":"077f94c83700cdd29433d09372f916f9e277497b"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"nfsroot/usr/share/doc/libparse-recdescent-perl/examples/demo_lisplike.pl"},"max_forks_repo_name":{"kind":"string","value":"simontakite/FAI"},"max_forks_repo_head_hexsha":{"kind":"string","value":"077f94c83700cdd29433d09372f916f9e277497b"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#!/usr/bin/perl -w\n\nuse Parse::RecDescent;\nuse Data::Dumper;\n\nmy $grammar = q{\n\n s_expr: '(' s_expr(s) ')' # NESTED S-EXPRS\n { $return = $item[2] }\n | /\" [^\\\\\"]* (\\\\. [^\\\\\"]*)* \"/x # STRINGS\n | /[^()\\s]+/ # ANYTHING ELSE\n\n\n};\n\nmy $parser = Parse::RecDescent->new($grammar) or die;\n\nundef $/;\nmy $data = ;\n\nmy $nested_array = $parser->s_expr($data);\n\n\nprint Data::Dumper->Dump($nested_array);\n\n__DATA__\n\n (net\n (rename VDDTX \"vddtx\")\n (joined\n\t (portRef VDDTX)\n\t (portRef &2\n\t (instanceRef I_45_1102680350)))\n (figure WIRE\n\t (path\n\t (pointList\n\t (pt 6700 -2100)\n\t (pt 6900 -2100)))\n\t (path\n\t (pointList\n\t (pt 6900 -2100)\n\t (pt 6900 -2500)))))\n (net\n (rename N00023 \"N00023\")\n (joined\n\t (portRef &2\n\t (instanceRef I_45_1215476478))\n\t (portRef &1\n\t (instanceRef I_45_1102680350))\n\t (portRef &2\n\t (instanceRef I_45_1215470655)))\n (figure WIRE\n\t (path\n\t (pointList\n\t (pt 5800 -3400)\n\t (pt 6900 -3400)))\n\t (path\n\t (pointList\n\t (pt 5800 -3400)\n\t (pt 5800 -3700)))\n\t (path\n\t (pointList\n\t (pt 6900 -3100)\n\t (pt 6900 -3400)))\n\t (path\n\t (pointList\n\t (pt 8000 -3400)\n\t (pt 8000 -3700)))\n\t (path\n\t (pointList\n\t (pt 6900 -3400)\n\t (pt 8000 -3400))))\n (instance\n\t (rename TIE1 \"TIE1\")\n\t (viewRef XTIE0A2Y2\n\t (cellRef XTIE0A2Y2\n\t (libraryRef RIPPER_LIBRARY)))\n\t (transform\n\t (origin\n\t (pt 6900 -3400)))))\n\n"},"avg_line_length":{"kind":"number","value":18.6341463415,"string":"18.634146"},"max_line_length":{"kind":"number","value":64,"string":"64"},"alphanum_fraction":{"kind":"number","value":0.5137434555,"string":"0.513743"}}},{"rowIdx":463242,"cells":{"hexsha":{"kind":"string","value":"edbcabbd88d1a6b527f9b6a553508c3863c7ba39"},"size":{"kind":"number","value":1089,"string":"1,089"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"ext/Parrot-Embed/lib/Parrot/Embed.pm"},"max_stars_repo_name":{"kind":"string","value":"allisonrandal/pcc_testing"},"max_stars_repo_head_hexsha":{"kind":"string","value":"b906b48d01125d1818f8ea31ff87b9fa85d21994"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2016-04-05T22:45:45.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2016-04-05T22:45:45.000Z"},"max_issues_repo_path":{"kind":"string","value":"ext/Parrot-Embed/lib/Parrot/Embed.pm"},"max_issues_repo_name":{"kind":"string","value":"allisonrandal/pcc_testing"},"max_issues_repo_head_hexsha":{"kind":"string","value":"b906b48d01125d1818f8ea31ff87b9fa85d21994"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"ext/Parrot-Embed/lib/Parrot/Embed.pm"},"max_forks_repo_name":{"kind":"string","value":"allisonrandal/pcc_testing"},"max_forks_repo_head_hexsha":{"kind":"string","value":"b906b48d01125d1818f8ea31ff87b9fa85d21994"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package Parrot::Embed;\n# Copyright (C) 2006-2009, Parrot Foundation.\n# $Id$\n\nuse strict;\nuse warnings;\n\nour $VERSION = '20081006';\n\nuse base 'DynaLoader';\n\nParrot::Embed->bootstrap($VERSION);\n\n1;\n\n__END__\n\n=head1 NAME\n\nParrot::Embed - use Parrot from Perl 5\n\n=head1 VERSION\n\nVersion 20081006\n\n=head1 SYNOPSIS\n\n use Parrot::Embed qw(Parrot_revision);\n\n=head1 DESCRIPTION\n\nThis module embeds libparrot in Perl 5 programs. You can load Parrot bytecode,\ncompile your own code, and call Parrot subroutines and send and receive values\nto them.\n\nIt provides the core implementation used by the L module.\nDo consider using L first however. See also\nL.\n\nThis module provides no user-inspectable code.\n\n=head1 AUTHOR\n\nchromatic, C<< >>\n\n=head1 BUGS\n\nPlease report any bugs or feature requests to the Parrot Porters mailing list.\nSomeday there may be a CPAN version of this code. Who knows?\n\n=cut\n\n# Local Variables:\n# mode: cperl\n# cperl-indent-level: 4\n# fill-column: 100\n# End:\n# vim: expandtab shiftwidth=4:\n"},"avg_line_length":{"kind":"number","value":18.4576271186,"string":"18.457627"},"max_line_length":{"kind":"number","value":79,"string":"79"},"alphanum_fraction":{"kind":"number","value":0.7438016529,"string":"0.743802"}}},{"rowIdx":463243,"cells":{"hexsha":{"kind":"string","value":"edede426126bc4af4db65ececdedc246310b9339"},"size":{"kind":"number","value":8147,"string":"8,147"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/mk-ca-bundle.pl"},"max_stars_repo_name":{"kind":"string","value":"patrick0057/ermine-curl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"60c20d72f5ffd66e975aa37487324f9a7dddccb7"},"max_stars_repo_licenses":{"kind":"list like","value":["curl"],"string":"[\n \"curl\"\n]"},"max_stars_count":{"kind":"number","value":133,"string":"133"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-01-05T10:45:10.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-01-07T09:41:57.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/mk-ca-bundle.pl"},"max_issues_repo_name":{"kind":"string","value":"patrick0057/ermine-curl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"60c20d72f5ffd66e975aa37487324f9a7dddccb7"},"max_issues_repo_licenses":{"kind":"list like","value":["curl"],"string":"[\n \"curl\"\n]"},"max_issues_count":{"kind":"number","value":114,"string":"114"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2015-02-24T18:55:51.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-12-11T13:37:32.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/mk-ca-bundle.pl"},"max_forks_repo_name":{"kind":"string","value":"patrick0057/ermine-curl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"60c20d72f5ffd66e975aa37487324f9a7dddccb7"},"max_forks_repo_licenses":{"kind":"list like","value":["curl"],"string":"[\n \"curl\"\n]"},"max_forks_count":{"kind":"number","value":45,"string":"45"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-02-24T03:50:42.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2022-01-31T00:35:44.000Z"},"content":{"kind":"string","value":"#!/usr/bin/perl -w\n# ***************************************************************************\n# * _ _ ____ _\n# * Project ___| | | | _ \\| |\n# * / __| | | | |_) | |\n# * | (__| |_| | _ <| |___\n# * \\___|\\___/|_| \\_\\_____|\n# *\n# * Copyright (C) 1998 - 2013, Daniel Stenberg, , et al.\n# *\n# * This software is licensed as described in the file COPYING, which\n# * you should have received as part of this distribution. The terms\n# * are also available at http://curl.haxx.se/docs/copyright.html.\n# *\n# * You may opt to use, copy, modify, merge, publish, distribute and/or sell\n# * copies of the Software, and permit persons to whom the Software is\n# * furnished to do so, under the terms of the COPYING file.\n# *\n# * This software is distributed on an \"AS IS\" basis, WITHOUT WARRANTY OF ANY\n# * KIND, either express or implied.\n# *\n# ***************************************************************************\n# This Perl script creates a fresh ca-bundle.crt file for use with libcurl.\n# It downloads certdata.txt from Mozilla's source tree (see URL below),\n# then parses certdata.txt and extracts CA Root Certificates into PEM format.\n# These are then processed with the OpenSSL commandline tool to produce the\n# final ca-bundle.crt file.\n# The script is based on the parse-certs script written by Roland Krikava.\n# This Perl script works on almost any platform since its only external\n# dependency is the OpenSSL commandline tool for optional text listing.\n# Hacked by Guenter Knauf.\n#\nuse Getopt::Std;\nuse MIME::Base64;\nuse LWP::UserAgent;\nuse strict;\nuse vars qw($opt_b $opt_f $opt_h $opt_i $opt_l $opt_n $opt_q $opt_t $opt_u $opt_v $opt_w);\n\nmy $url = 'http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';\n# If the OpenSSL commandline is not in search path you can configure it here!\nmy $openssl = 'openssl';\n\nmy $version = '1.18';\n\n$opt_w = 76; # default base64 encoded lines length\n\n$0 =~ s@.*(/|\\\\)@@;\n$Getopt::Std::STANDARD_HELP_VERSION = 1;\ngetopts('bfhilnqtuvw:');\n\nif ($opt_i) {\n print (\"=\" x 78 . \"\\n\");\n print \"Script Version : $version\\n\";\n print \"Perl Version : $]\\n\";\n print \"Operating System Name : $^O\\n\";\n print \"Getopt::Std.pm Version : ${Getopt::Std::VERSION}\\n\";\n print \"MIME::Base64.pm Version : ${MIME::Base64::VERSION}\\n\";\n print \"LWP::UserAgent.pm Version : ${LWP::UserAgent::VERSION}\\n\";\n print \"LWP.pm Version : ${LWP::VERSION}\\n\";\n print (\"=\" x 78 . \"\\n\");\n}\n\nsub HELP_MESSAGE() {\n print \"Usage:\\t${0} [-b] [-f] [-i] [-l] [-n] [-q] [-t] [-u] [-v] [-w] []\\n\";\n print \"\\t-b\\tbackup an existing version of ca-bundle.crt\\n\";\n print \"\\t-f\\tforce rebuild even if certdata.txt is current\\n\";\n print \"\\t-i\\tprint version info about used modules\\n\";\n print \"\\t-l\\tprint license info about certdata.txt\\n\";\n print \"\\t-n\\tno download of certdata.txt (to use existing)\\n\";\n print \"\\t-q\\tbe really quiet (no progress output at all)\\n\";\n print \"\\t-t\\tinclude plain text listing of certificates\\n\";\n print \"\\t-u\\tunlink (remove) certdata.txt after processing\\n\";\n print \"\\t-v\\tbe verbose and print out processed CAs\\n\";\n print \"\\t-w \\twrap base64 output lines after chars (default: ${opt_w})\\n\";\n exit;\n}\n\nsub VERSION_MESSAGE() {\n print \"${0} version ${version} running Perl ${]} on ${^O}\\n\";\n}\n\nHELP_MESSAGE() if ($opt_h);\n\nmy $crt = $ARGV[0] || 'ca-bundle.crt';\n(my $txt = $url) =~ s@(.*/|\\?.*)@@g;\n\nmy $stdout = $crt eq '-';\nmy $resp;\nmy $fetched;\n\nunless ($opt_n and -e $txt) {\n print STDERR \"Downloading '$txt' ...\\n\" if (!$opt_q);\n my $ua = new LWP::UserAgent(agent => \"$0/$version\");\n $ua->env_proxy();\n $resp = $ua->mirror($url, $txt);\n if ($resp && $resp->code eq '304') {\n print STDERR \"Not modified\\n\" unless $opt_q;\n exit 0 if -e $crt && !$opt_f;\n } else {\n $fetched = 1;\n }\n if( !$resp || $resp->code !~ /^(?:200|304)$/ ) {\n print STDERR \"Unable to download latest data: \"\n . ($resp? $resp->code . ' - ' . $resp->message : \"LWP failed\") . \"\\n\"\n unless $opt_q;\n exit 1 if -e $crt || ! -r $txt;\n }\n}\n\nmy $currentdate = scalar gmtime($fetched ? $resp->last_modified : (stat($txt))[9]);\n\nmy $format = $opt_t ? \"plain text and \" : \"\";\nif( $stdout ) {\n open(CRT, '> -') or die \"Couldn't open STDOUT: $!\\n\";\n} else {\n open(CRT,\">$crt.~\") or die \"Couldn't open $crt.~: $!\\n\";\n}\nprint CRT <) {\n if (/\\*\\*\\*\\*\\* BEGIN LICENSE BLOCK \\*\\*\\*\\*\\*/) {\n print CRT;\n print if ($opt_l);\n while () {\n print CRT;\n print if ($opt_l);\n last if (/\\*\\*\\*\\*\\* END LICENSE BLOCK \\*\\*\\*\\*\\*/);\n }\n }\n next if /^#|^\\s*$/;\n chomp;\n if (/^CVS_ID\\s+\\\"(.*)\\\"/) {\n print CRT \"# $1\\n\";\n }\n\n # this is a match for the start of a certificate\n if (/^CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE/) {\n $start_of_cert = 1\n }\n if ($start_of_cert && /^CKA_LABEL UTF8 \\\"(.*)\\\"/) {\n $caname = $1;\n }\n my $untrusted = 0;\n if ($start_of_cert && /^CKA_VALUE MULTILINE_OCTAL/) {\n my $data;\n while () {\n last if (/^END/);\n chomp;\n my @octets = split(/\\\\/);\n shift @octets;\n for (@octets) {\n $data .= chr(oct);\n }\n }\n # scan forwards until the trust part\n while () {\n last if (/^CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST/);\n chomp;\n }\n # now scan the trust part for untrusted certs\n while () {\n last if (/^#/);\n if (/^CKA_TRUST_SERVER_AUTH\\s+CK_TRUST\\s+CKT_NSS_NOT_TRUSTED$/\n or /^CKA_TRUST_SERVER_AUTH\\s+CK_TRUST\\s+CKT_NSS_TRUST_UNKNOWN$/) {\n $untrusted = 1;\n }\n }\n if ($untrusted) {\n $skipnum ++;\n } else {\n my $encoded = MIME::Base64::encode_base64($data, '');\n $encoded =~ s/(.{1,${opt_w}})/$1\\n/g;\n my $pem = \"-----BEGIN CERTIFICATE-----\\n\"\n . $encoded\n . \"-----END CERTIFICATE-----\\n\";\n print CRT \"\\n$caname\\n\";\n print CRT (\"=\" x length($caname) . \"\\n\");\n if (!$opt_t) {\n print CRT $pem;\n } else {\n my $pipe = \"|$openssl x509 -md5 -fingerprint -text -inform PEM\";\n if (!$stdout) {\n $pipe .= \" >> $crt.~\";\n close(CRT) or die \"Couldn't close $crt.~: $!\";\n }\n open(TMP, $pipe) or die \"Couldn't open openssl pipe: $!\";\n print TMP $pem;\n close(TMP) or die \"Couldn't close openssl pipe: $!\";\n if (!$stdout) {\n open(CRT, \">>$crt.~\") or die \"Couldn't open $crt.~: $!\";\n }\n }\n print STDERR \"Parsing: $caname\\n\" if ($opt_v);\n $certnum ++;\n $start_of_cert = 0;\n }\n }\n}\nclose(TXT) or die \"Couldn't close $txt: $!\\n\";\nclose(CRT) or die \"Couldn't close $crt.~: $!\\n\";\nunless( $stdout ) {\n if ($opt_b && -e $crt) {\n my $bk = 1;\n while (-e \"$crt.~${bk}~\") {\n $bk++;\n }\n rename $crt, \"$crt.~${bk}~\" or die \"Failed to create backup $crt.~$bk}~: $!\\n\";\n } elsif( -e $crt ) {\n unlink( $crt ) or die \"Failed to remove $crt: $!\\n\";\n }\n rename \"$crt.~\", $crt or die \"Failed to rename $crt.~ to $crt: $!\\n\";\n}\nunlink $txt if ($opt_u);\nprint STDERR \"Done ($certnum CA certs processed, $skipnum untrusted skipped).\\n\" if (!$opt_q);\n\nexit;\n\n\n"},"avg_line_length":{"kind":"number","value":33.5267489712,"string":"33.526749"},"max_line_length":{"kind":"number","value":100,"string":"100"},"alphanum_fraction":{"kind":"number","value":0.565852461,"string":"0.565852"}}},{"rowIdx":463244,"cells":{"hexsha":{"kind":"string","value":"eda58e8f145656fe431e45e9a1079cb49eea6283"},"size":{"kind":"number","value":8070,"string":"8,070"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Bio/PopGen/IO/prettybase.pm"},"max_stars_repo_name":{"kind":"string","value":"Helmholtz-HIPS/prosnap"},"max_stars_repo_head_hexsha":{"kind":"string","value":"5286cda39276d5eda85d2ddb23b8ab83c5d4960c"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":5,"string":"5"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2017-10-27T15:03:19.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2020-04-25T17:44:49.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/Bio/PopGen/IO/prettybase.pm"},"max_issues_repo_name":{"kind":"string","value":"Helmholtz-HIPS/prosnap"},"max_issues_repo_head_hexsha":{"kind":"string","value":"5286cda39276d5eda85d2ddb23b8ab83c5d4960c"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":4,"string":"4"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2021-01-28T20:49:55.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-03-25T19:02:54.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/Bio/PopGen/IO/prettybase.pm"},"max_forks_repo_name":{"kind":"string","value":"Helmholtz-HIPS/prosnap"},"max_forks_repo_head_hexsha":{"kind":"string","value":"5286cda39276d5eda85d2ddb23b8ab83c5d4960c"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":2,"string":"2"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2019-02-22T10:51:15.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2019-02-22T12:35:35.000Z"},"content":{"kind":"string","value":"#\n# BioPerl module for Bio::PopGen::IO::prettybase\n#\n# Please direct questions and support issues to \n#\n# Cared for by Jason Stajich \n#\n# Copyright Jason Stajich\n#\n# You may distribute this module under the same terms as perl itself\n\n# POD documentation - main docs before the code\n\n=head1 NAME\n\nBio::PopGen::IO::prettybase - Extract individual allele data from PrettyBase format\n\n=head1 SYNOPSIS\n\nDo not use directly, use through the Bio::PopGen::IO driver\n\n=head1 DESCRIPTION\n\nThis object will parse comma delimited PrettyBase output. PrettyBase\nis defined by the SeattleSNPs http://pga.gs.washington.edu/\n\nThis is expected to be tab delimited (you can vary with the\nfield_delimiter flag SITE SAMPLE ALLELE1 ALLELE2\n\nThere are 2 initialization parameters, the delimiter\n(-field_delimiter) [default 'tab'] and a boolean -no_header which\nspecifies if there is no header line to read in. All lines starting\nwith '#' will be skipped\n\n=head1 FEEDBACK\n\n=head2 Mailing Lists\n\nUser feedback is an integral part of the evolution of this and other\nBioperl modules. Send your comments and suggestions preferably to\nthe Bioperl mailing list. Your participation is much appreciated.\n\n bioperl-l@bioperl.org - General discussion\n http://bioperl.org/wiki/Mailing_lists - About the mailing lists\n\n=head2 Support \n\nPlease direct usage questions or support issues to the mailing list:\n\nI\n\nrather than to the module maintainer directly. Many experienced and \nreponsive experts will be able look at the problem and quickly \naddress it. Please include a thorough description of the problem \nwith code and data examples if at all possible.\n\n=head2 Reporting Bugs\n\nReport bugs to the Bioperl bug tracking system to help us keep track\nof the bugs and their resolution. Bug reports can be submitted via\nthe web:\n\n https://github.com/bioperl/bioperl-live/issues\n\n=head1 AUTHOR - Jason Stajich\n\nEmail jason-at-bioperl.org\n\n=head1 CONTRIBUTORS\n\nMatthew Hahn, matthew.hahn-at-duke.edu\n\n=head1 APPENDIX\n\nThe rest of the documentation details each of the object methods.\nInternal methods are usually preceded with a _\n\n=cut\n\n\n# Let the code begin...\n\n\npackage Bio::PopGen::IO::prettybase;\nuse vars qw($FieldDelim $Header);\nuse strict;\n\n($FieldDelim,$Header) =( '\\t',0);\n\n\nuse Bio::PopGen::Individual;\nuse Bio::PopGen::Population;\nuse Bio::PopGen::Genotype;\n\nuse base qw(Bio::PopGen::IO);\n\n=head2 new\n\n Title : new\n Usage : my $obj = Bio::PopGen::IO::prettybase->new();\n Function: Builds a new Bio::PopGen::IO::prettybase object \n Returns : an instance of Bio::PopGen::IO::prettybase\n Args : -field_delimiter => a field delimiter character or regexp (default is /\\t/ ) \n -header => boolean if the file will have a header and parser should\n skip first line in the file (default is false)\n -convert_indel_states => convert alleles which are longer than one character\n to an 'I' meaning insert state, and alleles which are\n '-' to a delete state.\n (default is false)\n\n=cut\n\nsub _initialize {\n my($self, @args) = @_;\n my ($fieldsep,\n\t$conv_indels,\n\t$header) = $self->_rearrange([qw(FIELD_DELIMITER\n\t\t\t\t\t CONVERT_INDEL_STATES\n\t\t\t\t\t HEADER)],@args);\n\n $self->flag('header', defined $header ? $header : $Header);\n $self->flag('field_delimiter',defined $fieldsep ? $fieldsep : $FieldDelim);\n $self->{'_header'} = undef;\n $self->{'_parsed_individiuals'} = [];\n $self->{'_parsed'} = 0;\n $self->flag('convert_indel',$conv_indels || 0);\n return 1;\n}\n\n=head2 flag\n\n Title : flag\n Usage : $obj->flag($flagname,$newval)\n Function: Get/Set the flag value\n Returns : value of a flag (a boolean)\n Args : A flag name, currently we expect \n 'header', 'field_delimiter', or 'allele_delimiter' \n on set, new value (a boolean or undef, optional)\n\n\n=cut\n\nsub flag{\n my $self = shift;\n my $fieldname = shift;\n return unless defined $fieldname;\n \n return $self->{'_flag'}->{$fieldname} = shift if @_;\n return $self->{'_flag'}->{$fieldname};\n}\n\n\n=head2 next_individual\n\n Title : next_individual\n Usage : my $ind = $popgenio->next_individual;\n Function: Retrieve the next individual from a dataset\n Returns : Bio::PopGen::IndividualI object\n Args : none\n\n\n=cut\n\nsub next_individual {\n my ($self) = @_;\n unless( $self->{'_parsed'} ) {\n\t$self->_parse_prettybase;\n }\n return $self->{'_parsed_individiuals'}->[$self->{'_iterator'}++];\n}\n\n\n\n=head2 next_population\n\n Title : next_population\n Usage : my $ind = $popgenio->next_population;\n Function: Retrieve the next population from a dataset\n Returns : Bio::PopGen::PopulationI object\n Args : none\n Note : Many implementation will not implement this\n\n=cut\n\n# Plan is to just return the whole dataset as a single population by \n# default I think - people would then have each population in a separate\n# file.\n\nsub next_population{\n my ($self) = @_;\n my @inds;\n while( my $ind = $self->next_individual ) {\n\tpush @inds, $ind;\n }\n return unless @inds;\n Bio::PopGen::Population->new(-individuals => \\@inds);\n}\n\n\nsub _parse_prettybase {\n my $self = shift;\n my %inds;\n my $convert_indels = $self->flag('convert_indel');\n while( defined( $_ = $self->_readline) ) {\n\tnext if( /^\\s*\\#/ || /^\\s+$/ || ! length($_) );\n\t\n\tmy ($site,$sample,@alleles) = split($self->flag('field_delimiter'),$_);\n\tif( ! defined $sample ) { \n\t warn(\"sample id is undefined for $_\");\n\t next;\n\t}\n\tfor my $allele ( @alleles ) {\n\t $allele =~ s/^\\s+//;\n\t $allele =~ s/\\s+$//;\n\t if( $convert_indels ) {\n\t\tif( length($allele) > 1 ) {\n\t\t # we have an insert state\n\t\t $allele = 'I';\n\t\t} elsif( $allele eq '-' ) {\n\t\t # have a delete state\n\t\t $allele = 'D';\n\t\t}\n\t }\n\t}\n\t\n\tmy $g = Bio::PopGen::Genotype->new(-alleles => \\@alleles,\n\t\t\t\t\t -marker_name => $site,\n\t\t\t\t\t -individual_id=> $sample); \n\t\n\n\tif( ! defined $inds{$sample} ) {\n\t $inds{$sample} = Bio::PopGen::Individual->new(-unique_id => $sample);\n\t}\n\t$inds{$sample}->add_Genotype($g);\n }\n $self->{'_parsed_individiuals'} = [ values %inds ];\n $self->{'_parsed'} = 1;\n return;\n}\n\n\n=head2 write_individual\n\n Title : write_individual\n Usage : $popgenio->write_individual($ind);\n Function: Write an individual out in the file format\n Returns : none\n Args : L object(s)\n\n=cut\n\nsub write_individual{\n my ($self,@inds) = @_;\n foreach my $ind ( @inds ) {\n\tif (! ref($ind) || ! $ind->isa('Bio::PopGen::IndividualI') ) {\n\t $self->warn(\"Cannot write an object that is not a Bio::PopGen::IndividualI object\");\n\t next;\n\t}\n\tforeach my $marker ( $ind->get_marker_names ) { \n\t my $g = $ind->get_Genotypes(-marker=> $marker);\n\t next unless defined $g;\n\t $self->_print( join(\"\\t\", $marker, $ind->unique_id, \n\t\t\t\t$g->get_Alleles), \"\\n\");\t \n\t}\n }\n \n}\n\n\n\n=head2 write_population\n\n Title : write_population\n Usage : $popgenio->write_population($pop);\n Function: Write a population out in the file format\n Returns : none\n Args : L object(s)\n Note : Many implementation will not implement this\n\n=cut\n\nsub write_population{\n my ($self,@pops) = @_;\n foreach my $pop ( @pops ) {\n\tif (! ref($pop) || ! $pop->isa('Bio::PopGen::PopulationI') ) {\n\t $self->warn(\"Cannot write an object that is not a Bio::PopGen::PopulationI object\");\n\t next;\n\t}\n\tmy @mnames = $pop->get_marker_names;\n\tforeach my $ind ( $pop->get_Individuals ) {\n\t if (! ref($ind) || ! $ind->isa('Bio::PopGen::IndividualI') ) {\n\t\t$self->warn(\"Cannot write an object that is not a Bio::PopGen::IndividualI object\");\n\t\tnext;\n\t }\n\t foreach my $marker ( @mnames ) { \n\t\tmy $g = $ind->get_Genotypes(-marker=> $marker);\n\t\tnext unless defined $g;\n\t\t$self->_print( join(\"\\t\", $marker, $ind->unique_id, \n\t\t\t\t $g->get_Alleles), \"\\n\");\n\t\t\t \n\t }\n\t}\n }\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":26.2866449511,"string":"26.286645"},"max_line_length":{"kind":"number","value":93,"string":"93"},"alphanum_fraction":{"kind":"number","value":0.6508054523,"string":"0.650805"}}},{"rowIdx":463245,"cells":{"hexsha":{"kind":"string","value":"edd26b45394cb541087fe5405aac3417ab27d545"},"size":{"kind":"number","value":4257,"string":"4,257"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Dancer/Session.pm"},"max_stars_repo_name":{"kind":"string","value":"atoomic/Dancer"},"max_stars_repo_head_hexsha":{"kind":"string","value":"1ab1aab873c9f95b75b2d7d6b4ceba6cad283b07"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-1.0"],"string":"[\n \"Artistic-1.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2017-09-09T12:44:54.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2017-09-09T12:44:54.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/Dancer/Session.pm"},"max_issues_repo_name":{"kind":"string","value":"abh/Dancer"},"max_issues_repo_head_hexsha":{"kind":"string","value":"0466b406a80deedcb06bb6623124a7bdef6754a2"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-1.0"],"string":"[\n \"Artistic-1.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"lib/Dancer/Session.pm"},"max_forks_repo_name":{"kind":"string","value":"abh/Dancer"},"max_forks_repo_head_hexsha":{"kind":"string","value":"0466b406a80deedcb06bb6623124a7bdef6754a2"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-1.0"],"string":"[\n \"Artistic-1.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package Dancer::Session;\n\nuse strict;\nuse warnings;\n\nuse Dancer::Cookies;\nuse Dancer::Engine;\n\n# Singleton representing the session engine class to use\nmy $ENGINE = undef;\nsub engine {$ENGINE}\n\n# This wrapper look for the session engine and try to load it.\nsub init {\n my ($class, $name, $config) = @_;\n $ENGINE = Dancer::Engine->build(session => $name, $config);\n\n #$ENGINE->init(); already done\n}\n\n# retrieve or create a session for the client\nsub get_current_session {\n my $sid = engine->read_session_id;\n my $session = undef;\n my $class = ref(engine);\n\n $session = $class->retrieve($sid) if $sid;\n\n if (not defined $session) {\n $session = $class->create();\n engine->write_session_id($session->id);\n }\n return $session;\n}\n\nsub get { get_current_session() }\n\nsub read {\n my ($class, $key) = @_;\n my $session = get_current_session();\n return $session->{$key};\n}\n\nsub write {\n my ($class, $key, $value) = @_;\n my $session = get_current_session();\n $session->{$key} = $value;\n\n # TODO : should be moved as an \"after\" filter\n $session->flush;\n return $value;\n}\n\n1;\n__END__\n\n=pod\n\n=head1 NAME\n\nDancer::Session - session engine for the Dancer framework\n\n=head1 DESCRIPTION\n\nThis module provides support for server-side sessions for the L web\nframework. The session is accessible to the user via an abstraction layer\nimplemented by the L class.\n\n=head1 USAGE\n\n=head2 Configuration\n\nThe session engine must be first enabled in the environment settings, this can\nbe done like the following:\n\nIn the application code:\n\n # enabling the YAML-file-based session engine\n set session => 'YAML';\n\nOr in config.yml or environments/$env.yml\n\n session: \"YAML\"\n\nBy default session are disabled, you must enable them before using it. If the\nsession engine is disabled, any Dancer::Session call will throw an exception.\n\n=head2 Route Handlers\n\nWhen enabled, the session engine can be used in a route handler with the keyword\nB. This keyword represents a key-value pairs ensemble that is actually\nstored to the session.\n\nYou can either look for an existing item in the session storage or modify one.\nHere is a simple example of two route handlers that implement a basic C and\nC actions using the session engine. \n\n post '/login' => sub {\n # look for params and authenticate the user\n # ...\n if ($user) {\n session user_id => $user->id;\n }\n };\n\n get '/home' => sub {\n # if a user is present in the session, let him go, otherwise redirect to\n # /login\n if (not session('user_id')) {\n redirect '/login';\n }\n };\n\nOf course, you probably don't want to have to duplicate the code to check\nwhether the user is logged in for each route handler; there's an example in the\nL showing how to use a before filter to check whether the user\nis logged in before all requests, and redirect to a login page if not.\n\n\n=head1 SUPPORTED ENGINES\n\nDancer has a modular session engine that makes implementing new session backends\npretty easy. If you'd like to write your own, feel free to take a\nlook at L.\n\nThe following engines are supported:\n\n=over 4\n\n=item L\n\nA YAML file-based session backend, pretty convininent for development purposes,\nbut maybe not the best for production needs.\n\n=item L\n\nSession are stored in Memcached servers. This is good for production matters\nand is a good way to use a distributed session storage.\n\n=item L\n\nThis module implements a session engine for sessions stored entirely\ninside encrypted cookies (this engine doesn't use a server-side storage).\n\n=back\n\n=head1 DEPENDENCY\n\nDancer::Session may depend on third-party modules, depending on the session\nengine used. See the session engine module for details.\n\n\n=head1 AUTHORS\n\nThis module has been written by Alexis Sukrieh. See the AUTHORS file that comes\nwith this distribution for details.\n\n=head1 LICENSE\n\nThis module is free software and is released under the same terms as Perl\nitself.\n\n=head1 SEE ALSO\n\nSee L for details about the complete framework.\n\n=cut\n"},"avg_line_length":{"kind":"number","value":25.3392857143,"string":"25.339286"},"max_line_length":{"kind":"number","value":83,"string":"83"},"alphanum_fraction":{"kind":"number","value":0.7110641297,"string":"0.711064"}}},{"rowIdx":463246,"cells":{"hexsha":{"kind":"string","value":"edae5b942ce8b368eff164f43afd91f0785c488f"},"size":{"kind":"number","value":1771,"string":"1,771"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"auto-lib/Paws/KinesisAnalytics/KinesisStreamsInputUpdate.pm"},"max_stars_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"auto-lib/Paws/KinesisAnalytics/KinesisStreamsInputUpdate.pm"},"max_issues_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":1,"string":"1"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2021-05-26T19:13:58.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-05-26T19:13:58.000Z"},"max_forks_repo_path":{"kind":"string","value":"auto-lib/Paws/KinesisAnalytics/KinesisStreamsInputUpdate.pm"},"max_forks_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package Paws::KinesisAnalytics::KinesisStreamsInputUpdate;\n use Moose;\n has ResourceARNUpdate => (is => 'ro', isa => 'Str');\n has RoleARNUpdate => (is => 'ro', isa => 'Str');\n1;\n\n### main pod documentation begin ###\n\n=head1 NAME\n\nPaws::KinesisAnalytics::KinesisStreamsInputUpdate\n\n=head1 USAGE\n\nThis class represents one of two things:\n\n=head3 Arguments in a call to a service\n\nUse the attributes of this class as arguments to methods. You shouldn't make instances of this class. \nEach attribute should be used as a named argument in the calls that expect this type of object.\n\nAs an example, if Att1 is expected to be a Paws::KinesisAnalytics::KinesisStreamsInputUpdate object:\n\n $service_obj->Method(Att1 => { ResourceARNUpdate => $value, ..., RoleARNUpdate => $value });\n\n=head3 Results returned from an API call\n\nUse accessors for each attribute. If Att1 is expected to be an Paws::KinesisAnalytics::KinesisStreamsInputUpdate object:\n\n $result = $service_obj->Method(...);\n $result->Att1->ResourceARNUpdate\n\n=head1 DESCRIPTION\n\nWhen updating application input configuration, provides information\nabout an Amazon Kinesis stream as the streaming source.\n\n=head1 ATTRIBUTES\n\n\n=head2 ResourceARNUpdate => Str\n\n Amazon Resource Name (ARN) of the input Amazon Kinesis stream to read.\n\n\n=head2 RoleARNUpdate => Str\n\n ARN of the IAM role that Amazon Kinesis Analytics can assume to access\nthe stream on your behalf. You need to grant the necessary permissions\nto this role.\n\n\n\n=head1 SEE ALSO\n\nThis class forms part of L, describing an object used in L\n\n=head1 BUGS and CONTRIBUTIONS\n\nThe source code is located here: L\n\nPlease report bugs to: L\n\n=cut\n\n"},"avg_line_length":{"kind":"number","value":26.8333333333,"string":"26.833333"},"max_line_length":{"kind":"number","value":120,"string":"120"},"alphanum_fraction":{"kind":"number","value":0.7566346697,"string":"0.756635"}}},{"rowIdx":463247,"cells":{"hexsha":{"kind":"string","value":"ed8fc75d6a3ab7ece8b4c3240a26dc5dbd5d344e"},"size":{"kind":"number","value":16498,"string":"16,498"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"src/fhem/trunk/fhem/contrib/deprecated/98_JsonList.pm"},"max_stars_repo_name":{"kind":"string","value":"nastymorbol/fhem-docker"},"max_stars_repo_head_hexsha":{"kind":"string","value":"c88d13e6fb098a487486b448806048eab1222b81"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"src/fhem/trunk/fhem/contrib/deprecated/98_JsonList.pm"},"max_issues_repo_name":{"kind":"string","value":"nastymorbol/fhem-docker"},"max_issues_repo_head_hexsha":{"kind":"string","value":"c88d13e6fb098a487486b448806048eab1222b81"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"src/fhem/trunk/fhem/contrib/deprecated/98_JsonList.pm"},"max_forks_repo_name":{"kind":"string","value":"nastymorbol/fhem-docker"},"max_forks_repo_head_hexsha":{"kind":"string","value":"c88d13e6fb098a487486b448806048eab1222b81"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"################################################################\n# $Id: 98_JsonList.pm 16370 2018-03-10 09:00:04Z rudolfkoenig $\n#\n# Copyright notice\n#\n# (c) 2008 Copyright: Martin Fischer (m_fischer at gmx dot de)\n# All rights reserved\n#\n# This script is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# The GNU General Public License can be found at\n# http://www.gnu.org/copyleft/gpl.html.\n# A copy is found in the textfile GPL.txt and important notices to the license\n# from the author is found in LICENSE.txt distributed with these scripts.\n#\n# This script is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n################################################################\n# examples:\n# jsonslist - returns all definitions and status infos\n# jsonlist lamp1 - returns definitions and status infos for 'lamp1' \n# jsonlist FS20 - returns status infos for FS20 devices\n# jsonlist ROOMS - returns a list of rooms\n################################################################\n\npackage main;\nuse strict;\nuse warnings;\nuse POSIX;\n\nsub CommandJsonList($$);\nsub JsonEscape($);\nsub PrintHashJson($$);\n\n\n#####################################\nsub\nJsonList_Initialize($$)\n{\n my %lhash = ( Fn=>\"CommandJsonList\",\n Hlp=>\"[||rooms],list definitions and status info or rooms as JSON\" );\n $cmds{jsonlist} = \\%lhash;\n}\n\n\n#####################################\nsub\nJsonEscape($)\n{\n my $a = shift;\n return \"null\" if(!$a);\n $a=~ s/([\\x00-\\x19\\x22\\x5c])/sprintf '\\u%04x', ord($1)/ge; # Forum 57377\n return $a;\n}\n\n#####################################\nsub\nPrintHashJson($$)\n{\n my ($h, $lev) = @_;\n return if($h->{PrintHashJson});\n\n my $hc = keys %{$h};\n my @str;\n foreach my $c (sort keys %{$h}) {\n\n my $str = \"\";\n if(ref($h->{$c})) {\n if(ref($h->{$c}) eq \"HASH\" && $c ne \"PortObj\") {\n if($c eq \"IODev\" || $c eq \"HASH\") {\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\"\", $lev,\" \",$c, JsonEscape($h->{$c}{NAME}));\n } else {\n $str .= sprintf(\"%*s\\\"%s\\\": {\\n\", $lev, \" \", $c);\n if(keys(%{$h->{$c}}) != 0) {\n $h->{PrintHashJson} = 1;\n $str .= PrintHashJson($h->{$c}, $lev+2);\n delete($h->{PrintHashJson});\n } else {\n $str .= sprintf(\"%*s\\\"null\\\": \\\"null\\\"\\n\", $lev+4, \" \");\n }\n $str .= sprintf(\"%*s}\", $lev, \" \");\n }\n } elsif(ref($h->{$c}) eq \"ARRAY\") {\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\"\", $lev,\" \",$c, \"ARRAY\");\n } elsif($c eq \"PortObj\") {\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\"\", $lev,\" \",$c, \"PortObj\");\n }\n } else {\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\"\", $lev,\" \",$c, JsonEscape($h->{$c}));\n }\n push @str, $str if($str);\n }\n\n return join(\",\\n\", @str) . \"\\n\";\n}\n\n#####################################\nsub\nCommandJsonList($$)\n{\n my ($cl, $param) = @_;\n my $lt = \"\";\n my $str = \"\";\n\n # Text indentation\n my $lev = 2;\n\n if(!$param) {\n # Array counter\n my @ac;\n my $ac = 0;\n my $cc = 0;\n my @dc;\n my $dc = 0;\n my $tc = 0; # total available\n my $tr = 0; # results returned\n\n my $q = \"\";\n\n # open JSON object \n $str = \"{\\n\";\n $str .= sprintf(\"%*s\\\"ResultSet\\\": \\\"%s\\\",\\n\", $lev, \" \",\"full\");\n # open JSON array\n $str .= sprintf(\"%*s\\\"Results\\\": [\\n\", $lev, \" \");\n\n delete($modules{\"\"}) if(defined($modules{\"\"}));\n @dc = keys(%defs);\n $dc = @dc;\n #$tc = 0;\n for my $d (sort { my $x = $modules{$defs{$a}{TYPE}}{ORDER} cmp\n $modules{$defs{$b}{TYPE}}{ORDER};\n $x = ($a cmp $b) if($x == 0); $x; } keys %defs) {\n\n my $p = $defs{$d};\n my $t = $p->{TYPE};\n if(!$t) {\n Log3 undef, 3, \"JsonList: device ($d) without TYPE\";\n next;\n }\n $t = $q if($q ne \"\");\n\n #$str .= sprintf(\"} \") if($t eq $lt);\n #$str .= sprintf(\"},\\n\") if($t eq $lt);\n #$str .= sprintf(\"%*s},\\n\", $lev+6, \" \") if($t eq $lt);\n\n my $a1 = JsonEscape($p->{STATE});\n # close device object\n $str .= sprintf(\"%*s},\\n\", $lev+6, \" \") if($t eq $lt);\n\n if($t ne $lt) {\n # close device opject\n $str .= sprintf(\"%*s}\\n\", $lev+6, \" \") if($lt && $t ne $lt);\n #$str .= sprintf(\"}\\n\") if($lt);\n\n # close devices array\n $str .= sprintf(\"%*s]\\n\", $lev+4, \" \") if($lt);\n\n # close list object\n $str .= sprintf(\"%*s},\\n\", $lev+2, \" \") if($lt);\n\n \t#$str .= sprintf(\"%*s{\\n\", $lev+4, \" \");\n # open list object\n $str .= sprintf(\"%*s\\{\\n\", $lev+2, \" \");\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\",\\n\", $lev+4, \" \", \"list\", $t);\n\n # open devices array\n $str .= sprintf(\"%*s\\\"%s\\\": [\\n\", $lev+4, \" \", \"devices\");\n }\n\n $lt = $t;\n\n #$str .= sprintf(\"%*s{\\n\", $lev+8, \" \");\n\n # open device object\n $str .= sprintf(\"%*s{\\n\", $lev+6, \" \");\n\n #$str .= sprintf(\"%*s\\\"name\\\": \\\"%s\\\",\\n\", $lev+8, \" \", $d);\n #$str .= sprintf(\"%*s\\\"state\\\": \\\"%s\\\",\\n\", $lev+8, \" \", $a1);\n #$str .= sprintf(\"\\\"INT\\\": { \");\n @ac = keys(%{$p});\n $ac = 0;\n foreach my $k (sort @ac) {\n next if(ref($p->{$k}));\n $ac++;\n }\n $cc = 0;\n\n foreach my $c (sort keys %{$p}) {\n next if(ref($p->{$c}));\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\",\\n\", $lev+8, \" \",\n JsonEscape($c), JsonEscape($p->{$c}));\n $cc++;\n #$str .= \",\\n\" if($cc != $ac || ($cc == $ac && $p->{IODev}));\n #$str .= \",\\n\" if($cc != $ac || ($cc == $ac && $p->{IODev}));\n #$str .= \"\\n\" if($cc == $ac && !$p->{IODev});\n }\n $str .= sprintf(\"%*s\\\"IODev\\\": \\\"%s\\\",\\n\", $lev+8, \" \",\n $p->{IODev}{NAME}) if($p->{IODev});\n #$str .= sprintf(\" }, \");\n\n @ac = keys(%{$attr{$d}});\n $ac = @ac;\n $cc = 0;\n if($ac != 0) {\n $str .= sprintf(\"%*s\\\"ATTR\\\": {\\n\", $lev+8, \" \");\n foreach my $c (sort keys %{$attr{$d}}) {\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\"\", $lev+10, \" \",\n JsonEscape($c), JsonEscape($attr{$d}{$c}));\n $cc++;\n #$str .= \",\\n\" if($cc != $ac);\n $str .= \",\\n\" if($cc != $ac);\n #$str .= \"\\n\" if($cc == $ac);\n }\n $str .= \"\\n\";\n #$str .= sprintf(\"%*s]\\n\", $lev+8, \" \") if(!$p->{READINGS});\n #$str .= sprintf(\"%*s],\\n\", $lev+8, \" \") if($p->{READINGS});\n $str .= sprintf(\"%*s},\\n\", $lev+8, \" \");\n } else {\n $str .= sprintf(\"%*s\\\"ATTR\\\": {},\\n\", $lev+8, \" \");\n }\n #$str .= sprintf(\"%*s],\\n\", $lev+8, \" \") if($p->{READINGS});\n #$str .= sprintf(\"%*s]\\n\", $lev+8, \" \") if(!$p->{READINGS});\n\n my $r = $p->{READINGS};\n if($r) {\n $str .= sprintf(\"%*s\\\"READINGS\\\": [\\n\", $lev+8, \" \");\n @ac = keys(%{$r});\n $ac = @ac;\n $cc = 0;\n foreach my $c (sort keys %{$r}) {\n $str .= sprintf(\"%*s{\\n\", $lev+10, \" \");\n\t $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\",\\n\", $lev+12, \" \", JsonEscape($c), JsonEscape($r->{$c}{VAL}));\n $str .= sprintf(\"%*s\\\"measured\\\": \\\"%s\\\"\\n\", $lev+12, \" \", $r->{$c}{TIME});\n $cc++;\n #$str .= \",\\n\" if($cc != $ac);\n $str .= sprintf(\"%*s},\\n\", $lev+10, \" \") if($cc != $ac);\n $str .= sprintf(\"%*s}\\n\", $lev+10, \" \") if($cc == $ac);\n }\n $str .= sprintf(\"%*s],\\n\", $lev+8, \" \");\n } else {\n $str .= sprintf(\"%*s\\\"READINGS\\\": [],\\n\", $lev+8, \" \");\n }\n\n\n # corresponding set parameters\n $str .= sprintf(\"%*s\\\"sets\\\": [\\n\", $lev+6, \" \");\n my $sets = getAllSets($d);\n if($sets) {\n my @pSets;\n foreach my $set (split(\" \", JsonEscape($sets))) {\n push @pSets, sprintf(\"%*s\\\"%s\\\"\", $lev+8, \" \", $set);\n } \n $str .= join(\",\\n\", @pSets);\n }\n $str .= sprintf(\"\\n%*s],\\n\", $lev+6, \" \");\n\n # corresponding attributes\n $str .= sprintf(\"%*s\\\"attrs\\\": [\\n\", $lev+6, \" \");\n my $attrs = getAllAttr($d);\n if($attrs) {\n my @aSets;\n foreach my $attr (split(\" \", JsonEscape($attrs))) {\n push @aSets, sprintf(\"%*s\\\"%s\\\"\", $lev+8, \" \", $attr);\n }\n $str .= join(\",\\n\", @aSets);\n }\n $str .= sprintf(\"\\n%*s]\\n\", $lev+6, \" \");\n\n $tc++;\n $tr = $tc if($q eq \"\");\n $tr++ if($q ne \"\" && $p->{TYPE} eq $t);\n $str .= sprintf(\"%*s}\\n\", $lev+6, \" \") if(($tc == $dc) || (!$lt));\n }\n $str .= sprintf(\"%*s]\\n\", $lev+4, \" \") if($lt);\n $str .= sprintf(\"%*s}\\n\", $lev+2, \" \") if($lt);\n\n # close JSON array\n $str .= sprintf(\"%*s],\\n\", $lev, \" \");\n\n # return number of results\n $str .= sprintf(\"%*s\\\"totalResultsReturned\\\": %s\\n\", $lev, \" \",$tr);\n\n # close JSON object\n $str .= \"}\\n\";\n\n } else {\n if($param eq \"ROOMS\") {\n my %rooms;\n foreach my $d (keys %attr) {\n my $r = $attr{$d}{room};\n map { $rooms{$_} = 1 } split(\",\", $r) if($r && $r ne \"hidden\");\n }\n my @rooms = sort keys %rooms;\n\n # Result counter\n my $c = 0;\n\n # Open JSON object\n $str .= \"{\\n\";\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\",\\n\", $lev, \" \", \"ResultSet\", \"rooms\");\n # Open JSON array\n $str .= sprintf(\"%*s\\\"%s\\\": [\", $lev, \" \", \"Results\");\n\n for (my $i=0; $i<@rooms; $i++) {\n $str .= \",\" if($i <= $#rooms && $i > 0);\n $str .= sprintf(\"\\n%*s\\\"%s\\\"\", $lev+2, \" \", $rooms[$i]);\n $c++;\n }\n\n $str .= \"\\n\";\n # Close JSON array\n $str .= sprintf(\"%*s],\\n\", $lev, \" \");\n # Result summary\n #$str .= sprintf(\"%*s\\\"%s\\\": %s,\\n\", $lev, \" \", \"totalResultsAvailable\", $c);\n $str .= sprintf(\"%*s\\\"%s\\\": %s\\n\", $lev, \" \", \"totalResultsReturned\", $c);\n # Close JSON object\n $str .= \"}\";\n\n } else {\n # Search for given device-type\n my @devs = grep { $param eq $defs{$_}{TYPE} } keys %defs;\n\n if(@devs) {\n my $lt = \"\";\n my $ld = \"\";\n # Result counter\n my $c = 0;\n\n # Open JSON object\n $str .= \"{\\n\";\n $str .= sprintf(\"%*s\\\"%s\\\": \\\"%s\\\",\\n\", $lev, \" \", \"ResultSet\", \"devices#$param\");\n # Open JSON array\n $str .= sprintf(\"%*s\\\"%s\\\": [\", $lev, \" \", \"Results\");\n\n # Sort first by type then by name\n for my $d (sort { my $x = $modules{$defs{$a}{TYPE}}{ORDER} cmp\n $modules{$defs{$b}{TYPE}}{ORDER};\n $x = ($a cmp $b) if($x == 0); $x; } keys %defs) {\n if($defs{$d}{TYPE} eq $param) {\n my $t = $defs{$d}{TYPE};\n $str .= sprintf(\"\\n%*s},\",$lev+2, \" \") if($d ne $ld && $lt ne \"\");\n $str .= sprintf(\"\\n%*s{\",$lev+2, \" \");\n $str .= sprintf(\"\\n%*s\\\"name\\\": \\\"%s\\\",\",$lev+4, \" \", $d);\n $str .= sprintf(\"\\n%*s\\\"state\\\": \\\"%s\\\"\",$lev+4, \" \", $defs{$d}{STATE});\n $lt = $t;\n $ld = $d;\n $c++;\n }\n }\n\n $str .= sprintf(\"\\n%*s}\\n\",$lev+2, \" \");\n # Close JSON array\n $str .= sprintf(\"%*s],\\n\", $lev, \" \");\n # Result summary\n $str .= sprintf(\"%*s\\\"%s\\\": %s\\n\", $lev, \" \", \"totalResultsReturned\", $c);\n # Close JSON object\n $str .= \"}\";\n\n } else {\n # List device\n foreach my $sdev (devspec2array($param)) {\n if(!defined($defs{$sdev})) {\n $str .= \"No device named or type $param found, try for all devices\";\n next;\n }\n $defs{$sdev}{\"ATTRIBUTES\"} = $attr{$sdev};\n # Open JSON object\n $str = \"{\\n\";\n $str .= sprintf(\"%*s\\\"%s\\\": {\\n\", $lev, \" \", \"ResultSet\");\n # Open JSON array\n $str .= sprintf(\"%*s\\\"%s\\\": {\\n\", $lev+2, \" \", \"Results\");\n $str .= PrintHashJson($defs{$sdev}, $lev+4);\n # Close JSON array\n $str .= sprintf(\"%*s}\\n\", $lev+2, \" \");\n # Close JSON object\n $str .= sprintf(\"%*s}\\n\", $lev, \" \");\n $str .= \"}\";\n }\n }\n }\n }\n return $str;\n}\n\n1;\n\n=pod\n=item command\n=item summary show device data in JSON format (deprecated, use JsonList2)\n=item summary_DE zeigt Gerätedaten in JSON Format (überholt, bitte JSonList2 verwenden)\n=begin html\n\n\n
JsonList
\n
\n Note: this command is deprecated, use jsonlist2 instead.
\n Returns an JSON tree of all definitions, all notify settings and all at\n entries if no parameter is given. Can also be called via HTTP by\n http://fhemhost:8083/fhem?cmd=jsonlist&XHR=1\n
\n\n\n=end html\n=cut\n"},"avg_line_length":{"kind":"number","value":29.7797833935,"string":"29.779783"},"max_line_length":{"kind":"number","value":109,"string":"109"},"alphanum_fraction":{"kind":"number","value":0.4240514002,"string":"0.424051"}}},{"rowIdx":463248,"cells":{"hexsha":{"kind":"string","value":"ede7d743605270aefb00d1957c471c00cb91f8ab"},"size":{"kind":"number","value":462,"string":"462"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"t/build-hook.t"},"max_stars_repo_name":{"kind":"string","value":"pnu/panda"},"max_stars_repo_head_hexsha":{"kind":"string","value":"671bd4f46b775342452489d709c0e9a9844dd5ed"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":89,"string":"89"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-01-03T02:44:44.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-11-22T08:31:29.000Z"},"max_issues_repo_path":{"kind":"string","value":"t/build-hook.t"},"max_issues_repo_name":{"kind":"string","value":"trenchmortar/panda"},"max_issues_repo_head_hexsha":{"kind":"string","value":"46b7940708c5916da407760d5c0c591fd40633e8"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":178,"string":"178"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2015-01-01T18:23:41.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2017-06-30T10:49:54.000Z"},"max_forks_repo_path":{"kind":"string","value":"t/build-hook.t"},"max_forks_repo_name":{"kind":"string","value":"trenchmortar/panda"},"max_forks_repo_head_hexsha":{"kind":"string","value":"46b7940708c5916da407760d5c0c591fd40633e8"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":50,"string":"50"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-01-02T04:49:08.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-11-07T04:51:37.000Z"},"content":{"kind":"string","value":"#!perl6\n\nuse v6.c;\n\nuse Test;\n\nuse Panda::Tester;\nuse Panda::Builder;\n\nmy $wd = $*CWD.child('testmodules').child('with-build').Str;\n\n$PANDATEST::RAN = False;\n\nlives-ok {\n ok Panda::Tester.test($wd), \"run test\";\n ok Panda::Builder.build($wd), \"run build\";\n ok Panda::Builder.build($wd), \"run build\";\n ok $PANDATEST::RAN, \"and it ran the builder\";\n}, \"run test and build with a Build.pm present\";\n\n\ndone-testing;\n# vim: expandtab shiftwidth=4 ft=perl6\n"},"avg_line_length":{"kind":"number","value":19.25,"string":"19.25"},"max_line_length":{"kind":"number","value":60,"string":"60"},"alphanum_fraction":{"kind":"number","value":0.6536796537,"string":"0.65368"}}},{"rowIdx":463249,"cells":{"hexsha":{"kind":"string","value":"edaf0d8ca0cec11b0e8bad90b46100b40fb5d311"},"size":{"kind":"number","value":2785,"string":"2,785"},"ext":{"kind":"string","value":"al"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"benchmark/benchmarks/FASP-benchmarks/data/random-oriented/randomoriented-1135-330-429.al"},"max_stars_repo_name":{"kind":"string","value":"krzysg/FaspHeuristic"},"max_stars_repo_head_hexsha":{"kind":"string","value":"1929c40e3fbc49e68b04acfc5522539a18758031"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"benchmark/benchmarks/FASP-benchmarks/data/random-oriented/randomoriented-1135-330-429.al"},"max_issues_repo_name":{"kind":"string","value":"krzysg/FaspHeuristic"},"max_issues_repo_head_hexsha":{"kind":"string","value":"1929c40e3fbc49e68b04acfc5522539a18758031"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"benchmark/benchmarks/FASP-benchmarks/data/random-oriented/randomoriented-1135-330-429.al"},"max_forks_repo_name":{"kind":"string","value":"krzysg/FaspHeuristic"},"max_forks_repo_head_hexsha":{"kind":"string","value":"1929c40e3fbc49e68b04acfc5522539a18758031"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"1\t169\t284\n2\t23\t286\n3\t154\n4\t39\n5\t168\n6\t112\n7\t203\n8\t38\t243\t265\t278\n9\t257\n10\t33\t143\t179\t292\n11\n12\n13\n14\t300\n15\n16\n17\t225\n18\n19\t215\n20\n21\t170\t208\n22\n23\n24\n25\t142\n26\t134\n27\t310\n28\n29\t80\t103\n30\t230\t317\n31\t170\n32\t215\t328\n33\t85\n34\t16\t58\n35\n36\n37\t186\n38\n39\t35\n40\t16\t168\n41\t267\n42\t75\t235\t247\n43\t150\t261\t278\n44\t145\n45\t103\n46\t182\n47\t50\n48\t324\n49\n50\t157\t175\t273\t281\n51\t1\t172\t180\t281\n52\t9\n53\n54\t109\n55\t251\t268\n56\t97\n57\n58\n59\t303\n60\t234\t309\n61\n62\t129\n63\t70\n64\t44\t84\t286\n65\t26\t96\t115\n66\t7\n67\t169\t200\t293\n68\n69\t115\n70\n71\t92\t177\n72\n73\t46\n74\n75\t300\n76\t44\t132\n77\t252\t264\t272\t304\n78\t80\n79\t301\t312\n80\t51\t208\n81\n82\t69\n83\n84\t131\t255\t313\n85\n86\t15\n87\t158\t255\n88\t233\t322\n89\t12\t86\t99\n90\n91\n92\n93\t6\t47\t48\t182\n94\n95\t102\n96\n97\t208\t306\n98\t260\n99\t156\n100\n101\t100\t173\n102\t87\t128\t159\t244\n103\t27\t211\n104\t61\n105\t57\t296\n106\t57\n107\t10\t148\t304\n108\t56\t304\n109\n110\n111\t194\n112\t9\n113\t51\t213\n114\t292\n115\t24\n116\t23\t95\t251\n117\n118\t40\t192\t196\n119\n120\n121\n122\n123\t14\n124\t101\t198\n125\t17\t330\n126\n127\t248\t284\t311\n128\t63\t173\t232\n129\t228\n130\t39\n131\t94\n132\n133\t94\t265\n134\t75\t251\t295\n135\t188\t211\n136\t74\t245\t327\n137\n138\t41\n139\n140\t159\t196\t220\t284\n141\n142\n143\n144\t84\t97\n145\n146\t144\n147\t3\t217\t307\n148\t4\t45\n149\t74\n150\n151\t43\n152\n153\t116\t156\t213\n154\t11\t168\n155\t265\n156\n157\n158\t42\t78\t285\n159\t106\t270\n160\t2\t32\t121\n161\t81\n162\t157\n163\t310\t312\n164\t80\t313\n165\t7\t112\t219\n166\t86\n167\t319\t328\n168\n169\n170\t107\t228\n171\n172\t288\n173\t141\n174\t85\n175\t122\n176\t11\t212\t263\n177\t213\n178\t191\n179\t244\t256\n180\t297\n181\t125\t272\n182\t166\t304\n183\t100\t292\n184\t140\t237\n185\n186\t2\n187\t237\t289\n188\n189\t106\t206\n190\t251\n191\t166\t264\t317\t329\n192\n193\t184\n194\t320\n195\t26\n196\n197\t37\t48\t157\n198\n199\t24\n200\t194\t297\n201\n202\t40\n203\t44\n204\t192\t316\n205\t164\t285\n206\t71\t91\t150\t197\n207\t182\n208\t91\t328\n209\t283\t292\n210\t86\t91\n211\t225\n212\n213\n214\t162\n215\t221\n216\t235\n217\t158\t192\t234\n218\n219\n220\t15\t189\t246\t264\n221\t251\t280\t294\n222\t136\t153\t321\n223\n224\n225\t200\n226\n227\n228\t27\t79\t120\t226\t299\n229\n230\t8\n231\t13\t201\t228\n232\t136\n233\t19\t79\t204\n234\t315\t323\n235\t131\n236\t1\t54\t104\n237\n238\t223\n239\t15\t95\t96\t120\t326\n240\t203\n241\t93\t181\n242\n243\n244\t66\n245\t246\n246\t261\n247\t103\t306\n248\t300\n249\t72\t196\t206\n250\t203\t212\t235\n251\t117\t149\n252\t127\t231\n253\t133\n254\t141\t180\t246\n255\t7\t14\t78\t206\t216\n256\t230\n257\t262\t271\t325\n258\t20\t106\n259\t134\t201\n260\t144\t227\t268\n261\t87\t170\n262\t85\t119\n263\t155\n264\n265\t201\n266\t231\n267\t182\t249\t264\n268\t127\t194\n269\n270\n271\t64\t327\n272\t71\n273\t154\t214\t277\n274\n275\n276\t22\n277\n278\t92\t285\n279\n280\t201\n281\t219\t236\n282\t80\t81\n283\n284\t123\t230\n285\t81\t96\n286\t276\n287\t64\t218\t263\n288\t233\t306\n289\t293\n290\n291\n292\t165\t270\n293\t76\t193\t211\n294\n295\t48\t88\n296\t185\n297\t31\n298\t102\t154\n299\n300\n301\t56\t171\t327\n302\t15\t51\t291\n303\n304\t168\n305\t53\t243\n306\t193\n307\n308\t58\t131\n309\t22\n310\n311\t120\n312\t17\t205\n313\t112\n314\t188\n315\t115\t207\n316\n317\n318\t144\n319\t237\n320\n321\n322\t129\n323\n324\n325\t93\t319\n326\n327\n328\t52\t190\n329\t175\n330\t131\t159"},"avg_line_length":{"kind":"number","value":8.4393939394,"string":"8.439394"},"max_line_length":{"kind":"number","value":21,"string":"21"},"alphanum_fraction":{"kind":"number","value":0.7278276481,"string":"0.727828"}}},{"rowIdx":463250,"cells":{"hexsha":{"kind":"string","value":"eda37a27ea4b77dd156cf609d46a2274d07eaf8b"},"size":{"kind":"number","value":384,"string":"384"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"auto-lib/Paws/GameLift/ResolveAliasOutput.pm"},"max_stars_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"auto-lib/Paws/GameLift/ResolveAliasOutput.pm"},"max_issues_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":1,"string":"1"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2021-05-26T19:13:58.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-05-26T19:13:58.000Z"},"max_forks_repo_path":{"kind":"string","value":"auto-lib/Paws/GameLift/ResolveAliasOutput.pm"},"max_forks_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"\npackage Paws::GameLift::ResolveAliasOutput;\n use Moose;\n has FleetId => (is => 'ro', isa => 'Str');\n\n has _request_id => (is => 'ro', isa => 'Str');\n\n### main pod documentation begin ###\n\n=head1 NAME\n\nPaws::GameLift::ResolveAliasOutput\n\n=head1 ATTRIBUTES\n\n\n=head2 FleetId => Str\n\nFleet identifier that is associated with the requested alias.\n\n\n=head2 _request_id => Str\n\n\n=cut\n\n1;"},"avg_line_length":{"kind":"number","value":14.2222222222,"string":"14.222222"},"max_line_length":{"kind":"number","value":61,"string":"61"},"alphanum_fraction":{"kind":"number","value":0.671875,"string":"0.671875"}}},{"rowIdx":463251,"cells":{"hexsha":{"kind":"string","value":"ed0846049bbd4bba191434ddba1042ccd54b3032"},"size":{"kind":"number","value":2292,"string":"2,292"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"tools/winapi/setup.pm"},"max_stars_repo_name":{"kind":"string","value":"imaami/wine"},"max_stars_repo_head_hexsha":{"kind":"string","value":"9711a73b2ee23ca2ab025a2d377147daec6f7507"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"tools/winapi/setup.pm"},"max_issues_repo_name":{"kind":"string","value":"imaami/wine"},"max_issues_repo_head_hexsha":{"kind":"string","value":"9711a73b2ee23ca2ab025a2d377147daec6f7507"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"tools/winapi/setup.pm"},"max_forks_repo_name":{"kind":"string","value":"imaami/wine"},"max_forks_repo_head_hexsha":{"kind":"string","value":"9711a73b2ee23ca2ab025a2d377147daec6f7507"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#\n# Copyright 1999, 2000, 2001 Patrik Stridvall\n#\n# This library is free software; you can redistribute it and/or\n# modify it under the terms of the GNU Lesser General Public\n# License as published by the Free Software Foundation; either\n# version 2.1 of the License, or (at your option) any later version.\n#\n# This library is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n# Lesser General Public License for more details.\n#\n# You should have received a copy of the GNU Lesser General Public\n# License along with this library; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\n#\n\npackage setup;\n\nuse strict;\nuse warnings 'all';\n\nBEGIN {\n use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);\n require Exporter;\n\n @ISA = qw(Exporter);\n @EXPORT = qw();\n @EXPORT_OK = qw($current_dir $wine_dir $winapi_dir);\n\n use vars qw($current_dir $wine_dir $winapi_dir);\n\n my $tool = $0;\n $tool =~ s%^(?:.*?/)?([^/]+)$%$1%;\n\n if(defined($current_dir) && defined($wine_dir) &&\n defined($winapi_dir))\n {\n\t# Nothing\n } elsif($0 =~ m%^(.*?)/?tools/([^/]+)/[^/]+$%) {\n\tmy $dir = $2;\n\n\tif(defined($1) && $1 ne \"\")\n\t{\n\t $wine_dir = $1;\n\t} else {\n\t $wine_dir = \".\";\n\n\t}\n\n\trequire Cwd;\n\tmy $cwd = Cwd::cwd();\n\n\tif($wine_dir =~ /^\\./) {\n\t $current_dir = \".\";\n\t my $pwd; chomp($pwd = `pwd`);\n\t foreach my $n (1..((length($wine_dir) + 1) / 3)) {\n\t\t$pwd =~ s/\\/([^\\/]*)$//;\n\t\t$current_dir = \"$1/$current_dir\";\n\t }\n\t $current_dir =~ s%/\\.$%%;\n\t} elsif($wine_dir eq $cwd) {\n\t $wine_dir = \".\";\n\t $current_dir = \".\";\n\t} elsif($cwd =~ m%^$wine_dir/(.*?)?$%) {\n\t $current_dir = $1;\n\t $wine_dir = \".\";\n\t foreach my $dir (split(m%/%, $current_dir)) {\n\t\t$wine_dir = \"../$wine_dir\";\n\t }\n\t $wine_dir =~ s%/\\.$%%;\n\t} else {\n\t print STDERR \"$tool: You must run this tool in the main Wine directory or a sub directory\\n\";\n\t exit 1;\n\t}\n\n\t$winapi_dir = \"$wine_dir/tools/winapi\";\n\t$winapi_dir =~ s%^\\./%%;\n\n\tpush @INC, $winapi_dir;\n } else {\n\tprint STDERR \"$tool: You must run this tool in the main Wine directory or a sub directory\\n\";\n\texit 1;\n }\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":25.7528089888,"string":"25.752809"},"max_line_length":{"kind":"number","value":98,"string":"98"},"alphanum_fraction":{"kind":"number","value":0.6003490401,"string":"0.600349"}}},{"rowIdx":463252,"cells":{"hexsha":{"kind":"string","value":"ed9c33978ef67489d93fb29077bd3f4390e9e63a"},"size":{"kind":"number","value":3419,"string":"3,419"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"network/hirschmann/standard/snmp/mode/processcount.pm"},"max_stars_repo_name":{"kind":"string","value":"xdrive05/centreon-plugins"},"max_stars_repo_head_hexsha":{"kind":"string","value":"8227ba680fdfd2bb0d8a806ea61ec1611c2779dc"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2021-03-16T22:20:32.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-03-16T22:20:32.000Z"},"max_issues_repo_path":{"kind":"string","value":"network/hirschmann/standard/snmp/mode/processcount.pm"},"max_issues_repo_name":{"kind":"string","value":"xdrive05/centreon-plugins"},"max_issues_repo_head_hexsha":{"kind":"string","value":"8227ba680fdfd2bb0d8a806ea61ec1611c2779dc"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"network/hirschmann/standard/snmp/mode/processcount.pm"},"max_forks_repo_name":{"kind":"string","value":"xdrive05/centreon-plugins"},"max_forks_repo_head_hexsha":{"kind":"string","value":"8227ba680fdfd2bb0d8a806ea61ec1611c2779dc"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#\n# Copyright 2020 Centreon (http://www.centreon.com/)\n#\n# Centreon is a full-fledged industry-strength solution that meets\n# the needs in IT infrastructure and application monitoring for\n# service performance.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\npackage network::hirschmann::standard::snmp::mode::processcount;\n\nuse base qw(centreon::plugins::mode);\n\nuse strict;\nuse warnings;\n\nsub new {\n my ($class, %options) = @_;\n my $self = $class->SUPER::new(package => __PACKAGE__, %options);\n bless $self, $class;\n\n $options{options}->add_options(arguments =>\n {\n \"warning:s\" => { name => 'warning' },\n \"critical:s\" => { name => 'critical' },\n });\n return $self;\n}\n\nsub check_options {\n my ($self, %options) = @_;\n $self->SUPER::init(%options);\n\n if (($self->{perfdata}->threshold_validate(label => 'warning', value => $self->{option_results}->{warning})) == 0) {\n $self->{output}->add_option_msg(short_msg => \"Wrong warning threshold '\" . $self->{option_results}->{warning} . \"'.\");\n $self->{output}->option_exit();\n }\n if (($self->{perfdata}->threshold_validate(label => 'critical', value => $self->{option_results}->{critical})) == 0) {\n $self->{output}->add_option_msg(short_msg => \"Wrong critical threshold '\" . $self->{option_results}->{critical} . \"'.\");\n $self->{output}->option_exit();\n }\n}\n\nsub run {\n my ($self, %options) = @_;\n $self->{snmp} = $options{snmp};\n\n my $oid_hmCpuRunningProcesses = '.1.3.6.1.4.1.248.14.2.15.2.3.0';\n\n my $result = $self->{snmp}->get_leef(oids => [$oid_hmCpuRunningProcesses],\n nothing_quit => 1);\n my $processcount = $result->{$oid_hmCpuRunningProcesses};\n\n my $exit = $self->{perfdata}->threshold_check(value => $processcount, threshold => [ { label => 'critical', exit_litteral => 'critical' }, { label => 'warning', exit_litteral => 'warning' } ]);\n\n $self->{output}->output_add(severity => $exit,\n short_msg => sprintf(\"Number of current processes running: %d\", $processcount));\n\n $self->{output}->perfdata_add(label => \"nbproc\",\n value => $processcount,\n warning => $self->{perfdata}->get_perfdata_for_output(label => 'warning'),\n critical => $self->{perfdata}->get_perfdata_for_output(label => 'critical'),\n min => 0);\n\n $self->{output}->display();\n $self->{output}->exit();\n}\n\n1;\n\n__END__\n\n=head1 MODE\n\nCheck number of processes.\nhmEnableMeasurement must be activated (value = 1).\n\n=over 8\n\n=item B<--warning>\n\nThreshold warning (process count).\n\n=item B<--critical>\n\nThreshold critical (process count).\n\n=back\n\n=cut\n"},"avg_line_length":{"kind":"number","value":33.5196078431,"string":"33.519608"},"max_line_length":{"kind":"number","value":197,"string":"197"},"alphanum_fraction":{"kind":"number","value":0.5928634104,"string":"0.592863"}}},{"rowIdx":463253,"cells":{"hexsha":{"kind":"string","value":"ed8ab726b050dfa368bb646548b6f0633f8c69d7"},"size":{"kind":"number","value":703,"string":"703"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/perfSONAR_PS/NPToolkit/WebService/Auth.pm"},"max_stars_repo_name":{"kind":"string","value":"candlerb/perl-shared"},"max_stars_repo_head_hexsha":{"kind":"string","value":"027b63874da5c5a4431afd0c4bbd78cef047b14d"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":7,"string":"7"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-08-21T21:37:03.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-03-21T08:25:35.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/perfSONAR_PS/NPToolkit/WebService/Auth.pm"},"max_issues_repo_name":{"kind":"string","value":"candlerb/perl-shared"},"max_issues_repo_head_hexsha":{"kind":"string","value":"027b63874da5c5a4431afd0c4bbd78cef047b14d"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":48,"string":"48"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2015-09-01T14:21:25.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-05-19T19:20:12.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/perfSONAR_PS/NPToolkit/WebService/Auth.pm"},"max_forks_repo_name":{"kind":"string","value":"candlerb/perl-shared"},"max_forks_repo_head_hexsha":{"kind":"string","value":"027b63874da5c5a4431afd0c4bbd78cef047b14d"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":3,"string":"3"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2016-07-07T00:06:31.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2020-11-26T10:32:52.000Z"},"content":{"kind":"string","value":"package perfSONAR_PS::NPToolkit::WebService::Auth;\nuse base 'Exporter';\n\nuse strict;\nour @EXPORT_OK = ( 'is_authenticated', 'unauthorized_output' );\n\nsub is_authenticated {\n my $cgi = shift;\n my $authenticated = 0;\n return if (! defined $cgi);\n if( defined $cgi->auth_type() && $cgi->auth_type ne '' && defined $cgi->remote_user() ){\n $authenticated = 1;\n }\n return $authenticated;\n}\n\nsub unauthorized_output {\n my $cgi = shift;\n my $header = \"\";\n if ( !is_authenticated($cgi) ) {\n $header = $cgi->header(\n -type => \"text/plain\",\n -status => \"401 Unauthorized\",\n );\n $header .= \"Unauthorized\";\n }\n return $header;\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":22.6774193548,"string":"22.677419"},"max_line_length":{"kind":"number","value":92,"string":"92"},"alphanum_fraction":{"kind":"number","value":0.5775248933,"string":"0.577525"}}},{"rowIdx":463254,"cells":{"hexsha":{"kind":"string","value":"ed8fce8aa80b6d03b97f1aada988d899aa78608a"},"size":{"kind":"number","value":65154,"string":"65,154"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"vendor/C/netpbm/buildtools/configure.pl"},"max_stars_repo_name":{"kind":"string","value":"ownclo/jpeg-on-steroids"},"max_stars_repo_head_hexsha":{"kind":"string","value":"deef3d015f07c46fedeaf0cceaadd4b702e89838"},"max_stars_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_stars_count":{"kind":"number","value":2,"string":"2"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2016-11-23T18:45:39.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2017-08-28T14:45:50.000Z"},"max_issues_repo_path":{"kind":"string","value":"vendor/C/netpbm/buildtools/configure.pl"},"max_issues_repo_name":{"kind":"string","value":"ownclo/jpeg-on-steroids"},"max_issues_repo_head_hexsha":{"kind":"string","value":"deef3d015f07c46fedeaf0cceaadd4b702e89838"},"max_issues_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"vendor/C/netpbm/buildtools/configure.pl"},"max_forks_repo_name":{"kind":"string","value":"ownclo/jpeg-on-steroids"},"max_forks_repo_head_hexsha":{"kind":"string","value":"deef3d015f07c46fedeaf0cceaadd4b702e89838"},"max_forks_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#!/usr/bin/perl -w\n\nrequire 5.000;\n\nuse strict;\nuse English;\nuse File::Basename;\nuse Cwd 'abs_path';\nuse Fcntl;\nuse Config;\n#use File::Temp \"tempfile\"; Not available before Perl 5.6.1\n \n\nmy ($TRUE, $FALSE) = (1,0);\n\n# This program generates Makefile.config, which is included by all of the\n# Netpbm makefiles. You run this program as the first step in building \n# Netpbm. (The second step is 'make').\n\n# This program is only a convenience. It is supported to create \n# Makefile.config any way you want. In fact, an easy way is to copy\n# Makefile.config.in and follow the instructions in the comments therein\n# to uncomment certain lines and make other changes.\n\n# Note that if you invoke 'make' without having first run 'configure',\n# the make will call 'configure' itself when it finds\n# 'Makefile.config' missing. That might look a little messy to the\n# user, but it isn't the normal build process.\n\n# The argument to this program is the filepath of the Makefile.config.in\n# file. If unspecified, the default is 'Makefile.config.in' in the \n# Netpbm source directory.\n\n# For explanations of the stuff we put in the make files, see the comments\n# in Makefile.config.in.\n\n\n# $testCc is the command we use to do test compiles. Note that test\n# compiles are never more than heuristics, because we may be configuring\n# a build that will happen on a whole different system, which will build\n# programs to run on a third system.\n\nmy $testCc;\n\n#******************************************************************************\n#\n# SUBROUTINES\n#\n#*****************************************************************************\n\nsub autoFlushStdout() {\n my $oldFh = select(STDOUT);\n $OUTPUT_AUTOFLUSH = $TRUE;\n select($oldFh);\n}\n\n\n\nsub prompt($$) {\n\n my ($prompt, $default) = @_;\n\n my $defaultPrompt = defined($default) ? $default : \"?\";\n\n print(\"$prompt [$defaultPrompt] ==> \");\n\n my $response = ;\n\n if (defined($response)) {\n chomp($response);\n if ($response eq \"\" && defined($default)) {\n $response = $default;\n }\n } else {\n print(\"\\n\");\n die(\"End of file on Standard Input when expecting response to prompt\");\n }\n\n return $response;\n}\n\n\n\nsub tmpdir() {\n# This is our approximation of File::Spec->tmpdir(), which became part of\n# basic Perl some time after Perl 5.005_03.\n\n my $retval;\n \n if ($ENV{\"TMPDIR\"}) {\n $retval = $ENV{\"TMPDIR\"};\n } else {\n if ($Config{'osvers'} eq \"djgpp\") {\n $retval = \"/dev/env/DJDIR/tmp\";\n } else {\n $retval = \"/tmp\";\n }\n }\n return $retval;\n}\n\n\n\nsub tempFile($) {\n\n# Here's what we'd do if we could expect Perl 5.6.1 or later, instead\n# of calling this subroutine:\n# my ($cFile, $cFileName) = tempfile(\"netpbmXXXX\", \n# SUFFIX=>\".c\", \n# DIR=>File::Spec->tmpdir(),\n# UNLINK=>0);\n my ($suffix) = @_;\n my $fileName;\n local *file; # For some inexplicable reason, must be local, not my\n my $i;\n $i = 0;\n do {\n $fileName = tmpdir() . \"/netpbm\" . $i++ . $suffix;\n } until sysopen(*file, $fileName, O_RDWR|O_CREAT|O_EXCL);\n\n return(*file, $fileName);\n}\n\n\n\nsub commandExists($) {\n my ($command) = @_;\n#-----------------------------------------------------------------------------\n# Return TRUE iff a shell command $command exists.\n#-----------------------------------------------------------------------------\n\n# Note that it's significant that the redirection on the following\n# causes it to be executed in a shell. That makes the return code\n# from system() a lot different than if system() were to try to\n# execute the program directly.\n\n return(system(\"$command 1/dev/null 2>/dev/null\")/256 != 127); \n}\n\n\n\nsub chooseTestCompiler($$) {\n\n my ($compiler, $testCcR) = @_;\n\n my $cc;\n\n if ($ENV{'CC'}) {\n $cc = $ENV{'CC'};\n } else {\n if (commandExists('cc')) {\n $cc = 'cc';\n } elsif (commandExists(\"gcc\")) {\n $cc = 'gcc';\n }\n }\n $$testCcR = $cc;\n}\n\n\n\nsub testCflags($) {\n my ($needLocal) = @_;\n\n my $cflags;\n\n $cflags = \"\"; # initial value \n \n if ($ENV{\"CPPFLAGS\"}) {\n $cflags = $ENV{\"CPPFLAGS\"};\n } else {\n $cflags = \"\";\n }\n \n if ($ENV{\"CFLAGS\"}) {\n $cflags .= \" \" . $ENV{\"CFLAGS\"};\n }\n \n if ($needLocal) {\n $cflags .= \" -I/usr/local/include\";\n }\n return $cflags;\n} \n\n\n\nsub testCompile($$$) {\n my ($cflags, $cSourceCodeR, $successR) = @_;\n#-----------------------------------------------------------------------------\n# Do a test compile of the program in @{$cSourceCodeR}.\n# \n# Return $$successR == $TRUE iff the compile succeeds (exit code 0).\n#-----------------------------------------------------------------------------\n my ($cFile, $cFileName) = tempFile(\".c\");\n\n print $cFile @{$cSourceCodeR};\n \n my ($oFile, $oFileName) = tempFile(\".o\");\n # Note: we tried using /dev/null for the output file and got complaints\n # from the Sun compiler that it has the wrong suffix. 2002.08.09.\n \n my $compileCommand = \"$testCc -c -o $oFileName $cflags $cFileName\";\n print (\"Doing test compile: $compileCommand\\n\");\n my $rc = system($compileCommand);\n \n unlink($oFileName);\n close($oFile);\n unlink($cFileName);\n close($cFile);\n\n $$successR = ($rc == 0);\n}\n\n\n\nsub displayIntroduction() {\n print(\"This is the Netpbm configurator. It is an interactive dialog \" .\n \"that\\n\");\n print(\"helps you build the file 'Makefile.config' and prepare to build \");\n print(\"Netpbm.\\n\");\n print(\"\\n\");\n\n print(\"Do not be put off by all the questions. Configure gives you \" .\n \"the \\n\");\n print(\"opportunity to make a lot of choices, but you don't have to. \" .\n \"If \\n\");\n print(\"you don't have reason to believe you're smarter than Configure,\\n\");\n print(\"just take the defaults (hit ENTER) and don't sweat it.\\n\");\n print(\"\\n\");\n\n print(\"If you are considering having a program feed answers to the \" .\n \"questions\\n\");\n print(\"below, please read doc/INSTALL, because that's probably the \" .\n \"wrong thing to do.\\n\");\n print(\"\\n\");\n\n print(\"Hit ENTER to begin.\\n\");\n my $response = ;\n}\n\n\nsub askAboutCygwin() {\n\n print(\"Are you building in/for the Cygwin environment?\\n\");\n print(\"\\n\");\n \n my $default;\n if ($OSNAME eq \"cygwin\") {\n $default = \"y\";\n } else {\n $default = \"n\";\n }\n \n my $retval;\n\n while (!defined($retval)) {\n my $response = prompt(\"(y)es or (n)o\", $default);\n \n if (uc($response) =~ /^(Y|YES)$/) {\n $retval = $TRUE;\n } elsif (uc($response) =~ /^(N|NO)$/) {\n $retval = $FALSE;\n } else {\n print(\"'$response' isn't one of the choices. \\n\" .\n \"You must choose 'yes' or 'no' (or 'y' or 'n').\\n\");\n }\n }\n return $retval;\n}\n\n\n\nsub askAboutDjgpp() {\n\n print(\"Are you building in/for the DJGPP environment?\\n\");\n print(\"\\n\");\n \n my $default;\n if ($OSNAME eq \"dos\") {\n $default = \"y\";\n } else {\n $default = \"n\";\n }\n \n my $retval;\n\n while (!defined($retval)) {\n my $response = prompt(\"(y)es or (n)o\", $default);\n \n if (uc($response) =~ /^(Y|YES)$/) {\n $retval = $TRUE;\n } elsif (uc($response) =~ /^(N|NO)$/) {\n $retval = $FALSE;\n } else {\n print(\"'$response' isn't one of the choices. \\n\" .\n \"You must choose 'yes' or 'no' (or 'y' or 'n').\\n\");\n }\n }\n}\n\n\n\nsub computePlatformDefault($) {\n\n my ($defaultP) = @_;\n\n if ($OSNAME eq \"linux\") {\n $$defaultP = \"gnu\";\n } elsif ($OSNAME eq \"cygwin\") {\n $$defaultP = \"win\";\n } elsif ($OSNAME eq \"dos\") {\n # DJGPP says \"dos\"\n $$defaultP = \"win\";\n } elsif ($OSNAME eq \"aix\" || $OSNAME eq \"freebsd\" || $OSNAME eq \"darwin\" ||\n $OSNAME eq \"amigaos\") {\n $$defaultP = $OSNAME;\n } elsif ($OSNAME eq \"solaris\") {\n $$defaultP = \"sun\";\n } elsif ($OSNAME eq \"dec_osf\") {\n $$defaultP = \"tru64\";\n } else {\n print(\"Unrecognized OSNAME='$OSNAME'. No default possible\\n\");\n }\n # OK - if you know what $OSNAME is on any other platform, send me a patch!\n}\n\n\n\nsub getPlatform() {\n\n my $platform;\n my $default;\n\n computePlatformDefault(\\$default);\n\n print(\"Which of the following best describes your platform?\\n\");\n \n print(\"gnu GNU/Linux\\n\");\n print(\"sun Solaris or SunOS\\n\");\n print(\"hp HP-UX\\n\");\n print(\"aix AIX\\n\");\n print(\"win Windows/DOS (Cygwin, DJGPP, Mingw32)\\n\");\n print(\"tru64 Tru64\\n\");\n print(\"irix Irix\\n\");\n print(\"bsd NetBSD, BSD/OS\\n\");\n print(\"openbsd OpenBSD\\n\");\n print(\"freebsd FreeBSD\\n\");\n print(\"darwin Darwin or Mac OS X\\n\");\n print(\"amigaos Amiga\\n\");\n print(\"unixware Unixware\\n\");\n print(\"sco SCO OpenServer\\n\");\n print(\"beos BeOS\\n\");\n print(\"none none of these are even close\\n\");\n print(\"\\n\");\n\n my $response = prompt(\"Platform\", $default);\n\n my %platform = (\"gnu\" => \"GNU\",\n \"sun\" => \"SOLARIS\",\n \"hp\" => \"HP-UX\",\n \"aix\" => \"AIX\",\n \"tru64\" => \"TRU64\",\n \"irix\" => \"IRIX\",\n \"win\" => \"WINDOWS\",\n \"beos\" => \"BEOS\",\n \"bsd\" => \"NETBSD\",\n \"openbsd\" => \"OPENBSD\",\n \"freebsd\" => \"FREEBSD\",\n \"unixware\" => \"UNIXWARE\",\n \"sco\" => \"SCO\",\n \"darwin\" => \"DARWIN\",\n \"amigaos\" => \"AMIGA\",\n \"none\" => \"NONE\"\n );\n\n $platform = $platform{$response};\n if (!defined($platform)) {\n print(\"'$response' isn't one of the choices.\\n\");\n exit 8;\n }\n\n my $subplatform;\n\n if ($platform eq \"WINDOWS\") {\n my ($djgpp, $cygwin);\n\n if ($OSNAME eq \"dos\") {\n $djgpp = askAboutDjgpp();\n if ($djgpp) {\n $cygwin = $FALSE;\n } else {\n $cygwin = askAboutCygwin();\n }\n } else {\n $cygwin = askAboutCygwin();\n if ($cygwin) {\n $djgpp = $FALSE;\n } else {\n $djgpp = askAboutDjgpp();\n }\n }\n\n if ($cygwin) {\n $subplatform = \"cygwin\";\n } elsif ($djgpp) {\n $subplatform = \"djgpp\";\n } else {\n $subplatform = \"other\";\n }\n }\n\n return($platform, $subplatform);\n}\n\n\n\nsub getCompiler($$) {\n my ($platform, $compilerR) = @_;\n#-----------------------------------------------------------------------------\n# Here are some of the issues surrounding choosing a compiler:\n#\n# - It's not just the name of the program we need -- different compilers\n# need different options.\n#\n# - There are basically two choices on any system: native compiler or\n# GNU compiler. That's all this program recognizes, anyway. On some,\n# native _is_ GNU, and we return 'gcc'.\n#\n# - A user may well have various compilers. Different releases, using\n# different standard libraries, for different target machines, etc.\n#\n# - The CC environment variable tells the default compiler.\n#\n# - In the absence of a CC environment variable, 'cc' is the default\n# compiler.\n#\n# - The user must be able to specify the compiler by overriding the CC\n# make variable (e.g. make CC=gcc2).\n#\n# - Configure needs to do test compiles. The test is best if it uses\n# the same compiler that the build eventually will use, but it's \n# useful even if not.\n#\n# The value this subroutine returns is NOT the command name to invoke the\n# compiler. It is simply \"cc\" to mean native compiler or \"gcc\" to mean\n# GNU compiler.\n#-----------------------------------------------------------------------------\n my %gccOptionalPlatform = (\"SOLARIS\" => 1,\n \"TRU64\" => 1,\n \"SCO\" => 1,\n \"AIX\" => 1,\n \"HP-UX\" => 1);\n\n my %gccUsualPlatform = (\"GNU\" => 1,\n \"NETBSD\" => 1,\n \"OPENBSD\" => 1,\n \"FREEBSD\" => 1,\n \"DARWIN\" => 1,\n );\n\n if ($gccUsualPlatform{$platform}) {\n $$compilerR = \"gcc\";\n } elsif ($gccOptionalPlatform{$platform}) {\n print(\"GNU compiler or native operating system compiler (cc)?\\n\");\n print(\"\\n\");\n\n my $default;\n\n if ($platform eq \"SOLARIS\" || $platform eq \"SCO\" ) {\n $default = \"gcc\";\n } else {\n $default = \"cc\";\n }\n\n my $response = prompt(\"gcc or cc\", $default);\n\n if ($response eq \"gcc\") {\n $$compilerR = \"gcc\";\n } elsif ($response eq \"cc\") {\n $$compilerR = \"cc\";\n } else {\n print(\"'$response' isn't one of the choices. \\n\" .\n \"You must choose 'gcc' or 'cc'.\\n\");\n exit 12;\n }\n\n if ($$compilerR eq 'gcc' && !commandExists('gcc')) {\n print(\"WARNING: You selected the GNU compiler, \" .\n \"but do not appear to have a program \" .\n \"named 'gcc' in your PATH. This may \" .\n \"cause trouble later. You may need to \" .\n \"set the CC environment variable or CC \" .\n \"makefile variable or install 'gcc'\\n\");\n }\n print(\"\\n\");\n } else {\n $$compilerR = 'cc';\n }\n}\n\n\n\nsub gccLinker() {\n#-----------------------------------------------------------------------------\n# Determine what linker Gcc on this system appears to use.\n#\n# Return either \"gnu\" or \"sun\"\n#\n# For now, we assume it must be either a GNU linker or Sun linker and\n# that all Sun linkers are fungible.\n#\n# If we can't tell, we assume it is the GNU linker.\n#-----------------------------------------------------------------------------\n # First, we assume that the compiler calls 'collect2' as the linker\n # front end. The specs file might specify some other program, but\n # it usually says 'collect2'.\n \n my $retval;\n\n my $collect2 = qx{gcc --print-prog-name=collect2};\n \n if (defined($collect2)) {\n chomp($collect2);\n my $linker = qx{$collect2 -v 2>&1};\n if (defined($linker) && $linker =~ m{GNU ld}) {\n $retval = \"gnu\";\n } else {\n $retval = \"sun\";\n }\n } else {\n $retval = \"gnu\";\n }\n return $retval;\n}\n\n\n\nsub getLinker($$$$) {\n\n my ($platform, $compiler, $baseLinkerR, $viaCompilerR) = @_;\n\n my $baseLinker;\n\n if ($platform eq \"SOLARIS\") {\n $$viaCompilerR = $TRUE;\n\n while (!defined($$baseLinkerR)) {\n print(\"GNU linker or SUN linker?\\n\");\n print(\"\\n\");\n\n my $default;\n \n if ($compiler eq \"gcc\") {\n $default = gccLinker();\n } else {\n $default = \"sun\";\n }\n my $response = prompt(\"sun or gnu\", $default);\n \n if ($response eq \"gnu\") {\n $$baseLinkerR = \"GNU\";\n } elsif ($response eq \"sun\") {\n $$baseLinkerR = \"SUN\";\n } else {\n print(\"'$response' isn't one of the choices. \\n\" .\n \"You must choose 'sun' or 'gnu'.\\n\");\n }\n print(\"\\n\");\n }\n } else {\n $$viaCompilerR = $TRUE;\n $$baseLinkerR = \"?\";\n }\n}\n\n\n\nsub libSuffix($) {\n my ($platform) = @_;\n#-----------------------------------------------------------------------------\n# Return the traditional suffix for the link-time library on platform\n# type $platform.\n#\n# Note that this information is used mainly for cosmetic purposes in this\n# this program and the Netpbm build, because the build typically removes\n# any suffix and uses link options such as \"-ltiff\" to link the library.\n# This leaves it up to the linker to supply the actual suffix.\n#-----------------------------------------------------------------------------\n my $suffix;\n\n if ($platform eq 'WINDOWS') {\n $suffix = '.dll';\n } elsif ($platform eq 'AIX') {\n $suffix = '.a';\n } elsif ($platform eq 'DARWIN') {\n $suffix = '.dylib';\n } else {\n $suffix = '.so';\n }\n}\n\n\n\nsub getLibTypes($$$$$$$$) {\n my ($platform, $subplatform, $default_target,\n $netpbmlibtypeR, $netpbmlibsuffixR, $shlibprefixlistR,\n $willBuildSharedR, $staticlib_tooR) = @_;\n\n print(\"Do you want libnetpbm to be statically linked or shared?\\n\");\n print(\"\\n\");\n\n my $default = ($default_target eq \"merge\") ? \"static\" : \"shared\";\n\n my ($netpbmlibtype, $netpbmlibsuffix, $shlibprefixlist, \n $willBuildShared, $staticlib_too);\n \n my $response = prompt(\"static or shared\", $default);\n \n if ($response eq \"shared\") {\n $willBuildShared = $TRUE;\n if ($platform eq \"WINDOWS\") {\n $netpbmlibtype = \"dll\";\n $netpbmlibsuffix = \"dll\";\n if ($subplatform eq \"cygwin\") {\n $shlibprefixlist = \"cyg lib\";\n } \n } elsif ($platform eq \"DARWIN\") {\n $netpbmlibtype = \"dylib\";\n $netpbmlibsuffix = \"dylib\";\n } else {\n\t if ($platform eq \"IRIX\") {\n\t\t$netpbmlibtype = \"irixshared\";\n\t } else {\n\t\t$netpbmlibtype = \"unixshared\";\n\t }\n if ($platform eq \"AIX\") {\n $netpbmlibsuffix = \"a\";\n } elsif ($platform eq \"HP-UX\") {\n $netpbmlibsuffix = \"sl\";\n } else {\n $netpbmlibsuffix = \"so\";\n }\n }\n } elsif ($response eq \"static\") {\n $willBuildShared = $FALSE;\n $netpbmlibtype = \"unixstatic\";\n $netpbmlibsuffix = \"a\";\n # targets, but needed for building\n # libopt \n } else {\n print(\"'$response' isn't one of the choices. \\n\" .\n \"You must choose 'static' or 'shared'.\\n\");\n exit 12;\n }\n\n print(\"\\n\");\n\n # Note that we can't do both a static and shared library for AIX, because\n # they both have the same name: libnetpbm.a.\n \n if (($netpbmlibtype eq \"unixshared\" or \n $netpbmlibtype eq \"irixshared\" or \n $netpbmlibtype eq \"dll\") and $netpbmlibsuffix ne \"a\") {\n print(\"Do you want to build static libraries too (for linking to \\n\");\n print(\"programs not in the Netpbm package?\\n\");\n print(\"\\n\");\n \n my $default = \"y\";\n \n my $response = prompt(\"(y)es or (n)o\", $default);\n \n if (uc($response) =~ /^(Y|YES)$/) {\n $staticlib_too = \"y\";\n } elsif (uc($response) =~ /^(N|NO)$/) {\n $staticlib_too = \"n\";\n } else {\n print(\"'$response' isn't one of the choices. \\n\" .\n \"You must choose 'yes' or 'no' (or 'y' or 'n').\\n\");\n exit 12;\n }\n } else {\n $staticlib_too = \"n\";\n }\n print(\"\\n\");\n\n $$netpbmlibtypeR = $netpbmlibtype;\n $$netpbmlibsuffixR = $netpbmlibsuffix;\n $$shlibprefixlistR = $shlibprefixlist;\n $$willBuildSharedR = $willBuildShared;\n $$staticlib_tooR = $staticlib_too;\n}\n\n\n\nsub inttypesDefault() {\n\n my $retval;\n\n if (defined($testCc)) {\n\n print(\"(Doing test compiles to choose a default for you -- \" .\n \"ignore errors)\\n\");\n\n my $cflags = testCflags($FALSE);\n\n my $works;\n\n # We saw a system (Irix 5.3 with native IDO, December 2005) on\n # which sys/types.h defines uint32_t, but not int32_t and other\n # similar types. We saw a Mac OS X system (January 2006) on which\n # sys/types sometimes defines uint32_t, but sometimes doesn't.\n # So we make those last resorts.\n\n # int_fastXXX_t are the least likely of all the types to be\n # defined, so we look for that.\n\n # Solaris 8, for example, has a that defines\n # int32_t and uint32_t, but nothing the defines int_fast32_t.\n\n my @candidateList = (\"\", \"\",\n \"\", \"\");\n \n for (my $i = 0; $i < @candidateList && !$works; ++$i) {\n my $candidate = $candidateList[$i];\n my @cSourceCode = (\n \"#include $candidate\\n\",\n \"int_fast32_t testvar;\\n\"\n );\n \n testCompile($cflags, \\@cSourceCode, \\my $success);\n \n if ($success) {\n $works = $candidate;\n }\n }\n if ($works) {\n $retval = $works;\n } else {\n testCompile($cflags, [\"int_fast32_t testvar;\"], \\my $success);\n if ($success) {\n $retval = \"NONE\";\n } else {\n $retval = '\"inttypes_netpbm.h\"';\n }\n }\n print(\"\\n\");\n } else {\n $retval = '';\n }\n return $retval;\n}\n\n\n\nsub getInttypes($) {\n my ($inttypesHeaderFileR) = @_;\n\n my $gotit;\n\n print(\"What header file defines uint32_t, etc.?\\n\");\n print(\"\\n\");\n\n my $default = inttypesDefault();\n \n while (!$gotit) {\n my $response = prompt(\"'#include' argument or NONE\", $default);\n\n if ($response eq \"NONE\") {\n $$inttypesHeaderFileR = '';\n $gotit = $TRUE;\n } else {\n if ($response !~ m{<.+>} &&\n $response !~ m{\".+\"}) {\n print(\"'$response' is not a legal argument of a C #include \" .\n \"statement. It must be something in <> or \\\"\\\".\\n\");\n } else {\n $gotit = $TRUE;\n $$inttypesHeaderFileR = $response;\n }\n }\n }\n}\n\n\nsub getInt64($$) {\n\n my ($inttypes_h, $haveInt64R) = @_;\n\n if (defined($testCc)) {\n\n print(\"(Doing test compiles to determine if you have int64 type -- \" .\n \"ignore errors)\\n\");\n\n my $cflags = testCflags($FALSE);\n\n my $works;\n\n my @cSourceCode = (\n \"#include $inttypes_h\\n\",\n \"int64_t testvar;\\n\"\n );\n \n testCompile($cflags, \\@cSourceCode, \\my $success);\n \n if ($success) {\n print(\"You do.\\n\");\n $$haveInt64R = 'Y';\n } else {\n print(\"You do not. 64-bit code won't be built.\\n\");\n $$haveInt64R = 'N';\n }\n print(\"\\n\");\n } else {\n $$haveInt64R = \"N\";\n }\n}\n\n\n\n# TODO: These should do test compiles to see if the headers are in the\n# default search path, both to create a default to offer and to issue a\n# warning after user has chosen. Also test links to test the link library.\n\n# It looks like these should all be in the default search paths and were there\n# just to override defaults in Makefile.config.in. Since Configure now\n# creates a default of \"standard search path,\" I'm guessing we don't need\n# to set these anymore.\n\nsub getTiffLibrary($@) {\n\n my ($platform, @suggestedHdrDir) = @_;\n\n my $tifflib;\n {\n my $default = \"libtiff\" . libSuffix($platform);\n\n print(\"What is your TIFF (graphics format) library?\\n\");\n \n my $response = prompt(\"library filename or 'none'\", $default);\n \n if ($response ne \"none\") {\n $tifflib = $response;\n }\n if (defined($tifflib) and $tifflib =~ m{/} and !-f($tifflib)) {\n printf(\"WARNING: No regular file named '$tifflib' exists.\\n\");\n }\n }\n my $tiffhdr_dir;\n if (defined($tifflib)) {\n my $default;\n\n if (-d(\"/usr/include/tiff\")) {\n $default = \"/usr/include/tiff\";\n } elsif (-d(\"/usr/include/libtiff\")) {\n $default = \"/usr/include/libtiff\";\n } else {\n $default = \"default\";\n }\n print(\"Where are the interface headers for it?\\n\");\n \n my $response = prompt(\"TIFF header directory\", $default);\n \n if ($response ne \"default\") {\n $tiffhdr_dir = $response;\n }\n if (defined($tiffhdr_dir) and !-d($tiffhdr_dir)) {\n printf(\"WARNING: No directory named '$tiffhdr_dir' exists.\\n\");\n }\n }\n return($tifflib, $tiffhdr_dir);\n}\n\n\n\nsub getJpegLibrary($@) {\n\n my ($platform, @suggestedHdrDir) = @_;\n\n my $jpeglib;\n {\n my $default = \"libjpeg\" . libSuffix($platform);\n\n print(\"What is your JPEG (graphics format) library?\\n\");\n \n my $response = prompt(\"library filename or 'none'\", $default);\n \n if ($response ne \"none\") {\n $jpeglib = $response;\n }\n }\n my $jpeghdr_dir;\n if (defined($jpeglib)) {\n my $default;\n\n if (-d(\"/usr/include/jpeg\")) {\n $default = \"/usr/include/jpeg\";\n } else {\n $default = \"default\";\n }\n print(\"Where are the interface headers for it?\\n\");\n \n my $response = prompt(\"JPEG header directory\", $default);\n \n if ($response ne \"default\") {\n $jpeghdr_dir = $response;\n }\n if (defined($jpeghdr_dir) and !-d($jpeghdr_dir)) {\n printf(\"WARNING: No directory named '$jpeghdr_dir' exists.\\n\");\n }\n }\n return($jpeglib, $jpeghdr_dir);\n}\n\n\n\nsub getPngLibrary($@) {\n\n my ($platform, @suggestedHdrDir) = @_;\n\n my ($pnglib, $pnghdr_dir);\n\n if (commandExists('libpng-config')) {\n # We don't need to ask where Libpng is; there's a 'libpng-config'\n # That tells exactly how to access it, and the make files will use\n # that.\n } else {\n {\n my $default = \"libpng\" . libSuffix($platform);\n\n print(\"What is your PNG (graphics format) library?\\n\");\n \n my $response = prompt(\"library filename or 'none'\", $default);\n \n if ($response ne \"none\") {\n $pnglib = $response;\n }\n }\n if (defined($pnglib)) {\n my $default;\n\n if (-d(\"/usr/include/png\")) {\n $default = \"/usr/include/libpng\";\n } else {\n $default = \"default\";\n }\n \n print(\"Where are the interface headers for it?\\n\");\n \n my $response = prompt(\"PNG header directory\", $default);\n\n if ($response ne \"default\") {\n $pnghdr_dir = $response;\n }\n }\n }\n return($pnglib, $pnghdr_dir);\n}\n\n\n\nsub getZLibrary($@) {\n\n my ($platform, @suggestedHdrDir) = @_;\n\n my ($zlib, $zhdr_dir);\n\n {\n my $default = \"libz\" . libSuffix($platform);\n\n print(\"What is your Z (compression) library?\\n\");\n \n my $response = prompt(\"library filename or 'none'\", $default);\n \n if ($response ne \"none\") {\n $zlib = $response;\n }\n }\n if (defined($zlib)) {\n my $default;\n\n if (-d(\"/usr/include/zlib\")) {\n $default = \"/usr/include/zlib\";\n } else {\n $default = \"default\";\n }\n \n print(\"Where are the interface headers for it?\\n\");\n \n my $response = prompt(\"Z header directory\", $default);\n \n if ($response ne \"default\") {\n $zhdr_dir = $response;\n }\n }\n return($zlib, $zhdr_dir);\n}\n\n\n\nsub getX11Library($@) {\n\n my ($platform, @suggestedHdrDir) = @_;\n\n my $x11lib;\n {\n my $default;\n\n if (-d('/usr/link/X11')) {\n $default = '/usr/link/X11/libX11' . libSuffix($platform);\n } elsif (-d('/usr/X11R6/lib')) {\n $default = '/usr/X11R6/lib/libX11' . libSuffix($platform);\n } else {\n $default = \"libX11\" . libSuffix($platform);\n }\n print(\"What is your X11 (X client) library?\\n\");\n \n my $response = prompt(\"library filename or 'none'\", $default);\n \n if ($response ne \"none\") {\n $x11lib = $response;\n }\n }\n my $x11hdr_dir;\n if (defined($x11lib)) {\n my $default;\n\n $default = \"default\";\n\n print(\"Where are the interface headers for it?\\n\");\n \n my $response = prompt(\"X11 header directory\", $default);\n \n if ($response ne \"default\") {\n $x11hdr_dir = $response;\n }\n if (defined($x11hdr_dir)) {\n if (!-d($x11hdr_dir)) {\n printf(\"WARNING: No directory named '$x11hdr_dir' exists.\\n\");\n } elsif (!-d(\"$x11hdr_dir/X11\")) {\n printf(\"WARNING: Directory '$x11hdr_dir' does not contain \" .\n \"the requisite 'X11' subdirectory\\n\");\n }\n }\n }\n return($x11lib, $x11hdr_dir);\n}\n\n\n\nsub getLinuxsvgaLibrary($@) {\n\n my ($platform, @suggestedHdrDir) = @_;\n\n my ($svgalib, $svgalibhdr_dir);\n\n if ($platform eq \"GNU\") {\n my $default;\n\n if (-d('/usr/link/svgalib')) {\n $default = '/usr/link/svgalib/libvga.so';\n } elsif (-d('/usr/lib/svgalib')) {\n $default = '/usr/lib/svgalib/libvga.so';\n } elsif (system('ldconfig -p | grep libvga >/dev/null 2>&1') == 0) {\n # &>/dev/null should work above, but on 12.03.26, it caused the\n # return value of system() always to be zero!\n $default = 'libvga.so';\n } else {\n $default = 'none';\n }\n \n print(\"What is your Svgalib library?\\n\");\n \n my $response = prompt(\"library filename or 'none'\", $default);\n \n if ($response ne 'none') {\n $svgalib = $response;\n }\n }\n if (defined($svgalib) && $svgalib ne 'none') {\n my $default;\n \n if (-d('/usr/include/svgalib')) {\n $default = '/usr/include/svgalib';\n } else {\n $default = \"default\";\n }\n print(\"Where are the interface headers for it?\\n\");\n \n my $response = prompt(\"Svgalib header directory\", $default);\n \n if ($response ne \"default\") {\n $svgalibhdr_dir = $response;\n }\n if (defined($svgalibhdr_dir)) {\n if (!-d($svgalibhdr_dir)) {\n printf(\"WARNING: No directory named \" .\n \"'$svgalibhdr_dir' exists.\\n\");\n }\n }\n }\n return($svgalib, $svgalibhdr_dir);\n}\n\n\n\nsub symlink_command() {\n\n my $retval;\n\n # Some Windows environments don't have symbolic links (or even a\n # simulation via a \"ln\" command, but have a \"cp\" command which works\n # in a pinch. Some Windows environments have \"ln\", but it won't do\n # symbolic links.\n \n if (commandExists(\"ln\")) {\n # We assume if Perl can do symbolic links, so can Ln, and vice\n # versa.\n\n my $symlink_exists = eval { symlink(\"\",\"\"); 1 };\n \n if ($symlink_exists) {\n $retval = \"ln -s\";\n } else {\n $retval = \"ln\";\n }\n } elsif (commandExists(\"cp\")) {\n $retval = \"cp\";\n } else {\n # Well, maybe we just made a mistake.\n $retval = \"ln -s\";\n }\n return $retval;\n}\n\n\n\nsub help() {\n\n print(\"This is the Netpbm custom configuration program. \\n\");\n print(\"It is not GNU Configure.\\n\");\n print(\"\\n\");\n print(\"There is one optional argument to this program: The \" .\n \"name of the file to use as the basis for the Makefile.config \" .\n \"file. Default is 'Makefile.config.in'\\n\");\n print(\"\\n\");\n print(\"Otherwise, the program is interactive.\\n\");\n}\n\n\n\nsub gnuOptimizeOpt($) {\n my ($gccCommandName) = @_;\n#-----------------------------------------------------------------------------\n# Compute the -O compiler flag appropriate for a GNU system. Ordinarily,\n# this is just -O3. But many popular GNU systems have a broken compiler\n# that causes -O3 to generate incorrect code (symptom: pnmtojpeg --quality=95\n# generates a syntax error message from shhopt).\n#-----------------------------------------------------------------------------\n# I don't know what are exactly the cases that Gcc is broken. I know \n# Red Hat 7.1 and 7.2 and Mandrake 8.2, running gcc 2.96.1, commonly have\n# the problem. But it may be limited to a certain subrelease level or\n# CPU type or other environment. People who have reported the problem have\n# reported that Gcc 3.0 doesn't have it. Gcc 2.95.3 doesn't have it.\n\n# Note that automatic inlining happens at -O3 level, but there are some\n# subroutines in Netpbm marked for explicit inlining, and we need to disable\n# that inlining too, so we must go all the way down to -O0.\n\n my @gccVerboseResp = `$gccCommandName --verbose 2>&1`;\n\n my $brokenCompiler;\n \n if (@gccVerboseResp ==2) {\n if ($gccVerboseResp[1] =~ m{gcc version 2.96}) {\n $brokenCompiler = $TRUE;\n } else {\n $brokenCompiler = $FALSE;\n }\n } else {\n $brokenCompiler = $FALSE;\n }\n\n my $oOpt;\n\n if ($brokenCompiler) {\n print(\"You appear to have a broken compiler which would produce \\n\");\n print(\"incorrect code if requested to do inline optimization.\\n\");\n print(\"Therefore, I am configuring the build to not do inline \\n\");\n print(\"optimization. This will make some Netpbm programs \\n\");\n print(\"noticeably slower. If I am wrong about your compiler, just\\n\");\n print(\"edit Makefile.config and change -O0 to -O3 near the bottom.\\n\");\n print(\"\\n\");\n print(\"The problem is known to exist in the GNU Compiler \\n\");\n print(\"release 2.96. If you upgrade, you will not have this \\n\");\n print(\"problem.\\n\");\n print(\"---------------------------------------------\\n\");\n print(\"\\n\");\n $oOpt = \"-O0\";\n } else {\n $oOpt = \"-O3\";\n }\n return $oOpt;\n}\n\n\n\nsub needLocal($) {\n#-----------------------------------------------------------------------------\n# Return wether or not /usr/local paths must be added to compiles and\n# links. In a properly configured system, those paths should be in\n# the compiler and linker default search paths, e.g. the compiler\n# should search /usr/local/include and then /usr/include without any\n# -I options needed. But we've seen some systems where it isn't.\n#\n# Actually, I have doubts now as to whether these misconfigured systems\n# really exist. This subroutine was apparently always broken, because\n# before 04.03.15, it had \"netbsd\", etc. in lower case. So it always\n# returned false. I never had a complaint. Plus, we had a bug in \n# Makefile.config.in wherein it wiped out the user's setting of the LDFLAGS\n# environment variable. This could explain /usr/local/lib not being in\n# the path when it should have been.\n#\n# So I've disabled this function; we'll see if we encounter any truly\n# misconfigured systems. 04.03.15.\n#-----------------------------------------------------------------------------\n my ($platform) = @_;\n\n return $FALSE; # See comments above.\n\n my $needLocal;\n \n if ($platform eq \"NETBSD\" || $platform eq \"OPENBSD\" || \n $platform eq \"FREEBSD\") {\n $needLocal = $TRUE;\n } else {\n $needLocal = $FALSE;\n }\n return $needLocal;\n}\n\n\n\nsub findProcessManagement($) {\n my ($dontHaveProcessMgmtR) = @_;\n#-----------------------------------------------------------------------------\n# Return $TRUE iff the system does not have in its default\n# search path.\n#-----------------------------------------------------------------------------\n my $cflags = testCflags($FALSE);\n\n my @cSourceCode = (\n \"#include \\n\",\n );\n \n testCompile($cflags, \\@cSourceCode, \\my $success);\n\n if (!$success) {\n print(\"Your system does not appear to have in its \" .\n \"standard compiler include path. Therefore, we will build \" .\n \"Netpbm with some function missing (e.g. the pm_system() \" .\n \"function in libnetpbm and most of 'pamlookup'\\n\");\n $$dontHaveProcessMgmtR = $TRUE;\n } else {\n $$dontHaveProcessMgmtR = $FALSE;\n }\n}\n\n\n\nsub validateLibraries(@) {\n my @libList = @_;\n#-----------------------------------------------------------------------------\n# Check each library name in the list @libList for viability.\n#-----------------------------------------------------------------------------\n foreach my $libname (@libList) {\n if (defined($libname)) {\n if ($libname =~ m{/} and !-f($libname)) {\n print(\"WARNING: No regular file named '$libname' exists.\\n\");\n } elsif (!($libname =~ m{ .* \\. (so|a|sa|sl|dll|dylib) $ }x)) {\n print(\"WARNING: The library name '$libname' does not have \" .\n \"a conventional suffix (.so, .a, .dll, etc.)\\n\");\n }\n }\n }\n}\n\n\n\nsub warnJpegTiffDependency($$) {\n my ($jpeglib, $tifflib) = @_;\n\n if (defined($tifflib) && !defined($jpeglib)) {\n print(\"WARNING: You say you have a Tiff library, \" .\n \"but no Jpeg library.\\n\");\n print(\"Sometimes the Tiff library prerequires the \" .\n \"Jpeg library. If \\n\");\n print(\"that is the case on your system, you will \" .\n \"have some links fail with\\n\");\n print(\"missing 'jpeg...' symbols. If so, rerun \" .\n \"Configure and say you\\n\");\n print(\"have no Tiff library either.\\n\");\n print(\"\\n\");\n }\n}\n\n\n\nsub testCompileJpeglibH($$) {\n my ($cflags, $successR) = @_;\n#-----------------------------------------------------------------------------\n# Do a test compile to see if we can see jpeglib.h.\n#-----------------------------------------------------------------------------\n my @cSourceCode = (\n \"#include \\n\",\n \"#include \\n\",\n \"#include \\n\",\n );\n \n testCompile($cflags, \\@cSourceCode, $successR);\n}\n\n\n\nsub testCompileJpegMarkerStruct($$) {\n my ($cflags, $successR) = @_;\n#-----------------------------------------------------------------------------\n# Do a test compile to see if struct jpeg_marker_struct is defined in \n# jpeglib.h. Assume it is already established that the compiler works\n# and can find jpeglib.h.\n#-----------------------------------------------------------------------------\n my @cSourceCode = (\n \"#include \\n\",\n \"#include \\n\",\n \"#include \\n\",\n \"struct jpeg_marker_struct test;\\n\",\n );\n\n testCompile($cflags, \\@cSourceCode, $successR);\n}\n\n\n\nsub printMissingHdrWarning($$) {\n\n my ($name, $hdr_dir) = @_;\n\n print(\"WARNING: You said the compile-time part of the $name library \" .\n \"(the header\\n\");\n print(\"files) is in \");\n\n if (defined($hdr_dir)) {\n print(\"directory '$hdr_dir', \");\n } else {\n print(\"the compiler's default search path, \");\n }\n print(\"but a test compile failed\\n\");\n print(\"to confirm that. If your configuration is exotic, the test \" .\n \"compile might\\n\");\n print(\"just be wrong, but otherwise the Netpbm build will fail.\\n\");\n print(\"\\n\");\n print(\"To fix this, either install the $name library there \\n\");\n print(\"or re-run Configure and answer the question about the $name \" .\n \"library\\n\");\n print(\"differently.\\n\");\n print(\"\\n\");\n}\n\n\n\nsub printOldJpegWarning() {\n print(\"WARNING: Your JPEG library appears to be too old for Netpbm.\\n\");\n print(\"We base this conclusion on the fact that jpeglib.h apparently\\n\");\n print(\"does not define struct jpeg_marker_struct.\\n\");\n print(\"If the JPEG library is not Independent Jpeg Group's Version 6b\\n\");\n print(\"or better, the Netpbm build will fail when it attempts to build\\n\");\n print(\"the parts that use the JPEG library.\\n\");\n print(\"\\n\");\n print(\"If your configuration is exotic, this test may just be wrong.\\n\");\n print(\"Otherwise, either upgrade your JPEG library or re-run Configure\\n\");\n print(\"and say you don't have a JPEG library.\\n\");\n print(\"\\n\");\n}\n\n\n\nsub testJpegHdr($$) {\n\n my ($needLocal, $jpeghdr_dir) = @_;\n\n if (defined($testCc)) {\n\n my $generalCflags = testCflags($needLocal);\n\n my $jpegIOpt = $jpeghdr_dir ? \"-I$jpeghdr_dir\" : \"\";\n\n testCompileJpeglibH(\"$generalCflags $jpegIOpt\", \\my $success);\n\n if (!$success) {\n print(\"\\n\");\n printMissingHdrWarning(\"JPEG\", $jpeghdr_dir);\n } else {\n # We can get to something named jpeglib.h, but maybe it's an old\n # version we can't use. Check it out.\n testCompileJpegMarkerStruct(\"$generalCflags $jpegIOpt\", \n \\my $success);\n if (!$success) {\n print(\"\\n\");\n printOldJpegWarning();\n }\n }\n }\n}\n\n\n\nsub testCompileZlibH($$) {\n my ($cflags, $successR) = @_;\n#-----------------------------------------------------------------------------\n# Do a test compile to see if we can see zlib.h.\n#-----------------------------------------------------------------------------\n my @cSourceCode = (\n \"#include \\n\",\n );\n \n testCompile($cflags, \\@cSourceCode, $successR);\n}\n\n\n\nsub testCompilePngH($$) {\n my ($cflags, $successR) = @_;\n#-----------------------------------------------------------------------------\n# Do a test compile to see if we can see png.h, assuming we can see\n# zlib.h, which png.h #includes.\n#-----------------------------------------------------------------------------\n my @cSourceCode = (\n \"#include \\n\",\n );\n \n testCompile($cflags, \\@cSourceCode, $successR);\n}\n\n\n\nsub testPngHdr($$$) {\n#-----------------------------------------------------------------------------\n# Issue a warning if the compiler can't find png.h.\n#-----------------------------------------------------------------------------\n my ($needLocal, $pnghdr_dir, $zhdr_dir) = @_;\n\n if (defined($testCc)) {\n\n my $generalCflags = testCflags($needLocal);\n\n my $zlibIOpt = $zhdr_dir ? \"-I$zhdr_dir\" : \"\";\n\n testCompileZlibH(\"$generalCflags $zlibIOpt\", \\my $success);\n if (!$success) {\n print(\"\\n\");\n printMissingHdrWarning(\"Zlib\", $zhdr_dir);\n } else {\n my $pngIOpt = $pnghdr_dir ? \"-I$pnghdr_dir\" : \"\";\n\n testCompilePngH(\"$generalCflags $zlibIOpt $pngIOpt\", \n \\my $success);\n\n if (!$success) {\n print(\"\\n\");\n printMissingHdrWarning(\"PNG\", $pnghdr_dir);\n }\n }\n }\n}\n\n\n\nsub testLibpngConfig($) {\n my ($needLocal) = @_;\n#-----------------------------------------------------------------------------\n# Issue a warning if the instructions 'libpng-config' give for compiling\n# with Libpng don't work.\n#-----------------------------------------------------------------------------\n my $generalCflags = testCflags($needLocal);\n\n my $pngCflags = qx{libpng-config --cflags};\n chomp($pngCflags);\n\n testCompilePngH(\"$generalCflags $pngCflags\", \\my $success);\n\n if (!$success) {\n print(\"\\n\");\n print(\"Unable to compile a test PNG program using the compiler \" .\n \"flags that libpng-config says to use: '$pngCflags'.\\n\");\n print(\"This indicates that you have Libpng installed incorrectly.\\n\");\n print(\"libpng-config gets installed as part of the Libpng package.\\n\");\n } else {\n \n\n\n }\n}\n\n\n\nsub testConfiguration($$$$$$$) {\n\n my ($needLocal, $jpeglib, $jpeghdr_dir,\n $pnglib, $pnghdr_dir, $zlib, $zhdr_dir) = @_;\n\n if (defined($jpeglib)) {\n testJpegHdr($needLocal, $jpeghdr_dir);\n }\n if (defined($pnglib) && defined($zlib)) {\n testPngHdr($needLocal, $pnghdr_dir, $zhdr_dir);\n } elsif (commandExists('libpng-config')) {\n testLibpngConfig($needLocal);\n }\n\n # TODO: We ought to validate other libraries too. But it's not\n # that important, because in the vast majority of cases where the\n # user incorrectly identifies any library, it affects all the\n # libraries and if the user can get a handle on the JPEG library\n # problem, he will also solve problems with any other library.\n}\n\n\n\n#******************************************************************************\n#\n# MAINLINE\n#\n#*****************************************************************************\n\nautoFlushStdout();\n\nmy $configInPathArg;\nif (@ARGV > 0) {\n if ($ARGV[0] =~ \"^-\") {\n if ($ARGV[0] eq \"--help\") {\n help();\n exit(0);\n } else {\n die(\"Unrecognized option: $ARGV[0]\");\n }\n } \n $configInPathArg = $ARGV[0];\n}\n\nif (stat(\"Makefile.config\")) {\n print(\"Discard existing Makefile.config?\\n\");\n print(\"Y or N (N) ==> \");\n\n my $answer = ;\n if (!defined($answer)) {\n die(\"\\nEnd of file on Standard Input\");\n }\n chomp($answer);\n if (uc($answer) ne \"Y\") {\n print(\"Aborting at user request.\\n\");\n exit(1);\n }\n}\n\nprint(\"\\n\");\n\ndisplayIntroduction();\n\nmy ($platform, $subplatform) = getPlatform();\n\nprint(\"\\n\");\n\nif ($platform eq \"NONE\") {\n print(\"You will have to construct Makefile.config manually. To do \\n\");\n print(\"this, copy Makefile.config.in as Makefile.config, and then \\n\");\n print(\"edit it. Follow the instructions and examples in the file. \\n\");\n print(\"Please report your results to the Netpbm maintainer so he \\n\");\n print(\"can improve the configure program. \\n\");\n exit;\n}\n\ngetCompiler($platform, \\my $compiler);\ngetLinker($platform, $compiler, \\my $baseLinker, \\my $linkViaCompiler);\n\nchooseTestCompiler($compiler, \\$testCc);\n\nmy $netpbmlib_runtime_path;\n # Undefined if the default from Makefile.config.in is acceptable.\n\nif ($platform eq \"SOLARIS\" or $platform eq \"IRIX\" or\n $platform eq \"DARWIN\" or $platform eq \"NETBSD\" or\n $platform eq \"AMIGA\") {\n print(\"Where will the Netpbm shared library reside once installed?\\n\");\n print(\"Enter 'default' if it will reside somewhere that the shared\\n\");\n print(\"library loader will find it automatically. Otherwise, \\n\");\n print(\"this directory will get built into the Netpbm programs.\\n\");\n print(\"\\n\");\n\n my $default = \"default\";\n my $response = prompt(\"Netpbm shared library directory\", $default);\n\n if ($response eq \"default\") {\n $netpbmlib_runtime_path = \"\";\n } else {\n $netpbmlib_runtime_path = $response;\n }\n}\n\nmy $default_target;\n\nprint(\"Do you want a regular build or a merge build?\\n\");\nprint(\"If you don't know what this means, \" .\n \"take the default or see doc/INSTALL\\n\");\nprint(\"\\n\");\n\n{\n my $default = \"regular\";\n my $response = prompt(\"regular or merge\", $default);\n \n if ($response eq \"regular\") {\n $default_target = \"nonmerge\";\n } elsif ($response eq \"merge\") {\n $default_target = \"merge\";\n } else {\n print(\"'$response' isn't one of the choices. \\n\" .\n \"You must choose 'regular' or 'merge'.\\n\");\n exit 12;\n }\n}\n\nprint(\"\\n\");\n\ngetLibTypes($platform, $subplatform, $default_target,\n \\my $netpbmlibtype, \\my $netpbmlibsuffix, \\my $shlibprefixlist,\n \\my $willBuildShared, \\my $staticlib_too);\n\n\ngetInttypes(\\my $inttypesHeaderFile);\n\ngetInt64($inttypesHeaderFile, \\my $haveInt64);\n\nfindProcessManagement(\\my $dontHaveProcessMgmt);\n\n#******************************************************************************\n#\n# FIND THE PREREQUISITE LIBRARIES\n#\n#*****************************************************************************\n\nprint(\"\\n\\n\");\nprint(\"The following questions concern the subroutine libraries that are \" .\n \"Netpbm\\n\");\nprint(\"prerequisites. Every library has a compile-time part (header \" .\n \"files)\\n\");\nprint(\"and a link-time part. In the case of a shared library, these are \" .\n \"both\\n\");\nprint(\"part of the \\\"development\\\" component of the library, which may be \" .\n \"separately\\n\");\nprint(\"installable from the runtime shared library. For each library, you \" .\n \"must\\n\");\nprint(\"give the filename of the link library. If it is not in your \" .\n \"linker's\\n\");\nprint(\"default search path, give the absolute pathname of the file. In \" .\n \"addition,\\n\");\nprint(\"you will be asked for the directory in which the library's interface \" .\n \"headers\\n\");\nprint(\"reside, and you can respond 'default' if they are in your compiler's \" .\n \"default\\n\");\nprint(\"search path.\\n\");\nprint(\"\\n\");\nprint(\"If you don't have the library on your system, you can enter 'none' \" .\n \"as the\\n\");\nprint(\"library filename and the builder will skip any part that requires \" .\n \"that \");\nprint(\"library.\\n\");\nprint(\"\\n\");\n\nmy ($jpeglib, $jpeghdr_dir) = getJpegLibrary($platform);\nprint(\"\\n\");\nmy ($tifflib, $tiffhdr_dir) = getTiffLibrary($platform, $jpeghdr_dir);\nprint(\"\\n\");\nmy ($pnglib, $pnghdr_dir) = getPngLibrary($platform, \n $tiffhdr_dir, $jpeghdr_dir);\nprint(\"\\n\");\nmy ($zlib, $zhdr_dir) = getZLibrary($platform, \n $pnghdr_dir,\n $tiffhdr_dir,\n $jpeghdr_dir);\nprint(\"\\n\");\nmy ($x11lib, $x11hdr_dir) = getX11Library($platform); \n\nprint(\"\\n\");\nmy ($linuxsvgalib, $linuxsvgahdr_dir) = getLinuxsvgaLibrary($platform); \n\nprint(\"\\n\");\n\n# We should add the JBIG and URT libraries here too. They're a little\n# more complicated because there are versions shipped with Netpbm.\n\n\n#******************************************************************************\n#\n# CONFIGURE DOCUMENTATION\n#\n#*****************************************************************************\n\nprint(\"What URL will you use for the main Netpbm documentation page?\\n\");\nprint(\"This information does not get built into any programs or libraries.\\n\");\nprint(\"It does not make anything actually install that web page.\\n\");\nprint(\"It is just for including in legacy man pages.\\n\");\nprint(\"\\n\");\n\nmy $default = \"http://netpbm.sourceforge.net/doc/\";\n\nmy $netpbm_docurl = prompt(\"Documentation URL\", $default);\n\nprint(\"\\n\");\n\n\n\n\n#******************************************************************************\n#\n# VALIDATE THE CONFIGURATION USER HAS SELECTED\n#\n#*****************************************************************************\n\nvalidateLibraries($jpeglib, $tifflib, $pnglib, $zlib);\n\nwarnJpegTiffDependency($jpeglib, $tifflib);\n\ntestConfiguration(needLocal($platform), \n $jpeglib, $jpeghdr_dir,\n $pnglib, $pnghdr_dir,\n $zlib, $zhdr_dir,\n );\n\n#******************************************************************************\n#\n# FIND THE NETPBM SOURCE TREE AND INITIALIZE BUILD TREE\n#\n#*****************************************************************************\n\nmy $defaultConfigInPath;\n\nif (-f(\"GNUmakefile\")) {\n # He's apparently running us in the source tree or an already set up\n # build directory.\n $defaultConfigInPath = \"Makefile.config.in\";\n} else {\n my $srcdir;\n my $done;\n\n $done = $FALSE;\n while (!$done) {\n print(\"Where is the Netpbm source code?\\n\");\n\n $srcdir = prompt(\"Netpbm source directory\", \n abs_path(dirname($0) . \"/..\"));\n\n if (-f(\"$srcdir/GNUmakefile\")) {\n $done = $TRUE;\n } else {\n print(\"That doesn't appear to contain Netpbm source code.\\n\");\n print(\"There is no file named 'GNUmakefile' in it.\\n\");\n print(\"\\n\");\n } \n }\n unlink(\"GNUmakefile\");\n symlink(\"$srcdir/GNUmakefile\", \"GNUmakefile\");\n unlink(\"Makefile\");\n symlink(\"$srcdir/Makefile\", \"Makefile\");\n\n open(SRCDIR, \">Makefile.srcdir\");\n print(SRCDIR \"SRCDIR = $srcdir\\n\");\n close(SRCDIR);\n \n $defaultConfigInPath = \"$srcdir/Makefile.config.in\";\n}\n\nsub makeCompilerGcc($) {\n my ($Makefile_configR) = @_;\n my $compileCommand = 'gcc';\n push(@{$Makefile_configR}, \"CC = $compileCommand\\n\");\n push(@{$Makefile_configR}, gnuCflags($compileCommand));\n}\n\n\n#******************************************************************************\n#\n# BUILD Makefile.config\n#\n#*****************************************************************************\n\nsub gnuCflags($) {\n my ($gccCommandName) = @_;\n\n return(\"CFLAGS = \" . gnuOptimizeOpt($gccCommandName) . \" -ffast-math \" .\n \" -pedantic -fno-common \" . \n \"-Wall -Wno-uninitialized -Wmissing-declarations -Wimplicit \" .\n \"-Wwrite-strings -Wmissing-prototypes -Wundef\\n\");\n}\n\nmy @Makefile_config;\n # This is the complete Makefile.config contents. We construct it here\n # and ultimately write the whole thing out as Makefile.config.\n\n# First, we just read the 'Makefile.config.in' in\n\nmy $configInPath;\nif (defined($configInPathArg)) {\n $configInPath = $configInPathArg;\n} else {\n $configInPath = $defaultConfigInPath;\n}\nopen (CONFIG_IN,\"<$configInPath\") or\n die(\"Unable to open file '$configInPath' for input.\");\n\n@Makefile_config = ;\n\nunshift(@Makefile_config, \n \"####This file was automatically created by 'configure.'\\n\",\n \"####Many variables are set twice -- a generic setting, then \\n\",\n \"####a system-specific override at the bottom of the file.\\n\",\n \"####\\n\");\n\nclose(CONFIG_IN);\n\n# Now, add the variable settings that override the default settings that are\n# done by the Makefile.config.in contents.\n\npush(@Makefile_config, \"\\n\\n\\n\\n\");\npush(@Makefile_config, \"####Lines above were copied from Makefile.config.in \" .\n \"by 'configure'.\\n\");\npush(@Makefile_config, \"####Lines below were added by 'configure' based on \" .\n \"the $platform platform.\\n\");\nif (defined($subplatform)) {\n push(@Makefile_config, \"####subplatform '$subplatform'\\n\");\n}\n\npush(@Makefile_config, \"DEFAULT_TARGET = $default_target\\n\");\n\npush(@Makefile_config, \"NETPBMLIBTYPE=$netpbmlibtype\\n\");\npush(@Makefile_config, \"NETPBMLIBSUFFIX=$netpbmlibsuffix\\n\");\nif (defined($shlibprefixlist)) {\n push(@Makefile_config, \"SHLIBPREFIXLIST=$shlibprefixlist\\n\");\n}\npush(@Makefile_config, \"STATICLIB_TOO=$staticlib_too\\n\");\n\nif (defined($netpbmlib_runtime_path)) {\n push(@Makefile_config, \"NETPBMLIB_RUNTIME_PATH=$netpbmlib_runtime_path\\n\");\n}\n\nif ($platform eq \"GNU\") {\n my $compileCommand;\n if (!commandExists(\"cc\") && commandExists(\"gcc\")) {\n $compileCommand = \"gcc\";\n push(@Makefile_config, \"CC = $compileCommand\\n\");\n } else {\n $compileCommand = \"cc\";\n }\n push(@Makefile_config, gnuCflags($compileCommand));\n# The merged programs have a main_XXX subroutine instead of main(),\n# which would cause a warning with -Wmissing-declarations or \n# -Wmissing-prototypes.\n push(@Makefile_config, \"CFLAGS_MERGE = \" .\n \"-Wno-missing-declarations -Wno-missing-prototypes\\n\");\n push(@Makefile_config, \"LDRELOC = ld --reloc\\n\");\n push(@Makefile_config, \"LINKER_CAN_DO_EXPLICIT_LIBRARY=Y\\n\");\n} elsif ($platform eq \"SOLARIS\") {\n push(@Makefile_config, 'LDSHLIB = -Wl,-Bdynamic,-G,-h,$(SONAME)', \"\\n\");\n\n push(@Makefile_config, 'NEED_RUNTIME_PATH = Y', \"\\n\");\n if ($compiler eq \"cc\") {\n push(@Makefile_config, \"CFLAGS = -O\\n\");\n push(@Makefile_config, \"CFLAGS_SHLIB = -Kpic\\n\");\n } else {\n makeCompilerGcc(\\@Makefile_config);\n }\n # Before Netpbm 10.20 (January 2004), we set this to -R for \n # $compiler == cc and -rpath otherwise. But now we know that the GNU\n # compiler can also invoke a linker that needs -R, so we're more flexible.\n if ($baseLinker eq \"GNU\") {\n push(@Makefile_config, \"RPATHOPTNAME = -rpath\\n\");\n } else {\n push(@Makefile_config, \"RPATHOPTNAME = -R\\n\");\n }\n push(@Makefile_config, \"NETWORKLD = -lsocket -lnsl\\n\");\n} elsif ($platform eq \"HP-UX\") {\n if ($compiler eq \"gcc\") {\n makeCompilerGcc(\\@Makefile_config);\n push(@Makefile_config, \"CFLAGS += -fPIC\\n\");\n push(@Makefile_config, \"LDSHLIB = -shared -fPIC\\n\");\n push(@Makefile_config, 'LDFLAGS += -Wl,+b,/usr/pubsw/lib', \"\\n\");\n } else {\n # We don't know what to do here. We used to (before 10.20) just\n # just assume the compiler was gcc. We know that the gcc stuff\n # above does NOT work for HP native compiler.\n push(@Makefile_config, \"LDSHLIB =\\n\");\n }\n} elsif ($platform eq \"AIX\") {\n push(@Makefile_config, 'LDFLAGS = -L /usr/pubsw/lib', \"\\n\");\n if ($compiler eq \"cc\") {\n # Yes, the -L option implies the runtime as well as linktime library\n # search path. There's no way to specify runtime path independently.\n push(@Makefile_config, \"RPATHOPTNAME = -L\\n\");\n push(@Makefile_config, \"LDSHLIB = -qmkshrobj\\n\");\n } else {\n makeCompilerGcc(\\@Makefile_config);\n push(@Makefile_config, \"LDSHLIB = -shared\\n\");\n }\n} elsif ($platform eq \"TRU64\") {\n# push(@Makefile_config, \"INSTALL = installbsd\\n\");\n if ($compiler eq \"cc\") {\n push(@Makefile_config, 'CFLAGS = -O2 -std1', \"\\n\");\n push(@Makefile_config, \"LDFLAGS = -call_shared -oldstyle_liblookup \" .\n \"-L/usr/local/lib\\n\");\n push(@Makefile_config, \"LDSHLIB = -shared -expect_unresolved \\\"*\\\"\\n\");\n } else {\n # We've never tested this. This is just here to give a user a \n # headstart on submitting to us the necessary information. 2002.07.04.\n push(@Makefile_config, \"CC = gcc\\n\");\n push(@Makefile_config, 'CFLAGS = -O3', \"\\n\");\n push(@Makefile_config, \"LDSHLIB = -shared\\n\");\n }\n # Between May 2000 and July 2003, we had -DLONG_32 in these options.\n # We took it out because it generated bad code for a TRU64 user in\n # July 2003 whose system has 64 bit long and 32 bit int. It affects\n # only Ppmtompeg and it isn't clear that using long instead of int is\n # ever right anyway.\n\n push(@Makefile_config, \"OMIT_NETWORK = y\\n\");\n push(@Makefile_config, \"LINKER_CAN_DO_EXPLICIT_LIBRARY=Y\\n\");\n} elsif ($platform eq \"IRIX\") {\n# push(@Makefile_config, \"INSTALL = install\\n\");\n push(@Makefile_config, \"MANPAGE_FORMAT = cat\\n\");\n push(@Makefile_config, \"RANLIB = true\\n\");\n push(@Makefile_config, \"CFLAGS = -n32 -O3 -fullwarn\\n\");\n push(@Makefile_config, \"LDFLAGS = -n32\\n\");\n push(@Makefile_config, \"LDSHLIB = -shared -n32\\n\");\n} elsif ($platform eq \"WINDOWS\") {\n if ($subplatform eq \"cygwin\") {\n makeCompilerGcc(\\@Makefile_config);\n }\n push(@Makefile_config, \"EXE = .exe\\n\");\n push(@Makefile_config, \"OMIT_NETWORK = y\\n\");\n# # Though it may not have the link as \"ginstall\", \"install\" in a Windows\n# # Unix environment is usually GNU install.\n# my $ginstall_result = `ginstall --version 2>/dev/null`;\n# if (!$ginstall_result) {\n# # System doesn't have 'ginstall', so use 'install' instead.\n# push(@Makefile_config, \"INSTALL = install\\n\");\n# }\n push(@Makefile_config, 'SYMLINK = ', symlink_command(), \"\\n\");\n push(@Makefile_config, 'DLLVER=$(NETPBM_MAJOR_RELEASE)', \"\\n\");\n push(@Makefile_config, \"LDSHLIB = \" . \n '-shared -Wl,--image-base=0x10000000 -Wl,--enable-auto-import', \"\\n\");\n} elsif ($platform eq \"BEOS\") {\n push(@Makefile_config, \"LDSHLIB = -nostart\\n\");\n} elsif ($platform eq \"OPENBSD\") {\n # vedge@vedge.com.ar says on 2001.04.29 that there are a ton of \n # undefined symbols in the Fiasco stuff on OpenBSD. So we'll just\n # cut it out of the build until someone feels like fixing it.\n push(@Makefile_config, \"BUILD_FIASCO = N\\n\");\n} elsif ($platform eq \"FREEBSD\") {\n} elsif ($platform eq \"AMIGA\") {\n push(@Makefile_config, \"CFLAGS = -m68020-60 -ffast-math -mstackextend\\n\");\n} elsif ($platform eq \"UNIXWARE\") {\n # Nothing to do.\n} elsif ($platform eq \"SCO\") {\n # Got this from \"John H. DuBois III\" 2002.09.27:\n push(@Makefile_config, \"RANLIB = true\\n\");\n if ($compiler eq \"cc\") {\n push(@Makefile_config, \"CFLAGS = -O\\n\");\n push(@Makefile_config, \"CFLAGS_SHLIB = -O -K pic\\n\");\n push(@Makefile_config, \"LDSHLIB = -G\\n\");\n push(@Makefile_config, \"SHLIB_CLIB =\\n\");\n } else {\n makeCompilerGcc(\\@Makefile_config);\n push(@Makefile_config, \"LDSHLIB = -shared\\n\"); \n }\n push(@Makefile_config, \"NETWORKLD = -lsocket -lresolve\\n\");\n} elsif ($platform eq \"DARWIN\") {\n push(@Makefile_config, \"CC = cc -no-cpp-precomp\\n\");\n push(@Makefile_config, 'CFLAGS_SHLIB = -fno-common', \"\\n\");\n push(@Makefile_config, \"LDSHLIB = \",\n \"-dynamiclib \",\n '-install_name $(NETPBMLIB_RUNTIME_PATH)/libnetpbm.$(MAJ).dylib', \n \"\\n\");\n# push(@Makefile_config, \"INSTALL = install\\n\");\n} else {\n die (\"Internal error: invalid value for \\$platform: '$platform'\\n\");\n}\n\nif (needLocal($platform)) {\n push(@Makefile_config, \"CFLAGS += -I/usr/local/include\\n\");\n push(@Makefile_config, \"LDFLAGS += -L/usr/local/lib\\n\");\n}\n\nif ($linkViaCompiler) {\n push(@Makefile_config, \"LINKERISCOMPILER = Y\\n\");\n}\n\nmy $flex_result = `flex --version`;\nif (!$flex_result) {\n # System doesn't have 'flex'. Maybe 'lex' will work. See the\n # make rules for Thinkjettopbm for information on our experiences\n # with Lexes besides Flex.\n\n my $systemRc = system('lex /dev/null 2>&1');\n\n if ($systemRc >> 8 == 127) {\n print(\"\\n\");\n print(\"You do not appear to have the 'flex' or 'lex' pattern \\n\");\n print(\"matcher generator on your system, so we will not build \\n\");\n print(\"programs that need it (Thinkjettopbm)\\n\");\n \n print(\"\\n\");\n print(\"Press ENTER to continue.\\n\");\n my $key = ;\n print(\"\\n\");\n\n push(@Makefile_config, \"LEX=\\n\");\n } else {\n print(\"\\n\");\n print(\"Using 'lex' as the pattern matcher generator, \" .\n \"since we cannot\\n\");\n print(\"find 'flex' on your system.\\n\");\n print(\"\\n\");\n\n push(@Makefile_config, \"LEX = lex\\n\"); \n }\n}\n\nif ($compiler eq 'gcc') {\n push(@Makefile_config, \"CFLAGS_SHLIB += -fPIC\\n\");\n}\n\nif (defined($tiffhdr_dir)) {\n push(@Makefile_config, \"TIFFHDR_DIR = $tiffhdr_dir\\n\");\n}\nif (defined($tifflib)) {\n push(@Makefile_config, \"TIFFLIB = $tifflib\\n\");\n}\n\nif (defined($jpeghdr_dir)) {\n push(@Makefile_config, \"JPEGHDR_DIR = $jpeghdr_dir\\n\");\n}\nif (defined($jpeglib)) {\n push(@Makefile_config, \"JPEGLIB = $jpeglib\\n\");\n}\n\nif (defined($pnghdr_dir)) {\n push(@Makefile_config, \"PNGHDR_DIR = $pnghdr_dir\\n\");\n}\nif (defined($pnglib)) {\n push(@Makefile_config, \"PNGLIB = $pnglib\\n\");\n}\n\nif (defined($zhdr_dir)) {\n push(@Makefile_config, \"ZHDR_DIR = $zhdr_dir\\n\");\n}\nif (defined($zlib)) {\n push(@Makefile_config, \"ZLIB = $zlib\\n\");\n}\n\nif (defined($x11hdr_dir)) {\n push(@Makefile_config, \"X11HDR_DIR = $x11hdr_dir\\n\");\n}\nif (defined($x11lib)) {\n push(@Makefile_config, \"X11LIB = $x11lib\\n\");\n}\n\nif (defined($linuxsvgahdr_dir)) {\n push(@Makefile_config, \"LINUXSVGAHDR_DIR = $linuxsvgahdr_dir\\n\");\n}\nif (defined($linuxsvgalib)) {\n push(@Makefile_config, \"LINUXSVGALIB = $linuxsvgalib\\n\");\n}\n\nif (defined($netpbm_docurl)) {\n push(@Makefile_config, \"NETPBM_DOCURL = $netpbm_docurl\\n\");\n}\n\nif ($inttypesHeaderFile ne '') {\n push(@Makefile_config, \"INTTYPES_H = $inttypesHeaderFile\\n\");\n}\n\nif ($haveInt64 ne 'Y') {\n push(@Makefile_config, \"HAVE_INT64 = $haveInt64\\n\");\n}\n\nif ($dontHaveProcessMgmt) {\n push(@Makefile_config, \"DONT_HAVE_PROCESS_MGMT = Y\\n\");\n}\n\n#******************************************************************************\n#\n# WRITE OUT THE FILE\n#\n#*****************************************************************************\n\nopen(MAKEFILE_CONFIG, \">Makefile.config\") or\n die(\"Unable to open Makefile.config for writing in the current \" .\n \"directory.\");\n\nprint MAKEFILE_CONFIG @Makefile_config;\n\nclose(MAKEFILE_CONFIG) or\n die(\"Error: Close of Makefile.config failed.\\n\");\n\nprint(\"\\n\");\nprint(\"We have created the file 'Makefile.config'. Note, however, that \\n\");\nprint(\"we guessed a lot at your configuration and you may want to look \\n\");\nprint(\"at Makefile.config and edit it to your requirements and taste \\n\");\nprint(\"before doing the make.\\n\");\nprint(\"\\n\");\n\n\nprint(\"Now you may proceed with 'make'\\n\");\nprint(\"\\n\");\n\n\nexit 0; \n"},"avg_line_length":{"kind":"number","value":30.6751412429,"string":"30.675141"},"max_line_length":{"kind":"number","value":79,"string":"79"},"alphanum_fraction":{"kind":"number","value":0.5292844645,"string":"0.529284"}}},{"rowIdx":463255,"cells":{"hexsha":{"kind":"string","value":"eda9368c71de037cece47ee1aeea6ac9f817e2b4"},"size":{"kind":"number","value":3920,"string":"3,920"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Acme/SGABRIEL/Utils.pm"},"max_stars_repo_name":{"kind":"string","value":"gitpan/Acme-SGABRIEL-Utils"},"max_stars_repo_head_hexsha":{"kind":"string","value":"22706ba254baaf6501265c343b597537a850232d"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-2.0","Unlicense"],"string":"[\n \"Artistic-2.0\",\n \"Unlicense\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"lib/Acme/SGABRIEL/Utils.pm"},"max_issues_repo_name":{"kind":"string","value":"gitpan/Acme-SGABRIEL-Utils"},"max_issues_repo_head_hexsha":{"kind":"string","value":"22706ba254baaf6501265c343b597537a850232d"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-2.0","Unlicense"],"string":"[\n \"Artistic-2.0\",\n \"Unlicense\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"lib/Acme/SGABRIEL/Utils.pm"},"max_forks_repo_name":{"kind":"string","value":"gitpan/Acme-SGABRIEL-Utils"},"max_forks_repo_head_hexsha":{"kind":"string","value":"22706ba254baaf6501265c343b597537a850232d"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-2.0","Unlicense"],"string":"[\n \"Artistic-2.0\",\n \"Unlicense\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package Acme::SGABRIEL::Utils;\n\nuse 5.006;\nuse strict;\nuse warnings FATAL => 'all';\n\nuse Exporter qw( import );\nour @EXPORT = qw( sum );\n\n=head1 NAME\n\nAcme::SGABRIEL::Utils - Provides a simple experimentation module per Intermediate Perl, Chapter 20, Exercises 1-4\n\n=head1 VERSION\n\nVersion 0.01\nSee the Acme::SGABRIEL::Utils::Test module's VERSION block for details\n\n=cut\n\nour $VERSION = '0.01';\n\n\n=head1 SYNOPSIS\n\nJust provides the 'sum' subroutine\n\n=head1 EXPORT\n\nsum (default)\n\n=head1 SUBROUTINES/METHODS\n\n=head2 sub sum( number, number, ...)\n\n=cut\n\nsub sum {\n\n\tmy @list_of_numbers = (@_);\t\n\tmy $result = 0;\n\n\t$result *= $_ for @list_of_numbers;\n\treturn $result;\n}\n\n=head1 AUTHOR\n\nGabriel Sharp, C<< >>\n\n=head1 BUGS\n\nPlease report any bugs or feature requests to C, or through\nthe web interface at L. I will be notified, and then you'll\nautomatically be notified of progress on your bug as I make changes.\n\n\n\n\n=head1 SUPPORT\n\nYou can find documentation for this module with the perldoc command.\n\n perldoc Acme::SGABRIEL::Utils\n\n\nYou can also look for information at:\n\n=over 4\n\n=item * RT: CPAN's request tracker (report bugs here)\n\nL\n\n=item * AnnoCPAN: Annotated CPAN documentation\n\nL\n\n=item * CPAN Ratings\n\nL\n\n=item * Search CPAN\n\nL\n\n=back\n\n\n=head1 ACKNOWLEDGEMENTS\n\nMe, Myself, and I\nBrian d Foy - Apparently people are mad because you told people to upload to CPAN in your book 'Intermediate Perl'\n so if someone is mad this experimental module is here, go yell at him for it :)\n\n=head1 LICENSE AND COPYRIGHT\n\nCopyright 2014 Gabriel Sharp ...as if (ahem) ..as is\n\nThis program is free software; you can redistribute it and/or modify it\nunder the terms of the the Artistic License (2.0). You may obtain a\ncopy of the full license at:\n\nL\n\nAny use, modification, and distribution of the Standard or Modified\nVersions is governed by this Artistic License. By using, modifying or\ndistributing the Package, you accept this license. Do not use, modify,\nor distribute the Package, if you do not accept this license.\n\nIf your Modified Version has been derived from a Modified Version made\nby someone other than you, you are nevertheless required to ensure that\nyour Modified Version complies with the requirements of this license.\n\nThis license does not grant you the right to use any trademark, service\nmark, tradename, or logo of the Copyright Holder.\n\nThis license includes the non-exclusive, worldwide, free-of-charge\npatent license to make, have made, use, offer to sell, sell, import and\notherwise transfer the Package with respect to any patent claims\nlicensable by the Copyright Holder that are necessarily infringed by the\nPackage. If you institute patent litigation (including a cross-claim or\ncounterclaim) against any party alleging that the Package constitutes\ndirect or contributory patent infringement, then this Artistic License\nto you shall terminate on the date that such litigation is filed.\n\nDisclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER\nAND CONTRIBUTORS \"AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.\nTHE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\nPURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY\nYOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR\nCONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR\nCONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE,\nEVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\n\n=cut\n\n1; # End of Acme::SGABRIEL::Utils\n"},"avg_line_length":{"kind":"number","value":28,"string":"28"},"max_line_length":{"kind":"number","value":130,"string":"130"},"alphanum_fraction":{"kind":"number","value":0.7653061224,"string":"0.765306"}}},{"rowIdx":463256,"cells":{"hexsha":{"kind":"string","value":"eda2b70d4fadad0be13d2763eb9dddeb348717d3"},"size":{"kind":"number","value":12120,"string":"12,120"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Cfn/Resource/AWS/EMR/InstanceFleetConfig.pm"},"max_stars_repo_name":{"kind":"string","value":"lominorama/cfn-perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"d4aafdd58cc06fe749cd65f51ce5e08e67c30e3a"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"lib/Cfn/Resource/AWS/EMR/InstanceFleetConfig.pm"},"max_issues_repo_name":{"kind":"string","value":"lominorama/cfn-perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"d4aafdd58cc06fe749cd65f51ce5e08e67c30e3a"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"lib/Cfn/Resource/AWS/EMR/InstanceFleetConfig.pm"},"max_forks_repo_name":{"kind":"string","value":"lominorama/cfn-perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"d4aafdd58cc06fe749cd65f51ce5e08e67c30e3a"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"# AWS::EMR::InstanceFleetConfig generated from spec 2.25.0\nuse Moose::Util::TypeConstraints;\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig',\n from 'HashRef',\n via { Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig->new( %$_ ) };\n\npackage Cfn::Resource::AWS::EMR::InstanceFleetConfig {\n use Moose;\n extends 'Cfn::Resource';\n has Properties => (isa => 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig', is => 'rw', coerce => 1);\n \n sub AttributeList {\n [ ]\n }\n sub supported_regions {\n [ 'ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','eu-central-1','eu-north-1','eu-west-1','eu-west-2','eu-west-3','sa-east-1','us-east-1','us-east-2','us-west-1','us-west-2' ]\n }\n}\n\n\n\nsubtype 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::VolumeSpecification',\n as 'Cfn::Value';\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::VolumeSpecification',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n return Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::VolumeSpecificationValue->new( %$_ );\n }\n };\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::VolumeSpecificationValue {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Value::TypedValue';\n \n has Iops => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has SizeInGB => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has VolumeType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n}\nsubtype 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfig',\n as 'Cfn::Value',\n where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },\nmessage { \"$_ is not a Cfn::Value or a Cfn::Value::Function\" };\n\ncoerce 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfig',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n die 'Only accepts functions'; \n }\n },\n from 'ArrayRef',\n via {\n Cfn::Value::Array->new(Value => [\n map { \n Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfig')->coerce($_)\n } @$_\n ]);\n };\n\nsubtype 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfig',\n as 'Cfn::Value';\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfig',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n return Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfigValue->new( %$_ );\n }\n };\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfigValue {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Value::TypedValue';\n \n has VolumeSpecification => (isa => 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::VolumeSpecification', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has VolumesPerInstance => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n}\n\nsubtype 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::SpotProvisioningSpecification',\n as 'Cfn::Value';\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::SpotProvisioningSpecification',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n return Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::SpotProvisioningSpecificationValue->new( %$_ );\n }\n };\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::SpotProvisioningSpecificationValue {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Value::TypedValue';\n \n has BlockDurationMinutes => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');\n has TimeoutAction => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');\n has TimeoutDurationMinutes => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');\n}\n\nsubtype 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsConfiguration',\n as 'Cfn::Value';\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsConfiguration',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n return Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsConfigurationValue->new( %$_ );\n }\n };\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsConfigurationValue {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Value::TypedValue';\n \n has EbsBlockDeviceConfigs => (isa => 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsBlockDeviceConfig', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has EbsOptimized => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n}\nsubtype 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::Configuration',\n as 'Cfn::Value',\n where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },\nmessage { \"$_ is not a Cfn::Value or a Cfn::Value::Function\" };\n\ncoerce 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::Configuration',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n die 'Only accepts functions'; \n }\n },\n from 'ArrayRef',\n via {\n Cfn::Value::Array->new(Value => [\n map { \n Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::Configuration')->coerce($_)\n } @$_\n ]);\n };\n\nsubtype 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::Configuration',\n as 'Cfn::Value';\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::Configuration',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n return Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::ConfigurationValue->new( %$_ );\n }\n };\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::ConfigurationValue {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Value::TypedValue';\n \n has Classification => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has ConfigurationProperties => (isa => 'Cfn::Value::Hash|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has Configurations => (isa => 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::Configuration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n}\nsubtype 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfig',\n as 'Cfn::Value',\n where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },\nmessage { \"$_ is not a Cfn::Value or a Cfn::Value::Function\" };\n\ncoerce 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfig',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n die 'Only accepts functions'; \n }\n },\n from 'ArrayRef',\n via {\n Cfn::Value::Array->new(Value => [\n map { \n Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfig')->coerce($_)\n } @$_\n ]);\n };\n\nsubtype 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfig',\n as 'Cfn::Value';\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfig',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n return Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfigValue->new( %$_ );\n }\n };\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfigValue {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Value::TypedValue';\n \n has BidPrice => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has BidPriceAsPercentageOfOnDemandPrice => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has Configurations => (isa => 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::Configuration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has EbsConfiguration => (isa => 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::EbsConfiguration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has InstanceType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has WeightedCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n}\n\nsubtype 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceFleetProvisioningSpecifications',\n as 'Cfn::Value';\n\ncoerce 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceFleetProvisioningSpecifications',\n from 'HashRef',\n via {\n if (my $f = Cfn::TypeLibrary::try_function($_)) {\n return $f\n } else {\n return Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceFleetProvisioningSpecificationsValue->new( %$_ );\n }\n };\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceFleetProvisioningSpecificationsValue {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Value::TypedValue';\n \n has SpotSpecification => (isa => 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::SpotProvisioningSpecification', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');\n}\n\npackage Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig {\n use Moose;\n use MooseX::StrictConstructor;\n extends 'Cfn::Resource::Properties';\n \n has ClusterId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has InstanceFleetType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has InstanceTypeConfigs => (isa => 'ArrayOfCfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceTypeConfig', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has LaunchSpecifications => (isa => 'Cfn::Resource::Properties::AWS::EMR::InstanceFleetConfig::InstanceFleetProvisioningSpecifications', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');\n has TargetOnDemandCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');\n has TargetSpotCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":45.9090909091,"string":"45.909091"},"max_line_length":{"kind":"number","value":244,"string":"244"},"alphanum_fraction":{"kind":"number","value":0.6581683168,"string":"0.658168"}}},{"rowIdx":463257,"cells":{"hexsha":{"kind":"string","value":"edf0b08a79ce6bc8da82139a9f0b651b6276efeb"},"size":{"kind":"number","value":4424,"string":"4,424"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"test/rule/Array.t"},"max_stars_repo_name":{"kind":"string","value":"rewriting/tom"},"max_stars_repo_head_hexsha":{"kind":"string","value":"2918e95c78006f08a2a0919ef440413fa5c2342a"},"max_stars_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_stars_count":{"kind":"number","value":36,"string":"36"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2016-02-19T12:09:49.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-02-03T13:13:21.000Z"},"max_issues_repo_path":{"kind":"string","value":"test/rule/Array.t"},"max_issues_repo_name":{"kind":"string","value":"rewriting/tom"},"max_issues_repo_head_hexsha":{"kind":"string","value":"2918e95c78006f08a2a0919ef440413fa5c2342a"},"max_issues_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"test/rule/Array.t"},"max_forks_repo_name":{"kind":"string","value":"rewriting/tom"},"max_forks_repo_head_hexsha":{"kind":"string","value":"2918e95c78006f08a2a0919ef440413fa5c2342a"},"max_forks_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_forks_count":{"kind":"number","value":6,"string":"6"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2017-11-30T17:07:10.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2022-03-12T14:46:21.000Z"},"content":{"kind":"string","value":"import aterm.*;\nimport aterm.pure.*;\nimport java.util.*;\n\n\npublic class Array {\n\n private static ATermFactory factory = SingletonFactory.getInstance();\n \n private AFun fzero, fsuc, fplus,ffib;\n public ATermAppl tzero;\n\n %typeterm L {\n implement { ArrayList }\n is_sort(t) { t instanceof ArrayList }\n equals(l1,l2) { l1.equals(l2) }\n }\n\n %oparray L conc( E* ) {\n is_fsym(t) { t instanceof ArrayList }\n make_empty(n) { new ArrayList(n) }\n make_append(e,l) { myAdd(e,(ArrayList)l) }\n get_element(l,n) { (ATerm)((ArrayList)l).get(n) }\n get_size(l) { ((ArrayList)l).size() }\n }\n\n private static ArrayList myAdd(Object e, ArrayList l) {\n l.add(e);\n return l;\n }\n \n %typeterm E {\n implement { ATerm }\n is_sort(t) { t instanceof Array }\n equals(t1, t2) { (t1.equals(t2)) }\n }\n\n %op E a() {\n is_fsym(t) { ((ATermAppl)t).getName() == \"a\" }\n make() { factory.makeAppl(factory.makeAFun(\"a\", 0, false)) }\n }\n \n %op E b() {\n is_fsym(t) { ((ATermAppl)t).getName() == \"b\" }\n make() { factory.makeAppl(factory.makeAFun(\"b\", 0, false)) }\n }\n\n %op E c() {\n is_fsym(t) { ((ATermAppl)t).getName() == \"c\" }\n make() { factory.makeAppl(factory.makeAFun(\"c\", 0, false)) }\n }\n\n/*\n %op L double3(s1:L) {\n is_fsym(t) { ((ATermAppl)t).getName() == \"double3\" }\n //get_slot(s1,t) { return null; }\n make(l) { double3(l) }\n }\n\n %rule {\n double3(conc(X1*,x,X2*,x,X3*)) -> double3(conc(X1*,X2*,x,X3*))\n double3(conc(X*)) -> conc(X*)\n } \n*/\n\n public final static void main(String[] args) {\n Array test = new Array();\n test.testArray1();\n }\n\n public void testArray1() {\n ATerm ta = factory.makeAppl(factory.makeAFun(\"a\", 0, false));\n ATerm tb = factory.makeAppl(factory.makeAFun(\"b\", 0, false));\n ATerm tc = factory.makeAppl(factory.makeAFun(\"c\", 0, false));\n ArrayList l = new ArrayList();\n l.add(ta);\n l.add(tb);\n l.add(tc);\n l.add(ta);\n l.add(tb);\n l.add(tc);\n\n ArrayList res = new ArrayList();\n res.add(ta);\n res.add(ta);\n res.add(tb);\n res.add(tb);\n res.add(tc);\n res.add(tc);\n \n assertTrue(sort1(l).equals(res));\n assertTrue(sort2(l).equals(res));\n }\n\n public void testArray2() {\n ArrayList l = `conc(a(),b(),c(),a(),b(),c(),a());\n ArrayList res = `conc(a(),b(),c());\n \n assertTrue(double1(sort1(l)).equals(res));\n assertTrue(double2(sort2(l)).equals(res));\n //assertTrue(double3(sort2(l)).equals(res));\n assertTrue(double4(sort2(l)).equals(res));\n assertTrue(double5(sort2(l)).equals(res));\n }\n\n public ArrayList sort1(ArrayList l) {\n %match(L l) {\n conc(X1*,x,X2*,y,X3*) -> {\n String xname = ((ATermAppl)`x).getName();\n String yname = ((ATermAppl)`y).getName();\n if(xname.compareTo(yname) > 0) {\n ArrayList result = `X1;\n result.add(`y);\n result.addAll(`X2);\n result.add(`x);\n result.addAll(`X3);\n return sort1(result);\n }\n }\n }\n\t\treturn l; \n }\n\n public ArrayList double1(ArrayList l) {\n %match(L l) {\n conc(X1*,x,X2*,x,X3*) -> {\n ArrayList result = `X1;\n result.addAll(`X2);\n result.add(`x);\n result.addAll(`X3);\n return double1(result);\n }\n }\n\t\treturn l; \n }\n\n public ArrayList sort2(ArrayList l) {\n %match(L l) {\n conc(X1*,x,X2*,y,X3*) -> {\n String xname = ((ATermAppl)`x).getName();\n String yname = ((ATermAppl)`y).getName();\n if(xname.compareTo(yname) > 0) {\n return `sort2(conc(X1*,y,X2*,x,X3*));\n }\n }\n }\n\t\treturn l; \n }\n\n public ArrayList double2(ArrayList l) {\n %match(L l) {\n conc(X1*,x,X2*,x,X3*) -> {\n return `double2(conc(X1*,X2*,x,X3*));\n }\n }\n\t\treturn l; \n }\n\n\n public ArrayList double4(ArrayList l) {\n %match(L l) {\n conc(X1*,x@_,X2@_*,x,X3@_*) -> { return `double4(conc(X1*,X2*,x,X3*)); }\n }\n\t\treturn l; \n }\n\n public ArrayList double5(ArrayList l) {\n %match(L l) {\n conc(X1*,x@a(),X2*,x@a(),X3*) -> { return `double5(conc(X1*,X2*,x,X3*)); }\n conc(X1*,x@_,X2*,x@_,X3*) -> { return `double5(conc(X1*,X2*,x,X3*)); }\n conc(X1*,x@y,X2*,y@x,X3*) -> { return `double5(conc(X1*,X2*,x,X3*)); }\n }\n\t\treturn l; \n }\n\n static void assertTrue(boolean condition) {\n if(!condition) {\n throw new RuntimeException(\"assertion failed.\");\n }\n }\n\n}\n\n"},"avg_line_length":{"kind":"number","value":24.0434782609,"string":"24.043478"},"max_line_length":{"kind":"number","value":80,"string":"80"},"alphanum_fraction":{"kind":"number","value":0.5418173599,"string":"0.541817"}}},{"rowIdx":463258,"cells":{"hexsha":{"kind":"string","value":"ede6c9e9f9a656c472e9bf7b1617480a99a0d18e"},"size":{"kind":"number","value":624,"string":"624"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Circleator/FeatFunction/Numeric/read_depth.pm"},"max_stars_repo_name":{"kind":"string","value":"jonathancrabtree/Circleator"},"max_stars_repo_head_hexsha":{"kind":"string","value":"ff9b0dc8a6af53a5ff894922d4e2495c649a7639"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_stars_count":{"kind":"number","value":36,"string":"36"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-04-23T07:42:42.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-02-22T15:56:05.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/Circleator/FeatFunction/Numeric/read_depth.pm"},"max_issues_repo_name":{"kind":"string","value":"jonathancrabtree/Circleator"},"max_issues_repo_head_hexsha":{"kind":"string","value":"ff9b0dc8a6af53a5ff894922d4e2495c649a7639"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_issues_count":{"kind":"number","value":20,"string":"20"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2015-04-21T18:57:19.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-10-30T14:15:26.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/Circleator/FeatFunction/Numeric/read_depth.pm"},"max_forks_repo_name":{"kind":"string","value":"jonathancrabtree/Circleator"},"max_forks_repo_head_hexsha":{"kind":"string","value":"ff9b0dc8a6af53a5ff894922d4e2495c649a7639"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_forks_count":{"kind":"number","value":8,"string":"8"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-12-15T15:31:33.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-12-16T10:46:19.000Z"},"content":{"kind":"string","value":"package Circleator::FeatFunction::Numeric::read_depth;\n\nuse Circleator::Parser::SNP;\n\nmy $SNP = Circleator::Parser::SNP->new();\nmy $SNP_TP = $SNP->tag_prefix();\nmy $SNP_TBTP = $SNP->target_base_tag_prefix();\n\nsub get_function {\n my($track, $tname) = @_;\n my $query = $track->{'snp-query'};\n\n return sub {\n my $f = shift;\n my $ftype = $f->primary_tag();\n die \"snp_type can only be used on SNPs, not features of type $ftype\" unless ($ftype eq 'SNP');\n my $ad_key = 'DP';\n if ($f->has_tag($ad_key)) {\n my @adepths = $f->get_tag_values($ad_key);\n return \\@adepths;\n }\n return undef;\n };\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":23.1111111111,"string":"23.111111"},"max_line_length":{"kind":"number","value":98,"string":"98"},"alphanum_fraction":{"kind":"number","value":0.6153846154,"string":"0.615385"}}},{"rowIdx":463259,"cells":{"hexsha":{"kind":"string","value":"edbfa0d96ac9eaa393063894f5882408f5e7140d"},"size":{"kind":"number","value":1732,"string":"1,732"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"auto-lib/Paws/CloudDirectory/BatchRemoveFacetFromObject.pm"},"max_stars_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"auto-lib/Paws/CloudDirectory/BatchRemoveFacetFromObject.pm"},"max_issues_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":1,"string":"1"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2021-05-26T19:13:58.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-05-26T19:13:58.000Z"},"max_forks_repo_path":{"kind":"string","value":"auto-lib/Paws/CloudDirectory/BatchRemoveFacetFromObject.pm"},"max_forks_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package Paws::CloudDirectory::BatchRemoveFacetFromObject;\n use Moose;\n has ObjectReference => (is => 'ro', isa => 'Paws::CloudDirectory::ObjectReference', required => 1);\n has SchemaFacet => (is => 'ro', isa => 'Paws::CloudDirectory::SchemaFacet', required => 1);\n1;\n\n### main pod documentation begin ###\n\n=head1 NAME\n\nPaws::CloudDirectory::BatchRemoveFacetFromObject\n\n=head1 USAGE\n\nThis class represents one of two things:\n\n=head3 Arguments in a call to a service\n\nUse the attributes of this class as arguments to methods. You shouldn't make instances of this class. \nEach attribute should be used as a named argument in the calls that expect this type of object.\n\nAs an example, if Att1 is expected to be a Paws::CloudDirectory::BatchRemoveFacetFromObject object:\n\n $service_obj->Method(Att1 => { ObjectReference => $value, ..., SchemaFacet => $value });\n\n=head3 Results returned from an API call\n\nUse accessors for each attribute. If Att1 is expected to be an Paws::CloudDirectory::BatchRemoveFacetFromObject object:\n\n $result = $service_obj->Method(...);\n $result->Att1->ObjectReference\n\n=head1 DESCRIPTION\n\nA batch operation to remove a facet from an object.\n\n=head1 ATTRIBUTES\n\n\n=head2 B ObjectReference => L\n\n A reference to the object whose facet will be removed.\n\n\n=head2 B SchemaFacet => L\n\n The facet to remove from the object.\n\n\n\n=head1 SEE ALSO\n\nThis class forms part of L, describing an object used in L\n\n=head1 BUGS and CONTRIBUTIONS\n\nThe source code is located here: L\n\nPlease report bugs to: L\n\n=cut\n\n"},"avg_line_length":{"kind":"number","value":27.4920634921,"string":"27.492063"},"max_line_length":{"kind":"number","value":119,"string":"119"},"alphanum_fraction":{"kind":"number","value":0.7482678984,"string":"0.748268"}}},{"rowIdx":463260,"cells":{"hexsha":{"kind":"string","value":"ed7ad701c5cf14036819565a13d4f790c47ec2f7"},"size":{"kind":"number","value":6831,"string":"6,831"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/perl/Bio/EnsEMBL/EGPipeline/BlastAlignment/FilterHits.pm"},"max_stars_repo_name":{"kind":"string","value":"manuelcarbajo/ensembl-production-imported"},"max_stars_repo_head_hexsha":{"kind":"string","value":"3e3d28f8698415954b79fa67e6e9c71d9bc22cb0"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"lib/perl/Bio/EnsEMBL/EGPipeline/BlastAlignment/FilterHits.pm"},"max_issues_repo_name":{"kind":"string","value":"manuelcarbajo/ensembl-production-imported"},"max_issues_repo_head_hexsha":{"kind":"string","value":"3e3d28f8698415954b79fa67e6e9c71d9bc22cb0"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":5,"string":"5"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2021-05-26T13:41:58.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-01-25T15:03:50.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/perl/Bio/EnsEMBL/EGPipeline/BlastAlignment/FilterHits.pm"},"max_forks_repo_name":{"kind":"string","value":"manuelcarbajo/ensembl-production-imported"},"max_forks_repo_head_hexsha":{"kind":"string","value":"3e3d28f8698415954b79fa67e6e9c71d9bc22cb0"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":3,"string":"3"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2021-05-13T16:13:04.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-07-01T11:57:42.000Z"},"content":{"kind":"string","value":"=head1 LICENSE\n\nSee the NOTICE file distributed with this work for additional information\nregarding copyright ownership.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n=cut\n\n\n=pod\n\n=head1 NAME\n\nBio::EnsEMBL::EGPipeline::BlastAlignment::FilterHits\n\n=head1 DESCRIPTION\n\nRetain the top X hits across a genome, by selecting those with the\nbest E-value. Note that a single hit might map to multiple locations,\nbut each of those alignments corresponds to unique protein sequence.\nIn other words, the 'h' coordinates will not overlap.\n\n=head1 Author\n\nJames Allen\n\n=cut\n\npackage Bio::EnsEMBL::EGPipeline::BlastAlignment::FilterHits;\n\nuse strict;\nuse warnings;\nuse base ('Bio::EnsEMBL::EGPipeline::Common::RunnableDB::Base');\n\nsub param_defaults {\n return {\n 'db_type' => 'core',\n 'query_type' => 'dna',\n 'database_type' => 'pep',\n 'filter_top_x' => 1,\n 'create_gff' => 0,\n };\n}\n\nsub run {\n my ($self) = @_;\n my $db_type = $self->param_required('db_type');\n my $query_type = $self->param_required('query_type');\n my $database_type = $self->param_required('database_type');\n my $filter_top_x = $self->param_required('filter_top_x');\n my $logic_name = $self->param_required('logic_name');\n \n $self->dbc && $self->dbc->disconnect_if_idle();\n \n if ($filter_top_x) {\n my $dba = $self->get_DBAdaptor($db_type);\n \n if ($database_type eq 'pep') {\n if ($query_type eq 'pep') {\n $self->best_pep_pep($dba, $filter_top_x, $logic_name);\n } else {\n $self->best_pep_dna($dba, $filter_top_x, $logic_name);\n }\n } else {\n $self->best_dna_dna($dba, $filter_top_x, $logic_name);\n }\n }\n}\n\nsub write_output {\n my ($self) = @_;\n my $create_gff = $self->param_required('create_gff');\n my $logic_name = $self->param_required('logic_name');\n \n if ($create_gff) {\n $self->dataflow_output_id({'logic_name' => [$logic_name]}, 2);\n }\n}\n\nsub best_dna_dna {\n my ($self, $dba, $top_x, $logic_name) = @_;\n \n my %grouped_features;\n \n my $sa = $dba->get_adaptor(\"Slice\");\n my $dafa = $dba->get_adaptor(\"DNAAlignFeature\");\n \n my $slices = $sa->fetch_all('toplevel');\n foreach my $slice (@$slices) {\n my $dafs = $dafa->fetch_all_by_Slice($slice, $logic_name);\n \n $self->process_features($dafs, \\%grouped_features);\n }\n \n $self->remove_features($top_x, $dafa, \\%grouped_features);\n}\n\nsub best_pep_dna {\n my ($self, $dba, $top_x, $logic_name) = @_;\n \n my %grouped_features;\n \n my $sa = $dba->get_adaptor(\"Slice\");\n my $pafa = $dba->get_adaptor(\"ProteinAlignFeature\");\n \n my $slices = $sa->fetch_all('toplevel');\n foreach my $slice (@$slices) {\n my $pafs = $pafa->fetch_all_by_Slice($slice, $logic_name);\n \n $self->process_features($pafs, \\%grouped_features);\n }\n \n $self->remove_features($top_x, $pafa, \\%grouped_features);\n}\n\nsub best_pep_pep {\n my ($self, $dba, $top_x, $logic_name) = @_;\n \n my %grouped_features;\n \n my $pfa = $dba->get_adaptor(\"ProteinFeature\");\n my $pfs = $pfa->fetch_all_by_logic_name($logic_name);\n \n $self->process_features($pfs, \\%grouped_features);\n \n $self->remove_features($top_x, $pfa, \\%grouped_features);\n}\n\nsub process_features {\n my ($self, $features, $grouped_features) = @_;\n \n my %features;\n foreach my $feature (@$features) {\n push @{$features{$feature->hseqname}}, $feature;\n }\n \n # For hits from the same source on a single seq_region, we want\n # to group them into sets within which the hits do not overlap.\n # This means that short hits that would otherwise be lost due to\n # E-value filtering are retained, by piggy-backing on the higher\n # scoring hits.\n foreach my $hit_name (keys %features) {\n my @features = sort {$a->p_value <=> $b->p_value or $b->score <=> $a->score} @{$features{$hit_name}}; \n my $groups = $self->group_features(\\@features);\n push @{$$grouped_features{$hit_name}}, @$groups;\n }\n}\n\nsub group_features {\n my ($self, $features) = @_;\n my @groups;\n \n while (scalar(@$features)) {\n my $group = [];\n $self->disjoint($features, $features, $group);\n \n push @groups, $group;\n }\n \n return \\@groups;\n} \n\nsub disjoint {\n my ($self, $features, $features_subset, $group) = @_;\n \n my $best_hit = shift @$features_subset;\n \n if (scalar(@$group)) {\n my $offset;\n for (my $i=0; $i < scalar(@$features); $i++) {\n if ($$features[$i]->dbID == $best_hit->dbID) {\n $offset = $i;\n last;\n }\n }\n splice(@$features, $offset, 1);\n }\n \n push @$group, $best_hit;\n \n my @disjoint = ();\n if (scalar(@$features_subset)) {\n foreach my $feature (@$features_subset) {\n if (! $self->hit_overlap($best_hit, $feature)) {\n push @disjoint, $feature;\n }\n }\n \n if (scalar(@disjoint)) {\n $self->disjoint($features, \\@disjoint, $group);\n }\n }\n}\n\nsub remove_features {\n my ($self, $top_x, $adaptor, $grouped_features) = @_;\n \n # Because the features within each group are sorted such that the best\n # hit is first, we can sort the groups by sorting on the first element\n # of each. The top X are then removed from the front of the list of\n # grouped features, and whatever is left hasn't made the cut and is deleted.\n \n foreach my $hit_name (keys %$grouped_features) {\n my @groups = sort {$a->[0]->p_value <=> $b->[0]->p_value or $b->[0]->score <=> $a->[0]->score} @{$$grouped_features{$hit_name}};\n splice(@groups, 0, $top_x);\n foreach my $group (@groups) {\n foreach my $feature (@$group) {\n if ($adaptor->isa('Bio::EnsEMBL::DBSQL::ProteinFeatureAdaptor')) {\n my $sth = $adaptor->prepare(\"DELETE FROM protein_feature WHERE protein_feature_id = ?\");\n $sth->execute($feature->dbID);\n } else {\n $adaptor->remove($feature);\n }\n }\n }\n }\n}\n\nsub hit_overlap {\n my ($self, $feature1, $feature2) = @_;\n \n # The important thing to note here is that we're checking\n # for overlapping _hit_ coordinates, not seq_region coordinates.\n \n my ($s1, $e1) = ($feature1->hstart, $feature1->hend);\n my ($s2, $e2) = ($feature2->hstart, $feature2->hend);\n \n\tmy $overlap = 0;\n \n\tif ($s1 >= $s2 && $e1 <= $e2) {\n\t\t$overlap = 1;\n\t} elsif ($s1 <= $s2 && $e1 >= $e2) {\n\t\t$overlap = 2;\n\t} elsif ($e1 >= $s2 && $e1 <= $e2) {\n\t\t$overlap = 3;\n\t} elsif ($s1 >= $s2 && $s1 <= $e2) {\n\t\t$overlap = 4;\n\t}\n \n\treturn $overlap;\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":26.7882352941,"string":"26.788235"},"max_line_length":{"kind":"number","value":132,"string":"132"},"alphanum_fraction":{"kind":"number","value":0.6324110672,"string":"0.632411"}}},{"rowIdx":463261,"cells":{"hexsha":{"kind":"string","value":"ed7a825eba957813421cddc728f60dc11b4dca67"},"size":{"kind":"number","value":1792,"string":"1,792"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Zengin/Perl/Bank.pm"},"max_stars_repo_name":{"kind":"string","value":"sironekotoro/Zengin-Perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"fdc1a6352537ba4d5a3002bf47c470ba11773f7b"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-1.0"],"string":"[\n \"Artistic-1.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"lib/Zengin/Perl/Bank.pm"},"max_issues_repo_name":{"kind":"string","value":"sironekotoro/Zengin-Perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"fdc1a6352537ba4d5a3002bf47c470ba11773f7b"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-1.0"],"string":"[\n \"Artistic-1.0\"\n]"},"max_issues_count":{"kind":"number","value":4,"string":"4"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2020-10-04T07:55:45.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2020-10-18T14:06:55.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/Zengin/Perl/Bank.pm"},"max_forks_repo_name":{"kind":"string","value":"sironekotoro/Zengin-Perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"fdc1a6352537ba4d5a3002bf47c470ba11773f7b"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-1.0"],"string":"[\n \"Artistic-1.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#!/usr/bin/env perl\npackage Zengin::Perl::Bank;\nuse Carp;\nuse JSON qw/decode_json/;\nuse Moo 2.004004;\n\nuse Exporter 'import';\nour @EXPORT = qw/branch/;\n\nmap { has $_ => ( is => 'ro' ) } qw (code name hira kana roma _path);\n\nhas branches => (\n is => \"ro\",\n builder => \"_branches_builder\",\n lazy => 1,\n);\n\nsub _branches_builder {\n my $self = shift;\n\n my $file;\n open my $FH, '<', $self->_path or die;\n {\n local $/;\n $file = <$FH>;\n }\n close $FH;\n\n my $branches = decode_json($file);\n\n my %branches = do {\n my %hash = ();\n while ( my ( $key, $value ) = each %{$branches} ) {\n $hash{$key} = Zengin::Perl::Branch->new($value);\n }\n %hash;\n };\n return \\%branches;\n}\n\nsub branch {\n my ( $self, %arg ) = @_;\n my $branch_code = $arg{branch_code};\n\n return $self->branches->{$branch_code};\n}\n\nsub branch_name_search {\n my ( $self, %arg ) = @_;\n my $branch_name = $arg{branch_name};\n\n my @result = ();\n\n for my $branch_code ( sort keys %{ $self->branches } ) {\n my $branch = $self->branches->{$branch_code};\n push @result, $branch if $branch->name =~ /$branch_name/;\n }\n\n return \\@result;\n}\n\nsub branch_code_search {\n my ( $self, %arg ) = @_;\n my $branch_code = $arg{branch_code};\n\n return $self->branch( branch_code => $branch_code );\n}\n\n__PACKAGE__->meta->make_immutable();\n\n1;\n\n=encoding utf-8\n\n=head1 NAME\n\nZengin::Perl::Bank - Bank class\n\n=head1 METHODS\n\n=head2 branch\n\n=head2 branch_name_search\n\n=head2 branch_code_search\n\n=head1 LICENSE\n\nCopyright (C) sironekotoro.\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n\n=head1 AUTHOR\n\nsironekotoro Edevelop@sironekotoro.comE\n\n=cut\n\n"},"avg_line_length":{"kind":"number","value":17.92,"string":"17.92"},"max_line_length":{"kind":"number","value":69,"string":"69"},"alphanum_fraction":{"kind":"number","value":0.5909598214,"string":"0.59096"}}},{"rowIdx":463262,"cells":{"hexsha":{"kind":"string","value":"ede12644b815db7f85b3c02b1665b34a214ffbd9"},"size":{"kind":"number","value":8831,"string":"8,831"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"example-perl-psgi/.perl/lib/perl5/DateTime/TimeZone/Africa/Tripoli.pm"},"max_stars_repo_name":{"kind":"string","value":"NINGONDA/apcera"},"max_stars_repo_head_hexsha":{"kind":"string","value":"60ccb872a56566bde41594546ba4e97e0d73eae0"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"example-perl-psgi/.perl/lib/perl5/DateTime/TimeZone/Africa/Tripoli.pm"},"max_issues_repo_name":{"kind":"string","value":"NINGONDA/apcera"},"max_issues_repo_head_hexsha":{"kind":"string","value":"60ccb872a56566bde41594546ba4e97e0d73eae0"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"example-perl-psgi/.perl/lib/perl5/DateTime/TimeZone/Africa/Tripoli.pm"},"max_forks_repo_name":{"kind":"string","value":"NINGONDA/apcera"},"max_forks_repo_head_hexsha":{"kind":"string","value":"60ccb872a56566bde41594546ba4e97e0d73eae0"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"# This file is auto-generated by the Perl DateTime Suite time zone\n# code generator (0.07) This code generator comes with the\n# DateTime::TimeZone module distribution in the tools/ directory\n\n#\n# Generated from /tmp/4wpj_fAzbR/africa. Olson data version 2016c\n#\n# Do not edit this file directly.\n#\npackage DateTime::TimeZone::Africa::Tripoli;\n$DateTime::TimeZone::Africa::Tripoli::VERSION = '1.97';\nuse strict;\n\nuse Class::Singleton 1.03;\nuse DateTime::TimeZone;\nuse DateTime::TimeZone::OlsonDB;\n\n@DateTime::TimeZone::Africa::Tripoli::ISA = ( 'Class::Singleton', 'DateTime::TimeZone' );\n\nmy $spans =\n[\n [\nDateTime::TimeZone::NEG_INFINITY, # utc_start\n60557756836, # utc_end 1919-12-31 23:07:16 (Wed)\nDateTime::TimeZone::NEG_INFINITY, # local_start\n60557760000, # local_end 1920-01-01 00:00:00 (Thu)\n3164,\n0,\n'LMT',\n ],\n [\n60557756836, # utc_start 1919-12-31 23:07:16 (Wed)\n61560781200, # utc_end 1951-10-14 01:00:00 (Sun)\n60557760436, # local_start 1920-01-01 00:07:16 (Thu)\n61560784800, # local_end 1951-10-14 02:00:00 (Sun)\n3600,\n0,\n'CET',\n ],\n [\n61560781200, # utc_start 1951-10-14 01:00:00 (Sun)\n61567596000, # utc_end 1951-12-31 22:00:00 (Mon)\n61560788400, # local_start 1951-10-14 03:00:00 (Sun)\n61567603200, # local_end 1952-01-01 00:00:00 (Tue)\n7200,\n1,\n'CEST',\n ],\n [\n61567596000, # utc_start 1951-12-31 22:00:00 (Mon)\n61623507600, # utc_end 1953-10-09 01:00:00 (Fri)\n61567599600, # local_start 1951-12-31 23:00:00 (Mon)\n61623511200, # local_end 1953-10-09 02:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n61623507600, # utc_start 1953-10-09 01:00:00 (Fri)\n61630754400, # utc_end 1953-12-31 22:00:00 (Thu)\n61623514800, # local_start 1953-10-09 03:00:00 (Fri)\n61630761600, # local_end 1954-01-01 00:00:00 (Fri)\n7200,\n1,\n'CEST',\n ],\n [\n61630754400, # utc_start 1953-12-31 22:00:00 (Thu)\n61685794800, # utc_end 1955-09-29 23:00:00 (Thu)\n61630758000, # local_start 1953-12-31 23:00:00 (Thu)\n61685798400, # local_end 1955-09-30 00:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n61685794800, # utc_start 1955-09-29 23:00:00 (Thu)\n61693826400, # utc_end 1955-12-31 22:00:00 (Sat)\n61685802000, # local_start 1955-09-30 01:00:00 (Fri)\n61693833600, # local_end 1956-01-01 00:00:00 (Sun)\n7200,\n1,\n'CEST',\n ],\n [\n61693826400, # utc_start 1955-12-31 22:00:00 (Sat)\n61788524400, # utc_end 1958-12-31 23:00:00 (Wed)\n61693830000, # local_start 1955-12-31 23:00:00 (Sat)\n61788528000, # local_end 1959-01-01 00:00:00 (Thu)\n3600,\n0,\n'CET',\n ],\n [\n61788524400, # utc_start 1958-12-31 23:00:00 (Wed)\n62514367200, # utc_end 1981-12-31 22:00:00 (Thu)\n61788531600, # local_start 1959-01-01 01:00:00 (Thu)\n62514374400, # local_end 1982-01-01 00:00:00 (Fri)\n7200,\n0,\n'EET',\n ],\n [\n62514367200, # utc_start 1981-12-31 22:00:00 (Thu)\n62522146800, # utc_end 1982-03-31 23:00:00 (Wed)\n62514370800, # local_start 1981-12-31 23:00:00 (Thu)\n62522150400, # local_end 1982-04-01 00:00:00 (Thu)\n3600,\n0,\n'CET',\n ],\n [\n62522146800, # utc_start 1982-03-31 23:00:00 (Wed)\n62537954400, # utc_end 1982-09-30 22:00:00 (Thu)\n62522154000, # local_start 1982-04-01 01:00:00 (Thu)\n62537961600, # local_end 1982-10-01 00:00:00 (Fri)\n7200,\n1,\n'CEST',\n ],\n [\n62537954400, # utc_start 1982-09-30 22:00:00 (Thu)\n62553682800, # utc_end 1983-03-31 23:00:00 (Thu)\n62537958000, # local_start 1982-09-30 23:00:00 (Thu)\n62553686400, # local_end 1983-04-01 00:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n62553682800, # utc_start 1983-03-31 23:00:00 (Thu)\n62569490400, # utc_end 1983-09-30 22:00:00 (Fri)\n62553690000, # local_start 1983-04-01 01:00:00 (Fri)\n62569497600, # local_end 1983-10-01 00:00:00 (Sat)\n7200,\n1,\n'CEST',\n ],\n [\n62569490400, # utc_start 1983-09-30 22:00:00 (Fri)\n62585305200, # utc_end 1984-03-31 23:00:00 (Sat)\n62569494000, # local_start 1983-09-30 23:00:00 (Fri)\n62585308800, # local_end 1984-04-01 00:00:00 (Sun)\n3600,\n0,\n'CET',\n ],\n [\n62585305200, # utc_start 1984-03-31 23:00:00 (Sat)\n62601112800, # utc_end 1984-09-30 22:00:00 (Sun)\n62585312400, # local_start 1984-04-01 01:00:00 (Sun)\n62601120000, # local_end 1984-10-01 00:00:00 (Mon)\n7200,\n1,\n'CEST',\n ],\n [\n62601112800, # utc_start 1984-09-30 22:00:00 (Sun)\n62617273200, # utc_end 1985-04-05 23:00:00 (Fri)\n62601116400, # local_start 1984-09-30 23:00:00 (Sun)\n62617276800, # local_end 1985-04-06 00:00:00 (Sat)\n3600,\n0,\n'CET',\n ],\n [\n62617273200, # utc_start 1985-04-05 23:00:00 (Fri)\n62632648800, # utc_end 1985-09-30 22:00:00 (Mon)\n62617280400, # local_start 1985-04-06 01:00:00 (Sat)\n62632656000, # local_end 1985-10-01 00:00:00 (Tue)\n7200,\n1,\n'CEST',\n ],\n [\n62632648800, # utc_start 1985-09-30 22:00:00 (Mon)\n62648636400, # utc_end 1986-04-03 23:00:00 (Thu)\n62632652400, # local_start 1985-09-30 23:00:00 (Mon)\n62648640000, # local_end 1986-04-04 00:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n62648636400, # utc_start 1986-04-03 23:00:00 (Thu)\n62664357600, # utc_end 1986-10-02 22:00:00 (Thu)\n62648643600, # local_start 1986-04-04 01:00:00 (Fri)\n62664364800, # local_end 1986-10-03 00:00:00 (Fri)\n7200,\n1,\n'CEST',\n ],\n [\n62664357600, # utc_start 1986-10-02 22:00:00 (Thu)\n62679913200, # utc_end 1987-03-31 23:00:00 (Tue)\n62664361200, # local_start 1986-10-02 23:00:00 (Thu)\n62679916800, # local_end 1987-04-01 00:00:00 (Wed)\n3600,\n0,\n'CET',\n ],\n [\n62679913200, # utc_start 1987-03-31 23:00:00 (Tue)\n62695720800, # utc_end 1987-09-30 22:00:00 (Wed)\n62679920400, # local_start 1987-04-01 01:00:00 (Wed)\n62695728000, # local_end 1987-10-01 00:00:00 (Thu)\n7200,\n1,\n'CEST',\n ],\n [\n62695720800, # utc_start 1987-09-30 22:00:00 (Wed)\n62711535600, # utc_end 1988-03-31 23:00:00 (Thu)\n62695724400, # local_start 1987-09-30 23:00:00 (Wed)\n62711539200, # local_end 1988-04-01 00:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n62711535600, # utc_start 1988-03-31 23:00:00 (Thu)\n62727343200, # utc_end 1988-09-30 22:00:00 (Fri)\n62711542800, # local_start 1988-04-01 01:00:00 (Fri)\n62727350400, # local_end 1988-10-01 00:00:00 (Sat)\n7200,\n1,\n'CEST',\n ],\n [\n62727343200, # utc_start 1988-09-30 22:00:00 (Fri)\n62743071600, # utc_end 1989-03-31 23:00:00 (Fri)\n62727346800, # local_start 1988-09-30 23:00:00 (Fri)\n62743075200, # local_end 1989-04-01 00:00:00 (Sat)\n3600,\n0,\n'CET',\n ],\n [\n62743071600, # utc_start 1989-03-31 23:00:00 (Fri)\n62758879200, # utc_end 1989-09-30 22:00:00 (Sat)\n62743078800, # local_start 1989-04-01 01:00:00 (Sat)\n62758886400, # local_end 1989-10-01 00:00:00 (Sun)\n7200,\n1,\n'CEST',\n ],\n [\n62758879200, # utc_start 1989-09-30 22:00:00 (Sat)\n62777458800, # utc_end 1990-05-03 23:00:00 (Thu)\n62758882800, # local_start 1989-09-30 23:00:00 (Sat)\n62777462400, # local_end 1990-05-04 00:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n62777458800, # utc_start 1990-05-03 23:00:00 (Thu)\n62979717600, # utc_end 1996-09-29 22:00:00 (Sun)\n62777466000, # local_start 1990-05-04 01:00:00 (Fri)\n62979724800, # local_end 1996-09-30 00:00:00 (Mon)\n7200,\n0,\n'EET',\n ],\n [\n62979717600, # utc_start 1996-09-29 22:00:00 (Sun)\n62995791600, # utc_end 1997-04-03 23:00:00 (Thu)\n62979721200, # local_start 1996-09-29 23:00:00 (Sun)\n62995795200, # local_end 1997-04-04 00:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n62995791600, # utc_start 1997-04-03 23:00:00 (Thu)\n63011599200, # utc_end 1997-10-03 22:00:00 (Fri)\n62995798800, # local_start 1997-04-04 01:00:00 (Fri)\n63011606400, # local_end 1997-10-04 00:00:00 (Sat)\n7200,\n1,\n'CEST',\n ],\n [\n63011599200, # utc_start 1997-10-03 22:00:00 (Fri)\n63488188800, # utc_end 2012-11-10 00:00:00 (Sat)\n63011606400, # local_start 1997-10-04 00:00:00 (Sat)\n63488196000, # local_end 2012-11-10 02:00:00 (Sat)\n7200,\n0,\n'EET',\n ],\n [\n63488188800, # utc_start 2012-11-10 00:00:00 (Sat)\n63500198400, # utc_end 2013-03-29 00:00:00 (Fri)\n63488192400, # local_start 2012-11-10 01:00:00 (Sat)\n63500202000, # local_end 2013-03-29 01:00:00 (Fri)\n3600,\n0,\n'CET',\n ],\n [\n63500198400, # utc_start 2013-03-29 00:00:00 (Fri)\n63518342400, # utc_end 2013-10-25 00:00:00 (Fri)\n63500205600, # local_start 2013-03-29 02:00:00 (Fri)\n63518349600, # local_end 2013-10-25 02:00:00 (Fri)\n7200,\n1,\n'CEST',\n ],\n [\n63518342400, # utc_start 2013-10-25 00:00:00 (Fri)\nDateTime::TimeZone::INFINITY, # utc_end\n63518349600, # local_start 2013-10-25 02:00:00 (Fri)\nDateTime::TimeZone::INFINITY, # local_end\n7200,\n0,\n'EET',\n ],\n];\n\nsub olson_version {'2016c'}\n\nsub has_dst_changes {13}\n\nsub _max_year {2026}\n\nsub _new_instance {\n return shift->_init( @_, spans => $spans );\n}\n\n\n\n1;\n\n"},"avg_line_length":{"kind":"number","value":26.3611940299,"string":"26.361194"},"max_line_length":{"kind":"number","value":89,"string":"89"},"alphanum_fraction":{"kind":"number","value":0.6455667535,"string":"0.645567"}}},{"rowIdx":463263,"cells":{"hexsha":{"kind":"string","value":"edb0848fae5de570a744cbbf4f5ee1ab3eb32bd8"},"size":{"kind":"number","value":10140,"string":"10,140"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"apps/vmware/connector/mode/healthhost.pm"},"max_stars_repo_name":{"kind":"string","value":"xdrive05/centreon-plugins"},"max_stars_repo_head_hexsha":{"kind":"string","value":"8227ba680fdfd2bb0d8a806ea61ec1611c2779dc"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2021-03-16T22:20:32.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-03-16T22:20:32.000Z"},"max_issues_repo_path":{"kind":"string","value":"apps/vmware/connector/mode/healthhost.pm"},"max_issues_repo_name":{"kind":"string","value":"xdrive05/centreon-plugins"},"max_issues_repo_head_hexsha":{"kind":"string","value":"8227ba680fdfd2bb0d8a806ea61ec1611c2779dc"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"apps/vmware/connector/mode/healthhost.pm"},"max_forks_repo_name":{"kind":"string","value":"xdrive05/centreon-plugins"},"max_forks_repo_head_hexsha":{"kind":"string","value":"8227ba680fdfd2bb0d8a806ea61ec1611c2779dc"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#\n# Copyright 2020 Centreon (http://www.centreon.com/)\n#\n# Centreon is a full-fledged industry-strength solution that meets\n# the needs in IT infrastructure and application monitoring for\n# service performance.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\npackage apps::vmware::connector::mode::healthhost;\n\nuse base qw(centreon::plugins::templates::counter);\n\nuse strict;\nuse warnings;\nuse centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);\n\nsub custom_status_output {\n my ($self, %options) = @_;\n\n my $msg = 'status ' . $self->{result_values}->{status};\n return $msg;\n}\n\nsub custom_status_calc {\n my ($self, %options) = @_;\n\n $self->{result_values}->{status} = $options{new_datas}->{$self->{instance} . '_state'};\n return 0;\n}\n\nsub custom_summary_output {\n my ($self, %options) = @_;\n\n my $msg;\n if ($self->{result_values}->{type_absolute} ne '') {\n $msg = $self->{result_values}->{type_absolute} . \" sensor \" . $self->{result_values}->{name_absolute} . \": \". $self->{result_values}->{summary_absolute};\n } else {\n $msg = $self->{result_values}->{name_absolute} . \": \". $self->{result_values}->{summary_absolute};\n }\n return $msg;\n}\n\nsub set_counters {\n my ($self, %options) = @_;\n\n $self->{maps_counters_type} = [\n { name => 'global', type => 0, skipped_code => { -10 => 1 } },\n { name => 'host', type => 3, cb_prefix_output => 'prefix_host_output', cb_long_output => 'host_long_output', indent_long_output => ' ', message_multiple => 'All ESX hosts are ok', \n group => [\n { name => 'global_host', type => 0, skipped_code => { -10 => 1 } },\n { name => 'global_problems', type => 0, skipped_code => { -10 => 1 } },\n { name => 'global_summary', type => 1 },\n ]\n }\n ];\n \n $self->{maps_counters}->{global} = [\n { label => 'total-problems', nlabel => 'host.health.problems.current.count', set => {\n key_values => [ { name => 'total_problems' }, { name => 'total' } ],\n output_template => '%s total health issue(s) found',\n perfdatas => [\n { label => 'total_problems', value => 'total_problems_absolute', template => '%s',\n min => 0, max => 'total_absolute' },\n ],\n }\n },\n ];\n \n $self->{maps_counters}->{global_host} = [\n { label => 'status', threshold => 0, set => {\n key_values => [ { name => 'state' } ],\n closure_custom_calc => $self->can('custom_status_calc'),\n closure_custom_output => $self->can('custom_status_output'),\n closure_custom_perfdata => sub { return 0; },\n closure_custom_threshold_check => \\&catalog_status_threshold,\n }\n },\n ];\n \n $self->{maps_counters}->{global_problems} = [\n { label => 'ok', threshold => 0, set => {\n key_values => [ { name => 'ok' } ],\n output_template => '%s health checks are green',\n closure_custom_perfdata => sub { return 0; },\n }\n },\n { label => 'problems', nlabel => 'host.health.problems.current.count', set => {\n key_values => [ { name => 'total_problems' }, { name => 'total' } ],\n output_template => '%s total health issue(s) found',\n perfdatas => [\n { label => 'problems', value => 'total_problems_absolute', template => '%s',\n min => 0, max => 'total_absolute', label_extra_instance => 1 },\n ],\n }\n },\n { label => 'problems-yellow', nlabel => 'host.health.yellow.current.count', set => {\n key_values => [ { name => 'yellow' }, { name => 'total' } ],\n output_template => '%s yellow health issue(s) found',\n perfdatas => [\n { label => 'problems_yellow', value => 'yellow_absolute', template => '%s',\n min => 0, max => 'total_absolute', label_extra_instance => 1 },\n ],\n }\n },\n { label => 'problems-red', nlabel => 'host.health.red.current.count', set => {\n key_values => [ { name => 'red' }, { name => 'total' } ],\n output_template => '%s red health issue(s) found',\n perfdatas => [\n { label => 'problems_red', value => 'red_absolute', template => '%s',\n min => 0, max => 'total_absolute', label_extra_instance => 1 },\n ],\n }\n },\n ];\n \n $self->{maps_counters}->{global_summary} = [\n { label => 'global-summary', threshold => 0, set => {\n key_values => [ { name => 'type' }, { name => 'name' }, { name => 'summary' } ],\n closure_custom_output => $self->can('custom_summary_output'),\n closure_custom_perfdata => sub { return 0; },\n }\n },\n ];\n}\n\nsub prefix_host_output {\n my ($self, %options) = @_;\n\n return \"Host '\" . $options{instance_value}->{display} . \"' : \";\n}\n\nsub host_long_output {\n my ($self, %options) = @_;\n\n return \"checking host '\" . $options{instance_value}->{display} . \"'\";\n}\n\nsub prefix_global_cpu_output {\n my ($self, %options) = @_;\n\n return \"cpu total average : \";\n}\n\nsub prefix_cpu_output {\n my ($self, %options) = @_;\n\n return \"cpu '\" . $options{instance_value}->{display} . \"' \";\n}\n\nsub new {\n my ($class, %options) = @_;\n my $self = $class->SUPER::new(package => __PACKAGE__, %options);\n bless $self, $class;\n \n $options{options}->add_options(arguments => {\n \"esx-hostname:s\" => { name => 'esx_hostname' },\n \"filter\" => { name => 'filter' },\n \"scope-datacenter:s\" => { name => 'scope_datacenter' },\n \"scope-cluster:s\" => { name => 'scope_cluster' },\n \"storage-status\" => { name => 'storage_status' },\n \"unknown-status:s\" => { name => 'unknown_status', default => '%{status} !~ /^connected$/i' },\n \"warning-status:s\" => { name => 'warning_status', default => '' },\n \"critical-status:s\" => { name => 'critical_status', default => '' },\n });\n \n return $self;\n}\n\nsub check_options {\n my ($self, %options) = @_;\n $self->SUPER::check_options(%options);\n \n $self->change_macros(macros => ['unknown_status', 'warning_status', 'critical_status']);\n}\n\nsub manage_selection {\n my ($self, %options) = @_;\n\n $self->{global} = { total_problems => 0, total => 0 };\n $self->{host} = {};\n my $response = $options{custom}->execute(params => $self->{option_results},\n command => 'healthhost');\n\n foreach my $host_id (keys %{$response->{data}}) {\n my $host_name = $response->{data}->{$host_id}->{name};\n $self->{host}->{$host_name} = { display => $host_name, \n global_host => {\n state => $response->{data}->{$host_id}->{state}, \n },\n global_summary => {},\n global_problems => {\n ok => 0, total_problems => 0, red => 0, yellow => 0, total => 0,\n }, \n };\n \n my $i = 0;\n foreach (('memory_info', 'cpu_info', 'sensor_info', 'storage_info')) {\n if (defined($response->{data}->{$host_id}->{$_})) {\n foreach my $entry (@{$response->{data}->{$host_id}->{$_}}) {\n my $status = 'ok';\n $status = lc($1) if ($entry->{status} =~ /(yellow|red)/i);\n $self->{host}->{$host_name}->{global_problems}->{$status}++;\n $self->{host}->{$host_name}->{global_problems}->{total}++;\n if ($status eq 'ok') {\n $self->{host}->{$host_name}->{global_problems}->{total_problems}++ \n } else {\n $self->{host}->{$host_name}->{global_summary}->{$i} = {\n type => defined($entry->{type}) ? $entry->{type} : '',\n name => $entry->{name},\n summary => $entry->{summary},\n };\n }\n }\n\n $i++;\n }\n }\n \n $self->{global}->{total_problems} += $self->{host}->{$host_name}->{global_problems}->{red} + $self->{host}->{$host_name}->{global_problems}->{yellow};\n $self->{global}->{total} += $self->{host}->{$host_name}->{global_problems}->{total};\n }\n}\n\n1;\n\n__END__\n\n=head1 MODE\n\nCheck health of ESX hosts.\n\n=over 8\n\n=item B<--esx-hostname>\n\nESX hostname to check.\nIf not set, we check all ESX.\n\n=item B<--filter>\n\nESX hostname is a regexp.\n\n=item B<--scope-datacenter>\n\nSearch in following datacenter(s) (can be a regexp).\n\n=item B<--scope-cluster>\n\nSearch in following cluster(s) (can be a regexp).\n\n=item B<--storage-status>\n\nCheck storage(s) status.\n\n=item B<--unknown-status>\n\nSet warning threshold for status (Default: '%{status} !~ /^connected$/i').\nCan used special variables like: %{status}\n\n=item B<--warning-status>\n\nSet warning threshold for status (Default: '').\nCan used special variables like: %{status}\n\n=item B<--critical-status>\n\nSet critical threshold for status (Default: '').\nCan used special variables like: %{status}\n\n=item B<--warning-*>\n\nThreshold warning.\nCan be: 'total-problems', 'problems', 'problems-yellow', 'problems-red'.\n\n=item B<--critical-*>\n\nThreshold critical.\nCan be: 'total-problems', 'problems', 'problems-yellow', 'problems-red'.\n\n=back\n\n=cut\n"},"avg_line_length":{"kind":"number","value":34.3728813559,"string":"34.372881"},"max_line_length":{"kind":"number","value":191,"string":"191"},"alphanum_fraction":{"kind":"number","value":0.5306706114,"string":"0.530671"}}},{"rowIdx":463264,"cells":{"hexsha":{"kind":"string","value":"edd96bb6d36f066ff8eb33eff30bb6e0853c66e6"},"size":{"kind":"number","value":970,"string":"970"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"tools/test_modules/m11760.pm"},"max_stars_repo_name":{"kind":"string","value":"vbalyasnyy/hashcat"},"max_stars_repo_head_hexsha":{"kind":"string","value":"84d3981e7b6bc4efe3c1bcbaa6f4198f4c523204"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":3,"string":"3"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2019-02-08T11:12:44.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-05-09T13:43:50.000Z"},"max_issues_repo_path":{"kind":"string","value":"tools/test_modules/m11760.pm"},"max_issues_repo_name":{"kind":"string","value":"e-ago/hashcat"},"max_issues_repo_head_hexsha":{"kind":"string","value":"dbbdb7e5ac4f7db2dd503c1820b91fbbcfc37c92"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"tools/test_modules/m11760.pm"},"max_forks_repo_name":{"kind":"string","value":"e-ago/hashcat"},"max_forks_repo_head_hexsha":{"kind":"string","value":"dbbdb7e5ac4f7db2dd503c1820b91fbbcfc37c92"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":1,"string":"1"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2021-05-01T09:38:27.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-05-01T09:38:27.000Z"},"content":{"kind":"string","value":"#!/usr/bin/env perl\n\n##\n## Author......: See docs/credits.txt\n## License.....: MIT\n##\n\nuse strict;\nuse warnings;\n\nsub module_constraints { [[0, 256], [0, 256], [-1, -1], [-1, -1], [-1, -1]] }\n\nsub module_generate_hash\n{\n my $word = shift;\n my $salt = shift;\n my $python_code = <<\"END_CODE\";\n\nimport binascii\nimport hmac\nimport sys\nfrom pygost import gost34112012256\nkey = b\"$salt\"\nmsg = b\"$word\"\ndigest = hmac.new(key, msg, gost34112012256).digest()\nsys.stdout.write(binascii.hexlify(digest[::-1]))\n\nEND_CODE\n\n my $digest = `python2 -c '$python_code'`;\n\n my $hash = sprintf (\"%s:%s\", $digest, $salt);\n\n return $hash;\n}\n\nsub module_verify_hash\n{\n my $line = shift;\n\n my ($hash, $salt, $word) = split (':', $line);\n\n return unless defined $hash;\n return unless defined $salt;\n return unless defined $word;\n\n my $word_packed = pack_if_HEX_notation ($word);\n\n my $new_hash = module_generate_hash ($word_packed, $salt);\n\n return ($new_hash, $word);\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":17.6363636364,"string":"17.636364"},"max_line_length":{"kind":"number","value":77,"string":"77"},"alphanum_fraction":{"kind":"number","value":0.6371134021,"string":"0.637113"}}},{"rowIdx":463265,"cells":{"hexsha":{"kind":"string","value":"eded75f189b4daaabcb18473feedd86cfd574124"},"size":{"kind":"number","value":4510,"string":"4,510"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"scripts/EST/clip_cdnas.pl"},"max_stars_repo_name":{"kind":"string","value":"vsitnik/ensembl-pipeline"},"max_stars_repo_head_hexsha":{"kind":"string","value":"3d12427eb0536812906fe5fd0cf5e90cc27d89ad"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":51,"string":"51"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-01-09T06:15:42.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-01-09T19:03:36.000Z"},"max_issues_repo_path":{"kind":"string","value":"scripts/EST/clip_cdnas.pl"},"max_issues_repo_name":{"kind":"string","value":"vsitnik/ensembl-pipeline"},"max_issues_repo_head_hexsha":{"kind":"string","value":"3d12427eb0536812906fe5fd0cf5e90cc27d89ad"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":4,"string":"4"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2017-08-03T11:06:57.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-01-21T17:23:19.000Z"},"max_forks_repo_path":{"kind":"string","value":"scripts/EST/clip_cdnas.pl"},"max_forks_repo_name":{"kind":"string","value":"vsitnik/ensembl-pipeline"},"max_forks_repo_head_hexsha":{"kind":"string","value":"3d12427eb0536812906fe5fd0cf5e90cc27d89ad"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":31,"string":"31"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-01-11T08:22:41.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2022-03-10T00:48:24.000Z"},"content":{"kind":"string","value":"#!/usr/bin/env perl\n\n\n# Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute\n# Copyright [2016-2020] EMBL-European Bioinformatics Institute\n# \n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# \n# http://www.apache.org/licenses/LICENSE-2.0\n# \n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\n# script to clip the ends of the given fasta file of cDNAs\n# clipping can be hard (physically remove bases; default) or\n# soft (replace clipped seq with Ns), and can be based\n# on a given clip-range X i.e. clip X bases from each end)\n# and/or on poly-A/T sequence occurring at the ends. If both\n# range and polya clipping are asked for, the range clipping\n# is performed first. \n\nuse warnings ;\nuse strict; \nuse Getopt::Long qw(:config no_ignore_case);\nuse Bio::Seq;\nuse Bio::SeqIO;\n\nuse Bio::EnsEMBL::Utils::PolyA;\n\nmy ($mask, $softmask, $poly_a_clip, $clip_len, $min_length, $outfile, $help);\n\nGetOptions( \n\t 'mask' => \\$mask,\n\t 'softmask' => \\$softmask,\n\t 'hardclip=s' => \\$clip_len,\n\t 'polyaclip' => \\$poly_a_clip,\n\t 'minlen=s' => \\$min_length,\n 'outfile=s' => \\$outfile,\n\t 'help' => \\$help\n\t );\n\n\n&usage if $help;\n\n\ndie \"You must give the name of an output filw with -outfile\\n\" \n if not defined $outfile;\n\n$min_length = 100 if not defined $min_length;\n\n# fasta format\n\nmy $seqout = new Bio::SeqIO( '-format' => \"fasta\",\n\t\t\t '-file' => \">$outfile\" );\n\nmy $polyA_clipper = Bio::EnsEMBL::Utils::PolyA->new();\n\nforeach my $file (@ARGV) {\n my $seqin = new Bio::SeqIO( '-format' => \"fasta\",\n\t\t\t\t'-file' => $file );\n\n while( my $cdna = $seqin->next_seq ){\n\tmy $new_cdna;\n\t\n\tif ( $clip_len ){\n\t my $seq = $cdna->seq;\n\t my $seq_length = length( $seq );\n\t \n\t # skip it if you are going to clip more than the actual length of the EST\n\t if ( 2*$clip_len >= $seq_length ){\n\t\tnext SEQFETCH;\n\t }\n\n\t my $seq_left = substr( $seq, 0, $clip_len ); \n\t my $new_seq = substr( $seq, $clip_len, $seq_length - 2*$clip_len ); \n\t my $seq_right = substr( $seq, $clip_len + $seq_length - 2*$clip_len);\n\n\t if ($mask) {\n\t\t$new_seq = \"N\" x $clip_len . $new_seq . \"N\" x $clip_len;\n\t }\n\t elsif ($softmask) {\n\t\t$new_seq = lc($seq_left) . $new_seq . lc($seq_right);\n\t }\n\t \n\t # skip it if you are left with an EST of less than 100bp\n\t if ( length( $new_seq ) < $min_length ){\n\t\tnext SEQFETCH;\n\t }\n\t \n\t $new_cdna = new Bio::Seq;\n\t $new_cdna->display_id( $cdna->display_id );\n\t $new_cdna->desc( $cdna->desc );\n\t $new_cdna->seq($new_seq);\n\t}\n\telse{ \n\t $new_cdna = $cdna;\n\t}\n\t\n\tif ($poly_a_clip){\n\t #print STDERR \"going to pass \".$new_cdna->display_id.\"\\n\";\n\t if ($mask or $softmask) {\n\t\t$new_cdna = $polyA_clipper->mask($new_cdna, $softmask);\n\t }\n\t else {\n\t\t$new_cdna = $polyA_clipper->clip($new_cdna);\n\t }\n\t \n\t if (not $new_cdna or $new_cdna->length < $min_length) {\n\t\tnext;\n\t } \n\t}\n\t\n\t# write sequence\n\t$seqout->write_seq($new_cdna);\n }\n}\n\n\n\nsub usage {\n print \"Usage: clip_dnas.pl -outfile out.fa <-mask|-softmask> <-hardclip n> <-polyaclip> <-minlen n> file1.fa file2.fa ...\\n\\n\";\n print \"Recommended settings:\\n clip_cdnas.pl -outfile out.fa -polyaclip -minlen 100 file1.fa file.fa...\\n\";\n print \" (clips polyAs only, rejecting if result is less than 100 bp)\\n\";\n print \"Other examples:\\n\";\n print \"To softmask polyA:\\n clip_cdnas.pl -outfile out.fa -softmask -polyaclip file1.fa file2.fa ...\\n\";\n print \"To hardmask polyA:\\n clip_cdnas.pl -outfile out.fa -mask -polyaclip file1.fa file2.fa ...\\n\";\n print \"To hard clip 20bp from each end:\\n clip_cdnas.pl -outfile out.fa -hardclip 20 file1.fa file2.fa ...\\n\";\n print \"Hard clip 20bp followed by polyA clip:\\n clip_cdnas.pl -outfile out.fa -hardclip 20 -polyA file1.fa file2.fa ...\\n\";\n print \"To reject entries < 60bp after clipping:\\n clip_cdnas.pl -outfile out.fa -hardclip 20 -polyA -minlen 60 file1.fa file2.fa ...\\n\";\n print \"To do nothing(!):\\n clip_cdnas.pl -outfile out.fa file1.fa file2.fa ...\\n\";\n exit(0);\n}\n"},"avg_line_length":{"kind":"number","value":32.4460431655,"string":"32.446043"},"max_line_length":{"kind":"number","value":142,"string":"142"},"alphanum_fraction":{"kind":"number","value":0.6385809313,"string":"0.638581"}}},{"rowIdx":463266,"cells":{"hexsha":{"kind":"string","value":"edbdb9589fade67d4e1a972388862ebdb69d24d9"},"size":{"kind":"number","value":1064,"string":"1,064"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"t/O2/Obj/PropertyDefinition-2.t"},"max_stars_repo_name":{"kind":"string","value":"haakonsk/O2-Framework"},"max_stars_repo_head_hexsha":{"kind":"string","value":"50f2f2def517b90dec647b914128ad8f949f51d9"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2016-05-24T08:13:09.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2016-05-24T08:13:09.000Z"},"max_issues_repo_path":{"kind":"string","value":"t/O2/Obj/PropertyDefinition-2.t"},"max_issues_repo_name":{"kind":"string","value":"haakonsk/O2-Framework"},"max_issues_repo_head_hexsha":{"kind":"string","value":"50f2f2def517b90dec647b914128ad8f949f51d9"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"t/O2/Obj/PropertyDefinition-2.t"},"max_forks_repo_name":{"kind":"string","value":"haakonsk/O2-Framework"},"max_forks_repo_head_hexsha":{"kind":"string","value":"50f2f2def517b90dec647b914128ad8f949f51d9"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"use strict;\n\nuse Test::More qw(no_plan);\n\nuse_ok 'O2::Context';\nuse_ok 'O2::Mgr::PropertyDefinitionManager';\n\nmy $context = O2::Context->new();\n\nmy $propertyDefinitionMgr = O2::Mgr::PropertyDefinitionManager->new( context => $context );\nmy $definition = $propertyDefinitionMgr->newObject();\n$definition->setPropertyName( 'My property definition' );\n$definition->setMetaName( 'My property definition' );\n\n$definition->setOptionsType('static');\n$definition->setOptionsData('[{name=>\"name\", value=>\"value\"}]');\nis_deeply([$definition->getOptions()], [{name=>\"name\", value=>\"value\"}], 'getOptions() static options type');\n\n$definition->setOptionsType('method');\n$definition->setOptionsData('O2::Obj::PropertyDefinition::StandardOptions::test');\n$definition->save();\n\nis_deeply([$definition->getOptions()], [{name=>\"Test1\", value=>\"test1\"}], 'getOptions() method options type');\n\nok( $propertyDefinitionMgr->getPropertyDefinitionByName( $definition->getPropertyName() ), 'getPropertyDefinitionByName()');\n\nEND {\n $definition->deletePermanently() if $definition;\n}\n"},"avg_line_length":{"kind":"number","value":35.4666666667,"string":"35.466667"},"max_line_length":{"kind":"number","value":124,"string":"124"},"alphanum_fraction":{"kind":"number","value":0.727443609,"string":"0.727444"}}},{"rowIdx":463267,"cells":{"hexsha":{"kind":"string","value":"edbc4f978f40770b6ee567b2892268c601607a07"},"size":{"kind":"number","value":14723,"string":"14,723"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"extlib/Mojo/Headers.pm"},"max_stars_repo_name":{"kind":"string","value":"jamadam/mojo-checkbot"},"max_stars_repo_head_hexsha":{"kind":"string","value":"ec3e39d43f7915ba61ad90234b6b3582f33e0f69"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":2,"string":"2"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2017-04-03T14:11:18.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2020-01-16T05:35:20.000Z"},"max_issues_repo_path":{"kind":"string","value":"extlib/Mojo/Headers.pm"},"max_issues_repo_name":{"kind":"string","value":"jamadam/mojo-checkbot"},"max_issues_repo_head_hexsha":{"kind":"string","value":"ec3e39d43f7915ba61ad90234b6b3582f33e0f69"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"extlib/Mojo/Headers.pm"},"max_forks_repo_name":{"kind":"string","value":"jamadam/mojo-checkbot"},"max_forks_repo_head_hexsha":{"kind":"string","value":"ec3e39d43f7915ba61ad90234b6b3582f33e0f69"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package Mojo::Headers;\nuse Mojo::Base -base;\n\nuse Mojo::Util 'monkey_patch';\n\nhas max_line_size => sub { $ENV{MOJO_MAX_LINE_SIZE} || 10240 };\n\n# Common headers\nmy %NORMALCASE = map { lc($_) => $_ } (\n qw(Accept Accept-Charset Accept-Encoding Accept-Language Accept-Ranges),\n qw(Allow Authorization Cache-Control Connection Content-Disposition),\n qw(Content-Encoding Content-Length Content-Range Content-Type Cookie DNT),\n qw(Date ETag Expect Expires Host If-Modified-Since Last-Modified Link),\n qw(Location Origin Proxy-Authenticate Proxy-Authorization Range),\n qw(Sec-WebSocket-Accept Sec-WebSocket-Extensions Sec-WebSocket-Key),\n qw(Sec-WebSocket-Protocol Sec-WebSocket-Version Server Set-Cookie Status),\n qw(TE Trailer Transfer-Encoding Upgrade User-Agent Vary WWW-Authenticate)\n);\nfor my $header (values %NORMALCASE) {\n my $name = lc $header;\n $name =~ y/-/_/;\n monkey_patch __PACKAGE__, $name, sub { shift->header($header => @_) };\n}\n\nsub add {\n my ($self, $name) = (shift, shift);\n\n # Make sure we have a normal case entry for name\n my $key = lc $name;\n $self->{normalcase}{$key} = defined $self->{normalcase}{$key} ? $self->{normalcase}{$key} : $name unless $NORMALCASE{$key};\n push @{$self->{headers}{$key}}, @_;\n\n return $self;\n}\n\nsub append {\n my ($self, $name, $value) = @_;\n my $old = $self->header($name);\n return $self->header($name => defined $old ? \"$old, $value\" : $value);\n}\n\nsub clone { $_[0]->new->from_hash($_[0]->to_hash(1)) }\n\nsub from_hash {\n my ($self, $hash) = @_;\n\n # Empty hash deletes all headers\n delete $self->{headers} if keys %{$hash} == 0;\n\n # Merge\n for my $header (keys %$hash) {\n my $value = $hash->{$header};\n $self->add($header => ref $value eq 'ARRAY' ? @$value : $value);\n }\n\n return $self;\n}\n\nsub header {\n my ($self, $name) = (shift, shift);\n\n # Replace\n return $self->remove($name)->add($name, @_) if @_;\n\n return undef unless my $headers = $self->{headers}{lc $name};\n return join ', ', @$headers;\n}\n\nsub is_finished { do {my $tmp = shift->{state}; defined $tmp ? $tmp : ''} eq 'finished' }\n\nsub is_limit_exceeded { !!shift->{limit} }\n\nsub leftovers { delete shift->{buffer} }\n\nsub names {\n my $self = shift;\n return [map { $NORMALCASE{$_} || $self->{normalcase}{$_} || $_ }\n keys %{$self->{headers}}];\n}\n\nsub parse {\n my $self = shift;\n\n $self->{state} = 'headers';\n $self->{buffer} .= do {my $buffer = shift; defined $buffer ? $buffer : ''};\n my $headers = $self->{cache} ||= [];\n my $max = $self->max_line_size;\n while ($self->{buffer} =~ s/^(.*?)\\x0d?\\x0a//) {\n my $line = $1;\n\n # Check line size limit\n if (length $line > $max) {\n @$self{qw(state limit)} = ('finished', 1);\n return $self;\n }\n\n # New header\n if ($line =~ /^(\\S[^:]*)\\s*:\\s*(.*)$/) { push @$headers, $1, $2 }\n\n # Multiline\n elsif (@$headers && $line =~ s/^\\s+//) { $headers->[-1] .= \" $line\" }\n\n # Empty line\n else {\n $self->add(splice @$headers, 0, 2) while @$headers;\n $self->{state} = 'finished';\n return $self;\n }\n }\n\n # Check line size limit\n @$self{qw(state limit)} = ('finished', 1) if length $self->{buffer} > $max;\n\n return $self;\n}\n\nsub referrer { shift->header(Referer => @_) }\n\nsub remove {\n my ($self, $name) = @_;\n delete $self->{headers}{lc $name};\n return $self;\n}\n\nsub to_hash {\n my ($self, $multi) = @_;\n return {map { $_ => $multi ? $self->{headers}{lc $_} : $self->header($_) }\n @{$self->names}};\n}\n\nsub to_string {\n my $self = shift;\n\n # Make sure multiline values are formatted correctly\n my @headers;\n for my $name (@{$self->names}) {\n push @headers, \"$name: $_\" for @{$self->{headers}{lc $name}};\n }\n\n return join \"\\x0d\\x0a\", @headers;\n}\n\n1;\n\n=encoding utf8\n\n=head1 NAME\n\nMojo::Headers - Headers\n\n=head1 SYNOPSIS\n\n use Mojo::Headers;\n\n # Parse\n my $headers = Mojo::Headers->new;\n $headers->parse(\"Content-Length: 42\\x0d\\x0a\");\n $headers->parse(\"Content-Type: text/html\\x0d\\x0a\\x0d\\x0a\");\n say $headers->content_length;\n say $headers->content_type;\n\n # Build\n my $headers = Mojo::Headers->new;\n $headers->content_length(42);\n $headers->content_type('text/plain');\n say $headers->to_string;\n\n=head1 DESCRIPTION\n\nL is a container for HTTP headers based on\nL and\nL.\n\n=head1 ATTRIBUTES\n\nL implements the following attributes.\n\n=head2 max_line_size\n\n my $size = $headers->max_line_size;\n $headers = $headers->max_line_size(1024);\n\nMaximum header line size in bytes, defaults to the value of the\nC environment variable or C<10240> (10KB).\n\n=head1 METHODS\n\nL inherits all methods from L and implements the\nfollowing new ones.\n\n=head2 accept\n\n my $accept = $headers->accept;\n $headers = $headers->accept('application/json');\n\nShortcut for the C header.\n\n=head2 accept_charset\n\n my $charset = $headers->accept_charset;\n $headers = $headers->accept_charset('UTF-8');\n\nShortcut for the C header.\n\n=head2 accept_encoding\n\n my $encoding = $headers->accept_encoding;\n $headers = $headers->accept_encoding('gzip');\n\nShortcut for the C header.\n\n=head2 accept_language\n\n my $language = $headers->accept_language;\n $headers = $headers->accept_language('de, en');\n\nShortcut for the C header.\n\n=head2 accept_ranges\n\n my $ranges = $headers->accept_ranges;\n $headers = $headers->accept_ranges('bytes');\n\nShortcut for the C header.\n\n=head2 add\n\n $headers = $headers->add(Foo => 'one value');\n $headers = $headers->add(Foo => 'first value', 'second value');\n\nAdd one or more header values with one or more lines.\n\n # \"Vary: Accept\"\n # \"Vary: Accept-Encoding\"\n $headers->vary('Accept')->add(Vary => 'Accept-Encoding')->to_string;\n\n=head2 allow\n\n my $allow = $headers->allow;\n $headers = $headers->allow('GET, POST');\n\nShortcut for the C header.\n\n=head2 append\n\n $headers = $headers->append(Vary => 'Accept-Encoding');\n\nAppend value to header and flatten it if necessary.\n\n # \"Vary: Accept\"\n $headers->append(Vary => 'Accept')->to_string;\n\n # \"Vary: Accept, Accept-Encoding\"\n $headers->vary('Accept')->append(Vary => 'Accept-Encoding')->to_string;\n\n=head2 authorization\n\n my $authorization = $headers->authorization;\n $headers = $headers->authorization('Basic Zm9vOmJhcg==');\n\nShortcut for the C header.\n\n=head2 cache_control\n\n my $cache_control = $headers->cache_control;\n $headers = $headers->cache_control('max-age=1, no-cache');\n\nShortcut for the C header.\n\n=head2 clone\n\n my $clone = $headers->clone;\n\nClone headers.\n\n=head2 connection\n\n my $connection = $headers->connection;\n $headers = $headers->connection('close');\n\nShortcut for the C header.\n\n=head2 content_disposition\n\n my $disposition = $headers->content_disposition;\n $headers = $headers->content_disposition('foo');\n\nShortcut for the C header.\n\n=head2 content_encoding\n\n my $encoding = $headers->content_encoding;\n $headers = $headers->content_encoding('gzip');\n\nShortcut for the C header.\n\n=head2 content_length\n\n my $len = $headers->content_length;\n $headers = $headers->content_length(4000);\n\nShortcut for the C header.\n\n=head2 content_range\n\n my $range = $headers->content_range;\n $headers = $headers->content_range('bytes 2-8/100');\n\nShortcut for the C header.\n\n=head2 content_type\n\n my $type = $headers->content_type;\n $headers = $headers->content_type('text/plain');\n\nShortcut for the C header.\n\n=head2 cookie\n\n my $cookie = $headers->cookie;\n $headers = $headers->cookie('f=b');\n\nShortcut for the C header from\nL.\n\n=head2 date\n\n my $date = $headers->date;\n $headers = $headers->date('Sun, 17 Aug 2008 16:27:35 GMT');\n\nShortcut for the C header.\n\n=head2 dnt\n\n my $dnt = $headers->dnt;\n $headers = $headers->dnt(1);\n\nShortcut for the C (Do Not Track) header, which has no specification yet,\nbut is very commonly used.\n\n=head2 etag\n\n my $etag = $headers->etag;\n $headers = $headers->etag('abc321');\n\nShortcut for the C header.\n\n=head2 expect\n\n my $expect = $headers->expect;\n $headers = $headers->expect('100-continue');\n\nShortcut for the C header.\n\n=head2 expires\n\n my $expires = $headers->expires;\n $headers = $headers->expires('Thu, 01 Dec 1994 16:00:00 GMT');\n\nShortcut for the C header.\n\n=head2 from_hash\n\n $headers = $headers->from_hash({'Cookie' => 'a=b'});\n $headers = $headers->from_hash({'Cookie' => ['a=b', 'c=d']});\n $headers = $headers->from_hash({});\n\nParse headers from a hash reference, an empty hash removes all headers.\n\n=head2 header\n\n my $value = $headers->header('Foo');\n $headers = $headers->header(Foo => 'one value');\n $headers = $headers->header(Foo => 'first value', 'second value');\n\nGet or replace the current header values.\n\n=head2 host\n\n my $host = $headers->host;\n $headers = $headers->host('127.0.0.1');\n\nShortcut for the C header.\n\n=head2 if_modified_since\n\n my $date = $headers->if_modified_since;\n $headers = $headers->if_modified_since('Sun, 17 Aug 2008 16:27:35 GMT');\n\nShortcut for the C header.\n\n=head2 is_finished\n\n my $bool = $headers->is_finished;\n\nCheck if header parser is finished.\n\n=head2 is_limit_exceeded\n\n my $bool = $headers->is_limit_exceeded;\n\nCheck if a header has exceeded C.\n\n=head2 last_modified\n\n my $date = $headers->last_modified;\n $headers = $headers->last_modified('Sun, 17 Aug 2008 16:27:35 GMT');\n\nShortcut for the C header.\n\n=head2 leftovers\n\n my $bytes = $headers->leftovers;\n\nGet leftover data from header parser.\n\n=head2 link\n\n my $link = $headers->link;\n $headers = $headers->link('; rel=\"next\"');\n\nShortcut for the C header from\nL.\n\n=head2 location\n\n my $location = $headers->location;\n $headers = $headers->location('http://127.0.0.1/foo');\n\nShortcut for the C header.\n\n=head2 names\n\n my $names = $headers->names;\n\nReturn a list of all currently defined headers.\n\n # Names of all headers\n say for @{$headers->names};\n\n=head2 origin\n\n my $origin = $headers->origin;\n $headers = $headers->origin('http://example.com');\n\nShortcut for the C header from\nL.\n\n=head2 parse\n\n $headers = $headers->parse(\"Content-Type: text/plain\\x0d\\x0a\\x0d\\x0a\");\n\nParse formatted headers.\n\n=head2 proxy_authenticate\n\n my $authenticate = $headers->proxy_authenticate;\n $headers = $headers->proxy_authenticate('Basic \"realm\"');\n\nShortcut for the C header.\n\n=head2 proxy_authorization\n\n my $authorization = $headers->proxy_authorization;\n $headers = $headers->proxy_authorization('Basic Zm9vOmJhcg==');\n\nShortcut for the C header.\n\n=head2 range\n\n my $range = $headers->range;\n $headers = $headers->range('bytes=2-8');\n\nShortcut for the C header.\n\n=head2 referrer\n\n my $referrer = $headers->referrer;\n $headers = $headers->referrer('http://example.com');\n\nShortcut for the C header, there was a typo in\nL which resulted in C\nbecoming an official header.\n\n=head2 remove\n\n $headers = $headers->remove('Foo');\n\nRemove a header.\n\n=head2 sec_websocket_accept\n\n my $accept = $headers->sec_websocket_accept;\n $headers = $headers->sec_websocket_accept('s3pPLMBiTxaQ9kYGzzhZRbK+xOo=');\n\nShortcut for the C header from\nL.\n\n=head2 sec_websocket_extensions\n\n my $extensions = $headers->sec_websocket_extensions;\n $headers = $headers->sec_websocket_extensions('foo');\n\nShortcut for the C header from\nL.\n\n=head2 sec_websocket_key\n\n my $key = $headers->sec_websocket_key;\n $headers = $headers->sec_websocket_key('dGhlIHNhbXBsZSBub25jZQ==');\n\nShortcut for the C header from\nL.\n\n=head2 sec_websocket_protocol\n\n my $proto = $headers->sec_websocket_protocol;\n $headers = $headers->sec_websocket_protocol('sample');\n\nShortcut for the C header from\nL.\n\n=head2 sec_websocket_version\n\n my $version = $headers->sec_websocket_version;\n $headers = $headers->sec_websocket_version(13);\n\nShortcut for the C header from\nL.\n\n=head2 server\n\n my $server = $headers->server;\n $headers = $headers->server('Mojo');\n\nShortcut for the C header.\n\n=head2 set_cookie\n\n my $cookie = $headers->set_cookie;\n $headers = $headers->set_cookie('f=b; path=/');\n\nShortcut for the C header from\nL.\n\n=head2 status\n\n my $status = $headers->status;\n $headers = $headers->status('200 OK');\n\nShortcut for the C header from\nL.\n\n=head2 te\n\n my $te = $headers->te;\n $headers = $headers->te('chunked');\n\nShortcut for the C header.\n\n=head2 to_hash\n\n my $single = $headers->to_hash;\n my $multi = $headers->to_hash(1);\n\nTurn headers into hash reference, array references to represent multiple\nheaders with the same name are disabled by default.\n\n say $headers->to_hash->{DNT};\n\n=head2 to_string\n\n my $str = $headers->to_string;\n\nTurn headers into a string, suitable for HTTP messages.\n\n=head2 trailer\n\n my $trailer = $headers->trailer;\n $headers = $headers->trailer('X-Foo');\n\nShortcut for the C header.\n\n=head2 transfer_encoding\n\n my $encoding = $headers->transfer_encoding;\n $headers = $headers->transfer_encoding('chunked');\n\nShortcut for the C header.\n\n=head2 upgrade\n\n my $upgrade = $headers->upgrade;\n $headers = $headers->upgrade('websocket');\n\nShortcut for the C header.\n\n=head2 user_agent\n\n my $agent = $headers->user_agent;\n $headers = $headers->user_agent('Mojo/1.0');\n\nShortcut for the C header.\n\n=head2 vary\n\n my $vary = $headers->vary;\n $headers = $headers->vary('*');\n\nShortcut for the C header.\n\n=head2 www_authenticate\n\n my $authenticate = $headers->www_authenticate;\n $headers = $headers->www_authenticate('Basic realm=\"realm\"');\n\nShortcut for the C header.\n\n=head1 SEE ALSO\n\nL, L, L.\n\n=cut\n"},"avg_line_length":{"kind":"number","value":23.5945512821,"string":"23.594551"},"max_line_length":{"kind":"number","value":125,"string":"125"},"alphanum_fraction":{"kind":"number","value":0.6768321674,"string":"0.676832"}}},{"rowIdx":463268,"cells":{"hexsha":{"kind":"string","value":"edbc4be717a42c7c933b2b1aa60ad82e5b9d48f1"},"size":{"kind":"number","value":4464,"string":"4,464"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"auto-lib/Paws/GameLift/PlayerSession.pm"},"max_stars_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"auto-lib/Paws/GameLift/PlayerSession.pm"},"max_issues_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"auto-lib/Paws/GameLift/PlayerSession.pm"},"max_forks_repo_name":{"kind":"string","value":"galenhuntington/aws-sdk-perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"13b775dcb5f0b3764f0a82f3679ed5c7721e67d3"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package Paws::GameLift::PlayerSession;\n use Moose;\n has CreationTime => (is => 'ro', isa => 'Str');\n has FleetId => (is => 'ro', isa => 'Str');\n has GameSessionId => (is => 'ro', isa => 'Str');\n has IpAddress => (is => 'ro', isa => 'Str');\n has PlayerData => (is => 'ro', isa => 'Str');\n has PlayerId => (is => 'ro', isa => 'Str');\n has PlayerSessionId => (is => 'ro', isa => 'Str');\n has Port => (is => 'ro', isa => 'Int');\n has Status => (is => 'ro', isa => 'Str');\n has TerminationTime => (is => 'ro', isa => 'Str');\n1;\n\n### main pod documentation begin ###\n\n=head1 NAME\n\nPaws::GameLift::PlayerSession\n\n=head1 USAGE\n\nThis class represents one of two things:\n\n=head3 Arguments in a call to a service\n\nUse the attributes of this class as arguments to methods. You shouldn't make instances of this class. \nEach attribute should be used as a named argument in the calls that expect this type of object.\n\nAs an example, if Att1 is expected to be a Paws::GameLift::PlayerSession object:\n\n $service_obj->Method(Att1 => { CreationTime => $value, ..., TerminationTime => $value });\n\n=head3 Results returned from an API call\n\nUse accessors for each attribute. If Att1 is expected to be an Paws::GameLift::PlayerSession object:\n\n $result = $service_obj->Method(...);\n $result->Att1->CreationTime\n\n=head1 DESCRIPTION\n\nProperties describing a player session. Player session objects are\ncreated either by creating a player session for a specific game\nsession, or as part of a game session placement. A player session\nrepresents either a player reservation for a game session (status\nC) or actual player activity in a game session (status\nC). A player session object (including player data) is\nautomatically passed to a game session when the player connects to the\ngame session and is validated.\n\nWhen a player disconnects, the player session status changes to\nC. Once the session ends, the player session object is\nretained for 30 days and then removed.\n\nPlayer-session-related operations include:\n\n=over\n\n=item *\n\nCreatePlayerSession\n\n=item *\n\nCreatePlayerSessions\n\n=item *\n\nDescribePlayerSessions\n\n=item *\n\nGame session placements\n\n=over\n\n=item *\n\nStartGameSessionPlacement\n\n=item *\n\nDescribeGameSessionPlacement\n\n=item *\n\nStopGameSessionPlacement\n\n=back\n\n=back\n\n\n=head1 ATTRIBUTES\n\n\n=head2 CreationTime => Str\n\n Time stamp indicating when this data object was created. Format is a\nnumber expressed in Unix time as milliseconds (for example\n\"1469498468.057\").\n\n\n=head2 FleetId => Str\n\n Unique identifier for a fleet that the player's game session is running\non.\n\n\n=head2 GameSessionId => Str\n\n Unique identifier for the game session that the player session is\nconnected to.\n\n\n=head2 IpAddress => Str\n\n IP address of the game session. To connect to a Amazon GameLift game\nserver, an app needs both the IP address and port number.\n\n\n=head2 PlayerData => Str\n\n Developer-defined information related to a player. Amazon GameLift does\nnot use this data, so it can be formatted as needed for use in the\ngame.\n\n\n=head2 PlayerId => Str\n\n Unique identifier for a player that is associated with this player\nsession.\n\n\n=head2 PlayerSessionId => Str\n\n Unique identifier for a player session.\n\n\n=head2 Port => Int\n\n Port number for the game session. To connect to a Amazon GameLift\nserver process, an app needs both the IP address and port number.\n\n\n=head2 Status => Str\n\n Current status of the player session.\n\nPossible player session statuses include the following:\n\n=over\n\n=item *\n\nB -- The player session request has been received, but the\nplayer has not yet connected to the server process and/or been\nvalidated.\n\n=item *\n\nB -- The player has been validated by the server process and is\ncurrently connected.\n\n=item *\n\nB -- The player connection has been dropped.\n\n=item *\n\nB -- A player session request was received, but the player\ndid not connect and/or was not validated within the timeout limit (60\nseconds).\n\n=back\n\n\n\n=head2 TerminationTime => Str\n\n Time stamp indicating when this data object was terminated. Format is a\nnumber expressed in Unix time as milliseconds (for example\n\"1469498468.057\").\n\n\n\n=head1 SEE ALSO\n\nThis class forms part of L, describing an object used in L\n\n=head1 BUGS and CONTRIBUTIONS\n\nThe source code is located here: L\n\nPlease report bugs to: L\n\n=cut\n\n"},"avg_line_length":{"kind":"number","value":22.32,"string":"22.32"},"max_line_length":{"kind":"number","value":102,"string":"102"},"alphanum_fraction":{"kind":"number","value":0.7323028674,"string":"0.732303"}}},{"rowIdx":463269,"cells":{"hexsha":{"kind":"string","value":"edbb7db72b01a5cc54343b90dac4408eb83850e5"},"size":{"kind":"number","value":27582,"string":"27,582"},"ext":{"kind":"string","value":"al"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"Apps/W1/AMCBanking365Fundamentals/test/src/Bank/ERMAMCbankingSetupATDD.Codeunit.al"},"max_stars_repo_name":{"kind":"string","value":"kwettermann/ALAppExtensions"},"max_stars_repo_head_hexsha":{"kind":"string","value":"4519eea4a265dda64dd53c0ff5d60d89333842ad"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":337,"string":"337"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2019-05-07T06:04:40.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-03-31T10:07:42.000Z"},"max_issues_repo_path":{"kind":"string","value":"Apps/W1/AMCBanking365Fundamentals/test/src/Bank/ERMAMCbankingSetupATDD.Codeunit.al"},"max_issues_repo_name":{"kind":"string","value":"kwettermann/ALAppExtensions"},"max_issues_repo_head_hexsha":{"kind":"string","value":"4519eea4a265dda64dd53c0ff5d60d89333842ad"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":14850,"string":"14,850"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2019-05-07T06:04:27.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-03-31T19:53:28.000Z"},"max_forks_repo_path":{"kind":"string","value":"Apps/W1/AMCBanking365Fundamentals/test/src/Bank/ERMAMCbankingSetupATDD.Codeunit.al"},"max_forks_repo_name":{"kind":"string","value":"kwettermann/ALAppExtensions"},"max_forks_repo_head_hexsha":{"kind":"string","value":"4519eea4a265dda64dd53c0ff5d60d89333842ad"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":374,"string":"374"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2019-05-09T10:08:14.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2022-03-31T17:48:32.000Z"},"content":{"kind":"string","value":"codeunit 134410 \"ERM AMC banking Setup ATDD\"\n{\n Subtype = Test;\n TestPermissions = NonRestrictive;\n\n trigger OnRun()\n begin\n // [FEATURE] [AMC Banking Fundamentals]\n end;\n\n var\n Assert: Codeunit Assert;\n LibraryTestInitialize: Codeunit \"Library - Test Initialize\";\n LibraryUtility: Codeunit \"Library - Utility\";\n IsolatedStorageManagement: Codeunit \"Isolated Storage Management\";\n UnsecureUriErr: Label 'The URI is not secure.';\n InvalidUriErr: Label 'The URI is not valid.';\n PasswordDoesNotMatchErr: Label 'The password from the database does not match the one that was introduced.';\n EncryptionIsNotActiveErr: Label 'The encryption was not activated.';\n EncryptionIsActiveErr: Label 'The encryption is activated and it should not be.';\n HandlerResponse: Boolean;\n MissingCredentialsErr: Label 'The user name and password must be filled';\n\n [Test]\n [HandlerFunctions('ConfirmHandlerYes,BlankAMCBankingSetupModalHandler,DataEncryprtionHandler')]\n [Scope('OnPrem')]\n procedure CheckCredentialsShouldOpenSetupPageInRealCompany()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n AMCBankingMgt: Codeunit \"AMC Banking Mgt.\";\n begin\n Initialize();\n\n // [GIVEN] \"AMC Bank Service Setup\" table is empty\n AMCBankingSetup.DeleteAll();\n // [GIVEN] The Company is NOT Demo Company\n SetDemoCompany(false);\n // [GIVEN] Run CheckCredentials()()\n AMCBankingMgt.CheckCredentials();\n\n // [WHEN] Answer 'Yes' to the confirmation 'Do you want to open the Setup page?'\n // answer Yes by ConfirmHandlerYes\n\n // [THEN] \"AMC Bank Service Setup\" page is open,\n // [THEN] Where User/Password are empty, the links are filled\n // verify by BlankAMCBankingSetupModalHandler\n end;\n\n [Test]\n [HandlerFunctions('ConfirmHandlerYes,AMCBankingSetupModalHandlerBlankPassword')]\n [Scope('OnPrem')]\n procedure CheckCredentialsShouldFailIfPasswordIsBlank()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n AMCBankingMgt: Codeunit \"AMC Banking Mgt.\";\n begin\n Initialize();\n\n // [GIVEN] AMC Bank Service Setup table is empty\n AMCBankingSetup.DeleteAll(true);\n // [GIVEN] The Company is NOT a Demo Company\n SetDemoCompany(false);\n // [GIVEN] Run CheckCredentials()()\n asserterror AMCBankingMgt.CheckCredentials();\n\n // [GIVEN] Answer 'Yes' to the confirmation 'Do you want to open the Setup page?'\n // answer Yes by ConfirmHandlerYes\n\n // [WHEN] Keep the blank Password on the \"AMC Bank Service Setup\" page and close page\n // handled by AMCBankingSetupModalHandlerBlankPassword\n\n // [THEN] Error message: 'The user name and password must be filled'\n Assert.ExpectedError(MissingCredentialsErr);\n end;\n\n [Test]\n [HandlerFunctions('ConfirmHandlerNo')]\n [Scope('OnPrem')]\n procedure CheckCredentialsShouldFailIfUserCancelConfirmation()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n AMCBankingMgt: Codeunit \"AMC Banking Mgt.\";\n begin\n Initialize();\n\n // [GIVEN] AMC Bank Service Setup table is empty\n AMCBankingSetup.DeleteAll();\n // [GIVEN] The Company is NOT a Demo Company\n SetDemoCompany(false);\n // [GIVEN] Run CheckCredentials()\n asserterror AMCBankingMgt.CheckCredentials();\n\n // [GIVEN] Answer 'No' to the confirmation 'Do you want to open the Setup page?'\n // answer No by ConfirmHandlerNo\n\n // [THEN] Error message: 'The user name and password must be filled'\n Assert.ExpectedError(MissingCredentialsErr);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanStoreHisAMCSetupInformation()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n PasswordAMC: Text;\n UserNameAMC: Text[50];\n begin\n // [FEATURE] [Password]\n // [SCENARIO 1] As a an Administrator I will store the User ID and Password obtained from the AMC Service site into Dynamics Nav,\n // this is used to enable bank data file conversion to happen from DynamicsNav.\n // [GIVEN] A User ID and password obtained from the AMC service site.\n // [WHEN] Username and Password is entered into the AMC Bank Service Setup\n // [THEN] The AMC Integration would be able to obtain User ID and Password to make use of the AMC Service, the Service URL was\n // automaticaly prepopulated\n Initialize();\n\n // Setup: Clear the existing setup\n if AMCBankingSetup.Get() then\n AMCBankingSetup.Delete();\n\n // Setup: Optain username and password\n UserNameAMC :=\n LibraryUtility.GenerateRandomCode(AMCBankingSetup.FieldNo(\"User Name\"), DATABASE::\"AMC Banking Setup\");\n PasswordAMC := GenerateRandomPassword();\n\n // Execute: Save username and password in service setup\n AMCBankingSetup.Init();\n AMCBankingSetup.Validate(\"User Name\", UserNameAMC);\n AMCBankingSetup.SavePassword(PasswordAMC);\n AMCBankingSetup.\"AMC Enabled\" := true;\n AMCBankingSetup.Insert();\n AMCBankingSetup.SetURLsToDefault();\n\n // Validate\n ValidateSetup(UserNameAMC, PasswordAMC);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanChangeHisAMCPassword()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n PasswordAMC: Text;\n UserNameAMC: Text[50];\n begin\n // [FEATURE] [Password]\n // [SCENARIO 2] As a an Administrator I will update the User ID and Password obtained from the AMC Service site into Dynamics Nav,\n // this is used to enable bank data file conversion to happen from DynamicsNav.\n // [GIVEN] A new User ID and password obtained from the AMC service site and an existing AMC Bank Service Setup.\n // [WHEN] The new Username and Password is entered into the existing AMC Bank Service Setup\n // [THEN] The AMC Integration would be able to obtain the updated User ID and Password to make use of the AMC Service, the\n // Service URL will remain unchanged.\n Initialize();\n\n // Setup: Optain username and password\n UserNameAMC :=\n LibraryUtility.GenerateRandomCode(AMCBankingSetup.FieldNo(\"User Name\"), DATABASE::\"AMC Banking Setup\");\n PasswordAMC := GenerateRandomPassword();\n\n // Execute: Save username and password in service setup\n AMCBankingSetup.Get();\n AMCBankingSetup.Validate(\"User Name\", UserNameAMC);\n AMCBankingSetup.SavePassword(PasswordAMC);\n AMCBankingSetup.Modify();\n\n // Validate\n ValidateSetup(UserNameAMC, PasswordAMC);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanChangeTheAMCSetupURL()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n PasswordAMC: Text;\n SignupAMC: Text[250];\n begin\n // [FEATURE] [URL]\n // [SCENARIO 3] As a an Administrator I will be able to update the Sign-up URL for the AMC service,\n // this is used to enable bank data file conversion to happen from DynamicsNav.\n // [GIVEN] A Sign-up URL and an existing AMC Bank Service Setup.\n // [WHEN] The Sign-up URL is entered into the existing AMC Bank Service Setup\n // [THEN] The Sign-up URL is save to make it simple to do the AMC Sign-up, User ID and Password\n // will remain unchanged.\n Initialize();\n\n // Setup: Optain username and SignupURL\n AMCBankingSetup.Get();\n PasswordAMC := AMCBankingSetup.GetPassword();\n SignupAMC :=\n LibraryUtility.GenerateRandomCode(AMCBankingSetup.FieldNo(\"Sign-up URL\"), DATABASE::\"AMC Banking Setup\");\n\n // Execute: Save username and password in service setup\n AMCBankingSetup.Get();\n AMCBankingSetup.Validate(\"Sign-up URL\", SignupAMC);\n AMCBankingSetup.Modify();\n\n // Validate\n AMCBankingSetup.Get();\n Assert.AreEqual(PasswordAMC, AMCBankingSetup.GetPassword(), 'Password invalid');\n Assert.AreEqual(SignupAMC, AMCBankingSetup.\"Sign-up URL\", 'Sign-up invalid');\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanChangeTheAMCServiceURL()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n LibraryRandom: Codeunit \"Library - Random\";\n PasswordAMC: Text;\n ServiceURLAMC: Text[250];\n UserNameAMC: Text[50];\n begin\n // [FEATURE] [URL]\n // [SCENARIO 4] As a an Administrator I will be able to update the Service URL for the AMC service,\n // this is used to enable bank data file conversion to happen from DynamicsNav.\n // [GIVEN] A Service URL and an existing AMC Bank Service Setup.\n // [WHEN] The Service URL is entered into the existing AMC Bank Service Setup\n // [THEN] The AMC Integration would be able to get the changed Service URL and use it to connect to the AMC service, User ID and Password\n // will be reset.\n Initialize();\n\n // Setup: Optain password and Service URL\n AMCBankingSetup.Get();\n AMCBankingSetup.\"User Name\" := CopyStr(LibraryRandom.RandText(50), 1, MaxStrLen(AMCBankingSetup.\"User Name\"));\n AMCBankingSetup.SavePassword(LibraryRandom.RandText(50));\n AMCBankingSetup.Modify();\n\n PasswordAMC := AMCBankingSetup.GetPassword();\n UserNameAMC := AMCBankingSetup.GetUserName();\n\n ServiceURLAMC := GenerateRandomUrl(true);\n\n // Execute: Save username and password in service setup\n AMCBankingSetup.Get();\n AMCBankingSetup.Validate(\"Service URL\", ServiceURLAMC);\n AMCBankingSetup.Modify();\n\n // Validate\n AMCBankingSetup.Get();\n Assert.AreNotEqual(PasswordAMC, AMCBankingSetup.GetPassword(), 'Password must be reset when changing service URL');\n Assert.AreNotEqual(UserNameAMC, AMCBankingSetup.GetUserName(), 'Username must be reset when changing service URL');\n Assert.AreEqual(ServiceURLAMC, AMCBankingSetup.\"Service URL\", 'Service URL invalid');\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanChangeTheAMCServiceURLToBeBlank()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n ServiceURLAMC: Text[250];\n begin\n // [FEATURE] [URL]\n // [SCENARIO 8] As an Administrator I will be able to update the Service URL for the AMC service as BLANK.\n // [GIVEN] An existing AMC Bank Service Setup.\n // [WHEN] The existng Service URL is deleted\n // [THEN] The field validation does not fail on a BLANK value in the Service URL field.\n Initialize();\n\n // Setup: Create a valid AMC Banking Setup record\n ServiceURLAMC := GenerateRandomUrl(true);\n AMCBankingSetup.Get();\n AMCBankingSetup.Validate(\"Service URL\", ServiceURLAMC);\n AMCBankingSetup.Modify();\n\n // Execute: Reset the Service URL to a BLANK\n AMCBankingSetup.Validate(\"Service URL\", '');\n AMCBankingSetup.Modify();\n\n // Validate: That the BLANK is saved\n AMCBankingSetup.Get();\n Assert.AreEqual('', AMCBankingSetup.\"Service URL\", 'Service URL is not set to empty');\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanEnterOnlySecureURLAsTheAMCServiceURL()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n ServiceURLAMC: Text[250];\n begin\n // [FEATURE] [URL]\n // [SCENARIO 9] As an Administrator I will only be able to create and update the Service URL for the AMC service that is secure.\n // [GIVEN] A new AMC Bank Service Setup.\n // [WHEN] A unsecure URL is entered in the Service URL field of the AMC Bank Service Setup\n // [THEN] Error is thrown.\n Initialize();\n // Setup: Generate a random unsecure URL\n ServiceURLAMC := GenerateRandomUrl(false);\n\n // Execute: Set the Service URL to the generated unsecure URL\n AMCBankingSetup.Get();\n asserterror AMCBankingSetup.Validate(\"Service URL\", ServiceURLAMC);\n\n // Validate: Exception is thrown\n Assert.ExpectedError(UnsecureUriErr);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanEnterOnlyValidURLAsTheAMCServiceURL()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n ServiceURLAMC: Text[250];\n begin\n // [FEATURE] [URL]\n // [SCENARIO 10] As an Administrator I will be able to update the Service URL for the AMC service as BLANK.\n // [GIVEN] An new AMC Bank Service Setup.\n // [WHEN] An invalid URL is entered in the Service URL field of the AMC Bank Service Setup\n // [THEN] Error is thrown.\n Initialize();\n\n // Setup: Generate a random text URL\n ServiceURLAMC := CopyStr(LibraryUtility.GenerateRandomText(5), 1, 5);\n\n // Execute: Set the Service URL to the generated text which will result in an invalid URL\n AMCBankingSetup.Get();\n asserterror AMCBankingSetup.Validate(\"Service URL\", ServiceURLAMC);\n\n // Validate: Exception is thrown\n Assert.ExpectedError(InvalidUriErr);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanChangeTheAMCSupportURL()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n PasswordAMC: Text;\n SupportURLAMC: Text[250];\n begin\n // [FEATURE] [URL]\n // [SCENARIO 5] As an Administrator I will be able to update the Support URL for the AMC service,\n // this is used to enable bank data file conversion to show contact information in case of connection issues.\n // [GIVEN] A Support URL and an existing AMC Bank Service Setup.\n // [WHEN] The Support URL is entered into the existing AMC Bank Service Setup\n // [THEN] The AMC Integration would be able to get the changed Support URL and use it to connect to the AMC service error\n // information, User ID and Password will remain unchanged.\n Initialize();\n\n // Setup: Optain username and Support URL\n AMCBankingSetup.Get();\n PasswordAMC := AMCBankingSetup.GetPassword();\n SupportURLAMC :=\n LibraryUtility.GenerateRandomCode(AMCBankingSetup.FieldNo(\"Service URL\"), DATABASE::\"AMC Banking Setup\");\n\n // Execute: Save username and password in service setup\n AMCBankingSetup.Get();\n AMCBankingSetup.Validate(\"Support URL\", SupportURLAMC);\n AMCBankingSetup.Modify();\n\n // Validate\n AMCBankingSetup.Get();\n Assert.AreEqual(PasswordAMC, AMCBankingSetup.GetPassword(), 'Password invalid');\n Assert.AreEqual(SupportURLAMC, AMCBankingSetup.\"Support URL\", 'Support URL invalid');\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanDeleteTheAMCSetupInformation()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n PasswordKey: Guid;\n begin\n // [FEATURE] [Password]\n // [SCENARIO 6] As a an Administrator I will remove the service setup to prevent use of hte AMC serive\n // [GIVEN] An existing AMC Bank Service Setup.\n // [WHEN] Delete of existing AMC Bank Service Setup\n // [THEN] The AMC Integration would NOT be able to obtain the updated User ID and Password to make use of the AMC Service\n Initialize();\n\n // Execute: Save username and password in service setup\n AMCBankingSetup.Get();\n PasswordKey := AMCBankingSetup.\"Password Key\";\n AMCBankingSetup.Delete(true);\n\n // Validate\n Assert.IsFalse(AMCBankingSetup.Get(), 'Setup should not exist');\n Assert.IsFalse(IsolatedStorageManagement.Contains(PasswordKey, DATASCOPE::Company), 'Password should not exist');\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure UserCanSeeThatAPasswordExist()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n begin\n // [FEATURE] [Password]\n // [SCENARIO 7] As a an Administrator I can see that a password exist\n // [GIVEN] An existing AMC Bank Service Setup.\n // [WHEN] Open AMC Bank Service Setup\n // [THEN] Password should show ******\n Initialize();\n\n // Execute: Save username and password in service setup\n AMCBankingSetup.Get();\n\n // Validate: The HasPassword used by UI\n Assert.IsTrue(AMCBankingSetup.HasPassword(), 'Password should exist');\n end;\n\n [Test]\n [HandlerFunctions('ConfirmHandlerNo')]\n [Scope('OnPrem')]\n procedure StorePasswordWithoutEncryption()\n var\n AMCBankingSetupRec: Record \"AMC Banking Setup\";\n CryptographyManagement: Codeunit \"Cryptography Management\";\n AMCBankingSetup: TestPage \"AMC Banking Setup\";\n begin\n // [FEATURE] [Password]\n // [SCENARIO 11] The user enters a new password.\n // [GIVEN] There is no password set for the conversion service.\n // [WHEN] The user enters a new password.\n // [THEN] The password will be stored in clear text.\n Initialize();\n\n // Setup\n if CryptographyManagement.IsEncryptionEnabled() then\n CryptographyManagement.DisableEncryption(true);\n\n AMCBankingSetup.OpenEdit();\n AMCBankingSetup.Password.SetValue('');\n\n // Execute\n AMCBankingSetup.Password.SetValue('Random Words');\n AMCBankingSetup.OK().Invoke();\n\n // Verify\n Assert.IsFalse(EncryptionEnabled(), EncryptionIsActiveErr);\n\n AMCBankingSetupRec.Get();\n Assert.AreEqual('Random Words', AMCBankingSetupRec.GetPassword(), PasswordDoesNotMatchErr);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure StorePasswordWithEncryption()\n var\n AMCBankingSetupRec: Record \"AMC Banking Setup\";\n CryptographyManagement: Codeunit \"Cryptography Management\";\n AMCBankingSetup: TestPage \"AMC Banking Setup\";\n begin\n // [FEATURE] [Password]\n // [SCENARIO 12] The user enters a new password.\n // [GIVEN] There is no password set for the conversion service.\n // [WHEN] The user enters a new password.\n // [THEN] The password will be stored encrypted.\n Initialize();\n\n // Setup\n if CryptographyManagement.IsEncryptionEnabled() then\n CryptographyManagement.DisableEncryption(true);\n\n AMCBankingSetup.OpenEdit();\n AMCBankingSetup.Password.SetValue('');\n CryptographyManagement.EnableEncryption(true);\n\n // Execute\n AMCBankingSetup.Password.SetValue('Random Words 2');\n AMCBankingSetup.OK().Invoke();\n\n // Verify\n AMCBankingSetupRec.Get();\n\n Assert.AreEqual('Random Words 2', AMCBankingSetupRec.GetPassword(), PasswordDoesNotMatchErr);\n Assert.IsTrue(EncryptionEnabled(), EncryptionIsNotActiveErr);\n\n // Clean-up\n CryptographyManagement.DisableEncryption(true);\n end;\n\n [Test]\n [HandlerFunctions('ConfirmHandlerYesNo')]\n [Scope('OnPrem')]\n procedure StorePasswordWithoutEncryptionAndCheckConfirmDialog()\n var\n AMCBankingSetupRec: Record \"AMC Banking Setup\";\n CryptographyManagement: Codeunit \"Cryptography Management\";\n AMCBankingSetup: TestPage \"AMC Banking Setup\";\n DataEncryptionManagement: TestPage \"Data Encryption Management\";\n begin\n // [FEATURE] [Password]\n // [SCENARIO 13] The user enters a new password and a confirmation dialog appears.\n // [GIVEN] There is no password set for the conversion service.\n // [WHEN] The user enters a new password.\n // [THEN] The password will be stored in clear text and a confirmation dialog appears.\n Initialize();\n\n // Setup\n HandlerResponse := true;\n if CryptographyManagement.IsEncryptionEnabled() then\n CryptographyManagement.DisableEncryption(true);\n\n DataEncryptionManagement.Trap();\n AMCBankingSetup.OpenEdit();\n AMCBankingSetup.Password.SetValue('');\n\n // Execute\n AMCBankingSetup.Password.SetValue('Random Words 3');\n\n AMCBankingSetup.OK().Invoke();\n\n DataEncryptionManagement.OK().Invoke();\n\n // Verify\n Assert.IsFalse(EncryptionEnabled(), EncryptionIsActiveErr);\n\n AMCBankingSetupRec.Get();\n Assert.AreEqual('Random Words 3', AMCBankingSetupRec.GetPassword(), PasswordDoesNotMatchErr);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure AMCBankingSetupIsCreatedIfItDoesNotExist()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n AMCBankingSetupPage: TestPage \"AMC Banking Setup\";\n begin\n // [FEATURE] [URL] [Demo Company]\n // [SCENARIO 14] As an admin, when I open the conv setup page I can see the default URLs.\n Initialize();\n\n SetDemoCompany(true);\n // [GIVEN] There is no conversion setup record.\n AMCBankingSetup.DeleteAll();\n\n // [WHEN] The user opens the conversion setup page.\n AMCBankingSetupPage.OpenEdit();\n AMCBankingSetupPage.Password.SetValue(''); // to avoid encryption confirmation\n AMCBankingSetupPage.OK().Invoke();\n\n // [THEN] The defaul URLs are in place.\n AMCBankingSetup.Get();\n ValidateDefaultURLs(AMCBankingSetup);\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure PageInEditAllFieldsEditable()\n var\n AMCBankingSetup: TestPage \"AMC Banking Setup\";\n begin\n // [FEATURE] [UI]\n // [SCENARIO 16] As an admin, when open AMC Banking Setup in edit all fields should be editable.\n Initialize();\n\n // [GIVEN] There is a default conversion setup record.\n // [WHEN] The user opens the conversion setup page in edit mode.\n AMCBankingSetup.OpenEdit();\n\n // [THEN] All fields editable.\n Assert.IsTrue(AMCBankingSetup.\"User Name\".Editable(), 'User Name field should be editable');\n Assert.IsTrue(AMCBankingSetup.Password.Editable(), 'Password field should be editable');\n Assert.IsTrue(AMCBankingSetup.\"Service URL\".Editable(), 'Service URL field should be editable');\n end;\n\n [Test]\n [Scope('OnPrem')]\n procedure PageInViewAllFieldsReadOnly()\n var\n AMCBankingSetup: TestPage \"AMC Banking Setup\";\n begin\n // [FEATURE] [UI]\n // [SCENARIO 17] As an admin, when open AMC Banking Setup in view all fields should be read only.\n Initialize();\n\n // [GIVEN] There is a default conversion setup record.\n // [WHEN] The user opens the conversion setup page in view mode.\n AMCBankingSetup.OpenView();\n\n // [THEN] All fields read only.\n Assert.IsFalse(AMCBankingSetup.\"User Name\".Editable(), 'User Name field should not be editable');\n Assert.IsFalse(AMCBankingSetup.Password.Editable(), 'Password field should not be editable');\n Assert.IsFalse(AMCBankingSetup.\"Service URL\".Editable(), 'Service URL field should not be editable');\n end;\n\n local procedure Initialize()\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n EnvironmentInfoTestLibrary: Codeunit \"Environment Info Test Library\";\n begin\n LibraryTestInitialize.OnTestInitialize(CODEUNIT::\"ERM AMC banking Setup ATDD\");\n EnvironmentInfoTestLibrary.SetTestabilitySoftwareAsAService(false);\n AMCBankingSetup.DeleteAll();\n AMCBankingSetup.Init();\n AMCBankingSetup.Validate(\"User Name\",\n LibraryUtility.GenerateRandomCode(AMCBankingSetup.FieldNo(\"User Name\"), DATABASE::\"AMC Banking Setup\"));\n AMCBankingSetup.SavePassword(GenerateRandomPassword());\n AMCBankingSetup.\"AMC Enabled\" := true;\n AMCBankingSetup.Insert(true);\n end;\n\n local procedure SetDemoCompany(DemoCompany: Boolean)\n var\n CompanyInformation: Record \"Company Information\";\n begin\n CompanyInformation.Get();\n CompanyInformation.\"Demo Company\" := DemoCompany;\n CompanyInformation.Modify();\n end;\n\n local procedure ValidateSetup(ExpectedUserName: Text[50]; ExpectedPassword: Text)\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n begin\n AMCBankingSetup.Get();\n Assert.AreEqual(ExpectedUserName, AMCBankingSetup.\"User Name\", 'User Name invalid');\n Assert.AreEqual(ExpectedPassword, AMCBankingSetup.GetPassword(), 'Password invalid');\n ValidateDefaultURLs(AMCBankingSetup);\n end;\n\n local procedure ValidateDefaultURLs(AMCBankingSetup: Record \"AMC Banking Setup\")\n var\n AMCBankingMgt: Codeunit \"AMC Banking Mgt.\";\n begin\n Assert.AreEqual('https://license.amcbanking.com/register', AMCBankingSetup.\"Sign-up URL\", 'Sign-up invalid');\n if ((AMCBankingSetup.Solution = AMCBankingMgt.GetDemoSolutionCode()) or\n (AMCBankingSetup.Solution = '')) then\n Assert.AreEqual('https://demoxtl.amcbanking.com/nav03', AMCBankingSetup.\"Service URL\", 'Service URL invalid')\n else\n Assert.AreEqual('https://nav.amcbanking.com/nav03', AMCBankingSetup.\"Service URL\", 'Service URL invalid');\n Assert.AreEqual('https://amcbanking.com/landing365bc/help/', AMCBankingSetup.\"Support URL\", 'Service URL invalid');\n end;\n\n local procedure GenerateRandomUrl(Secure: Boolean): Text[250]\n var\n AMCBankingSetup: Record \"AMC Banking Setup\";\n RandomCode: Code[250];\n Prefix: Text[8];\n begin\n if Secure then\n Prefix := 'https://'\n else\n Prefix := 'http://';\n\n RandomCode :=\n LibraryUtility.GenerateRandomCode(AMCBankingSetup.FieldNo(\"Service URL\"), DATABASE::\"AMC Banking Setup\");\n\n RandomCode := CopyStr(Prefix + RandomCode, 1, 250);\n exit(RandomCode);\n end;\n\n local procedure GenerateRandomPassword(): Text\n begin\n exit(LibraryUtility.GenerateRandomText(251));\n end;\n\n [ConfirmHandler]\n [Scope('OnPrem')]\n procedure ConfirmHandlerNo(Question: Text; var Reply: Boolean)\n begin\n Reply := false;\n end;\n\n [ConfirmHandler]\n [Scope('OnPrem')]\n procedure ConfirmHandlerYes(Question: Text; var Reply: Boolean)\n begin\n Reply := true;\n end;\n\n [ConfirmHandler]\n [Scope('OnPrem')]\n procedure ConfirmHandlerYesNo(Question: Text; var Reply: Boolean)\n begin\n Reply := HandlerResponse;\n HandlerResponse := not HandlerResponse;\n end;\n\n [ModalPageHandler]\n [Scope('OnPrem')]\n procedure BlankAMCBankingSetupModalHandler(var AMCBankingSetupPage: TestPage \"AMC Banking Setup\")\n begin\n AMCBankingSetupPage.\"User Name\".AssertEquals('demouser');\n Assert.ExpectedMessage('amc', AMCBankingSetupPage.\"Service URL\".Value());\n // Set not blank Password to avoid an error\n AMCBankingSetupPage.Password.SetValue('P');\n AMCBankingSetupPage.OK().Invoke();\n end;\n\n [ModalPageHandler]\n [Scope('OnPrem')]\n procedure AMCBankingSetupModalHandlerBlankPassword(var AMCBankingSetupPage: TestPage \"AMC Banking Setup\")\n begin\n // Password is blank\n AMCBankingSetupPage.\"User Name\".SetValue('newuser');\n AMCBankingSetupPage.Password.SetValue('');\n AMCBankingSetupPage.OK().Invoke();\n end;\n\n [ModalPageHandler]\n [Scope('OnPrem')]\n procedure AMCBankingSetupModalHandler(var AMCBankingSetupPage: TestPage \"AMC Banking Setup\")\n begin\n // Password is blank\n AMCBankingSetupPage.OK().Invoke();\n end;\n\n [PageHandler]\n [Scope('OnPrem')]\n procedure DataEncryprtionHandler(var DataEncryptionManagement: TestPage \"Data Encryption Management\")\n begin\n DataEncryptionManagement.Close();\n end;\n}\n"},"avg_line_length":{"kind":"number","value":39.0127298444,"string":"39.01273"},"max_line_length":{"kind":"number","value":145,"string":"145"},"alphanum_fraction":{"kind":"number","value":0.6632949025,"string":"0.663295"}}},{"rowIdx":463270,"cells":{"hexsha":{"kind":"string","value":"ed25e4e5e1358a0c4a08d682b65428c6633d4876"},"size":{"kind":"number","value":1598,"string":"1,598"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"modules/Bio/EnsEMBL/Hive/DBSQL/ResourceClassAdaptor.pm"},"max_stars_repo_name":{"kind":"string","value":"muffato/ensembl-hive"},"max_stars_repo_head_hexsha":{"kind":"string","value":"6d6fa0ef57dd3a76695e255d2e76d96603b4179b"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"modules/Bio/EnsEMBL/Hive/DBSQL/ResourceClassAdaptor.pm"},"max_issues_repo_name":{"kind":"string","value":"muffato/ensembl-hive"},"max_issues_repo_head_hexsha":{"kind":"string","value":"6d6fa0ef57dd3a76695e255d2e76d96603b4179b"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"modules/Bio/EnsEMBL/Hive/DBSQL/ResourceClassAdaptor.pm"},"max_forks_repo_name":{"kind":"string","value":"muffato/ensembl-hive"},"max_forks_repo_head_hexsha":{"kind":"string","value":"6d6fa0ef57dd3a76695e255d2e76d96603b4179b"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"=pod\n\n=head1 NAME\n\n Bio::EnsEMBL::Hive::DBSQL::ResourceClassAdaptor\n\n=head1 SYNOPSIS\n\n $resource_class_adaptor = $db_adaptor->get_ResourceClassAdaptor;\n\n $resource_class_adaptor = $resource_class_object->adaptor;\n\n=head1 DESCRIPTION\n\n Module to encapsulate all db access for persistent class ResourceClass.\n There should be just one per application and database connection.\n\n=head1 LICENSE\n\n Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute\n Copyright [2016-2022] EMBL-European Bioinformatics Institute\n\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software distributed under the License\n is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and limitations under the License.\n\n=head1 CONTACT\n\n Please subscribe to the Hive mailing list: http://listserver.ebi.ac.uk/mailman/listinfo/ehive-users to discuss Hive-related questions or to be notified of our updates\n\n=cut\n\n\npackage Bio::EnsEMBL::Hive::DBSQL::ResourceClassAdaptor;\n\nuse strict;\nuse warnings;\n\nuse base ('Bio::EnsEMBL::Hive::DBSQL::ObjectAdaptor');\n\n\nsub default_table_name {\n return 'resource_class';\n}\n\n\nsub object_class {\n return 'Bio::EnsEMBL::Hive::ResourceClass';\n}\n\n1;\n\n"},"avg_line_length":{"kind":"number","value":27.5517241379,"string":"27.551724"},"max_line_length":{"kind":"number","value":172,"string":"172"},"alphanum_fraction":{"kind":"number","value":0.7596996245,"string":"0.7597"}}},{"rowIdx":463271,"cells":{"hexsha":{"kind":"string","value":"edca17ec3fa797535964da8d9fa9374f897e5b13"},"size":{"kind":"number","value":666,"string":"666"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"tests/impl/uJIT-tests-Lua/suite/profile-leaf.t"},"max_stars_repo_name":{"kind":"string","value":"luavela/luavela"},"max_stars_repo_head_hexsha":{"kind":"string","value":"56c6e8d833cad56ae524ae82d6ae370bedcd2a45"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":64,"string":"64"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2020-08-18T18:44:47.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-03-30T23:14:30.000Z"},"max_issues_repo_path":{"kind":"string","value":"tests/impl/uJIT-tests-Lua/suite/profile-leaf.t"},"max_issues_repo_name":{"kind":"string","value":"luavela/luavela"},"max_issues_repo_head_hexsha":{"kind":"string","value":"56c6e8d833cad56ae524ae82d6ae370bedcd2a45"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":5,"string":"5"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2020-08-24T08:15:24.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-01-13T08:49:02.000Z"},"max_forks_repo_path":{"kind":"string","value":"tests/impl/uJIT-tests-Lua/suite/profile-leaf.t"},"max_forks_repo_name":{"kind":"string","value":"luavela/luavela"},"max_forks_repo_head_hexsha":{"kind":"string","value":"56c6e8d833cad56ae524ae82d6ae370bedcd2a45"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":3,"string":"3"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2020-09-09T09:12:49.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-03-19T11:56:07.000Z"},"content":{"kind":"string","value":"#!/usr/bin/perl\n#\n# Tests for leaf profiler.\n# Copyright (C) 2020-2021 LuaVela Authors. See Copyright Notice in COPYRIGHT\n# Copyright (C) 2015-2020 IPONWEB Ltd. See Copyright Notice in COPYRIGHT\n\nuse 5.010;\nuse warnings;\nuse strict;\nuse lib './lib';\n\nuse UJit::Test;\n\nmy $tester = UJit::Test->new(\n chunks_dir => './chunks/profile-leaf',\n);\n\nmy @chunks = qw/\n simple.lua\n mm-continuation.lua\n ff-vm-state.lua\n tail-call.lua tail-call-ff.lua\n coro-yield-resume.lua coro-vm-state.lua\n callgraph.lua\n restart.lua\n/;\n\nfor my $jit_mode (0, 1) {\n for my $chunk (@chunks) {\n $tester->run($chunk, jit => $jit_mode)->exit_ok;\n }\n}\n\nexit;\n"},"avg_line_length":{"kind":"number","value":19.0285714286,"string":"19.028571"},"max_line_length":{"kind":"number","value":76,"string":"76"},"alphanum_fraction":{"kind":"number","value":0.6516516517,"string":"0.651652"}}},{"rowIdx":463272,"cells":{"hexsha":{"kind":"string","value":"73da17c097bb94cba3e57333e422d34422e7afb7"},"size":{"kind":"number","value":1219,"string":"1,219"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"bundle/srcache-nginx-module-0.31/t/disk.t"},"max_stars_repo_name":{"kind":"string","value":"zyqCSL/openresty-1.13.6.1-instrumented"},"max_stars_repo_head_hexsha":{"kind":"string","value":"21be1c9e8e57a894a38865e34bccb2d3a97a6c18"},"max_stars_repo_licenses":{"kind":"list like","value":["BSD-2-Clause"],"string":"[\n \"BSD-2-Clause\"\n]"},"max_stars_count":{"kind":"number","value":147,"string":"147"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-01-06T05:12:03.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-01-13T11:02:44.000Z"},"max_issues_repo_path":{"kind":"string","value":"bundle/srcache-nginx-module-0.31/t/disk.t"},"max_issues_repo_name":{"kind":"string","value":"zyqCSL/openresty-1.13.6.1-instrumented"},"max_issues_repo_head_hexsha":{"kind":"string","value":"21be1c9e8e57a894a38865e34bccb2d3a97a6c18"},"max_issues_repo_licenses":{"kind":"list like","value":["BSD-2-Clause"],"string":"[\n \"BSD-2-Clause\"\n]"},"max_issues_count":{"kind":"number","value":19,"string":"19"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2015-01-20T13:50:03.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-11-30T15:54:32.000Z"},"max_forks_repo_path":{"kind":"string","value":"bundle/srcache-nginx-module-0.31/t/disk.t"},"max_forks_repo_name":{"kind":"string","value":"zyqCSL/openresty-1.13.6.1-instrumented"},"max_forks_repo_head_hexsha":{"kind":"string","value":"21be1c9e8e57a894a38865e34bccb2d3a97a6c18"},"max_forks_repo_licenses":{"kind":"list like","value":["BSD-2-Clause"],"string":"[\n \"BSD-2-Clause\"\n]"},"max_forks_count":{"kind":"number","value":59,"string":"59"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-02-13T09:28:51.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2022-02-11T13:37:33.000Z"},"content":{"kind":"string","value":"# vi:filetype=\n\nuse lib 'lib';\nuse Test::Nginx::Socket;\n\n#repeat_each(100);\n\nplan tests => repeat_each() * (2 * blocks() + 1);\n\n$ENV{TEST_NGINX_MEMCACHED_PORT} ||= 11211;\n\nno_shuffle();\n\nrun_tests();\n\n__DATA__\n\n=== TEST 1: flush all\n--- config\n location /flush {\n set $memc_cmd 'flush_all';\n memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT;\n }\n--- request\nGET /flush\n--- response_body eval: \"OK\\r\\n\"\n\n\n\n=== TEST 2: cache miss\n--- config\n location /index.html {\n srcache_fetch GET /memc $uri;\n srcache_store PUT /memc $uri;\n }\n\n location /memc {\n internal;\n\n set $memc_key $query_string;\n set $memc_exptime 300;\n memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT;\n }\n--- request\nGET /index.html\n--- response_headers\nAccept-Ranges: bytes\n--- response_body_like: It works!\n\n\n\n=== TEST 3: cache hit\n--- config\n location /index.html {\n srcache_fetch GET /memc $uri;\n srcache_store PUT /memc $uri;\n }\n\n location /memc {\n internal;\n\n set $memc_key $query_string;\n set $memc_exptime 300;\n memc_pass 127.0.0.1:$TEST_NGINX_MEMCACHED_PORT;\n }\n--- request\nGET /index.html\n--- response_body_like: It works!\n\n"},"avg_line_length":{"kind":"number","value":17.4142857143,"string":"17.414286"},"max_line_length":{"kind":"number","value":55,"string":"55"},"alphanum_fraction":{"kind":"number","value":0.6193601313,"string":"0.61936"}}},{"rowIdx":463273,"cells":{"hexsha":{"kind":"string","value":"ed6382d5dd800d7d738a6f7ca56859f581de3ea2"},"size":{"kind":"number","value":5169,"string":"5,169"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"scripts/local/lib/perl5/Test2/Util.pm"},"max_stars_repo_name":{"kind":"string","value":"ashkanx/binary-mt"},"max_stars_repo_head_hexsha":{"kind":"string","value":"ca9d040abb3ee1ac0e79964d79b86ff1bc0446fe"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"scripts/local/lib/perl5/Test2/Util.pm"},"max_issues_repo_name":{"kind":"string","value":"ashkanx/binary-mt"},"max_issues_repo_head_hexsha":{"kind":"string","value":"ca9d040abb3ee1ac0e79964d79b86ff1bc0446fe"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":3,"string":"3"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2016-09-22T07:23:29.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2017-02-01T01:39:44.000Z"},"max_forks_repo_path":{"kind":"string","value":"scripts/local/lib/perl5/Test2/Util.pm"},"max_forks_repo_name":{"kind":"string","value":"ashkanx/binary-mt"},"max_forks_repo_head_hexsha":{"kind":"string","value":"ca9d040abb3ee1ac0e79964d79b86ff1bc0446fe"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":10,"string":"10"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2016-09-13T02:10:40.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-07-11T23:11:01.000Z"},"content":{"kind":"string","value":"package Test2::Util;\nuse strict;\nuse warnings;\n\nour $VERSION = '1.302015';\n\n\nuse Config qw/%Config/;\n\nour @EXPORT_OK = qw{\n try\n\n pkg_to_file\n\n get_tid USE_THREADS\n CAN_THREAD\n CAN_REALLY_FORK\n CAN_FORK\n};\nuse base 'Exporter';\n\nsub _can_thread {\n return 0 unless $] >= 5.008001;\n return 0 unless $Config{'useithreads'};\n\n # Threads are broken on perl 5.10.0 built with gcc 4.8+\n if ($] == 5.010000 && $Config{'ccname'} eq 'gcc' && $Config{'gccversion'}) {\n my @parts = split /\\./, $Config{'gccversion'};\n return 0 if $parts[0] >= 4 && $parts[1] >= 8;\n }\n\n # Change to a version check if this ever changes\n return 0 if $INC{'Devel/Cover.pm'};\n return 1;\n}\n\nsub _can_fork {\n return 1 if $Config{d_fork};\n return 0 unless $^O eq 'MSWin32' || $^O eq 'NetWare';\n return 0 unless $Config{useithreads};\n return 0 unless $Config{ccflags} =~ /-DPERL_IMPLICIT_SYS/;\n\n return _can_thread();\n}\n\nBEGIN {\n no warnings 'once';\n *CAN_REALLY_FORK = $Config{d_fork} ? sub() { 1 } : sub() { 0 };\n *CAN_THREAD = _can_thread() ? sub() { 1 } : sub() { 0 };\n *CAN_FORK = _can_fork() ? sub() { 1 } : sub() { 0 };\n}\n\nsub _manual_try(&;@) {\n my $code = shift;\n my $args = \\@_;\n my $err;\n\n my $die = delete $SIG{__DIE__};\n\n eval { $code->(@$args); 1 } or $err = $@ || \"Error was squashed!\\n\";\n\n $die ? $SIG{__DIE__} = $die : delete $SIG{__DIE__};\n\n return (!defined($err), $err);\n}\n\nsub _local_try(&;@) {\n my $code = shift;\n my $args = \\@_;\n my $err;\n\n no warnings;\n local $SIG{__DIE__};\n eval { $code->(@$args); 1 } or $err = $@ || \"Error was squashed!\\n\";\n\n return (!defined($err), $err);\n}\n\n# Older versions of perl have a nasty bug on win32 when localizing a variable\n# before forking or starting a new thread. So for those systems we use the\n# non-local form. When possible though we use the faster 'local' form.\nBEGIN {\n if ($^O eq 'MSWin32' && $] < 5.020002) {\n *try = \\&_manual_try;\n }\n else {\n *try = \\&_local_try;\n }\n}\n\nBEGIN {\n if(CAN_THREAD) {\n if ($INC{'threads.pm'}) {\n # Threads are already loaded, so we do not need to check if they\n # are loaded each time\n *USE_THREADS = sub() { 1 };\n *get_tid = sub { threads->tid() };\n }\n else {\n # :-( Need to check each time to see if they have been loaded.\n *USE_THREADS = sub { $INC{'threads.pm'} ? 1 : 0 };\n *get_tid = sub { $INC{'threads.pm'} ? threads->tid() : 0 };\n }\n }\n else {\n # No threads, not now, not ever!\n *USE_THREADS = sub() { 0 };\n *get_tid = sub() { 0 };\n }\n}\n\nsub pkg_to_file {\n my $pkg = shift;\n my $file = $pkg;\n $file =~ s{(::|')}{/}g;\n $file .= '.pm';\n return $file;\n}\n\n1;\n\n__END__\n\n=pod\n\n=encoding UTF-8\n\n=head1 NAME\n\nTest2::Util - Tools used by Test2 and friends.\n\n=head1 DESCRIPTION\n\nCollection of tools used by L and friends.\n\n=head1 EXPORTS\n\nAll exports are optional, you must specify subs to import.\n\n=over 4\n\n=item ($success, $error) = try { ... }\n\nEval the codeblock, return success or failure, and the error message. This code\nprotects $@ and $!, they will be restored by the end of the run. This code also\ntemporarily blocks $SIG{DIE} handlers.\n\n=item protect { ... }\n\nSimilar to try, except that it does not catch exceptions. The idea here is to\nprotect $@ and $! from changes. $@ and $! will be restored to whatever they\nwere before the run so long as it is successful. If the run fails $! will still\nbe restored, but $@ will contain the exception being thrown.\n\n=item CAN_FORK\n\nTrue if this system is capable of true or psuedo-fork.\n\n=item CAN_REALLY_FORK\n\nTrue if the system can really fork. This will be false for systems where fork\nis emulated.\n\n=item CAN_THREAD\n\nTrue if this system is capable of using threads.\n\n=item USE_THREADS\n\nReturns true if threads are enabled, false if they are not.\n\n=item get_tid\n\nThis will return the id of the current thread when threads are enabled,\notherwise it returns 0.\n\n=item my $file = pkg_to_file($package)\n\nConvert a package name to a filename.\n\n=back\n\n=head1 NOTES && CAVEATS\n\n=over 4\n\n=item 5.10.0\n\nPerl 5.10.0 has a bug when compiled with newer gcc versions. This bug causes a\nsegfault whenever a new thread is launched. Test2 will attempt to detect\nthis, and note that the system is not capable of forking when it is detected.\n\n=item Devel::Cover\n\nDevel::Cover does not support threads. CAN_THREAD will return false if\nDevel::Cover is loaded before the check is first run.\n\n=back\n\n=head1 SOURCE\n\nThe source code repository for Test2 can be found at\nF.\n\n=head1 MAINTAINERS\n\n=over 4\n\n=item Chad Granum Eexodist@cpan.orgE\n\n=back\n\n=head1 AUTHORS\n\n=over 4\n\n=item Chad Granum Eexodist@cpan.orgE\n\n=item Kent Fredric Ekentnl@cpan.orgE\n\n=back\n\n=head1 COPYRIGHT\n\nCopyright 2016 Chad Granum Eexodist@cpan.orgE.\n\nThis program is free software; you can redistribute it and/or\nmodify it under the same terms as Perl itself.\n\nSee F\n\n=cut\n"},"avg_line_length":{"kind":"number","value":22.1845493562,"string":"22.184549"},"max_line_length":{"kind":"number","value":80,"string":"80"},"alphanum_fraction":{"kind":"number","value":0.6314567615,"string":"0.631457"}}},{"rowIdx":463274,"cells":{"hexsha":{"kind":"string","value":"edc780b8455a201ee1316d8f0f34ab05c12e2475"},"size":{"kind":"number","value":1267,"string":"1,267"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"auto-lib/Azure/StorSimple/GetStorageAccountCredentials.pm"},"max_stars_repo_name":{"kind":"string","value":"pplu/azure-sdk-perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"26cbef2d926f571bc1617c26338c106856f95568"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"auto-lib/Azure/StorSimple/GetStorageAccountCredentials.pm"},"max_issues_repo_name":{"kind":"string","value":"pplu/azure-sdk-perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"26cbef2d926f571bc1617c26338c106856f95568"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"auto-lib/Azure/StorSimple/GetStorageAccountCredentials.pm"},"max_forks_repo_name":{"kind":"string","value":"pplu/azure-sdk-perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"26cbef2d926f571bc1617c26338c106856f95568"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":1,"string":"1"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2021-04-08T15:26:39.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-04-08T15:26:39.000Z"},"content":{"kind":"string","value":"package Azure::StorSimple::GetStorageAccountCredentials;\n use Moose;\n use MooseX::ClassAttribute;\n\n has 'api_version' => (is => 'ro', required => 1, isa => 'Str', default => '2017-06-01',\n traits => [ 'Azure::ParamInQuery', 'Azure::LocationInResponse' ], location => 'api-version',\n );\n has 'managerName' => (is => 'ro', required => 1, isa => 'Str',\n traits => [ 'Azure::ParamInPath' ],\n );\n has 'resourceGroupName' => (is => 'ro', required => 1, isa => 'Str',\n traits => [ 'Azure::ParamInPath' ],\n );\n has 'storageAccountCredentialName' => (is => 'ro', required => 1, isa => 'Str',\n traits => [ 'Azure::ParamInPath' ],\n );\n has 'subscriptionId' => (is => 'ro', required => 1, isa => 'Str',\n traits => [ 'Azure::ParamInPath' ],\n );\n\n class_has _api_uri => (is => 'ro', default => '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.StorSimple/managers/{managerName}/storageAccountCredentials/{storageAccountCredentialName}');\n class_has _returns => (is => 'ro', isa => 'HashRef', default => sub { {\n \n 200 => 'Azure::StorSimple::GetStorageAccountCredentialsResult',\n \n } });\n class_has _is_async => (is => 'ro', default => 0);\n class_has _api_method => (is => 'ro', default => 'GET');\n1;\n"},"avg_line_length":{"kind":"number","value":42.2333333333,"string":"42.233333"},"max_line_length":{"kind":"number","value":229,"string":"229"},"alphanum_fraction":{"kind":"number","value":0.6179952644,"string":"0.617995"}}},{"rowIdx":463275,"cells":{"hexsha":{"kind":"string","value":"ed84d1633de12301d2a91691cd9129b23061a3b2"},"size":{"kind":"number","value":494,"string":"494"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"scripting/japh_map.pl"},"max_stars_repo_name":{"kind":"string","value":"bheckel/code"},"max_stars_repo_head_hexsha":{"kind":"string","value":"98309e8aa145901e49460546643c911eaaff54e6"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2019-08-11T00:39:34.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2019-08-11T00:39:34.000Z"},"max_issues_repo_path":{"kind":"string","value":"scripting/japh_map.pl"},"max_issues_repo_name":{"kind":"string","value":"bheckel/code"},"max_issues_repo_head_hexsha":{"kind":"string","value":"98309e8aa145901e49460546643c911eaaff54e6"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"scripting/japh_map.pl"},"max_forks_repo_name":{"kind":"string","value":"bheckel/code"},"max_forks_repo_head_hexsha":{"kind":"string","value":"98309e8aa145901e49460546643c911eaaff54e6"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":1,"string":"1"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2020-07-28T05:58:47.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2020-07-28T05:58:47.000Z"},"content":{"kind":"string","value":"#!/usr/bin/perl -w\n##############################################################################\n# Name: japh_map.pl\n#\n# Summary: Demo of map (and obfuscation).\n#\n# Adapted: Fri 16 Mar 2001 08:54:20 (Bob Heckel -- from RayCosoft website)\n##############################################################################\n\n$octalstr = '106117115116032097110111116104101114032112101114108032104097' .\n '099107101114';\n\n@japh = map { chr $_ } ($octalstr =~ /.../g);\n\nprint @japh, \"\\n\";\n"},"avg_line_length":{"kind":"number","value":30.875,"string":"30.875"},"max_line_length":{"kind":"number","value":78,"string":"78"},"alphanum_fraction":{"kind":"number","value":0.4433198381,"string":"0.44332"}}},{"rowIdx":463276,"cells":{"hexsha":{"kind":"string","value":"ed42e13c7404e80c0a1b4c8bff093afbb1c52512"},"size":{"kind":"number","value":6655,"string":"6,655"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"msys64/usr/share/perl5/core_perl/unicore/lib/CWU/Y.pl"},"max_stars_repo_name":{"kind":"string","value":"andresfaagit/sg-desarrollo-ruby"},"max_stars_repo_head_hexsha":{"kind":"string","value":"2c9bc5dad657d9713cc0f7fc4e883a85b83537e5"},"max_stars_repo_licenses":{"kind":"list like","value":["Ruby"],"string":"[\n \"Ruby\"\n]"},"max_stars_count":{"kind":"number","value":9,"string":"9"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2018-04-19T05:08:30.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-11-23T07:36:58.000Z"},"max_issues_repo_path":{"kind":"string","value":"msys64/usr/share/perl5/core_perl/unicore/lib/CWU/Y.pl"},"max_issues_repo_name":{"kind":"string","value":"andresfaagit/sg-desarrollo-ruby"},"max_issues_repo_head_hexsha":{"kind":"string","value":"2c9bc5dad657d9713cc0f7fc4e883a85b83537e5"},"max_issues_repo_licenses":{"kind":"list like","value":["Ruby"],"string":"[\n \"Ruby\"\n]"},"max_issues_count":{"kind":"number","value":98,"string":"98"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2017-11-02T19:00:44.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-03-22T16:15:39.000Z"},"max_forks_repo_path":{"kind":"string","value":"msys64/usr/share/perl5/core_perl/unicore/lib/CWU/Y.pl"},"max_forks_repo_name":{"kind":"string","value":"andresfaagit/sg-desarrollo-ruby"},"max_forks_repo_head_hexsha":{"kind":"string","value":"2c9bc5dad657d9713cc0f7fc4e883a85b83537e5"},"max_forks_repo_licenses":{"kind":"list like","value":["Ruby"],"string":"[\n \"Ruby\"\n]"},"max_forks_count":{"kind":"number","value":9,"string":"9"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2017-10-24T21:53:36.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-11-23T07:36:59.000Z"},"content":{"kind":"string","value":"# !!!!!!! DO NOT EDIT THIS FILE !!!!!!!\n# This file is machine-generated by lib/unicore/mktables from the Unicode\n# database, Version 12.1.0. Any changes made here will be lost!\n\n# !!!!!!! INTERNAL PERL USE ONLY !!!!!!!\n# This file is for internal use by core Perl only. The format and even the\n# name or existence of this file are subject to change without notice. Don't\n# use it directly. Use Unicode::UCD to access the Unicode character data\n# base.\n\n\nreturn <<'END';\nV1232\n97\n123\n181\n182\n223\n247\n248\n256\n257\n258\n259\n260\n261\n262\n263\n264\n265\n266\n267\n268\n269\n270\n271\n272\n273\n274\n275\n276\n277\n278\n279\n280\n281\n282\n283\n284\n285\n286\n287\n288\n289\n290\n291\n292\n293\n294\n295\n296\n297\n298\n299\n300\n301\n302\n303\n304\n305\n306\n307\n308\n309\n310\n311\n312\n314\n315\n316\n317\n318\n319\n320\n321\n322\n323\n324\n325\n326\n327\n328\n330\n331\n332\n333\n334\n335\n336\n337\n338\n339\n340\n341\n342\n343\n344\n345\n346\n347\n348\n349\n350\n351\n352\n353\n354\n355\n356\n357\n358\n359\n360\n361\n362\n363\n364\n365\n366\n367\n368\n369\n370\n371\n372\n373\n374\n375\n376\n378\n379\n380\n381\n382\n385\n387\n388\n389\n390\n392\n393\n396\n397\n402\n403\n405\n406\n409\n411\n414\n415\n417\n418\n419\n420\n421\n422\n424\n425\n429\n430\n432\n433\n436\n437\n438\n439\n441\n442\n445\n446\n447\n448\n453\n455\n456\n458\n459\n461\n462\n463\n464\n465\n466\n467\n468\n469\n470\n471\n472\n473\n474\n475\n476\n478\n479\n480\n481\n482\n483\n484\n485\n486\n487\n488\n489\n490\n491\n492\n493\n494\n495\n497\n498\n500\n501\n502\n505\n506\n507\n508\n509\n510\n511\n512\n513\n514\n515\n516\n517\n518\n519\n520\n521\n522\n523\n524\n525\n526\n527\n528\n529\n530\n531\n532\n533\n534\n535\n536\n537\n538\n539\n540\n541\n542\n543\n544\n547\n548\n549\n550\n551\n552\n553\n554\n555\n556\n557\n558\n559\n560\n561\n562\n563\n564\n572\n573\n575\n577\n578\n579\n583\n584\n585\n586\n587\n588\n589\n590\n591\n597\n598\n600\n601\n602\n603\n605\n608\n610\n611\n612\n613\n615\n616\n621\n623\n624\n625\n627\n629\n630\n637\n638\n640\n641\n642\n644\n647\n653\n658\n659\n669\n671\n837\n838\n881\n882\n883\n884\n887\n888\n891\n894\n912\n913\n940\n975\n976\n978\n981\n984\n985\n986\n987\n988\n989\n990\n991\n992\n993\n994\n995\n996\n997\n998\n999\n1000\n1001\n1002\n1003\n1004\n1005\n1006\n1007\n1012\n1013\n1014\n1016\n1017\n1019\n1020\n1072\n1120\n1121\n1122\n1123\n1124\n1125\n1126\n1127\n1128\n1129\n1130\n1131\n1132\n1133\n1134\n1135\n1136\n1137\n1138\n1139\n1140\n1141\n1142\n1143\n1144\n1145\n1146\n1147\n1148\n1149\n1150\n1151\n1152\n1153\n1154\n1163\n1164\n1165\n1166\n1167\n1168\n1169\n1170\n1171\n1172\n1173\n1174\n1175\n1176\n1177\n1178\n1179\n1180\n1181\n1182\n1183\n1184\n1185\n1186\n1187\n1188\n1189\n1190\n1191\n1192\n1193\n1194\n1195\n1196\n1197\n1198\n1199\n1200\n1201\n1202\n1203\n1204\n1205\n1206\n1207\n1208\n1209\n1210\n1211\n1212\n1213\n1214\n1215\n1216\n1218\n1219\n1220\n1221\n1222\n1223\n1224\n1225\n1226\n1227\n1228\n1229\n1230\n1232\n1233\n1234\n1235\n1236\n1237\n1238\n1239\n1240\n1241\n1242\n1243\n1244\n1245\n1246\n1247\n1248\n1249\n1250\n1251\n1252\n1253\n1254\n1255\n1256\n1257\n1258\n1259\n1260\n1261\n1262\n1263\n1264\n1265\n1266\n1267\n1268\n1269\n1270\n1271\n1272\n1273\n1274\n1275\n1276\n1277\n1278\n1279\n1280\n1281\n1282\n1283\n1284\n1285\n1286\n1287\n1288\n1289\n1290\n1291\n1292\n1293\n1294\n1295\n1296\n1297\n1298\n1299\n1300\n1301\n1302\n1303\n1304\n1305\n1306\n1307\n1308\n1309\n1310\n1311\n1312\n1313\n1314\n1315\n1316\n1317\n1318\n1319\n1320\n1321\n1322\n1323\n1324\n1325\n1326\n1327\n1328\n1377\n1416\n4304\n4347\n4349\n4352\n5112\n5118\n7296\n7305\n7545\n7546\n7549\n7550\n7566\n7567\n7681\n7682\n7683\n7684\n7685\n7686\n7687\n7688\n7689\n7690\n7691\n7692\n7693\n7694\n7695\n7696\n7697\n7698\n7699\n7700\n7701\n7702\n7703\n7704\n7705\n7706\n7707\n7708\n7709\n7710\n7711\n7712\n7713\n7714\n7715\n7716\n7717\n7718\n7719\n7720\n7721\n7722\n7723\n7724\n7725\n7726\n7727\n7728\n7729\n7730\n7731\n7732\n7733\n7734\n7735\n7736\n7737\n7738\n7739\n7740\n7741\n7742\n7743\n7744\n7745\n7746\n7747\n7748\n7749\n7750\n7751\n7752\n7753\n7754\n7755\n7756\n7757\n7758\n7759\n7760\n7761\n7762\n7763\n7764\n7765\n7766\n7767\n7768\n7769\n7770\n7771\n7772\n7773\n7774\n7775\n7776\n7777\n7778\n7779\n7780\n7781\n7782\n7783\n7784\n7785\n7786\n7787\n7788\n7789\n7790\n7791\n7792\n7793\n7794\n7795\n7796\n7797\n7798\n7799\n7800\n7801\n7802\n7803\n7804\n7805\n7806\n7807\n7808\n7809\n7810\n7811\n7812\n7813\n7814\n7815\n7816\n7817\n7818\n7819\n7820\n7821\n7822\n7823\n7824\n7825\n7826\n7827\n7828\n7829\n7836\n7841\n7842\n7843\n7844\n7845\n7846\n7847\n7848\n7849\n7850\n7851\n7852\n7853\n7854\n7855\n7856\n7857\n7858\n7859\n7860\n7861\n7862\n7863\n7864\n7865\n7866\n7867\n7868\n7869\n7870\n7871\n7872\n7873\n7874\n7875\n7876\n7877\n7878\n7879\n7880\n7881\n7882\n7883\n7884\n7885\n7886\n7887\n7888\n7889\n7890\n7891\n7892\n7893\n7894\n7895\n7896\n7897\n7898\n7899\n7900\n7901\n7902\n7903\n7904\n7905\n7906\n7907\n7908\n7909\n7910\n7911\n7912\n7913\n7914\n7915\n7916\n7917\n7918\n7919\n7920\n7921\n7922\n7923\n7924\n7925\n7926\n7927\n7928\n7929\n7930\n7931\n7932\n7933\n7934\n7935\n7944\n7952\n7958\n7968\n7976\n7984\n7992\n8000\n8006\n8016\n8024\n8032\n8040\n8048\n8062\n8064\n8117\n8118\n8120\n8124\n8125\n8126\n8127\n8130\n8133\n8134\n8136\n8140\n8141\n8144\n8148\n8150\n8152\n8160\n8168\n8178\n8181\n8182\n8184\n8188\n8189\n8526\n8527\n8560\n8576\n8580\n8581\n9424\n9450\n11312\n11359\n11361\n11362\n11365\n11367\n11368\n11369\n11370\n11371\n11372\n11373\n11379\n11380\n11382\n11383\n11393\n11394\n11395\n11396\n11397\n11398\n11399\n11400\n11401\n11402\n11403\n11404\n11405\n11406\n11407\n11408\n11409\n11410\n11411\n11412\n11413\n11414\n11415\n11416\n11417\n11418\n11419\n11420\n11421\n11422\n11423\n11424\n11425\n11426\n11427\n11428\n11429\n11430\n11431\n11432\n11433\n11434\n11435\n11436\n11437\n11438\n11439\n11440\n11441\n11442\n11443\n11444\n11445\n11446\n11447\n11448\n11449\n11450\n11451\n11452\n11453\n11454\n11455\n11456\n11457\n11458\n11459\n11460\n11461\n11462\n11463\n11464\n11465\n11466\n11467\n11468\n11469\n11470\n11471\n11472\n11473\n11474\n11475\n11476\n11477\n11478\n11479\n11480\n11481\n11482\n11483\n11484\n11485\n11486\n11487\n11488\n11489\n11490\n11491\n11492\n11500\n11501\n11502\n11503\n11507\n11508\n11520\n11558\n11559\n11560\n11565\n11566\n42561\n42562\n42563\n42564\n42565\n42566\n42567\n42568\n42569\n42570\n42571\n42572\n42573\n42574\n42575\n42576\n42577\n42578\n42579\n42580\n42581\n42582\n42583\n42584\n42585\n42586\n42587\n42588\n42589\n42590\n42591\n42592\n42593\n42594\n42595\n42596\n42597\n42598\n42599\n42600\n42601\n42602\n42603\n42604\n42605\n42606\n42625\n42626\n42627\n42628\n42629\n42630\n42631\n42632\n42633\n42634\n42635\n42636\n42637\n42638\n42639\n42640\n42641\n42642\n42643\n42644\n42645\n42646\n42647\n42648\n42649\n42650\n42651\n42652\n42787\n42788\n42789\n42790\n42791\n42792\n42793\n42794\n42795\n42796\n42797\n42798\n42799\n42800\n42803\n42804\n42805\n42806\n42807\n42808\n42809\n42810\n42811\n42812\n42813\n42814\n42815\n42816\n42817\n42818\n42819\n42820\n42821\n42822\n42823\n42824\n42825\n42826\n42827\n42828\n42829\n42830\n42831\n42832\n42833\n42834\n42835\n42836\n42837\n42838\n42839\n42840\n42841\n42842\n42843\n42844\n42845\n42846\n42847\n42848\n42849\n42850\n42851\n42852\n42853\n42854\n42855\n42856\n42857\n42858\n42859\n42860\n42861\n42862\n42863\n42864\n42874\n42875\n42876\n42877\n42879\n42880\n42881\n42882\n42883\n42884\n42885\n42886\n42887\n42888\n42892\n42893\n42897\n42898\n42899\n42901\n42903\n42904\n42905\n42906\n42907\n42908\n42909\n42910\n42911\n42912\n42913\n42914\n42915\n42916\n42917\n42918\n42919\n42920\n42921\n42922\n42933\n42934\n42935\n42936\n42937\n42938\n42939\n42940\n42941\n42942\n42943\n42944\n42947\n42948\n43859\n43860\n43888\n43968\n64256\n64263\n64275\n64280\n65345\n65371\n66600\n66640\n66776\n66812\n68800\n68851\n71872\n71904\n93792\n93824\n125218\n125252\nEND\n"},"avg_line_length":{"kind":"number","value":5.33680834,"string":"5.336808"},"max_line_length":{"kind":"number","value":77,"string":"77"},"alphanum_fraction":{"kind":"number","value":0.7915852742,"string":"0.791585"}}},{"rowIdx":463277,"cells":{"hexsha":{"kind":"string","value":"edaa5ad3b1cd8359e642487f08484b6bfed20186"},"size":{"kind":"number","value":3658,"string":"3,658"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"qeynos2/Knargon_Lanenda.pl"},"max_stars_repo_name":{"kind":"string","value":"GiverofMemory/FVProject-Quests"},"max_stars_repo_head_hexsha":{"kind":"string","value":"8754c17305f1b9f56fff5e2952127f628be10646"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2021-11-25T23:33:55.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-11-25T23:33:55.000Z"},"max_issues_repo_path":{"kind":"string","value":"qeynos2/Knargon_Lanenda.pl"},"max_issues_repo_name":{"kind":"string","value":"GiverofMemory/FVProject-Quests"},"max_issues_repo_head_hexsha":{"kind":"string","value":"8754c17305f1b9f56fff5e2952127f628be10646"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":6,"string":"6"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2020-02-12T16:39:52.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-08-16T22:12:59.000Z"},"max_forks_repo_path":{"kind":"string","value":"qeynos2/Knargon_Lanenda.pl"},"max_forks_repo_name":{"kind":"string","value":"GiverofMemory/FVProject-Quests"},"max_forks_repo_head_hexsha":{"kind":"string","value":"8754c17305f1b9f56fff5e2952127f628be10646"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":7,"string":"7"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2019-12-28T20:06:14.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-11-23T17:21:38.000Z"},"content":{"kind":"string","value":"sub EVENT_SAY {\n\tif ($text=~/hail/i) {\n\t\tquest::say(\"Hey.. What's up? My name's Knargon Lanenda. I just came over here from [Freeport] a couple of months ago. I used to run a big business importing goods from [Faydwer]. If you've been to [Freeport]. I'm sure you've heard of me.\");\n\t}\n\telsif ($text=~/freeport/i) {\n\t\tquest::say(\"It's a long way from here. . .which is a good thing for me.\");\n\t}\n\telsif ($text=~/faydwer/i) {\n\t\tquest::say(\"It's a long way from here. . .which is a good thing for me.\");\n\t}\n\telsif ($text=~/jracol/i) {\n\t\tquest::say(\"I don't know why [Carson] likes that guy ... he's certainly been nothing but trouble for me.\");\n\t}\n\telsif (($text=~/carson/i) || ($text=~/mccabe/i)) {\n\t\tquest::say(\"Carson McCabe? He runs that sham of a fortress called [Highpass Hold]. We've been dealing with him for a few years, now. But, lately he seems to be losing control of his business. [Hanns] will whip him into shape pretty soon though, I bet.\");\n\t}\n\telsif ($text=~/highpass hold/i) {\n\t\tquest::say(\"It's a long way from here. . .which is a good thing for me.\");\n\t}\n\telsif ($text=~/hanns/i) {\n\t\tquest::say(\"He is genuinely dangerous. If you think otherwise, you won't be thinking for long.\");\n\t}\n\telsif ($text=~/shipment/i) {\n\t\tquest::say(\"We have a small shipment of goods coming in later tonight. The [courier] will be waiting outside the city gates. Casually tell the courier [Lovely night for a stroll], and give him this old card as proof that you work for us. Make certain that you are not followed, and return the shipment to me.\");\n\t\t#:: Give a 13903 - Bent Playing Card\n\t\tquest::summonitem(13903);\n\t}\n\telsif ($text=~/courier/i) {\n\t\tquest::say(\"The courier that usually runs [McCabe]'s shipment, is that good for nothing J'Racol. I don't trust his kind.\");\n\t}\n}\n\nsub EVENT_WAYPOINT_ARRIVE {\n\t#:: Match waypoint 2\n\tif ($wp == 2) {\n\t\tquest::say(\"Hey Pelshia, how's business?\");\n\t\t#:: Send a signal \"1\" to North Qeynos >> Pelshia_Thuxpire (2073)\n\t\tquest::signalwith(2073, 1, 0);\n\t}\n\t#:: Match waypoint 7\n\telsif ($wp == 7) {\n\t\tquest::say(\"And what about you, gorgeous? Looking as delightful as ever, I must say.\");\n\t\t#:: This seems to be aimed at Renux, response not found yet\n\t}\n\t#:: Match waypoint 18\n\telsif ($wp == 18) {\n\t\tquest::say(\"So, yeah, that Pelshia, she's all over me. And Renux, too. She was giving me the look, man. I'm telling ya. Zan, all the ladies want a piece of the Knargman.\");\t\t#:: Send a signal \"1\" to North Qeynos >> Zannsin_Resdinet (2085)\n\t\t#:: Send a signal \"1\" to North Qeynos >> Zannsin_Resdinet (2085) with no delay\n\t\tquest::signalwith(2085, 1, 0);\n\t}\n}\n\nsub EVENT_SIGNAL {\n\t#:: Match a signal \"1\" from /qeynos2/Pelshia_Thuxpire.pl\n\tif ($signal == 1) {\n\t\tquest::say(\"How about you and I go take a stroll under the docks tonight?\");\n\t\t#:: Send a signal \"2\" to North Qeynos >> Pelshia_Thuxpire (2073)\n\t\tquest::signalwith(2073, 2, 0);\n\t}\n}\n\nsub EVENT_ITEM {\n\t#:: Match a 18722 - Sealed Note For Knargon\n\tif (plugin::takeItems(18722 => 1)) {\n\t\tquest::say(\"Hmm. Carson better deal with his little 'problem' soon, it's costing us a lot of money. Hanns is gonna skin us all when he hears this. Go tell Hanns that [Carson has a mole in the Highpass] guards, and see what he wants us to do.\");\n\t\t#:: Ding!\n\t\tquest::ding();\n\t\t#:: Set factions\n\t\tquest::faction(223, 5);\t\t\t#:: + Circle Of Unseen Hands\n\t\tquest::faction(291, -1);\t\t#:: - Merchants of Qeynos\n\t\tquest::faction(230, 1);\t\t\t#:: + Corrupt Qeynos Guards\n\t\tquest::faction(262, -1);\t\t#:: - Guards of Qeynos\n\t\tquest::faction(273, 1);\t\t\t#:: + Kane Bayle\n\t\t#:: Grant a small amount of experience\n\t\tquest::exp(500);\n\t}\n\t#:: Return unused items\n\tplugin::returnUnusedItems();\n}\n"},"avg_line_length":{"kind":"number","value":45.725,"string":"45.725"},"max_line_length":{"kind":"number","value":313,"string":"313"},"alphanum_fraction":{"kind":"number","value":0.6683980317,"string":"0.668398"}}},{"rowIdx":463278,"cells":{"hexsha":{"kind":"string","value":"ed155713976c23f43496abb2b1a154c202e45350"},"size":{"kind":"number","value":1738,"string":"1,738"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"bin/tests/system/statschannel/traffic-json.pl"},"max_stars_repo_name":{"kind":"string","value":"goby/bind9"},"max_stars_repo_head_hexsha":{"kind":"string","value":"a179cbdf652095d00e7774320592f25eab0210d8"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2019-02-06T14:25:43.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2019-02-06T14:25:43.000Z"},"max_issues_repo_path":{"kind":"string","value":"bin/tests/system/statschannel/traffic-json.pl"},"max_issues_repo_name":{"kind":"string","value":"muks/bind9"},"max_issues_repo_head_hexsha":{"kind":"string","value":"c762e15991fb24fce6d877c61ddd702e9c7ae9d6"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"bin/tests/system/statschannel/traffic-json.pl"},"max_forks_repo_name":{"kind":"string","value":"muks/bind9"},"max_forks_repo_head_hexsha":{"kind":"string","value":"c762e15991fb24fce6d877c61ddd702e9c7ae9d6"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#!/usr/bin/perl\n#\n# Copyright (C) 2015 Internet Systems Consortium, Inc. (\"ISC\")\n#\n# Permission to use, copy, modify, and/or distribute this software for any\n# purpose with or without fee is hereby granted, provided that the above\n# copyright notice and this permission notice appear in all copies.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\" AND ISC DISCLAIMS ALL WARRANTIES WITH\n# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\n# AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,\n# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\n# LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE\n# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\n# PERFORMANCE OF THIS SOFTWARE.\n\n# traffic-json.pl:\n# Parses the JSON version of the RSSAC002 traffic stats into a\n# normalized format.\n\nuse JSON;\n\nmy $file = $ARGV[0];\nopen(INPUT, \"<$file\");\nmy $text = do{local$/;};\nclose(INPUT);\n\nmy $ref = decode_json($text);\n\nmy $tcprcvd = $ref->{traffic}->{\"tcp-requests-received\"};\nmy $type = \"tcp request-size \";\nforeach $key (keys $tcprcvd) {\n print $type . $key . \": \". $tcprcvd->{$key} .\"\\n\";\n}\n\nmy $tcpsent = $ref->{traffic}->{\"tcp-responses-sent\"};\nmy $type = \"tcp response-size \";\nforeach $key (keys $tcpsent) {\n print $type . $key . \": \". $tcpsent->{$key} .\"\\n\";\n}\n\nmy $udprcvd = $ref->{traffic}->{\"udp-requests-received\"};\nmy $type = \"udp request-size \";\nforeach $key (keys $udprcvd) {\n print $type . $key . \": \". $udprcvd->{$key} .\"\\n\";\n}\n\nmy $udpsent = $ref->{traffic}->{\"udp-responses-sent\"};\nmy $type = \"udp response-size \";\nforeach $key (keys $udpsent) {\n print $type . $key . \": \". $udpsent->{$key} .\"\\n\";\n}\n"},"avg_line_length":{"kind":"number","value":32.7924528302,"string":"32.792453"},"max_line_length":{"kind":"number","value":77,"string":"77"},"alphanum_fraction":{"kind":"number","value":0.6749136939,"string":"0.674914"}}},{"rowIdx":463279,"cells":{"hexsha":{"kind":"string","value":"eddccd7159cc4f96e40e287c448e694d39753a08"},"size":{"kind":"number","value":3834,"string":"3,834"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/DDG/Spice/PackageTracking.pm"},"max_stars_repo_name":{"kind":"string","value":"ManrajGrover/zeroclickinfo-spice"},"max_stars_repo_head_hexsha":{"kind":"string","value":"f52ecd7a7246dc306b94ab9bbfa93174b8ec8b40"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"lib/DDG/Spice/PackageTracking.pm"},"max_issues_repo_name":{"kind":"string","value":"ManrajGrover/zeroclickinfo-spice"},"max_issues_repo_head_hexsha":{"kind":"string","value":"f52ecd7a7246dc306b94ab9bbfa93174b8ec8b40"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"lib/DDG/Spice/PackageTracking.pm"},"max_forks_repo_name":{"kind":"string","value":"ManrajGrover/zeroclickinfo-spice"},"max_forks_repo_head_hexsha":{"kind":"string","value":"f52ecd7a7246dc306b94ab9bbfa93174b8ec8b40"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package DDG::Spice::PackageTracking;\n\nuse strict;\nuse DDG::Spice;\nuse Text::Trim;\nuse YAML::XS 'LoadFile';\n\nspice is_cached => 1;\nspice proxy_cache_valid => \"200 1m\";\n\nspice wrap_jsonp_callback => 1;\n\nspice to => 'https://api.packagetrackr.com/ddg/v1/track/simple?n=$1&api_key={{ENV{DDG_SPICE_PACKAGETRACKR_API_KEY}}}';\n\nmy @carriers = sort { length $b <=> length $a } @{LoadFile(share('carriers.yml'))};\nmy $triggers_re = qr/(package|parcel)|track(ing)?( num(ber)?)?|shipping status/i;\nmy $carriers_re = join \"|\", @carriers;\n\n# allow carrier names without spaces (e.g royal mail OR royalmail)\n$carriers_re =~ s/ /\\\\s*/g;\nmy $strip_re = qr/\\b(?:$carriers_re|$triggers_re)\\b/i;\n\n### Regex triggers for queries containing carrier names\n### or words related to pacakge tracking\n\n# Carrier names\ntriggers query_lc => qr/\\b(?:$carriers_re)\\b/i;\n\n# Package words\ntriggers query_lc => qr/^$triggers_re .+|.+ $triggers_re$/i;\n\n### Regex triggers for queries only containing a tracking number\n\n## UPS\n# Soure: https://www.ups.com/content/ca/en/tracking/help/tracking/tnh.html\n# To Do: Some additional formats exist\ntriggers query_nowhitespace => qr/^\n (?:\n 1Z[0-9A-Z]{16} |\n \\d{9} |\n \\d{12} |\n T\\d{10}\n )\n $/xi;\n\n## Fedex\n# Source: https://www.trackingex.com/fedex-tracking.html\n# https://www.trackingex.com/fedexuk-tracking.html\n# https://www.trackingex.com/fedex-poland-domestic-tracking.html\ntriggers query_nowhitespace => qr/^\n \\d{12,22}\n $/xi;\n\n## USPS\n# Source: https://tools.usps.com/go/TrackConfirmAction!input.action\ntriggers query_nowhitespace => qr/^\n (?:\n (94001|92055|94073|93033|92701|92088|92021)\\d{17} |\n 82\\d{8} |\n [A-Z]{2}\\d{9}US\n )\n $/xi;\n\n## Parcelforce\n# Source: http://www.parcelforce.com/help-and-advice/sending-worldwide/tracking-number-formats\n# Note: May need to restrict pattern #3 if overtriggering\n# https://github.com/duckduckgo/zeroclickinfo-goodies/issues/3900\ntriggers query_nowhitespace => qr/^\n (?:\n [A-Z]{2}\\d{7} |\n [A-Z]{4}\\d{10} |\n [A-Z]{2}\\d{9}[A-Z]{2} |\n \\d{12}\n )\n $/xi;\n\nhandle query => sub {\n\n # remove trigger words & carrier names\n s/\\b$strip_re\\b//ixg;\n trim($_);\n return unless $_;\n\n # remainder should be numeric or alphanumeric, not alpha\n return if m/^[A-Z]+$/i;\n\n # ignore remainder with 2+ words\n return if m/\\b[A-Z]+\\s+[A-Z]+\\b/i;\n\n # ignore phone numbers\n return if m/^(\\d(-|\\s))?\\d{3}(-|\\s)\\d{3}(-|\\s)\\d{4}$/;\n return if m/^\\d{5} \\d{7}$/;\n return if m/^\\d{4} \\d{3} \\d{3}$/;\n\n # ignore address lookup\n return if m/^#\\d+ [A-Z\\s]+$/i;\n\n # ignore Microsoft knowledge base codes and Luhn Check queries\n # e.g. KB2553549\n return if m/^(kb|luhn)\\s?\\d+/i;\n\n # ignore pattern: \"word number word\"\n # e.g. ups building 2 worldport\n return if m/\\b[A-Z]+ \\d{1,8} [A-Z]+\\b/i;\n\n # remove spaces/dashes\n s/(\\s|-)//g;\n\n # ignore repeated strings of single digit (e.g. 0000 0000 0000)\n return if m/^(\\d)\\1+$/;\n\n # remainder should be 6-30 characters long\n return unless m/^[A-Z0-9]{6,30}$/i;\n \n # ignore if isbn is present\n return if m/isbn/i;\n\n return $_;\n};\n\n1;\n"},"avg_line_length":{"kind":"number","value":31.4262295082,"string":"31.42623"},"max_line_length":{"kind":"number","value":118,"string":"118"},"alphanum_fraction":{"kind":"number","value":0.5185185185,"string":"0.518519"}}},{"rowIdx":463280,"cells":{"hexsha":{"kind":"string","value":"73f5ef1c666911d0c7abd950803fcf1c59b0af5b"},"size":{"kind":"number","value":967,"string":"967"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"check_kzp.pl"},"max_stars_repo_name":{"kind":"string","value":"0xAF/check_kzp"},"max_stars_repo_head_hexsha":{"kind":"string","value":"a8fdd069730886a280e897446e7790203d4350d9"},"max_stars_repo_licenses":{"kind":"list like","value":["Unlicense"],"string":"[\n \"Unlicense\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"check_kzp.pl"},"max_issues_repo_name":{"kind":"string","value":"0xAF/check_kzp"},"max_issues_repo_head_hexsha":{"kind":"string","value":"a8fdd069730886a280e897446e7790203d4350d9"},"max_issues_repo_licenses":{"kind":"list like","value":["Unlicense"],"string":"[\n \"Unlicense\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"check_kzp.pl"},"max_forks_repo_name":{"kind":"string","value":"0xAF/check_kzp"},"max_forks_repo_head_hexsha":{"kind":"string","value":"a8fdd069730886a280e897446e7790203d4350d9"},"max_forks_repo_licenses":{"kind":"list like","value":["Unlicense"],"string":"[\n \"Unlicense\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#!/usr/bin/perl\n# Stanislav Lechev [0xAF]\n# mail: af@0xAF.org\n\nuse strict;\nuse Digest::MD5 qw( md5_hex );\nuse File::Fetch;\n\nmy $kzp_url = 'http://www.kzp.bg/download.php?mode=fileDownload&p_attached_file_id=4956';\n\ndie \"usage: $0 mails_file.txt [kzp_file.txt]\\n\" unless ($#ARGV >= 0);\ndie \"cannot open mails file: $!\" unless (open(my $f_mails, '<', $ARGV[0]));\n\nmy %kzp;\nmy $kzp_content;\n\nif ($ARGV[1] and -e $ARGV[1]) { # open kzp file\n\tdie \"cannot open kzp file: $!\" unless (open(my $f_kzp, '<', $ARGV[1]));\n\tlocal $/;\n\t$kzp_content = <$f_kzp>;\n} else { # or download the latest version of the file\n\tprint STDERR \"- downloading last KZP file...\\n\";\n\tmy $ff = File::Fetch->new(uri => $kzp_url);\n\tmy $file = $ff->fetch( to => \\$kzp_content ) or die $ff->error;\n}\n\n$kzp_content =~ s/\\r//g;\nforeach (split(/\\n/, $kzp_content)) {\n\t$kzp{lc($_)} = 1;\n}\n\nwhile ( <$f_mails> ) {\n\tchomp;\n\tmy $md5 = md5_hex(lc($_));\n\t$kzp{$md5} ? print STDERR \"- KZP: $_\\n\" : print \"$_\\n\";\n}\n"},"avg_line_length":{"kind":"number","value":26.1351351351,"string":"26.135135"},"max_line_length":{"kind":"number","value":89,"string":"89"},"alphanum_fraction":{"kind":"number","value":0.6163391934,"string":"0.616339"}}},{"rowIdx":463281,"cells":{"hexsha":{"kind":"string","value":"ed72b8d8cd5ac6ceefe603df5a889085f107dff0"},"size":{"kind":"number","value":2668,"string":"2,668"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"SeccubusV2.pm"},"max_stars_repo_name":{"kind":"string","value":"Web5design/Seccubus_v2"},"max_stars_repo_head_hexsha":{"kind":"string","value":"0b9d3c5a9bac08fc316cee9795388cbbed0e78f0"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2021-04-08T12:16:18.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-04-08T12:16:18.000Z"},"max_issues_repo_path":{"kind":"string","value":"SeccubusV2.pm"},"max_issues_repo_name":{"kind":"string","value":"Web5design/Seccubus_v2"},"max_issues_repo_head_hexsha":{"kind":"string","value":"0b9d3c5a9bac08fc316cee9795388cbbed0e78f0"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"SeccubusV2.pm"},"max_forks_repo_name":{"kind":"string","value":"Web5design/Seccubus_v2"},"max_forks_repo_head_hexsha":{"kind":"string","value":"0b9d3c5a9bac08fc316cee9795388cbbed0e78f0"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"# ------------------------------------------------------------------------------\n# Copyright 2013 Frank Breedijk\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\npackage SeccubusV2;\n\n=head1 NAME $RCSfile: SeccubusV2.pm,v $\n\nThis Pod documentation generated from the module SeccubusV2 gives a list of all \nfunctions within the module.\n\n=cut\n\n@ISA = ('Exporter');\n\n@EXPORT = qw( \n\t\tVERSION \n\t\tget_config\n\t\tcheck_param\n\t );\n\nuse XML::Simple;\nuse Data::Dumper;\n\nour $config = \"config.xml\";\t\t# Change this value to match your setup\n\t\t\t\t\t# if your configuration file cannot be \n\t\t\t\t\t# found\n$config = \"/home/seccubus/etc/config.xml\" unless -e $config;\n\t\t\t\t\t# Bug #62 - /home/seccubus/etc missing\n$config = \"/etc/seccubus/config.xml\" unless -e $config;\n\n$config = \"/opt/seccubus/etc/config.xml\" unless -e $config;\n\n# This line should prevent issue 21 dummy.config.xml should never exist\n$config = \"etc/dummy.config.xml\" unless -e $config;\n\n# Module directory\nuse lib \"/opt/seccubus/SeccubusV2\";\npush (@main::INC, @INC);\n\n$VERSION = '2.5';\n\nuse strict;\nuse Carp;\n#use SeccubusConfig;\nuse SeccubusHelpers;\n\npush (@main::INC, @INC);\n$ENV{REMOTE_USER} = \"admin\" unless $ENV{REMOTE_USER};\t\t# Run as admin user if the web server auth is not setup\ncheck_config();\n\n=head1 Utility functions\n\n=head2 get_config\n\n=over 2\n\n=item Returns\n\nReference to a hash containing the config in XML\n\n=back\n\n=cut\n\nsub get_config() {\n\tif ( ! ref($config) ) {\n\t\t$config = XMLin($config);\n\t}\n\treturn $config;\n}\n\n=head2 check_param\n\nFunction to check CGI parameters\n\n=over 2\n\n=item Parameters\n\n=over 4\n\n=item name - name of the parameter\n\n=item value - value of the parameter\n\n=item is_numeric - Optional parameter, if set the function checks if the parameter is numeric\n\n=item Returns\n\nFalse if parameter is ok, error text if otherwise\n\n=back\n\n=cut\n\nsub check_param($$;$) {\n\tmy $name = shift or die \"No name provided\";\n\tmy $value = shift;\n\tmy $is_numeric = shift;\n\n\tif ( not defined $value ) {\n\t\treturn \"Parameter $name is missing\";\n\t} elsif ( $is_numeric ) {\n\t\tif ( $value + 0 eq $value ) {\n\t\t\treturn undef;\n\t\t} else {\n\t\t\treturn \"Parameter $name is not numeric\";\n\t\t}\n\t}\n}\n\n# Close the PM file.\nreturn 1;\n\n"},"avg_line_length":{"kind":"number","value":21.1746031746,"string":"21.174603"},"max_line_length":{"kind":"number","value":110,"string":"110"},"alphanum_fraction":{"kind":"number","value":0.6859070465,"string":"0.685907"}}},{"rowIdx":463282,"cells":{"hexsha":{"kind":"string","value":"ede08d0e22ef12f7f6c53b4c0e2b024d7263f96d"},"size":{"kind":"number","value":610,"string":"610"},"ext":{"kind":"string","value":"ph"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"febe/Common/AppFrontEnd/fe_Core/fe_ChooseRibbonScriptFileDlg/chooseRibbonScriptFileDlg.ph"},"max_stars_repo_name":{"kind":"string","value":"PdcVipSolutions/SpbExamples"},"max_stars_repo_head_hexsha":{"kind":"string","value":"70b9767910316720fc3adf04b640027e3391f2c0"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2020-03-26T12:32:53.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2020-03-26T12:32:53.000Z"},"max_issues_repo_path":{"kind":"string","value":"AppData/ProjectTemplates/febe/Common/AppFrontEnd/fe_Core/fe_ChooseRibbonScriptFileDlg/chooseRibbonScriptFileDlg.ph"},"max_issues_repo_name":{"kind":"string","value":"PdcVipSolutions/SpbVipTools"},"max_issues_repo_head_hexsha":{"kind":"string","value":"0c77a6af97df6f826f8a898bf0aefe6b4e8420da"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"AppData/ProjectTemplates/febe/Common/AppFrontEnd/fe_Core/fe_ChooseRibbonScriptFileDlg/chooseRibbonScriptFileDlg.ph"},"max_forks_repo_name":{"kind":"string","value":"PdcVipSolutions/SpbVipTools"},"max_forks_repo_head_hexsha":{"kind":"string","value":"0c77a6af97df6f826f8a898bf0aefe6b4e8420da"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#requires @\"..\\Common\\AppFrontEnd\\fe_Core\\fe_chooseRibbonScriptFileDlg\\chooseRibbonScriptFileDlg.pack\"\n\n% publicly used packages\n#include @\"..\\Common\\AppFrontEnd\\fe_Core\\fe_ChooseRibbonScriptFileDlg\\chooseRibbonScriptFileDlg.ph\"\n#include @\"pfc\\core.ph\"\n#include @\"pfc\\gui\\gui.ph\"\n\n% exported interfaces\n#include @\"Interfaces\\Logic\\dictionary.i\"\n#include @\"Interfaces\\Logic\\coreDictionary.i\"\n#include @\"..\\Common\\AppFrontEnd\\fe_Core\\fe_ChooseRibbonScriptFileDlg\\chooseRibbonScriptFileDlg.i\"\n% exported classes\n#include @\"..\\Common\\AppFrontEnd\\fe_Core\\fe_chooseRibbonScriptFileDlg\\chooseRibbonScriptFileDlg.cl\"\n"},"avg_line_length":{"kind":"number","value":43.5714285714,"string":"43.571429"},"max_line_length":{"kind":"number","value":103,"string":"103"},"alphanum_fraction":{"kind":"number","value":0.8245901639,"string":"0.82459"}}},{"rowIdx":463283,"cells":{"hexsha":{"kind":"string","value":"ed98ca08f2e23ffe93eb81515b031959a16ada83"},"size":{"kind":"number","value":3058,"string":"3,058"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"modules/EnsEMBL/Web/Command/UserData/FviewRedirect.pm"},"max_stars_repo_name":{"kind":"string","value":"pblins/ensembl-webcode"},"max_stars_repo_head_hexsha":{"kind":"string","value":"1b70534380de5e46f3778b03296ffad6eaf739db"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"modules/EnsEMBL/Web/Command/UserData/FviewRedirect.pm"},"max_issues_repo_name":{"kind":"string","value":"pblins/ensembl-webcode"},"max_issues_repo_head_hexsha":{"kind":"string","value":"1b70534380de5e46f3778b03296ffad6eaf739db"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"modules/EnsEMBL/Web/Command/UserData/FviewRedirect.pm"},"max_forks_repo_name":{"kind":"string","value":"pblins/ensembl-webcode"},"max_forks_repo_head_hexsha":{"kind":"string","value":"1b70534380de5e46f3778b03296ffad6eaf739db"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"=head1 LICENSE\n\nCopyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute\nCopyright [2016-2022] EMBL-European Bioinformatics Institute\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n=cut\n\npackage EnsEMBL::Web::Command::UserData::FviewRedirect;\n\n### Redirects from the 'FeatureView' form to Location/Genome\n\nuse strict;\nuse warnings;\n\nuse URI::Escape qw(uri_escape);\n\nuse EnsEMBL::Web::Builder;\n\nuse base qw(EnsEMBL::Web::Command::UserData);\n\nsub process {\n my $self = shift;\n my $hub = $self->hub;\n my $site_type = $hub->species_defs->ENSEMBL_SITETYPE;\n my $ftype = $hub->param('ftype');\n my $builder = $hub->controller->builder;\n my $object = $builder->create_object('Feature');\n my $features = $object && $object->can('convert_to_drawing_parameters') ? $object->convert_to_drawing_parameters : {};\n my $desc = $hub->param('name') || \"Selected ${ftype}s\";\n my $content = sprintf qq{track name=%s description=\"%s\" useScore=1 color=%s style=%s\\n}, $ftype, $desc, $hub->param('colour'), $hub->param('style');\n \n ## Write out features as GFF file\n while (my ($type, $feat) = each %$features) {\n foreach my $f (@{$feat->[0] || []}) {\n ## Skip features (genes) on LRGs\n next if $f->{'region'} =~ /^LRG/;\n my $strand = $f->{'strand'} == 1 ? '+' : '-';\n my @attribs;\n \n if ($ftype eq 'Gene') {\n @attribs = (\n 'ID ' . $f->{'gene_id'}[0],\n 'extname ' . $f->{'extname'}, \n 'description ' . uri_escape($f->{'extra'}{'description'})\n );\n } else {\n @attribs = (\n 'length ' . $f->{'length'},\n 'label ' . uri_escape($f->{'label'}),\n 'align ' . $f->{'extra'}{'align'},\n 'ori ' . $f->{'extra'}{'ori'},\n 'id ' . $f->{'extra'}{'id'},\n 'score ' . $f->{'extra'}{'score'},\n 'p-value ' . $f->{'extra'}{'p-value'},\n );\n }\n \n $content .= join \"\\t\", $f->{'region'}, $site_type, $ftype, $f->{'start'}, $f->{'end'}, '.', $strand, '.', join('; ', @attribs);\n $content .= \"\\n\";\n }\n }\n \n $hub->param('text', $content);\n $hub->param('format', 'GTF');\n $hub->param('name', $desc);\n \n my $upload = $self->upload('text'); ## Upload munged data\n my $url = $hub->url({ species => $hub->param('species'), type => 'Location', action => 'Genome', function => undef, __clear => 1 });\n my $params = { Vkaryotype => \"upload_$upload->{'code'}=on\" };\n \n $self->ajax_redirect($url, $params, undef, 'page'); \n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":35.1494252874,"string":"35.149425"},"max_line_length":{"kind":"number","value":152,"string":"152"},"alphanum_fraction":{"kind":"number","value":0.5814257685,"string":"0.581426"}}},{"rowIdx":463284,"cells":{"hexsha":{"kind":"string","value":"edbd6fc7c52125dd214ca76eb23ad1fb1a929758"},"size":{"kind":"number","value":369,"string":"369"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"perl/vendor/lib/XML/SAX/PurePerl/UnicodeExt.pm"},"max_stars_repo_name":{"kind":"string","value":"mnikolop/Thesis_project_CyberDoc"},"max_stars_repo_head_hexsha":{"kind":"string","value":"9a37fdd5a31de24cb902ee31ef19eb992faa1665"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":7,"string":"7"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2016-01-29T21:34:09.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2020-05-20T13:36:14.000Z"},"max_issues_repo_path":{"kind":"string","value":"perl/vendor/lib/XML/SAX/PurePerl/UnicodeExt.pm"},"max_issues_repo_name":{"kind":"string","value":"mnikolop/Thesis_project_CyberDoc"},"max_issues_repo_head_hexsha":{"kind":"string","value":"9a37fdd5a31de24cb902ee31ef19eb992faa1665"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":7,"string":"7"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2018-10-07T10:55:46.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2019-04-02T17:04:28.000Z"},"max_forks_repo_path":{"kind":"string","value":"perl/vendor/lib/XML/SAX/PurePerl/UnicodeExt.pm"},"max_forks_repo_name":{"kind":"string","value":"mnikolop/Thesis_project_CyberDoc"},"max_forks_repo_head_hexsha":{"kind":"string","value":"9a37fdd5a31de24cb902ee31ef19eb992faa1665"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":11,"string":"11"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-09-24T01:35:57.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-06-08T19:00:55.000Z"},"content":{"kind":"string","value":"# $Id$\n\npackage XML::SAX::PurePerl;\nuse strict;\n\nno warnings 'utf8';\n\nsub chr_ref {\n return chr(shift);\n}\n\nif ($] >= 5.007002) {\n require Encode;\n \n Encode::define_alias( \"UTF-16\" => \"UCS-2\" );\n Encode::define_alias( \"UTF-16BE\" => \"UCS-2\" );\n Encode::define_alias( \"UTF-16LE\" => \"ucs-2le\" );\n Encode::define_alias( \"UTF16LE\" => \"ucs-2le\" );\n}\n\n1;\n\n"},"avg_line_length":{"kind":"number","value":16.0434782609,"string":"16.043478"},"max_line_length":{"kind":"number","value":52,"string":"52"},"alphanum_fraction":{"kind":"number","value":0.5718157182,"string":"0.571816"}}},{"rowIdx":463285,"cells":{"hexsha":{"kind":"string","value":"ede8ed05acaebca4d33411f7742d2536f6bfc400"},"size":{"kind":"number","value":12773,"string":"12,773"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"test/layer_factory/layer_factory.pl"},"max_stars_repo_name":{"kind":"string","value":"guimaraes13/NeuralLog"},"max_stars_repo_head_hexsha":{"kind":"string","value":"63cca557257ec67905b79048718db385cc4c3aab"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":6,"string":"6"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2021-05-04T12:24:17.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-07-28T03:20:48.000Z"},"max_issues_repo_path":{"kind":"string","value":"test/layer_factory/layer_factory.pl"},"max_issues_repo_name":{"kind":"string","value":"guimaraes13/NeuralLog"},"max_issues_repo_head_hexsha":{"kind":"string","value":"63cca557257ec67905b79048718db385cc4c3aab"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"test/layer_factory/layer_factory.pl"},"max_forks_repo_name":{"kind":"string","value":"guimaraes13/NeuralLog"},"max_forks_repo_head_hexsha":{"kind":"string","value":"63cca557257ec67905b79048718db385cc4c3aab"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"set_parameter(initial_value, class_name, random_uniform).\nset_parameter(initial_value, config, minval, 0.02).\nset_parameter(initial_value, config, maxval, 0.05).\n\nlearn(predicate_0_trainable).\nlearn(\"century/1\").\nlearn(\"female/1\").\nlearn(\"it_female/1\").\nlearn(\"multiply_2/2\").\nlearn(\"height/2\").\nlearn(\"it_height/2\").\nlearn(\"inv_age/2\").\nlearn(\"it_inv_age/2\").\n\nlearn(\"uncle/2\").\nlearn(\"it_uncle/2\").\nlearn(\"aunt/2\").\nlearn(\"it_aunt/2\").\nlearn(\"nephew/2\").\nlearn(\"niece/2\").\nlearn(\"it_niece/2\").\n\n0.3::predicate_0_not_trainable.\n0.5::predicate_0_trainable.\n\n0.7::year(2019).\n0.9::century(21).\n\n0.5::multiply(2, 3).\n\n0.25::multiply_2(4, 3).\n\n0.02::male(alfonso).\n0.03::male(andrew).\n0.05::male(arthur).\nmale(charles).\n0.07::male(christopher).\n0.07::male(some_male).\n0.11::male(colin).\n0.13::male(emilio).\n0.17::male(james).\n0.19::male(marco).\n0.23::male(pierro).\n0.31::male(roberto).\n0.37::male(tomaso).\n\n0.101::female(angela).\n0.103::female(charlotte).\n0.107::female(christine).\n0.107::female(some_female).\n0.109::female(francesca).\n0.113::female(gina).\n0.127::female(jennifer).\n0.137::female(lucia).\n0.139::female(margaret).\n0.149::female(maria).\n0.151::female(penelope).\n0.157::female(sophia).\n0.163::female(victoria).\n\n0.02::it_male(alfonso).\n0.03::it_male(andrew).\n0.05::it_male(arthur).\nit_male(charles).\n0.07::it_male(christopher).\n0.07::it_male(some_male).\n0.11::it_male(colin).\n0.13::it_male(emilio).\n0.17::it_male(james).\n0.19::it_male(marco).\n0.23::it_male(pierro).\n0.31::it_male(roberto).\n0.37::it_male(tomaso).\n\n0.101::it_female(angela).\n0.103::it_female(charlotte).\n0.107::it_female(christine).\n0.107::it_female(some_female).\n0.109::it_female(francesca).\n0.113::it_female(gina).\n0.127::it_female(jennifer).\n0.137::it_female(lucia).\n0.139::it_female(margaret).\n0.149::it_female(maria).\n0.151::it_female(penelope).\n0.157::it_female(sophia).\n0.163::it_female(victoria).\n\n0.211::age(some_male, 30).\n0.223::age(colin, 41).\n0.227::age(emilio, 27).\n0.239::age(some_female, 23).\n0.241::age(francesca, 27).\n0.251::age(gina, 81).\n\n0.211::it_age(some_male, 30).\n0.223::it_age(colin, 41).\n0.227::it_age(emilio, 27).\n0.239::it_age(some_female, 23).\n0.241::it_age(francesca, 27).\n0.251::it_age(gina, 81).\n\n0.307::height(some_male, 1.73).\n0.311::height(colin, 1.57).\n0.313::height(emilio, 2.06).\n0.317::height(james, 1.70).\n0.331::height(marco, 1.65).\n0.337::height(some_female, 1.72).\n0.347::height(francesca, 1.70).\n0.349::height(gina, 1.45).\n0.353::height(jennifer, 1.73).\n0.359::height(lucia, 1.59).\n0.367::height(pierro, 1.82).\n0.373::height(charlotte, 1.81).\n\n0.307::it_height(some_male, 1.73).\n0.311::it_height(colin, 1.57).\n0.313::it_height(emilio, 2.06).\n0.317::it_height(james, 1.70).\n0.331::it_height(marco, 1.65).\n0.337::it_height(some_female, 1.72).\n0.347::it_height(francesca, 1.70).\n0.349::it_height(gina, 1.45).\n0.353::it_height(jennifer, 1.73).\n0.359::it_height(lucia, 1.59).\n0.367::it_height(pierro, 1.82).\n0.373::it_height(charlotte, 1.81).\n\n0.211::inv_age(30, some_male).\n0.223::inv_age(41, colin).\n0.227::inv_age(27, emilio).\n0.239::inv_age(23, some_female).\n0.241::inv_age(27, francesca).\n0.251::inv_age(81, gina).\n\n0.211::it_inv_age(30, some_male).\n0.223::it_inv_age(41, colin).\n0.227::it_inv_age(27, emilio).\n0.239::it_inv_age(23, some_female).\n0.241::it_inv_age(27, francesca).\n0.251::it_inv_age(81, gina).\n\n0.307::inv_height(1.73, some_male).\n0.311::inv_height(1.57, colin).\n0.313::inv_height(2.06, emilio).\n0.317::inv_height(1.70, james).\n0.331::inv_height(1.65, marco).\n0.337::inv_height(1.72, some_female).\n0.347::inv_height(1.70, francesca).\n0.349::inv_height(1.45, gina).\n0.353::inv_height(1.73, jennifer).\n0.359::inv_height(1.65, lucia).\n0.367::inv_height(1.65, pierro).\n0.373::inv_height(1.81, charlotte).\n\n0.307::it_inv_height(1.73, some_male).\n0.311::it_inv_height(1.57, colin).\n0.313::it_inv_height(2.06, emilio).\n0.317::it_inv_height(1.70, james).\n0.331::it_inv_height(1.65, marco).\n0.337::it_inv_height(1.72, some_female).\n0.347::it_inv_height(1.70, francesca).\n0.349::it_inv_height(1.45, gina).\n0.353::it_inv_height(1.73, jennifer).\n0.359::it_inv_height(1.65, lucia).\n0.367::it_inv_height(1.65, pierro).\n0.373::it_inv_height(1.81, charlotte).\n\n0.547::husband(andrew, christine).\n0.557::husband(arthur, margaret).\n0.563::husband(charles, jennifer).\n0.569::husband(christopher, penelope).\n0.571::husband(emilio, gina).\n0.577::husband(james, victoria).\n0.587::husband(marco, lucia).\n0.593::husband(pierro, francesca).\n0.599::husband(roberto, maria).\n0.601::husband(tomaso, angela).\n0.6012::husband(some_male, some_female).\n0.7019::husband(james, some_female).\n\n0.547::it_husband(andrew, christine).\n0.557::it_husband(arthur, margaret).\n0.563::it_husband(charles, jennifer).\n0.569::it_husband(christopher, penelope).\n0.571::it_husband(emilio, gina).\n0.577::it_husband(james, victoria).\n0.587::it_husband(marco, lucia).\n0.593::it_husband(pierro, francesca).\n0.599::it_husband(roberto, maria).\n0.601::it_husband(tomaso, angela).\n0.6012::it_husband(some_male, some_female).\n0.7019::it_husband(james, some_female).\n\n0.547::it_husband_2(andrew, christine).\n0.557::it_husband_2(arthur, margaret).\n0.563::it_husband_2(charles, jennifer).\n0.569::it_husband_2(christopher, penelope).\n0.571::it_husband_2(emilio, gina).\n0.577::it_husband_2(james, victoria).\n0.587::it_husband_2(marco, lucia).\n0.593::it_husband_2(pierro, francesca).\n0.599::it_husband_2(roberto, maria).\n0.601::it_husband_2(tomaso, angela).\n0.6012::it_husband_2(some_male, some_female).\n0.7019::it_husband_2(james, some_female).\n\n0.6015::wife(some_female, some_male).\n0.607::wife(angela, tomaso).\n0.613::wife(christine, andrew).\n0.617::wife(francesca, pierro).\n0.619::wife(gina, emilio).\n0.631::wife(jennifer, charles).\n0.641::wife(lucia, marco).\n0.643::wife(maria, roberto).\n0.647::wife(penelope, christopher).\n0.653::wife(victoria, james).\n\n0.701::father(andrew, james).\n0.709::father(andrew, jennifer).\n0.006::father(andrew, andrew).\n0.719::father(christopher, arthur).\n0.727::father(christopher, victoria).\n0.733::father(james, charlotte).\n0.739::father(james, colin).\n0.743::father(marco, alfonso).\n0.751::father(marco, sophia).\n0.003::father(marco, marco).\n0.757::father(pierro, angela).\n0.761::father(pierro, marco).\n0.769::father(roberto, emilio).\n0.773::father(roberto, lucia).\n\n0.787::mother(christine, jennifer).\n0.797::mother(francesca, angela).\n0.809::mother(francesca, marco).\n0.811::mother(lucia, sophia).\n0.821::mother(maria, emilio).\n0.823::mother(maria, lucia).\n0.827::mother(penelope, arthur).\n0.829::mother(penelope, victoria).\n0.839::mother(victoria, charlotte).\n0.853::mother(victoria, colin).\n\n0.859::son(alfonso, lucia).\n0.863::son(alfonso, marco).\n0.877::son(arthur, christopher).\n0.881::son(arthur, penelope).\n0.883::son(colin, james).\n0.887::son(colin, victoria).\n0.907::son(emilio, roberto).\n0.911::son(james, andrew).\n0.919::son(james, christine).\n0.929::son(marco, francesca).\n0.937::son(marco, pierro).\n\n0.941::daughter(angela, pierro).\n0.9415::daughter(some_female, jennifer).\n0.947::daughter(charlotte, james).\n0.094::daughter(jennifer, james).\n0.953::daughter(charlotte, victoria).\n0.967::daughter(jennifer, andrew).\n0.971::daughter(jennifer, christine).\n0.977::daughter(lucia, maria).\n0.983::daughter(lucia, roberto).\n0.991::daughter(sophia, lucia).\n0.997::daughter(sophia, marco).\n0.2::daughter(victoria, christopher).\n0.3::daughter(victoria, penelope).\n\n0.941::it_daughter(angela, pierro).\n0.9415::it_daughter(some_female, jennifer).\n0.947::it_daughter(charlotte, james).\n0.094::it_daughter(jennifer, james).\n0.953::it_daughter(charlotte, victoria).\n0.967::it_daughter(jennifer, andrew).\n0.971::it_daughter(jennifer, christine).\n0.977::it_daughter(lucia, maria).\n0.983::it_daughter(lucia, roberto).\n0.991::it_daughter(sophia, lucia).\n0.997::it_daughter(sophia, marco).\n0.2::it_daughter(victoria, christopher).\n0.3::it_daughter(victoria, penelope).\n\n0.5::brother(alfonso, sophia).\n0.7::brother(arthur, victoria).\n0.11::brother(colin, charlotte).\n0.13::brother(emilio, lucia).\n0.17::brother(james, jennifer).\n0.19::brother(marco, angela).\n0.5853::brother(jennifer, some_female).\n0.6853::brother(angela, some_female).\n0.7853::brother(marco, some_female).\n\n0.5::it_brother(alfonso, sophia).\n0.7::it_brother(arthur, victoria).\n0.11::it_brother(colin, charlotte).\n0.13::it_brother(emilio, lucia).\n0.17::it_brother(james, jennifer).\n0.19::it_brother(marco, angela).\n0.5853::it_brother(jennifer, some_female).\n0.6853::it_brother(angela, some_female).\n0.7853::it_brother(marco, some_female).\n\n0.23::sister(angela, marco).\n0.29::sister(charlotte, colin).\n0.31::sister(lucia, emilio).\n0.37::sister(sophia, alfonso).\n0.41::sister(victoria, arthur).\n0.5853::sister(some_female, jennifer).\n0.6853::sister(some_female, angela).\n0.7853::sister(some_female, marco).\n\n0.23::it_sister(angela, marco).\n0.29::it_sister(charlotte, colin).\n0.31::it_sister(lucia, emilio).\n0.37::it_sister(sophia, alfonso).\n0.41::it_sister(victoria, arthur).\n0.5853::it_sister(some_female, jennifer).\n0.6853::it_sister(some_female, angela).\n0.7853::it_sister(some_female, marco).\n\n0.449::uncle(arthur, charlotte).\n0.029::uncle(arthur, arthur).\n0.049::uncle(some_male, some_female).\n0.457::uncle(charles, charlotte).\n0.461::uncle(charles, colin).\n0.463::uncle(emilio, alfonso).\n0.013::uncle(emilio, emilio).\n0.467::uncle(emilio, sophia).\n0.479::uncle(tomaso, alfonso).\n0.487::uncle(tomaso, sophia).\n\n0.449::it_uncle(arthur, charlotte).\n0.029::it_uncle(arthur, arthur).\n0.049::it_uncle(some_male, some_female).\n0.457::it_uncle(charles, charlotte).\n0.461::it_uncle(charles, colin).\n0.463::it_uncle(emilio, alfonso).\n0.013::it_uncle(emilio, emilio).\n0.467::it_uncle(emilio, sophia).\n0.479::it_uncle(tomaso, alfonso).\n0.487::it_uncle(tomaso, sophia).\n\n0.419::aunt(angela, alfonso).\n0.421::aunt(gina, alfonso).\n0.431::aunt(gina, sophia).\n0.433::aunt(jennifer, charlotte).\n0.0433::aunt(jennifer, some_male).\n0.21::aunt(some_female, alfonso).\n0.31::aunt(some_female, arthur).\n0.33::aunt(some_female, charlotte).\n0.439::aunt(jennifer, colin).\n0.443::aunt(margaret, charlotte).\n0.449::aunt(margaret, colin).\n\n0.419::it_aunt(angela, alfonso).\n0.421::it_aunt(gina, alfonso).\n0.431::it_aunt(gina, sophia).\n0.433::it_aunt(jennifer, charlotte).\n0.0433::it_aunt(jennifer, some_male).\n0.21::it_aunt(some_female, alfonso).\n0.31::it_aunt(some_female, arthur).\n0.33::it_aunt(some_female, charlotte).\n0.439::it_aunt(jennifer, colin).\n0.443::it_aunt(margaret, charlotte).\n0.449::it_aunt(margaret, colin).\n\n0.73::nephew(alfonso, angela).\n0.079::nephew(alfonso, arthur).\n0.083::nephew(alfonso, charlotte).\n0.03::nephew(alfonso, alfonso).\n0.79::nephew(alfonso, gina).\n0.83::nephew(alfonso, tomaso).\n0.89::nephew(colin, arthur).\n0.012::nephew(colin, colin).\n0.083::nephew(alfonso, tomaso).\n0.089::nephew(colin, arthur).\n0.97::nephew(colin, charles).\n0.101::nephew(colin, jennifer).\n0.103::nephew(colin, margaret).\n\n0.107::niece(charlotte, arthur).\n0.109::niece(charlotte, charles).\n0.113::niece(charlotte, jennifer).\n0.127::niece(charlotte, margaret).\n0.0107::niece(jennifer, some_female).\n0.0109::niece(lucia, some_female).\n0.0149::niece(lucia, jennifer).\n0.0113::niece(angela, some_female).\n0.0131::niece(angela, jennifer).\n0.0127::niece(charlotte, some_female).\n0.131::niece(sophia, angela).\n0.137::niece(sophia, emilio).\n0.139::niece(sophia, gina).\n0.149::niece(sophia, tomaso).\n\n0.107::it_niece(charlotte, arthur).\n0.109::it_niece(charlotte, charles).\n0.113::it_niece(charlotte, jennifer).\n0.127::it_niece(charlotte, margaret).\n0.0107::it_niece(jennifer, some_female).\n0.0109::it_niece(lucia, some_female).\n0.0149::it_niece(lucia, jennifer).\n0.0113::it_niece(angela, some_female).\n0.0131::it_niece(angela, jennifer).\n0.0127::it_niece(charlotte, some_female).\n0.131::it_niece(sophia, angela).\n0.137::it_niece(sophia, emilio).\n0.139::it_niece(sophia, gina).\n0.149::it_niece(sophia, tomaso).\n\nmale_human(X) :- it_male(X).\nfemale_human(X) :- it_female(X).\n\nhas_inv_height(X, Y) :- it_inv_height(X, Y).\nhas_height(X, Y) :- it_height(X, Y).\nhas_age(X, Y) :- it_age(X, Y).\nhas_inv_age(X, Y) :- it_inv_age(X, Y).\n\nhas_daughter(maria, Y) :- it_daughter(maria, Y).\nhas_sister(angela, Y) :- it_sister(angela, Y).\nhas_husband(X, victoria) :- it_husband(X, victoria).\nhas_husband_2(X, Y) :- it_husband_2(X, Y).\nhas_brother(X, angela) :- it_brother(X, angela).\nhas_aunt(X, Y) :- it_aunt(X, Y).\nhas_uncle(arthur, Y) :- it_uncle(arthur, Y).\nhas_niece(X, gina) :- it_niece(X, gina).\nhas_nephew(X, Y) :- nephew(X, X).\n#has_nephew(X, Y) :- nephew(X, Y).\n\n#human(X) :- {P}(X, Y), score(b_{P}).\n#human(X) :- {P}(Y, X), score(b_{P}).\n#\nfor x in father mother do\n for y in father mother do\n grand_{x}(X, Y) :- {x}(X, Z), {y}(Z, Y), w(grand_{x}).\n done\ndone\n#\n#grand_father(X, Y) :- father(X, Z), father(Z, Y), w(x, y).\n"},"avg_line_length":{"kind":"number","value":28.8981900452,"string":"28.89819"},"max_line_length":{"kind":"number","value":62,"string":"62"},"alphanum_fraction":{"kind":"number","value":0.7146324278,"string":"0.714632"}}},{"rowIdx":463286,"cells":{"hexsha":{"kind":"string","value":"edec6e591447474d681343414f28f75c325103f9"},"size":{"kind":"number","value":206,"string":"206"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"t/00-load.t"},"max_stars_repo_name":{"kind":"string","value":"tlawrence3/FAST"},"max_stars_repo_head_hexsha":{"kind":"string","value":"54a7987c04fa151e1fc8657caa13423069a33743"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-2.0","Unlicense"],"string":"[\n \"Artistic-2.0\",\n \"Unlicense\"\n]"},"max_stars_count":{"kind":"number","value":32,"string":"32"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-02-12T05:54:00.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-02-17T08:09:33.000Z"},"max_issues_repo_path":{"kind":"string","value":"t/00-load.t"},"max_issues_repo_name":{"kind":"string","value":"tlawrence3/FAST"},"max_issues_repo_head_hexsha":{"kind":"string","value":"54a7987c04fa151e1fc8657caa13423069a33743"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-2.0","Unlicense"],"string":"[\n \"Artistic-2.0\",\n \"Unlicense\"\n]"},"max_issues_count":{"kind":"number","value":42,"string":"42"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2015-02-12T05:53:50.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2019-10-18T12:43:24.000Z"},"max_forks_repo_path":{"kind":"string","value":"t/00-load.t"},"max_forks_repo_name":{"kind":"string","value":"tlawrence3/FAST"},"max_forks_repo_head_hexsha":{"kind":"string","value":"54a7987c04fa151e1fc8657caa13423069a33743"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-2.0","Unlicense"],"string":"[\n \"Artistic-2.0\",\n \"Unlicense\"\n]"},"max_forks_count":{"kind":"number","value":13,"string":"13"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-04-14T06:18:43.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-10-11T07:47:52.000Z"},"content":{"kind":"string","value":"#!perl -T\nuse 5.006;\nuse strict;\nuse warnings FATAL => 'all';\nuse Test::More;\n\nplan tests => 1;\n\nBEGIN {\n use_ok( 'FAST' ) || print \"Bail out!\\n\";\n}\n\ndiag( \"Testing FAST $FAST::VERSION, Perl $], $^X\" );\n"},"avg_line_length":{"kind":"number","value":14.7142857143,"string":"14.714286"},"max_line_length":{"kind":"number","value":52,"string":"52"},"alphanum_fraction":{"kind":"number","value":0.5825242718,"string":"0.582524"}}},{"rowIdx":463287,"cells":{"hexsha":{"kind":"string","value":"eda90458a19540b03664caea097e0f8e7a9002e6"},"size":{"kind":"number","value":2835,"string":"2,835"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"perl5/Mace/Compiler/ParseTreeObject/ParsedCatch.pm"},"max_stars_repo_name":{"kind":"string","value":"jojochuang/eventwave"},"max_stars_repo_head_hexsha":{"kind":"string","value":"6cb3a8569f12a9127bf326be3231123428cd754d"},"max_stars_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"perl5/Mace/Compiler/ParseTreeObject/ParsedCatch.pm"},"max_issues_repo_name":{"kind":"string","value":"jojochuang/eventwave"},"max_issues_repo_head_hexsha":{"kind":"string","value":"6cb3a8569f12a9127bf326be3231123428cd754d"},"max_issues_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"perl5/Mace/Compiler/ParseTreeObject/ParsedCatch.pm"},"max_forks_repo_name":{"kind":"string","value":"jojochuang/eventwave"},"max_forks_repo_head_hexsha":{"kind":"string","value":"6cb3a8569f12a9127bf326be3231123428cd754d"},"max_forks_repo_licenses":{"kind":"list like","value":["BSD-3-Clause"],"string":"[\n \"BSD-3-Clause\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"# \n# ParsedCatch.pm : part of the Mace toolkit for building distributed systems\n# \n# Copyright (c) 2010, Sunghwan Yoo, Charles Killian\n# All rights reserved.\n# \n# Redistribution and use in source and binary forms, with or without\n# modification, are permitted provided that the following conditions are met:\n# \n# * Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# * Redistributions in binary form must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer in\n# the documentation and/or other materials provided with the\n# distribution.\n# * Neither the names of Duke University nor The University of\n# California, San Diego, nor the names of the authors or contributors\n# may be used to endorse or promote products derived from\n# this software without specific prior written permission.\n# \n# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\n# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE\n# USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n# \n# ----END-OF-LEGAL-STUFF----\npackage Mace::Compiler::ParseTreeObject::ParsedCatch;\n\nuse strict;\nuse v5.10.1;\nuse feature 'switch';\n\nuse Class::MakeMethods::Template::Hash\n (\n 'new' => 'new',\n 'scalar' => 'type',\n 'object' => [\"parsed_var\" => { class => \"Mace::Compiler::ParseTreeObject::ParsedVar\" }],\n 'object' => [\"stmt_block\" => { class => \"Mace::Compiler::ParseTreeObject::StatementBlock\" }],\n );\n\nsub toString {\n my $this = shift;\n\n given ($this->type()) {\n when (\"parsed_var\") { return \"catch (\".$this->parsed_var()->toString().\") {\".$this->stmt_block()->toString().\"}\";}\n when (\"...\") { return \"catch (...) {\".$this->stmt_block()->toString().\"}\"; }\n default { return \"ParsedCatch:NOT-PARSED\"; }\n }\n}\n\nsub usedVar {\n my $this = shift;\n my @array = ();\n\n my $type = $this->type();\n\n given ($type) {\n when (\"parsed_var\") { @array = ($this->parsed_var()->usedVar(),$this->stmt_block()->usedVar()); }\n when (\"...\") { @array = $this->stmt_block()->usedVar(); }\n default { @array = (); }\n }\n\n return @array;\n}\n\n1;\n"},"avg_line_length":{"kind":"number","value":38.8356164384,"string":"38.835616"},"max_line_length":{"kind":"number","value":122,"string":"122"},"alphanum_fraction":{"kind":"number","value":0.6790123457,"string":"0.679012"}}},{"rowIdx":463288,"cells":{"hexsha":{"kind":"string","value":"edf0c11d24a9709f9535d3743a594dad51eba701"},"size":{"kind":"number","value":6561,"string":"6,561"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"apps/vmware/connector/mode/datastoresnapshot.pm"},"max_stars_repo_name":{"kind":"string","value":"fprwi6labs/centreon-plugins"},"max_stars_repo_head_hexsha":{"kind":"string","value":"acba6cf2baa7aac02dccfff4f07b449af20a9116"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"apps/vmware/connector/mode/datastoresnapshot.pm"},"max_issues_repo_name":{"kind":"string","value":"fprwi6labs/centreon-plugins"},"max_issues_repo_head_hexsha":{"kind":"string","value":"acba6cf2baa7aac02dccfff4f07b449af20a9116"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"apps/vmware/connector/mode/datastoresnapshot.pm"},"max_forks_repo_name":{"kind":"string","value":"fprwi6labs/centreon-plugins"},"max_forks_repo_head_hexsha":{"kind":"string","value":"acba6cf2baa7aac02dccfff4f07b449af20a9116"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#\n# Copyright 2019 Centreon (http://www.centreon.com/)\n#\n# Centreon is a full-fledged industry-strength solution that meets\n# the needs in IT infrastructure and application monitoring for\n# service performance.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n\npackage apps::vmware::connector::mode::datastoresnapshot;\n\nuse base qw(centreon::plugins::templates::counter);\n\nuse strict;\nuse warnings;\nuse centreon::plugins::misc;\nuse centreon::plugins::templates::catalog_functions qw(catalog_status_threshold);\n\nsub custom_status_output {\n my ($self, %options) = @_;\n\n my $msg = 'accessible ' . $self->{result_values}->{accessible};\n return $msg;\n}\n\nsub custom_status_calc {\n my ($self, %options) = @_;\n\n $self->{result_values}->{accessible} = $options{new_datas}->{$self->{instance} . '_accessible'};\n return 0;\n}\n\nsub set_counters {\n my ($self, %options) = @_;\n\n $self->{maps_counters_type} = [\n { name => 'datastore', type => 3, cb_prefix_output => 'prefix_datastore_output', cb_long_output => 'datastore_long_output', indent_long_output => ' ', message_multiple => 'All datastores are ok', \n group => [\n { name => 'global', type => 0, skipped_code => { -10 => 1 } },\n { name => 'global_snapshot', type => 0, skipped_code => { -10 => 1 } },\n { name => 'files', cb_prefix_output => 'prefix_files_output', message_multiple => 'All snapshot files are ok', type => 1, skipped_code => { -10 => 1 } },\n ]\n }\n ];\n \n $self->{maps_counters}->{global} = [\n { label => 'status', threshold => 0, set => {\n key_values => [ { name => 'accessible' } ],\n closure_custom_calc => $self->can('custom_status_calc'),\n closure_custom_output => $self->can('custom_status_output'),\n closure_custom_perfdata => sub { return 0; },\n closure_custom_threshold_check => \\&catalog_status_threshold,\n }\n },\n ];\n \n $self->{maps_counters}->{global_snapshot} = [\n { label => 'total', set => {\n key_values => [ { name => 'total' } ],\n output_template => 'total snapshots [size = %s %s]',\n output_change_bytes => 1,\n perfdatas => [\n { label => 'total_size', value => 'total_absolute', template => '%s', unit => 'B', \n min => 0, label_extra_instance => 1 },\n ],\n }\n },\n ];\n \n $self->{maps_counters}->{files} = [\n { label => 'snapshot', set => {\n key_values => [ { name => 'total' } ],\n output_template => '[size = %s %s]',\n output_change_bytes => 1,\n closure_custom_perfdata => sub { return 0; },\n }\n },\n ];\n}\n\nsub prefix_datastore_output {\n my ($self, %options) = @_;\n\n return \"Datastore '\" . $options{instance_value}->{display} . \"' : \";\n}\n\nsub datastore_long_output {\n my ($self, %options) = @_;\n\n return \"checking datastore '\" . $options{instance_value}->{display} . \"'\";\n}\n\nsub prefix_files_output {\n my ($self, %options) = @_;\n\n return sprintf(\"file snapshot [%s]=>[%s] \", $options{instance_value}->{folder_path}, $options{instance_value}->{path});\n}\n\nsub new {\n my ($class, %options) = @_;\n my $self = $class->SUPER::new(package => __PACKAGE__, %options);\n bless $self, $class;\n \n $self->{version} = '1.0';\n $options{options}->add_options(arguments => { \n \"datastore-name:s\" => { name => 'datastore_name' },\n \"filter\" => { name => 'filter' },\n \"scope-datacenter:s\" => { name => 'scope_datacenter' },\n \"unknown-status:s\" => { name => 'unknown_status', default => '%{accessible} !~ /^true|1$/i' },\n \"warning-status:s\" => { name => 'warning_status', default => '' },\n \"critical-status:s\" => { name => 'critical_status', default => '' },\n });\n \n return $self;\n}\n\nsub check_options {\n my ($self, %options) = @_;\n $self->SUPER::check_options(%options);\n \n $self->change_macros(macros => ['unknown_status', 'warning_status', 'critical_status']);\n}\n\nsub manage_selection {\n my ($self, %options) = @_;\n\n $self->{datastore} = {};\n my $response = $options{custom}->execute(params => $self->{option_results},\n command => 'datastoresnapshot');\n\n my $i = 0;\n foreach my $ds_id (keys %{$response->{data}}) {\n my $ds_name = $response->{data}->{$ds_id}->{name};\n $self->{datastore}->{$ds_name} = { display => $ds_name, \n files => {}, \n global => {\n accessible => $response->{data}->{$ds_id}->{accessible}, \n },\n global_snapshot => {\n total => 0\n }, \n };\n \n foreach (@{$response->{data}->{$ds_id}->{snapshost}}) {\n $self->{datastore}->{$ds_name}->{files}->{$i} = { \n folder_path => $_->{folder_path},\n path => $_->{path},\n total => $_->{size}, \n };\n $self->{datastore}->{$ds_name}->{global_snapshot}->{total} += $_->{size};\n $i++;\n }\n }\n}\n\n1;\n\n__END__\n\n=head1 MODE\n\nCheck snapshots usage on datastores.\n\n=over 8\n\n=item B<--datastore-name>\n\ndatastore name to list.\n\n=item B<--filter>\n\nDatastore name is a regexp.\n\n=item B<--scope-datacenter>\n\nSearch in following datacenter(s) (can be a regexp).\n\n=item B<--unknown-status>\n\nSet warning threshold for status (Default: '%{accessible} !~ /^true|1$/i').\nCan used special variables like: %{accessible}\n\n=item B<--warning-status>\n\nSet warning threshold for status (Default: '').\nCan used special variables like: %{accessible}\n\n=item B<--critical-status>\n\nSet critical threshold for status (Default: '').\nCan used special variables like: %{accessible}\n\n=item B<--warning-*>\n\nThreshold warning.\nCan be: 'total', 'snapshot'.\n\n=item B<--critical-*>\n\nThreshold critical.\nCan be: 'total', 'snapshot'.\n\n=back\n\n=cut\n"},"avg_line_length":{"kind":"number","value":30.2350230415,"string":"30.235023"},"max_line_length":{"kind":"number","value":207,"string":"207"},"alphanum_fraction":{"kind":"number","value":0.5654625819,"string":"0.565463"}}},{"rowIdx":463289,"cells":{"hexsha":{"kind":"string","value":"eddde694eb8f016c68214171c9cd52c4d00a0603"},"size":{"kind":"number","value":2022,"string":"2,022"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Chart/Plotly/Trace/Box/Selected.pm"},"max_stars_repo_name":{"kind":"string","value":"hstejas/p5-Chart-Plotly"},"max_stars_repo_head_hexsha":{"kind":"string","value":"c1666613369ff44d0ec984935b02b4024638aacf"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":11,"string":"11"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2017-01-08T12:08:24.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-12-14T15:27:56.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/Chart/Plotly/Trace/Box/Selected.pm"},"max_issues_repo_name":{"kind":"string","value":"hstejas/p5-Chart-Plotly"},"max_issues_repo_head_hexsha":{"kind":"string","value":"c1666613369ff44d0ec984935b02b4024638aacf"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":28,"string":"28"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2016-11-21T20:25:21.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-04-20T16:58:38.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/Chart/Plotly/Trace/Box/Selected.pm"},"max_forks_repo_name":{"kind":"string","value":"hstejas/p5-Chart-Plotly"},"max_forks_repo_head_hexsha":{"kind":"string","value":"c1666613369ff44d0ec984935b02b4024638aacf"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"number","value":3,"string":"3"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2016-12-14T15:59:41.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2020-07-30T04:39:43.000Z"},"content":{"kind":"string","value":"package Chart::Plotly::Trace::Box::Selected;\nuse Moose;\nuse MooseX::ExtraArgs;\nuse Moose::Util::TypeConstraints qw(enum union);\nif (!defined Moose::Util::TypeConstraints::find_type_constraint('PDL')) {\n Moose::Util::TypeConstraints::type('PDL');\n}\n\nuse Chart::Plotly::Trace::Box::Selected::Marker;\n\n\n# VERSION\n\n# ABSTRACT: This attribute is one of the possible options for the trace box.\n\n=encoding utf-8\n\n=head1 SYNOPSIS\n\n# EXAMPLE: examples/traces/box.pl\n\n=head1 DESCRIPTION\n\nThis attribute is part of the possible options for the trace box.\n\nThis file has been autogenerated from the official plotly.js source.\n\nIf you like Plotly, please support them: L \nOpen source announcement: L\n\nFull reference: L\n\n=head1 DISCLAIMER\n\nThis is an unofficial Plotly Perl module. Currently I'm not affiliated in any way with Plotly. \nBut I think plotly.js is a great library and I want to use it with perl.\n\n=head1 METHODS\n\n=cut\n\n=head2 TO_JSON\n\nSerialize the trace to JSON. This method should be called only by L serializer.\n\n=cut\n\nsub TO_JSON {\n my $self = shift; \n my $extra_args = $self->extra_args // {};\n my $meta = $self->meta;\n my %hash = %$self;\n for my $name (sort keys %hash) {\n my $attr = $meta->get_attribute($name);\n if (defined $attr) {\n my $value = $hash{$name};\n my $type = $attr->type_constraint;\n if ($type && $type->equals('Bool')) {\n $hash{$name} = $value ? \\1 : \\ 0;\n }\n }\n }\n %hash = (%hash, %$extra_args);\n delete $hash{'extra_args'};\n if ($self->can('type') && (!defined $hash{'type'})) {\n $hash{type} = $self->type();\n }\n return \\%hash;\n}\n\n=head1 ATTRIBUTES\n\n=over\n\n=cut\n\n=item * marker\n\n\n=cut\n\nhas marker => (\n is => \"rw\",\n isa => \"Maybe[HashRef]|Chart::Plotly::Trace::Box::Selected::Marker\",\n);\n\n=pod\n\n=back\n\n=cut\n\n\n__PACKAGE__->meta->make_immutable();\n1;\n"},"avg_line_length":{"kind":"number","value":21.0625,"string":"21.0625"},"max_line_length":{"kind":"number","value":95,"string":"95"},"alphanum_fraction":{"kind":"number","value":0.6434223541,"string":"0.643422"}}},{"rowIdx":463290,"cells":{"hexsha":{"kind":"string","value":"edf3ebc607a8e98b1ca86d6cee04e1824be3e81f"},"size":{"kind":"number","value":1853,"string":"1,853"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/EpitopeDB/sample.pm"},"max_stars_repo_name":{"kind":"string","value":"MullinsLab/viroverse"},"max_stars_repo_head_hexsha":{"kind":"string","value":"fca0c5f81ce9d5fdcef96d661def0699ba4209cb"},"max_stars_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_stars_count":{"kind":"number","value":7,"string":"7"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2019-02-04T20:37:19.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2020-10-07T18:23:09.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/EpitopeDB/sample.pm"},"max_issues_repo_name":{"kind":"string","value":"MullinsLab/viroverse"},"max_issues_repo_head_hexsha":{"kind":"string","value":"fca0c5f81ce9d5fdcef96d661def0699ba4209cb"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":75,"string":"75"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2019-03-07T20:44:04.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2020-01-22T11:27:03.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/EpitopeDB/sample.pm"},"max_forks_repo_name":{"kind":"string","value":"MullinsLab/viroverse"},"max_forks_repo_head_hexsha":{"kind":"string","value":"fca0c5f81ce9d5fdcef96d661def0699ba4209cb"},"max_forks_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"package EpitopeDB::sample;\n\nuse base qw/DBIx::Class/;\n\n# Load required DBIC stuff\n__PACKAGE__->load_components(qw/PK::Auto Core/);\n# Set the table name\n__PACKAGE__->table('epitope.sample');\n# Set columns in table\n__PACKAGE__->add_column(\n qw/\n sample_id \n tissue\n sample_date\n patient\n patient_id\n /\n);\n# Set the primary key for the table\n__PACKAGE__->set_primary_key(qw/sample_id/);\n\n__PACKAGE__->has_many(pept_responses => 'EpitopeDB::pept_response', 'sample_id');\n__PACKAGE__->has_many(pept_response_corravgs => 'EpitopeDB::pept_response_corravg', 'sample_id');\n__PACKAGE__->has_many(titrations => 'EpitopeDB::titration', 'sample_id');\n__PACKAGE__->has_many(titration_corravgs => 'EpitopeDB::titration_corravg', 'sample_id');\n__PACKAGE__->has_many(hla_responses => 'EpitopeDB::hla_response', 'sample_id');\n__PACKAGE__->has_many(hla_response_corravgs => 'EpitopeDB::hla_response_corravg', 'sample_id');\n\n# one to manay relationship between sample and pool_response\n__PACKAGE__->has_many(pool_response => 'EpitopeDB::pool_response', 'sample_id');\n\n# one to manay relationship between sample and pool_response_corravg\n__PACKAGE__->has_many(pool_response_corravg => 'EpitopeDB::pool_response_corravg', 'sample_id');\n\n__PACKAGE__->has_many(epitope_mutants => 'EpitopeDB::epitope_mutant', {'foreign.patient_id' => 'self.patient_id'});\n\n__PACKAGE__->belongs_to(test_patient => 'EpitopeDB::test_patient', {'foreign.patient_id' => 'self.patient_id'});\n\n\n\n=head1 NAME\n\nEpitopeDB::hla - A model object representing a hla type.\n\n=head1 DESCRIPTION\n\nThis is an object that represents a row in the 'gene' table of viroverse database.\nIt uses DBIx::Class (aka, DBIC) to do ORM. For Catalyst, this is designed to be \nused through Viroverse::Model::EpitopeDB. offline utilities may wish to use this \nclass directly.\n\n=cut\n\n1;\n"},"avg_line_length":{"kind":"number","value":33.6909090909,"string":"33.690909"},"max_line_length":{"kind":"number","value":115,"string":"115"},"alphanum_fraction":{"kind":"number","value":0.7566109012,"string":"0.756611"}}},{"rowIdx":463291,"cells":{"hexsha":{"kind":"string","value":"edbf22419c6516a2b838fbf209ef4002af9612ef"},"size":{"kind":"number","value":353,"string":"353"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"auto-lib/Paws/Chime/CreateBotResponse.pm"},"max_stars_repo_name":{"kind":"string","value":"0leksii/aws-sdk-perl"},"max_stars_repo_head_hexsha":{"kind":"string","value":"b2132fe3c79a06fd15b6137e8a0eb628de722e0f"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":164,"string":"164"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-01-08T14:58:53.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-02-20T19:16:24.000Z"},"max_issues_repo_path":{"kind":"string","value":"auto-lib/Paws/Chime/CreateBotResponse.pm"},"max_issues_repo_name":{"kind":"string","value":"0leksii/aws-sdk-perl"},"max_issues_repo_head_hexsha":{"kind":"string","value":"b2132fe3c79a06fd15b6137e8a0eb628de722e0f"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":348,"string":"348"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2015-01-07T22:08:38.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-01-27T14:34:44.000Z"},"max_forks_repo_path":{"kind":"string","value":"auto-lib/Paws/Chime/CreateBotResponse.pm"},"max_forks_repo_name":{"kind":"string","value":"0leksii/aws-sdk-perl"},"max_forks_repo_head_hexsha":{"kind":"string","value":"b2132fe3c79a06fd15b6137e8a0eb628de722e0f"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":87,"string":"87"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-04-22T06:29:47.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2021-09-29T14:45:55.000Z"},"content":{"kind":"string","value":"\npackage Paws::Chime::CreateBotResponse;\n use Moose;\n has Bot => (is => 'ro', isa => 'Paws::Chime::Bot');\n\n has _request_id => (is => 'ro', isa => 'Str');\n1;\n\n### main pod documentation begin ###\n\n=head1 NAME\n\nPaws::Chime::CreateBotResponse\n\n=head1 ATTRIBUTES\n\n\n=head2 Bot => L\n\nThe bot details.\n\n\n=head2 _request_id => Str\n\n\n=cut\n\n"},"avg_line_length":{"kind":"number","value":12.6071428571,"string":"12.607143"},"max_line_length":{"kind":"number","value":53,"string":"53"},"alphanum_fraction":{"kind":"number","value":0.6288951841,"string":"0.628895"}}},{"rowIdx":463292,"cells":{"hexsha":{"kind":"string","value":"ed3ba1d3844791a1e655adb0ec45a9740e2f109d"},"size":{"kind":"number","value":4023,"string":"4,023"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"core/server/OpenXPKI/Server/Authentication/ChallengeX509.pm"},"max_stars_repo_name":{"kind":"string","value":"aleibl/openxpki"},"max_stars_repo_head_hexsha":{"kind":"string","value":"ea27c1c8280a152eef7f4437e489e61575742094"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"core/server/OpenXPKI/Server/Authentication/ChallengeX509.pm"},"max_issues_repo_name":{"kind":"string","value":"aleibl/openxpki"},"max_issues_repo_head_hexsha":{"kind":"string","value":"ea27c1c8280a152eef7f4437e489e61575742094"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"core/server/OpenXPKI/Server/Authentication/ChallengeX509.pm"},"max_forks_repo_name":{"kind":"string","value":"aleibl/openxpki"},"max_forks_repo_head_hexsha":{"kind":"string","value":"ea27c1c8280a152eef7f4437e489e61575742094"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"## OpenXPKI::Server::Authentication::ChallengeX509\n##\n## Rewritten 2013 by Oliver Welter for the OpenXPKI Project\n## (C) Copyright 2013 by The OpenXPKI Project\n\npackage OpenXPKI::Server::Authentication::ChallengeX509;\n\nuse strict;\nuse warnings;\nuse English;\n\nuse OpenXPKI::Debug;\nuse OpenXPKI::Exception;\nuse OpenXPKI::Server::Context qw( CTX );\nuse OpenXPKI::Crypto::X509;\nuse MIME::Base64;\n\nuse Moose;\n\nextends 'OpenXPKI::Server::Authentication::X509';\n\nuse Data::Dumper;\n\n\nsub login_step {\n ##! 1: 'start'\n my $self = shift;\n my $arg_ref = shift;\n\n my $name = $arg_ref->{HANDLER};\n my $msg = $arg_ref->{MESSAGE};\n\n if (! exists $msg->{PARAMS}->{CHALLENGE} ||\n ! exists $msg->{PARAMS}->{SIGNATURE}) {\n ##! 4: 'no login data received (yet)'\n # The challenge is just the session ID, so we do not have to\n # remember the challenge (which could only be done in the\n # session anyways as people might talk to different servers\n # in different login steps) ...\n my $challenge = CTX('session')->data->id;\n ##! 64: 'challenge: ' . $challenge\n # save the pending challenge to check later that we\n # received a valid challenge\n\n return (undef, undef,\n {\n\t\tSERVICE_MSG => \"GET_X509_LOGIN\",\n\t\tPARAMS => {\n NAME => $self->{NAME},\n DESCRIPTION => $self->{DESC},\n CHALLENGE => $challenge,\n\t },\n },\n );\n }\n\n\n ##! 2: 'login data / signature received'\n my $challenge = $msg->{PARAMS}->{CHALLENGE};\n my $signature = $msg->{PARAMS}->{SIGNATURE};\n my $pki_realm = CTX('session')->data->pki_realm;\n\n if ($signature !~ m{ \\A .* \\n \\z }xms) {\n # signature does not end with \\n, add it\n $signature .= \"\\n\";\n }\n ##! 64: 'challenge: ' . $challenge\n ##! 64: 'signature: ' . $signature\n\n if ($challenge ne CTX('session')->data->id) {\n # the sent challenge is not for this session ID\n OpenXPKI::Exception->throw(\n message => 'I18N_OPENXPKI_SERVER_AUTHENTICATION_X509_CHALLENGE_DOES_NOT_MATCH_SESSION_ID',\n params => {\n CHALLENGE => $challenge,\n SESSION_ID => CTX('session')->data->id,\n },\n );\n }\n if (! $signature =~ m{ \\A [a-zA-Z\\+/=]+ \\z }xms) {\n # the sent signature is not in Base64 format\n OpenXPKI::Exception->throw(\n message => 'I18N_OPENXPKI_SERVER_AUTHENTICATION_X509_SIGNATURE_IS_NOT_BASE64',\n );\n }\n my $pkcs7 =\n '-----BEGIN PKCS7-----' . \"\\n\"\n . $signature\n . '-----END PKCS7-----';\n my $default_token = CTX('crypto_layer')->get_system_token({ TYPE => \"DEFAULT\" });\n\n ##! 64: ' Signature blob: ' . $pkcs7\n ##! 64: ' Challenge: ' . $challenge\n\n eval {\n # FIXME - this needs testing\n $default_token->command({\n COMMAND => 'pkcs7_verify',\n NO_CHAIN => 1,\n PKCS7 => $pkcs7,\n CONTENT => $challenge,\n });\n };\n if ($EVAL_ERROR) {\n OpenXPKI::Exception->throw(\n message => 'I18N_OPENXPKI_SERVER_AUTHENTICATION_X509_INVALID_SIGNATURE',\n );\n }\n ##! 16: 'signature valid'\n\n\n # Looks like firefox adds \\r to the p7\n $pkcs7 =~ s/\\r//g;\n my $validate = CTX('api')->validate_certificate({\n \tPKCS7 => $pkcs7,\n \tANCHOR => $self->trust_anchors(),\n });\n\n return $self->_validation_result( $validate );\n\n}\n\n\n1;\n__END__\n\n=head1 Name\n\nOpenXPKI::Server::Authentication::ChallengeX509 - certificate based authentication.\n\n=head1 Description\n\nSend the user a challenge to be signed by the browser. Requires a supported browser.\n\nSee OpenXPKI::Server::Authentication::X509 for configuration options.\n"},"avg_line_length":{"kind":"number","value":29.5808823529,"string":"29.580882"},"max_line_length":{"kind":"number","value":106,"string":"106"},"alphanum_fraction":{"kind":"number","value":0.5433755904,"string":"0.543376"}}},{"rowIdx":463293,"cells":{"hexsha":{"kind":"string","value":"ede7cc9721bf91c569681b614b85d529a691cfbf"},"size":{"kind":"number","value":2140,"string":"2,140"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/NewsExtractor.pm"},"max_stars_repo_name":{"kind":"string","value":"perltaiwan/NewsExtractor"},"max_stars_repo_head_hexsha":{"kind":"string","value":"58589d68af55665055ba5ac68e18ffc72b41b05b"},"max_stars_repo_licenses":{"kind":"list like","value":["CC0-1.0"],"string":"[\n \"CC0-1.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2020-10-22T03:48:53.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2020-10-22T03:48:53.000Z"},"max_issues_repo_path":{"kind":"string","value":"lib/NewsExtractor.pm"},"max_issues_repo_name":{"kind":"string","value":"perltaiwan/NewsExtractor"},"max_issues_repo_head_hexsha":{"kind":"string","value":"58589d68af55665055ba5ac68e18ffc72b41b05b"},"max_issues_repo_licenses":{"kind":"list like","value":["CC0-1.0"],"string":"[\n \"CC0-1.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"lib/NewsExtractor.pm"},"max_forks_repo_name":{"kind":"string","value":"perltaiwan/NewsExtractor"},"max_forks_repo_head_hexsha":{"kind":"string","value":"58589d68af55665055ba5ac68e18ffc72b41b05b"},"max_forks_repo_licenses":{"kind":"list like","value":["CC0-1.0"],"string":"[\n \"CC0-1.0\"\n]"},"max_forks_count":{"kind":"number","value":1,"string":"1"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2020-02-06T03:39:42.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2020-02-06T03:39:42.000Z"},"content":{"kind":"string","value":"package NewsExtractor;\nour $VERSION = v0.44.0;\nuse Moo;\n\nuse Mojo::UserAgent;\nuse Mojo::UserAgent::Transactor;\nuse Try::Tiny;\n\nuse Types::Standard qw< Str >;\nuse Types::URI qw< Uri >;\n\nuse Importer 'NewsExtractor::TextUtil' => qw(u);\nuse NewsExtractor::Error;\nuse NewsExtractor::Download;\n\nhas url => ( required => 1, is => 'ro', isa => Uri, coerce => 1 );\n\nhas user_agent_string => (\n required => 1,\n is => 'ro',\n isa => Str,\n default => sub {\n 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:93.0) Gecko/20100101 Firefox/93.0'\n }\n);\n\nsub download {\n my NewsExtractor $self = shift;\n\n my $ua = Mojo::UserAgent->new()->transactor(\n Mojo::UserAgent::Transactor->new()->name( $self->user_agent_string )\n )->max_redirects(3);\n\n my ($error, $download);\n\n my $tx = $ua->get( \"\". $self->url );\n\n my $res;\n try {\n $res = $tx->result\n } catch {\n $error = NewsExtractor::Error->new(\n is_exception => 0,\n message => u($_),\n )\n };\n\n if ($res) {\n if ($res->is_error) {\n $error = NewsExtractor::Error->new(\n is_exception => 0,\n message => u($res->message),\n );\n } else {\n $download = NewsExtractor::Download->new( tx => $tx );\n }\n }\n return ($error, $download);\n}\n\n1;\n\n__END__\n\n=head1 NAME\n\nNewsExtractor - download and extract news articles from Internet.\n\n=head1 SYNOPSIS\n\n my ($error, $article) = NewsExtractor->new( url => $url )->download->parse;\n die $error if $error;\n\n # $article is an instance of NewsExtractor::Article\n say \"Headline: \" . $article->headline;\n say \"When: \" . ($article->dateline // \"(unknown)\");\n say \"By: \" . ($article->journalist // \"(unknown)\");\n say \"\\n\" . $article->article_body;\n\n=head1 SEE Also\n\nL\n\n=head1 AUTHOR\n\nKang-min Liu \n\n=head1 LICENSE\n\nTo the extent possible under law, Kang-min Liu has waived all copyright and related or neighboring rights to NewsExtractor. This work is published from: Taiwan.\n\nhttps://creativecommons.org/publicdomain/zero/1.0/\n\n=cut\n"},"avg_line_length":{"kind":"number","value":22.5263157895,"string":"22.526316"},"max_line_length":{"kind":"number","value":160,"string":"160"},"alphanum_fraction":{"kind":"number","value":0.5934579439,"string":"0.593458"}}},{"rowIdx":463294,"cells":{"hexsha":{"kind":"string","value":"ede58a93ca94f77c9738b5b0bdcacf0e4c2a0a87"},"size":{"kind":"number","value":681,"string":"681"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"t/external/08_external.t"},"max_stars_repo_name":{"kind":"string","value":"Grinnz/p5-net-ssleay"},"max_stars_repo_head_hexsha":{"kind":"string","value":"6907f9027ba343d2299ab249dec856c63c5eef12"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"t/external/08_external.t"},"max_issues_repo_name":{"kind":"string","value":"Grinnz/p5-net-ssleay"},"max_issues_repo_head_hexsha":{"kind":"string","value":"6907f9027ba343d2299ab249dec856c63c5eef12"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"t/external/08_external.t"},"max_forks_repo_name":{"kind":"string","value":"Grinnz/p5-net-ssleay"},"max_forks_repo_head_hexsha":{"kind":"string","value":"6907f9027ba343d2299ab249dec856c63c5eef12"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-2.0"],"string":"[\n \"Artistic-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#!/usr/bin/perl\n# Test complete connection a number of external SSL web servers\n\nuse strict;\nuse warnings;\nuse Test::More;\nuse Net::SSLeay;\n\nmy @sites = qw(\n\twww.google.com\n\twww.microsoft.com\n\twww.kernel.org\n);\n@sites = split(/:/, $ENV{SSLEAY_SITES}) if exists $ENV{SSLEAY_SITES};\nif (@sites) {\n plan tests => scalar @sites * 2;\n}\nelse {\n plan skip_all => 'No external hosts specified for SSL testing';\n}\n\nmy $site;\nfor $site (@sites) {\n SKIP: {\n my ($p, $r, %h) = Net::SSLeay::get_https($site, 443, '/');\n skip 'could not connect', 2 unless defined $h{'CONTENT-TYPE'};\n pass('connection');\n ok($r =~ /^HTTP\\/1/s, 'correct response');\n }\n}\n"},"avg_line_length":{"kind":"number","value":21.9677419355,"string":"21.967742"},"max_line_length":{"kind":"number","value":70,"string":"70"},"alphanum_fraction":{"kind":"number","value":0.6123348018,"string":"0.612335"}}},{"rowIdx":463295,"cells":{"hexsha":{"kind":"string","value":"edb0bf9f55196735a15a2dd36f810bf831eff5a6"},"size":{"kind":"number","value":18778,"string":"18,778"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"perl/vendor/lib/PPM/XML/PPD.pm"},"max_stars_repo_name":{"kind":"string","value":"mnikolop/Thesis_project_CyberDoc"},"max_stars_repo_head_hexsha":{"kind":"string","value":"9a37fdd5a31de24cb902ee31ef19eb992faa1665"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":4,"string":"4"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2018-04-20T07:27:13.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-12-21T05:19:24.000Z"},"max_issues_repo_path":{"kind":"string","value":"perl/vendor/lib/PPM/XML/PPD.pm"},"max_issues_repo_name":{"kind":"string","value":"mnikolop/Thesis_project_CyberDoc"},"max_issues_repo_head_hexsha":{"kind":"string","value":"9a37fdd5a31de24cb902ee31ef19eb992faa1665"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":6,"string":"6"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2021-11-18T00:39:48.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2021-11-20T00:31:40.000Z"},"max_forks_repo_path":{"kind":"string","value":"perl/vendor/lib/PPM/XML/PPD.pm"},"max_forks_repo_name":{"kind":"string","value":"mnikolop/Thesis_project_CyberDoc"},"max_forks_repo_head_hexsha":{"kind":"string","value":"9a37fdd5a31de24cb902ee31ef19eb992faa1665"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":1,"string":"1"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2019-11-12T02:29:26.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2019-11-12T02:29:26.000Z"},"content":{"kind":"string","value":"#\n# PPM::XML::PPD\n#\n# Definition of the PPD file format.\n#\n###############################################################################\n\nuse PPM::XML::ValidatingElement;\nuse Exporter;\n\n###############################################################################\n# Set up PPM::XML::PPD to export its sub-packages so that we can use them in \n# other XML documents without too much effort.\n###############################################################################\npackage PPM::XML::PPD;\n@ISA = qw( Exporter );\n%EXPORT_TAGS = ( 'elements' =>\n [ '%SOFTPKG::', '%IMPLEMENTATION::', '%DEPENDENCY::',\n '%TITLE::', '%ABSTRACT::', '%AUTHOR::',\n '%LANGUAGE::', '%LICENSE::', '%OS::',\n '%OSVERSION::', '%PERLCORE::', '%PROCESSOR::',\n '%CODEBASE::', '%INSTALL::', '%UNINSTALL::',\n '%ARCHITECTURE::', '%PROVIDE::', '%REQUIRE::',\n ] );\nExporter::export_ok_tags( 'elements' );\n\n###############################################################################\n# PPD Element: SOFTPKG\n###############################################################################\npackage PPM::XML::PPD::SOFTPKG;\n@ISA = qw( PPM::XML::ValidatingElement );\n@oattrs = qw( VERSION );\n@rattrs = qw( NAME );\n@okids = qw( ABSTRACT AUTHOR IMPLEMENTATION LICENSE \n TITLE INSTALL UNINSTALL PROVIDE REQUIRE);\n\n###############################################################################\n# PPD Element: TITLE\n###############################################################################\npackage PPM::XML::PPD::TITLE;\n@ISA = qw( PPM::XML::ValidatingElement );\n\n###############################################################################\n# PPD Element: ABSTRACT\n###############################################################################\npackage PPM::XML::PPD::ABSTRACT;\n@ISA = qw( PPM::XML::ValidatingElement );\n\n###############################################################################\n# PPD Element: AUTHOR\n###############################################################################\npackage PPM::XML::PPD::AUTHOR;\n@ISA = qw( PPM::XML::ValidatingElement );\n\n###############################################################################\n# PPD Element: PROVIDE\n###############################################################################\npackage PPM::XML::PPD::PROVIDE;\n@ISA = qw( PPM::XML::ValidatingElement );\n@oattrs = qw( VERSION );\n@rattrs = qw( NAME );\n\n###############################################################################\n# PPD Element: REQUIRE\n###############################################################################\npackage PPM::XML::PPD::REQUIRE;\n@ISA = qw( PPM::XML::ValidatingElement );\n@oattrs = qw( VERSION );\n@rattrs = qw( NAME );\n\n###############################################################################\n# PPD Element: LICENSE\n###############################################################################\npackage PPM::XML::PPD::LICENSE;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( HREF );\n\n###############################################################################\n# PPD Element: IMPLEMENTATION\n###############################################################################\npackage PPM::XML::PPD::IMPLEMENTATION;\n@ISA = qw( PPM::XML::ValidatingElement );\n@okids = qw( DEPENDENCY INSTALL LANGUAGE OS OSVERSION PERLCORE PROCESSOR\n UNINSTALL ARCHITECTURE PROVIDE REQUIRE);\n@rkids = qw( CODEBASE );\n\n###############################################################################\n# PPD Element: OS\n###############################################################################\npackage PPM::XML::PPD::OS;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( VALUE );\nsub validate_possible_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_possible_attrs( @_ );\n}\n\nsub validate_required_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_required_attrs( @_ );\n}\n\nsub compatibility_check\n{\n my $self = shift;\n if (exists $self->{NAME})\n {\n $self->{VALUE} = $self->{NAME};\n delete $self->{NAME};\n }\n}\n\n###############################################################################\n# PPD Element: OSVERSION\n###############################################################################\npackage PPM::XML::PPD::OSVERSION;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( VALUE );\nsub validate_possible_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_possible_attrs( @_ );\n}\n\nsub validate_required_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_required_attrs( @_ );\n}\n\nsub compatibility_check\n{\n my $self = shift;\n if (exists $self->{NAME})\n {\n $self->{VALUE} = $self->{NAME};\n delete $self->{NAME};\n }\n}\n\n###############################################################################\n# PPD Element: PROCESSOR\n###############################################################################\npackage PPM::XML::PPD::PROCESSOR;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( VALUE );\nsub validate_possible_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_possible_attrs( @_ );\n}\n\nsub validate_required_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_required_attrs( @_ );\n}\n\nsub compatibility_check\n{\n my $self = shift;\n if (exists $self->{NAME})\n {\n $self->{VALUE} = $self->{NAME};\n delete $self->{NAME};\n }\n}\n\n###############################################################################\n# PPD Element: ARCHITECTURE\n###############################################################################\npackage PPM::XML::PPD::ARCHITECTURE;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( VALUE );\nsub validate_possible_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_possible_attrs( @_ );\n}\n\nsub validate_required_attrs\n{\n my $self = shift;\n $self->compatibility_check();\n $self->SUPER::validate_required_attrs( @_ );\n}\n\nsub compatibility_check\n{\n my $self = shift;\n if (exists $self->{NAME})\n {\n $self->{VALUE} = $self->{NAME};\n delete $self->{NAME};\n }\n}\n\n###############################################################################\n# PPD Element: CODEBASE\n###############################################################################\npackage PPM::XML::PPD::CODEBASE;\n@ISA = qw( PPM::XML::ValidatingElement );\n@oattrs = qw( FILENAME );\n@rattrs = qw( HREF );\n\n###############################################################################\n# PPD Element: DEPENDENCY\n###############################################################################\npackage PPM::XML::PPD::DEPENDENCY;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( NAME );\n@oattrs = qw( VERSION );\n\n###############################################################################\n# PPD Element: LANGUAGE\n###############################################################################\npackage PPM::XML::PPD::LANGUAGE;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( VALUE );\n\n###############################################################################\n# PPD Element: PERLCORE\n###############################################################################\npackage PPM::XML::PPD::PERLCORE;\n@ISA = qw( PPM::XML::ValidatingElement );\n@rattrs = qw( VERSION );\n\n###############################################################################\n# PPD Element: INSTALL\n###############################################################################\npackage PPM::XML::PPD::INSTALL;\n@ISA = qw( PPM::XML::ValidatingElement );\n@oattrs = qw( HREF EXEC );\n\n###############################################################################\n# PPD Element: UNINSTALL\n###############################################################################\npackage PPM::XML::PPD::UNINSTALL;\n@ISA = qw( PPM::XML::ValidatingElement );\n@oattrs = qw( HREF EXEC );\n\n__END__\n\n###############################################################################\n# POD\n###############################################################################\n\n=head1 NAME\n\nPPM::XML::PPD - PPD file format and XML parsing elements\n\n=head1 SYNOPSIS\n\n use XML::Parser;\n use PPM::XML::PPD;\n\n $p = new PPM::XML::Parser( Style => 'Objects', Pkg => 'PPM::XML::PPD' );\n ...\n\n=head1 DESCRIPTION\n\nThis module provides a set of classes for parsing PPD files using the\nC module. Each of the classes is derived from\nC, with optional/required attributes/children\nenforced.\n\n=head1 MAJOR ELEMENTS\n\n=head2 SOFTPKG\n\nDefines a Perl Package. The root of a PPD document is B a SOFTPKG\nelement. The SOFTPKG element allows for the following attributes:\n\n=over 4\n\n=item NAME\n\nRequired attribute. Name of the package (e.g. \"Foobar\").\n\n=item VERSION\n\nVersion number of the package, in comma-delimited format (e.g. \"1,0,0,0\").\n\n=back\n\n=head2 IMPLEMENTATION\n\nChild of SOFTPKG, used to describe a particular implementation of the Perl\nPackage. Multiple instances are valid, and should be used to describe\ndifferent implementations/ports for different operating systems or\narchitectures.\n\n=head2 DEPENDENCY\n\nChild of SOFTPKG or IMPLEMENTATION, used to indicate a dependency this Perl\nPackage has on another Perl Package. Multiple instances are valid. The\nDEPENDENCY element allows for the following attributes:\n\n=over 4\n\n=item NAME\n\nName of the package that this implementation is dependant upon.\n\n=item VERSION\n\nVersion number of the dependency, in comma-delimited format (e.g. \"1,0,0,0\").\n\n=back\n\n=head1 MINOR ELEMENTS\n\n=head2 TITLE\n\nChild of SOFTPKG, used to state the title of the Perl Package. Only one\ninstance should be present.\n\n=head2 ABSTRACT\n\nChild of SOFTPKG, used to provide a short description outlining the nature and\npurpose of the Perl Package. Only one instance should be present.\n\n=head2 AUTHOR\n\nChild of SOFTPKG, used to provide information about the author(s) of the Perl\nPackage. Multiple instances are valid.\n\n=head2 LANGUAGE\n\nChild of IMPLEMENTATION, used to specify the language used within the given\nimplementation of the Perl Package. Only one instance should be present.\n\n=head2 LICENSE\n\nChild of SOFTPKG, indicating the location of the appropriate license agreement\nor copyright notice for the Perl Package. Only one instance should be\npresent. The LICENSE element allows for the following attributes:\n\n=over 4\n\n=item HREF\n\nRequired attribute. A reference to the location of the license agreement or\ncopyright notice for this package.\n\n=back\n\n=head2 OS\n\nChild of IMPLEMENTATION, used to outline the operating system required for this\nimplementation of the Perl Package. Multiple instances are valid. Valid\nvalues can be taken from the OSD Specification and it's OS element. The OS\nelement allows for the following attributes:\n\n=over 4\n\n=item VALUE\n\nThe name of the operating system required for this implementation of the Perl\nPackage. This value should be obtained from Config.pm as 'osname'.\n\n=back\n\nNote that previous versions of the PPD format used a 'NAME' attribute. It's\nuse has been deprecated in preference of the 'VALUE' attribute. Also note that\nduring validation, this element will automatically convert any existing 'NAME'\nattribute to be a 'VALUE' attribute.\n\n=head2 OSVERSION\n\nChild of IMPLEMENTATION, used to outline the required version of the operating\nsystem required for this implementation of the Perl Package. Only one instance\nshould be present. The OSVERSION element allows for the following attributes:\n\n=over 4\n\n=item VALUE\n\nThe version of the operating system required for installation of this\nimplementation of the package, in a comma-delimited format (e.g. \"3,1,0,0\").\n\n=back\n\nNote that previous versions of the PPD format used a 'NAME' attribute. It's\nuse has been deprecated in preference of the 'VALUE' attribute. Also note that\nduring validation, this element will automatically convert any existing 'NAME'\nattribute to be a 'VALUE' attribute.\n\n=head2 PERLCORE\n\nChild of IMPLEMENTATION, used to specify the minimum version of the Perl core\ndistribution that this Perl Package is to be used with. Only one instance\nshould be present. The PERLCORE element allows for the following attributes:\n\n=over 4\n\n=item VERSION\n\nVersion of the Perl core that is required for this implementation of the Perl\nPackage.\n\n=back\n\n=head2 PROCESSOR\n\nChild of IMPLEMENTATION, outlining the cpu required for this implementation\nof the Perl Package. Only one instance should be present. The PROCESSOR\nelement allows for the following attributes:\n\n=over 4\n\n=item VALUE\n\nCPU required for the installation of this implementation of the Perl Package.\nThe following values are all valid according to the OSD Specification:\n\n x86 alpha mips sparc 680x0\n\n=back\n\nNote that previous versions of the PPD format used a 'NAME' attribute. It's\nuse has been deprecated in preference of the 'VALUE' attribute. Also note that\nduring validation, this element will automatically convert any existing 'NAME'\nattribute to be a 'VALUE' attribute.\n\n=head2 CODEBASE\n\nChild of IMPLEMENTATION, indicating a location where an archive of the Perl\nPackage can be retrieved. Multiple instances are valid, and can be used to\nindicate multiple possible locations where the same version of the Perl Package\ncan be retrieved. The CODEBASE element allows for the following attributes:\n\n=over 4\n\n=item FILENAME\n\n???\n\n=item HREF\n\nRequired attribute. A reference to the location of the Perl Package\ndistribution.\n\n=back\n\n=head2 INSTALL\n\nChild of IMPLEMENTATION, used to provide either a reference to an\ninstallation script or a series of commands which can be used to install\nthe Perl Package once it has been retrieved. If the EXEC attribute is not\nspecified, the value is assumed to be one or more commands, separated by\n`;;'. Each such command will be executed by the Perl `system()' function.\nOnly one instance should be present. The INSTALL element allows for\nthe following attributes:\n\n=over 4\n\n=item HREF\n\nReference to an external script which should be retrieved and run as part\nof the installation process. Both filenames and URLs should be considered\nvalid.\n\n=item EXEC\n\nName of interpreter/shell used to execute the installation script.\nIf the value of EXEC is `PPM_PERL', the copy of Perl that is executing\nPPM itself ($^X) is used to execute the install script.\n\n=back\n\n=head2 UNINSTALL\n\nChild of IMPLEMENTATION, used to provide either a reference to an\nuninstallation script or a raw Perl script which can be used to uninstall the\nPerl Package at a later point. Only one instance should be present. The\nUNINSTALL element allows for the following attributs:\n\n=over 4\n\n=item HREF\n\nReference to an external script which should be retrieved and run as part of\nthe removal process. Both filenames and URLs should be considered valid.\n\n=item EXEC\n\nName of interpreter/shell used to execute the uninstallation script.\nIf the value of EXEC is `PPM_PERL', the copy of Perl that is executing\nPPM itself ($^X) is used to execute the install script.\n\n=back\n\n=head1 DOCUMENT TYPE DEFINITION\n\nThe DTD for PPD documents is available from the ActiveState website and the\nlatest version can be found at http://www.ActiveState.com/PPM/DTD/ppd.dtd\n\nThis revision of the C module implements the following DTD:\n\n \n \n\n \n\n \n\n \n\n \n \n\n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n \n \n\n=head1 SAMPLE PPD FILE\n\nThe following is a sample PPD file describing the C module.\nNote that this may B be a current/proper description of this module and is\nfor sample purposes only.\n\n \n Math-MatrixBool\n Easy manipulation of matrices of booleans (Boolean Algebra)\n Steffen Beyer (sb@sdm.de)\n \n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n system(\"make\"); ;;\n system(\"make test\"); ;;\n system(\"make install\"); ;;\n \n \n \n\n=head1 KNOWN BUGS/ISSUES\n\nElements which are required to be empty (e.g. LICENSE) are not enforced as\nsuch.\n\nNotations above about elements for which \"only one instance\" or \"multiple\ninstances\" are valid are not enforced; this primarily a guideline for\ngenerating your own PPD files.\n\n=head1 AUTHORS\n\nGraham TerMarsch \n\nMurray Nesbitt \n\nDick Hardt \n\n=head1 HISTORY\n\nv0.1 - Initial release\n\n=head1 SEE ALSO\n\nL,\nL,\nL,\nOSD Specification (http://www.microsoft.com/standards/osd/)\n\n=cut\n"},"avg_line_length":{"kind":"number","value":30.2383252818,"string":"30.238325"},"max_line_length":{"kind":"number","value":119,"string":"119"},"alphanum_fraction":{"kind":"number","value":0.5815315795,"string":"0.581532"}}},{"rowIdx":463296,"cells":{"hexsha":{"kind":"string","value":"edc00fbc207a0e90f67bfe7396c1126304a2bb19"},"size":{"kind":"number","value":31640,"string":"31,640"},"ext":{"kind":"string","value":"pm"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"lib/Quiq/FFmpeg.pm"},"max_stars_repo_name":{"kind":"string","value":"s31tz/Quiq"},"max_stars_repo_head_hexsha":{"kind":"string","value":"6a65f1a00739d57275db6c11593722ebadd01036"},"max_stars_repo_licenses":{"kind":"list like","value":["Artistic-1.0-Perl"],"string":"[\n \"Artistic-1.0-Perl\"\n]"},"max_stars_count":{"kind":"null"},"max_stars_repo_stars_event_min_datetime":{"kind":"null"},"max_stars_repo_stars_event_max_datetime":{"kind":"null"},"max_issues_repo_path":{"kind":"string","value":"lib/Quiq/FFmpeg.pm"},"max_issues_repo_name":{"kind":"string","value":"s31tz/Quiq"},"max_issues_repo_head_hexsha":{"kind":"string","value":"6a65f1a00739d57275db6c11593722ebadd01036"},"max_issues_repo_licenses":{"kind":"list like","value":["Artistic-1.0-Perl"],"string":"[\n \"Artistic-1.0-Perl\"\n]"},"max_issues_count":{"kind":"number","value":2,"string":"2"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2019-05-04T13:48:16.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2019-08-27T21:39:45.000Z"},"max_forks_repo_path":{"kind":"string","value":"lib/Quiq/FFmpeg.pm"},"max_forks_repo_name":{"kind":"string","value":"s31tz/Quiq"},"max_forks_repo_head_hexsha":{"kind":"string","value":"6a65f1a00739d57275db6c11593722ebadd01036"},"max_forks_repo_licenses":{"kind":"list like","value":["Artistic-1.0-Perl"],"string":"[\n \"Artistic-1.0-Perl\"\n]"},"max_forks_count":{"kind":"number","value":2,"string":"2"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2019-02-02T12:04:19.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2019-08-27T19:25:23.000Z"},"content":{"kind":"string","value":"package Quiq::FFmpeg;\nuse base qw/Quiq::Hash/;\n\nuse v5.10;\nuse strict;\nuse warnings;\n\nour $VERSION = '1.196';\n\nuse Quiq::File::Video;\nuse POSIX ();\nuse Quiq::Option;\nuse Quiq::Duration;\nuse Quiq::FileHandle;\n\n# -----------------------------------------------------------------------------\n\n=encoding utf8\n\n=head1 NAME\n\nQuiq::FFmpeg - Konstruiere eine FFmpeg-Kommandozeile\n\n=head1 BASE CLASS\n\nL\n\n=head1 DESCRIPTION\n\nFFmpg Online-Dokumentation:\nL\n\nEin Objekt der Klasse repräsentiert eine ffmpeg-Kommandozeile.\nDie Klasse verfügt einerseits über I (Objekt-)Methoden,\num eine solche Kommandozeile sukzessive aus Eingabe- und\nAusgabe-Dateien, Optionen, Filtern usw. zu konstruieren und\nandererseits I (Klassen-)Methoden, die eine vollständige\nKommandozeile zur Erfüllung eines bestimmten Zwecks unter\nRückgriff auf die elementaren Methoden erstellen. Die höheren\nMethoden Methoden befinden sich im Abschnitt L.\n\n=head1 METHODS\n\n=head2 Konstruktor\n\n=head3 new() - Konstruktor\n\n=head4 Synopsis\n\n $cmd = $class->new;\n $cmd = $class->new($str);\n\n=head4 Description\n\nInstantiiere ein FFmpeg-Kommando-Objekt und liefere eine Referenz auf\ndieses Objekt zurück.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub new {\n my ($class,$str) = @_;\n\n return $class->SUPER::new(\n cmd => $str // '',\n inputA => [],\n inputObjectA => [],\n outputA => [],\n outName => undef,\n outWidth => undef,\n outHeight => undef,\n outStart => undef,\n outStop => undef,\n );\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head2 Objektmethoden\n\n=head3 command() - Kommandozeile als Zeichenkette\n\n=head4 Synopsis\n\n $str = $cmd->command;\n\n=head4 Description\n\nLiefere das Kommando als Zeichenkette.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub command {\n return shift->{'cmd'};\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head3 input() - Eingabe-Datei als Objekt\n\n=head4 Synopsis\n\n $fil = $cmd->input($i);\n\n=head4 Description\n\nInstantiiere Eingabe-Datei $i als Quiq::File-Objekt und liefere\ndieses zurück. Das Objekt wird gecached.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub input {\n my ($self,$i) = @_;\n\n my $fil = $self->inputObjectA->[$i];\n if (!$fil) {\n if (my $input = $self->inputA->[$i]) {\n $fil = Quiq::File::Video->new($input);\n $self->inputObjectA->[$i] = $fil; # cachen\n }\n }\n\n return $fil;\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head3 suffix() - Suffix Ausgabe-Datei\n\n=head4 Synopsis\n\n $str = $cmd->suffix;\n\n=head4 Description\n\nLiefere den Suffix für eine Ausgabedatei. Der Suffix ist eine\nZeichenkette der Form\n\n NAME-WIDTH-HEIGHT-START-STOP\n\nwobei Komponenten fehlen können, die nicht definiert sind.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub suffix {\n my $self = shift;\n\n my @suffix;\n\n my ($outName,$outWidth,$outHeight,$outStart,$outStop) =\n $self->get(qw/outName outWidth outHeight outStart outStop/);\n \n # name\n \n if ($outName) {\n push @suffix,$outName;\n }\n\n # size\n \n if ($outWidth && $outHeight) {\n push @suffix,sprintf('%04dx%04d',$outWidth,$outHeight);\n }\n\n # start, stop\n\n if (defined($outStart) && $outStop) {\n push @suffix,sprintf '%03d-%03d',POSIX::floor($outStart),\n POSIX::ceil($outStop);\n }\n \n return join '-',@suffix;\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head2 Kommandozeile konstruieren\n\n=head3 addOption() - Füge Option hinzu\n\n=head4 Synopsis\n\n $cmd->addOption($opt);\n $cmd->addOption($opt=>$val);\n\n=head4 Description\n\nErgänze die Kommandozeile um die Option $opt und (optional) den\nWert $val. Die Methode liefert keinen Wert zurück.\n\n=head4 Examples\n\nOption ohne Wert:\n\n $cmd->addOption('-y');\n =>\n -y\n\nOption mit Wert:\n\n $cmd->addOption(-i=>'video/GOPR1409.mp4');\n =>\n -i 'video/GOPR1409.mp4'\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub addOption {\n my $self = shift;\n my $opt = shift;\n # @_: $val\n\n my $ref = $self->getRef('cmd');\n my $val;\n if (@_) {\n $val = shift;\n if (!defined($val) || $val eq '') {\n # Keine Option hinzufügen, wenn Wert-Argument,\n # angegeben, dieses aber undef oder '' ist\n return;\n }\n }\n\n if ($$ref) {\n $$ref .= ' ';\n }\n $$ref .= $opt;\n\n if (defined $val) {\n $$ref .= ' ';\n if ($val =~ /^([0-9.]+|[A-Za-z0-9:]+)$/) {\n $$ref .= $val;\n }\n else {\n $$ref .= \"'$val'\";\n }\n }\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 addInput() - Füge Input-Option hinzu\n\n=head4 Synopsis\n\n $cmd->addInput($input);\n\n=head4 Description\n\nErgänze das Kommando um Input $input, sofern $input einen Wert hat.\nDie Methode liefert keinen Wert zurück.\n\n=head4 Examples\n\nDateiname:\n\n $cmd->addInput('video/GOPR1409.mp4');\n =>\n -i 'video/GOPR1409.mp4'\n\nMuster:\n\n $cmd->addInput('img/*.jpg');\n =>\n -i 'img/*.jpg'\n\nUndefiniert:\n\n $cmd->addInput(undef);\n =>\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub addInput {\n my ($self,$input) = @_;\n\n if ($input) {\n $self->addOption(-i=>$input);\n $self->push(inputA=>$input);\n }\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 addFilter() - Füge Filter-Option hinzu\n\n=head4 Synopsis\n\n $cmd->addFilter($opt,\\@filter,$sep);\n\n=head4 Description\n\nErgänze das Kommando um Filter-Option $opt mit den Filtern @filter\nund dem Trenner $sep (Komma oder Semikolon).\n\n=head4 Examples\n\nVideo Filter-Chain:\n\n $cmd->addFilter(-vf=>['crop=1440:1080','scale=720*a:720']);\n =>\n -vf 'crop=1440:1080,scale=720*a:720'\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub addFilter {\n my ($self,$opt,$filterA,$sep) = @_;\n\n if (my $val = join($sep,@$filterA)) {\n $self->addOption($opt=>$val);\n }\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 addStartStop() - Füge Optionen für Zeitbereich hinzu\n\n=head4 Synopsis\n\n $cmd->addStartStop($start,$stop);\n\n=head4 Description\n\nErgänze das Kommando um Optionen, die den Zeitbereich auf\nden Bereich $start und $stop eingrenzen.\n\n=head4 Examples\n\nNur Start-Zeitpunkt:\n\n $cmd->addStartStop(5.5);\n =>\n -ss 5.5\n\nNur Ende-Zeitpunkt:\n\n $cmd->addStartStop(undef,20.5);\n =>\n -t 20.5\n\nStart- und Ende-Zeitpunkt:\n\n $cmd->addStartStop(5.5,20.5);\n =>\n -ss 5.5 -t 20.5\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub addStartStop {\n my ($self,$start,$stop) = @_;\n\n if ($start) {\n $self->addOption(-ss=>$start);\n }\n \n $start ||= 0;\n if ($stop && $stop > $start) {\n $self->addOption(-t=>$stop-$start);\n }\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 addBitrate() - Füge Bitrate-Option hinzu\n\n=head4 Synopsis\n\n $cmd->addBitrate($bitrate);\n\n=head4 Description\n\nErgänze das Kommando um eine allgemeine Bitrate-Option mit\nSuffix 'k' (= kb/s). Ist die Bitrate 0, '' oder undef, wird\ndie Option nicht hinzugefügt.\n\n=head4 Examples\n\nBitrate von 10000k:\n\n $cmd->addBitrate(10000);\n =>\n -b 10000k\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub addBitrate {\n my ($self,$bitrate) = @_;\n\n if ($bitrate) {\n $self->addOption(-b=>$bitrate.'k');\n }\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 addOutput() - Füge Output-Argument hinzu\n\n=head4 Synopsis\n\n $cmd->addOutput($output);\n\n=head4 Description\n\nErgänze das Kommando um Output $output.\nDie Methode liefert keinen Wert zurück.\n\n=head4 Examples\n\nDateiname:\n\n $cmd->addOutput('video/GOPR1409.mp4');\n =>\n 'video/GOPR1409.mp4'\n\nMuster:\n\n $cmd->addOutput('img/%06d.jpg');\n =>\n 'img/%06d.jpg'\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub addOutput {\n my ($self,$out) = @_;\n\n if (!defined $out || $out eq '') {\n # Dateiname generieren\n\n my $inputA = $self->get('inputA');\n my ($path,$ext) = $inputA->[0] =~ /(.+?)\\.([^.]+)$/;\n $out = sprintf '%s-%s.%s',$path,$self->suffix,$ext;\n }\n else {\n # Suffix einsetzen\n $out =~ s/%S/$self->suffix/e;\n }\n\n my $ref = $self->getRef('cmd');\n if ($$ref) {\n $$ref .= ' ';\n }\n $$ref .= qq|'$out'|;\n \n $self->push(outputA=>$out);\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 addString() - Füge Zeichenkette am Ende hinzu\n\n=head4 Synopsis\n\n $cmd->addString($str);\n\n=head4 Description\n\nFüge Zeichenkette $str am Ende der Kommandozeile hinzu, mit einem\nLeerzeichen als Trenner.\n\n=head4 Example\n\nKommando nach Objekt-Instantiierung:\n\n $cmd->addString('ffprobe');\n =>\n ffprobe\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub addString {\n my ($self,$str) = @_;\n\n my $ref = $self->getRef('cmd');\n if ($$ref) {\n $$ref .= ' ';\n }\n $$ref .= $str;\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 prependString() - Füge Zeichenkette am Anfang hinzu\n\n=head4 Synopsis\n\n $cmd->prependString($str);\n\n=head4 Description\n\nFüge Zeichenkette $str am Beginn der Kommandozeile hinzu.\nEin Leerzeichen wird automatisch hinzugefügt.\n\n=head4 Example\n\nKommando voranstellen:\n\n $cmd->prependString('ffplay -autoexit');\n =>\n ffplay -autoexit ...\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub prependString {\n my ($self,$str) = @_;\n\n my $ref = $self->getRef('cmd');\n if ($$ref) {\n $$ref = ' '.$$ref;\n }\n $$ref = $str.$$ref;\n \n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head2 Filter\n\n=head3 cropFilter() - Liefere Crop-Filter\n\n=head4 Synopsis\n\n $str = $cmd->cropFilter($width,$height);\n $str = $cmd->cropFilter($width,$height,$xOffset,$yOffset);\n\n=head4 Description\n\nErzeuge eine Crop-Filter-Spezifikation für die angegebenen\nArgumente und liefere diese zurück.\n\n=head4 Examples\n\nNur Breite und Höhe:\n\n $cmd->cropFilter(1280,720);\n =>\n 'crop=1280:720'\n\nBreite, Höhe, X-Offset, Y-Offset:\n\n $cmd->cropFilter(1280,720,240,0);\n =>\n 'crop=1280:720:240:0'\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub cropFilter {\n my $self = shift;\n my $width = shift;\n my $height = shift;\n # @_: $xOffset,$yOffset\n\n my $str = \"crop=$width:$height\";\n if (@_) {\n my $xOffset = shift || 0;\n my $yOffset = shift || 0;\n $str .= \":$xOffset:$yOffset\";\n }\n\n return $str;\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head3 scaleFilter() - Liefere Scale-Filter\n\n=head4 Synopsis\n\n $str = $cmd->scaleFilter($width,$height);\n $str = $cmd->scaleFilter(\"$width:$height\");\n\n=head4 Description\n\nErzeuge eine Crop-Filter-Spezifikation für die angegebenen\nArgumente und liefere diese zurück.\n\nSind die Argumente undefiniert, wird eine leere Liste geliefert.\n\n=head4 Examples\n\nBreite und Höhe als getrennte Argumente:\n\n $cmd->scaleFilter(1280,720);\n =>\n 'scale=1280:720'\n\nBreite und Höhe in einem Argument:\n\n $cmd->scaleFilter('1280:720');\n =>\n 'scale=1280:720'\n\nUndefiniertes Argument:\n\n @filter = $cmd->scaleFilter(undef);\n =>\n ()\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub scaleFilter {\n my $self = shift;\n # @_: $width,$height -or- \"$width,$height\"\n\n my $size;\n if (@_ == 1) {\n $size = shift;\n }\n else {\n if (defined(my $width = shift) && defined(my $height = shift)) {\n $size = \"$width:$height\";\n }\n }\n\n if (!defined($size)) {\n return ();\n }\n\n return \"scale=$size\";\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head3 fpsFilter() - Liefere Fps-Filter\n\n=head4 Synopsis\n\n $str = $cmd->fpsFilter($fps);\n\n=head4 Description\n\nErzeuge eine Fps-Filter-Spezifikation und liefere diese zurück.\nIst das Argument undef, liefere eine leere Liste.\n\n=head4 Examples\n\nArgument:\n\n $cmd->fpsFilter(24);\n =>\n 'fps=24'\n\nUndefiniertes Argument:\n\n @filter = $cmd->fpsFilter(undef);\n =>\n ()\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub fpsFilter {\n my ($self,$fps) = @_;\n return !defined $fps? (): \"fps=$fps\";\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head3 framestepFilter() - Liefere Framestep-Filter\n\n=head4 Synopsis\n\n $str = $cmd->framestepFilter($fps);\n\n=head4 Description\n\nErzeuge eine Framestep-Filter-Spezifikation und liefere diese zurück.\nIst das Argument undef, liefere eine leere Liste.\n\n=head4 Examples\n\nArgument:\n\n $cmd->framestepFilter(4);\n =>\n 'framestep=4'\n\nUndefiniertes Argument:\n\n @filter = $cmd->framestepFilter(undef);\n =>\n ()\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub framestepFilter {\n my ($self,$framestep) = @_;\n\n if (!defined($framestep) || $framestep == 1) {\n return ();\n }\n \n return \"framestep=$framestep\";\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head2 Ausgabe-Datei-Eigenschaften (Getter/Setter)\n\n=head3 outName() - Setze/Liefere Bezeichnung Ausgabe-Datei\n\n=head4 Synopsis\n\n $cmd->outName($name);\n $name = $cmd->outName;\n\n=head4 Description\n\nSetze oder liefere die Bezeichnung für die Ausgabe-Datei.\nDie Angabe wird für den Suffix der Ausgabe-Datei genutzt.\n\n=head3 outSize() - Setze/Liefere Breite und Höhe Video-Ausgabe\n\n=head4 Synopsis\n\n $cmd->outSize($width,$height);\n ($width,$height) = $cmd->outSize;\n\n=head4 Description\n\nSetze oder liefere die Höhe und Breite der Video-Ausgabe.\nDie Angabe wird für den Suffix der Video-Ausgabe-Datei genutzt.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub outSize {\n my $self = shift;\n # @_: $width,$height\n\n if (@_) {\n $self->{'outWidth'} = shift;\n $self->{'outHeight'} = shift;\n }\n\n return ($self->{'outWidth'},$self->{'outHeight'});\n}\n \n\n# -----------------------------------------------------------------------------\n\n=head3 outStart() - Setze/Liefere Start-Zeitpunkt\n\n=head4 Synopsis\n\n $cmd->outStart($s);\n $s = $cmd->outStart;\n\n=head4 Description\n\nSetze oder liefere den Start-Zeitpunkt der Ausgabe.\nDie Angabe wird für den Suffix der Ausgabe-Datei genutzt.\n\n=head3 outStop() - Setze/Liefere Stop-Zeitpunkt\n\n=head4 Synopsis\n\n $cmd->outStop($s);\n $s = $cmd->outStop;\n\n=head4 Description\n\nSetze oder liefere den Stop-Zeitpunkt der Ausgabe.\nDie Angabe wird für den Suffix der Ausgabe-Datei genutzt.\n\n=head2 Klassenmethoden (vollständige Kommandozeilen)\n\n=head3 imagesToVideo() - Füge Bild-Sequenz zu einem Video zusammen\n\n=head4 Synopsis\n\n $cmd = $class->imagesToVideo($pattern,$output,@opt);\n\n=head4 Arguments\n\n=over 4\n\n=item $pattern\n\nPfad-Muster der Bilder. Enthält das Pfad-Muster einen Stern (*),\nwird C<-pattern_type glob> gewählt.\n\nBeispiele:\n\n 'img/%06d.jpg' => -i 'img/%06d.jpg'\n 'img/*.jpg' => -pattern_type glob -i 'img/*.jpg'\n\n=item $output\n\nName der generierten Video-Datei.\n\n=back\n\n=head4 Options\n\n=over 4\n\n=item -audio => $file (Default: undef)\n\nErzeuge einen Audio-Stream aus Audio-Datei $file.\n\n=item -duration => $duration (Default: undef)\n\nBeende die Ausgabe, wenn die Dauer $duration erreicht ist.\n\n=item -framerate => $n (Default: 8)\n\nAnzahl Bilder pro Sekunde.\n\n=item -loop => $bool (Default: 0)\n\nWiederhole die Bildserie zyklisch.\n\n=item -play => 0|1|2 (Default: 0)\n\nZeige das generierte Video im Player an, statt es in einer Datei\nzu speichern. Bei -play=>2 bleibt das Fenster des Players\noffen, bis es per Hand geschlossen wird.\n\n=item -preset => $preset (Default: undef)\n\nSatz an vorgewählten Optionen, für Encoding-Zeit\nvs. Kompressionsrate. Mögliche Werte: ultrafast, superfast,\nveryfast, faster, fast, medium, slow, slower, veryslow. Siehe\nL.\n\n=item -size => \"$width:$height\" (Default: undef)\n\nBreite und Höhe des generierten Video. Ohne Angabe nimmt\nffmpeg die Größe der Bilder.\n\n=item -videoBitrate => $bitrate (Default: 60_000)\n\nVideo-Bitrate in kbit/s.\n\n=item -videoFilter => $filter\n\nOptionale Filterangabe. Z.B. -videoFilter => 'lutyuv=y=val*1.4,hue=s=10'\n\n=item -videoFramerate => $n (Default: 24)\n\nFramerate des Video.\n\n=back\n\n=head4 Description\n\nGeneriere ein ffmpeg-Kommando zum Zusammenfügen der Bilder\n$pattern zu Video $output und liefere dieses Kommando zurück.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub imagesToVideo {\n my $class = shift;\n # @_: $pattern,$output,@opt\n\n # Optionen und Argumente\n\n my $audio = undef;\n my $duration = undef,\n my $framerate = 8;\n my $loop = 0;\n my $play = 0;\n my $preset = undef;\n my $size = undef;\n my $videoBitrate = 60_000;\n my $videoFilter = undef;\n my $videoFramerate = 24;\n\n Quiq::Option->extract(\\@_,\n -audio => \\$audio,\n -duration => \\$duration,\n -framerate => \\$framerate,\n -loop => \\$loop,\n -play => \\$play,\n -preset => \\$preset,\n -size => \\$size,\n -videoBitrate => \\$videoBitrate,\n -videoFilter => \\$videoFilter,\n -videoFramerate => \\$videoFramerate,\n );\n if (@_ == 0 || @_ > 2) {\n $class->throw('Usage: $ffm->imagesToVideo($input,$output,@opt)');\n }\n my $pattern = shift;\n my $output = shift;\n\n # Operation ausführen\n\n # * Command-Objekt instantiieren \n my $self = $class->new('ffmpeg -y');\n \n # * Input\n\n if ($loop) {\n $self->addOption(-loop=>$loop);\n }\n $self->addOption(-framerate=>$framerate);\n $self->addOption(-f=>'image2');\n if ($pattern =~ /\\*/) {\n $self->addOption(-pattern_type=>'glob');\n }\n $self->addInput($pattern);\n\n if ($audio) {\n $self->addInput($audio);\n }\n \n # * Filter\n\n my @filter;\n\n # ** fps\n push @filter,$self->fpsFilter($videoFramerate);\n\n # ** scale\n\n push @filter,$self->scaleFilter($size);\n if ($play && !$size) {\n push @filter,$self->scaleFilter('720*a',720);\n }\n\n # ** YUV color space (laut ffmpeg-Doku aus Kompatibilitätsgründen nötig)\n push @filter,'format=yuv420p';\n\n # ** Optionale Video-Filter\n\n if ($videoFilter) {\n push @filter,$videoFilter;\n }\n\n $self->addFilter(-vf=>\\@filter,',');\n\n # * Output-Options\n\n if (defined $duration) {\n $self->addOption(-t=>$duration);\n }\n elsif ($audio) {\n $self->addOption('-shortest');\n }\n\n if (defined $videoBitrate) {\n $self->addOption('-b:v'=>$videoBitrate.'k');\n }\n if (defined $preset) {\n $self->addOption(-preset=>$preset);\n }\n\n # * Output\n\n if ($play) {\n $self->addOption(-f=>'avi');\n if ($play == 1) {\n $self->addString('- 2>/dev/null | ffplay -autoexit - 2>/dev/null');\n }\n else {\n $self->addString('- 2>/dev/null | ffplay - 2>/dev/null');\n }\n }\n else {\n $self->addOutput($output);\n }\n \n return $self;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 videoToImages() - Extrahiere Bild-Sequenz (Frames) aus Video\n\n=head4 Synopsis\n\n $cmd = $ffm->videoToImages($input,$dir,@opt);\n\n=head4 Options\n\n=over 4\n\n=item -aspectRatio => '16:9'|'4:3' (Default: undef)\n\nGewünschtes Seitenverhältnis der Bilder. Hat das Video ein\nabweichendes Seitenverhältnis, wird ein entsprechender Crop-Filter\naufgesetzt.\n\n=item -framestep => $n (Default: 1)\n\nExtrahiere jeden $n-ten Frame.\n\n=item -pixelFormat=FMT (Default: 'yuvj422p')\n\nPixel-Format des erzeugten Bildes. Laut Aussage im Netz ist yuvj422p\ndas Standard-Pixel-Format für jpeg-Dateien. Wird das Pixel-Format\nhier nicht geändert, erzeugt ffmpeg die Bilder in Pixelformat\nyuvj420p, was Probleme beim Zusammenfügen mit Bildern einer\nKamera zu einem Film macht.\n\n=item -quality => $n (Default: 2)\n\nQualität der generierten jpg-Bilddateien. Wertebereich: 2-31, mit\n2 als bester und 31 als schlechtester Qualität.\n\n=item -start => $s (Default: 0)\n\nZeitpunkt in Sekunden (ggf. mit Nachkommastellen) vom Beginn\ndes Video, an dem das Extrahieren der Frames beginnt.\n\n=item -stop => $s (Default: undef)\n\nZeitpunkt in Sekunden (ggf. mit Nachkommastellen) vom Beginn\ndes Video, an dem das Extrahieren der Frames endet.\n\n=back\n\n=head4 Description\n\nGeneriere ein ffmpeg-Kommando, das die Frames aus dem Video $input\nextrahiert und im Verzeichnis $dir speichert. Die Bilder haben\ndas Format 'jpg'. Der Name der Dateien ist NNNNNN.jpg, von 1 an\nlückenlos aufsteigend.\n\n=head4 Examples\n\nOhne Optionen:\n\n $ffm->videoToImages('video.mp4','img');\n =>\n ffmpeg -y -loglevel error -stats\n -i 'video.mp4'\n -qscale:v 2\n 'img/%06d.jpg'\n\nVideo-Seitenverhältnis 16:9 zu Bild-Seitenverhältnis 4:3 wandeln:\n\n $ffm->videoToImages('video.mp4','img',\n -aspectRatio => '4:3',\n );\n =>\n ffmpeg -y -loglevel error -stats\n -i 'video.mp4'\n -vf 'crop=ih/3*4:ih'\n -qscale:v 2\n 'img/%06d.jpg'\n\nAlle Optionen:\n\n $ffm->videoToImages('video.mp4','img',\n -aspectRatio => '4:3',\n -framestep => 6,\n -start => 3,\n -stop => 10,\n );\n =>\n ffmpeg -y -loglevel error -stats\n -i 'video.mp4'\n -vf 'framestep=6,crop=ih/3*4:ih'\n -ss 3 -t 7\n -qscale:v 2\n 'img/%06d.jpg'\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub videoToImages {\n my $class = shift;\n # @_: $input,$dir,@opt\n \n # Optionen und Argumente\n\n my $aspectRatio = undef;\n my $framestep = 1;\n my $pixelFormat = 'yuvj422p';\n my $quality = 2;\n my $start = 0;\n my $stop = undef;\n \n Quiq::Option->extract(\\@_,\n -aspectRatio => \\$aspectRatio,\n -framestep => \\$framestep,\n -pixelFormat => \\$pixelFormat,\n -quality => \\$quality,\n -start => \\$start,\n -stop => \\$stop,\n );\n if (@_ == 0 || @_ > 2) {\n $class->throw('Usage: $ffm->videoToImages($input,$dir,@opt)');\n }\n my $input = shift;\n my $dir = shift;\n\n # Operation ausführen\n\n # * Command-Objekt instantiieren \n my $self = $class->new;\n \n # * Input\n $self->addInput($input);\n\n # * Filter\n \n my @filter;\n\n # ** framestep\n\n push @filter,$self->framestepFilter($framestep);\n\n if ($aspectRatio) {\n if ($aspectRatio eq '4:3') {\n push @filter,$self->cropFilter('ih/3*4','ih');\n }\n elsif ($aspectRatio eq '16:9') {\n push @filter,$self->cropFilter('iw','iw/16*9');\n }\n else {\n $self->throw;\n } \n }\n\n $self->addFilter(-vf=>\\@filter,',');\n\n # Output-Optionen\n \n $self->addStartStop($start,$stop);\n $self->addOption('-qscale:v'=>$quality);\n $self->addOption(-pix_fmt=>$pixelFormat);\n\n # * Output\n\n $self->prependString('ffmpeg -y');\n $self->addOutput(\"$dir/%06d.jpg\");\n\n return $self;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 extract() - Extrahiere Abschnitt aus Audio- oder Video-Datei\n\n=head4 Synopsis\n\n $cmd = $class->extract($input,$output,@opt);\n\n=head4 Arguments\n\n=over 4\n\n=item $input\n\nEingabe-Datei.\n\n=item $output\n\nAusgabe-Datei.\n\n=back\n\n=head4 Options\n\n=over 4\n\n=item -name => $str (Default: undef)\n\nFüge dem Dateinamen die Bezeichnung $str hinzu.\n\n=item -play => 0|1|2 (Default: 0)\n\nExtrahiere den Ausschnitt nicht, sondern zeige ihn an. 1=Exit am Ende,\n2=Fenster offen lassen (zu erneuten Positionen).\n\n=item -start => $s (Default: 0)\n\nStart-Position in einem Format, das die Klasse Quiq::Duration\nakzeptiert.\n\n=item -stop => $s (Default: undef)\n\nEnde-Position in einem Format, das die Klasse Quiq::Duration\nakzeptiert.\n\n=back\n\n=head4 Description\n\nExtrahiere von Position $start bis Position $stop einen Teil\naus der Audio- oder Video-Datei $input und schreibe ihn auf Datei $output.\n\nDie Extraktion erfolgt ohne Transcoding, also ohne Qualitätsverlust.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub extract {\n my $class = shift;\n # @_: $input,$output,@opt\n\n # Optionen und Argumente\n\n my $name = undef;\n my $play = 0;\n my $start = undef;\n my $stop = undef;\n \n Quiq::Option->extract(\\@_,\n -name => \\$name,\n -play => \\$play,\n -start => \\$start,\n -stop => \\$stop,\n );\n if (@_ == 0 || @_ > 2) {\n $class->throw('Usage: $ffm->extract($input,$output,@opt)');\n }\n my $input = shift;\n my $output = shift;\n\n my $self = $class->new;\n $self->addInput($input);\n if (defined $start) {\n $start = Quiq::Duration->stringToSeconds($start);\n }\n if (defined $stop) {\n $stop = Quiq::Duration->stringToSeconds($stop);\n }\n $self->addStartStop($start,$stop);\n\n if ($play) {\n $self->prependString($play == 1? 'ffplay -autoexit': 'ffplay');\n $self->addOption(-vf=>'scale=720*a:720');\n }\n else {\n my $inp = $self->input(0);\n $self->outName($name);\n # Rausgenommen, da Fehler bei Extraktion aus Audio-Datei.\n # Bei Video nötig?\n # $self->outSize($inp->size);\n $self->outStart($start || 0);\n $self->outStop($stop || $inp->duration);\n $self->prependString('ffmpeg -y');\n\n $self->addOption(-codec=>'copy');\n $self->addOutput($output);\n }\n\n return $self;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 extract169To43() - Extrahiere/Croppe 16:9-Video zu 4:3-Video\n\n=head4 Synopsis\n\n $cmd = $class->extract169To43($input,$output,@opt);\n\n=head4 Arguments\n\n=over 4\n\n=item $input\n\nEingabe-Datei.\n\n=item $output\n\nAusgabe-Datei. Wenn undef, wird der Name der Ausgabedatei generiert.\n\n=back\n\n=head4 Options\n\n=over 4\n\n=item -bitrate => $x (Default: undef)\n\nDie Bitrate des generierten Video in kb/s.\n\n=item -name => $str (Default: undef)\n\nFüge dem Dateinamen die Bezeichnung $str hinzu.\n\n=item -play => 0|1|2 (Default: 0)\n\nZeige das generierte Video im Player an, statt es in einer Datei\nzu speichern. Bei -play=>2 bleibt das Fenster des Players\noffen, bis es per Hand geschlossen wird.\n\n=item -start => $s (Default: 0)\n\nStart-Position in Sekunden (mit Millisekunden als Nachkommastellen).\n\n=item -stop => $s (Default: undef)\n\nEnde-Position in Sekunden (mit Millisekunden als Nachkommastellen).\n\n=item -xOffset => $n (Default: undef)\n\nCrop-Offset in x-Richtung. Per Default croppt der crop-Filter mittig.\n\n=back\n\n=head4 Description\n\nCroppe 16:9-Video $input zum 4:3-Video $output. Die Crop-Operation\nschneidet links und rechts einen Teil des Video ab.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub extract169To43 {\n my $class = shift;\n # @_: $input,$output,@opt\n\n # Optionen und Argumente\n\n my $bitrate = undef;\n my $name = undef;\n my $play = 0;\n my $start = undef;\n my $stop = undef;\n my $xOffset = undef;\n\n Quiq::Option->extract(\\@_,\n -bitrate => \\$bitrate,\n -name => \\$name,\n -play => \\$play,\n -start => \\$start,\n -stop => \\$stop,\n -xOffset => \\$xOffset,\n );\n if (@_ == 0 || @_ > 2) {\n $class->throw('Usage: $ffm->extract169To43($input,$output,@opt)');\n }\n my $input = shift;\n my $output = shift;\n\n # Operation ausführen\n\n # * Command-Objekt instantiieren \n my $self = $class->new;\n \n # * Input\n $self->addInput($input);\n \n # * Filter\n \n my @filter;\n\n # ** crop\n \n my ($width,$height) = $self->input(0)->size;\n my $newWidth = $height/3*4;\n if (!defined $xOffset) {\n $xOffset = ($width-$newWidth)/2;\n }\n push @filter,$self->cropFilter($newWidth,$height,$xOffset,0);\n\n # ** scale (im Falle von play)\n \n if ($play) {\n push @filter,$self->scaleFilter('720*a',720);\n }\n \n $self->addFilter('-vf',\\@filter,',');\n\n # * Output-Optionen\n\n $self->addStartStop($start,$stop);\n $self->addBitrate($bitrate || $self->input(0)->bitrate);\n\n # * Output\n \n if ($play) {\n $self->prependString($play == 1? 'ffplay -autoexit': 'ffplay');\n }\n else {\n $self->outName($name);\n $self->outSize($newWidth,$height);\n $self->outStart($start || 0);\n $self->outStop($stop || $self->input(0)->duration);\n\n $self->prependString('ffmpeg -y');\n $self->addOutput($output);\n }\n \n return $self;\n}\n\n# -----------------------------------------------------------------------------\n\n=head3 videoInfo() - Schreibe Video-Stream-Information in XML\n\n=head4 Synopsis\n\n $cmd = $class->videoInfo($input);\n $cmd = $class->videoInfo($input,$streamIndex);\n\n=head4 Arguments\n\n=over 4\n\n=item $input\n\nEingabe-Datei.\n\n=item $streamIndex (Default: 0)\n\nIndex des Video-Stream.\n\n=back\n\n=head4 Description\n\nErzeuge eine ffprobe-Kommandozeile, die Information über den\nVideo-Stream $streamIndex in Datei $input liefert. Ist kein\nStream-Index angegeben, wird der erste Stream (Index 0) genommen.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub videoInfo {\n my $class = shift;\n my $input = shift;\n my $streamIndex = shift || 0;\n\n my $self = $class->new;\n \n $self->addString('ffprobe');\n $self->addOption(-loglevel=>'error');\n $self->addOption(-print_format=>'xml');\n $self->addOption('-show_streams');\n $self->addOption(-select_streams=>\"v:$streamIndex\");\n $self->addInput($input);\n\n return $self;\n}\n\n# -----------------------------------------------------------------------------\n\n=head2 Kommando-Ausführung\n\n=head3 execute() - Führe FFmpeg-Kommandozeile aus\n\n=head4 Synopsis\n\n $cmd->execute;\n\n=head4 Description\n\nFühre FFmpeg-Kommando $cmd aus. Als Ausgabe erscheint lediglich\ndie Fortschrittsanzeige.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\nsub execute {\n my $self = shift;\n\n my $cmd = $self->command;\n my $fh = Quiq::FileHandle->open('-|',\"($cmd 2>&1)\");\n local $/ = \"\\r\";\n $| = 1;\n while (<$fh>) {\n if (/^(ffmpeg|ffplay|ffprobe|Input|Output)/) {\n next;\n }\n s/\\n+$/\\n/;\n print;\n }\n $fh->close;\n\n return;\n}\n\n# -----------------------------------------------------------------------------\n\n=head1 VERSION\n\n1.196\n\n=head1 AUTHOR\n\nFrank Seitz, L\n\n=head1 COPYRIGHT\n\nCopyright (C) 2021 Frank Seitz\n\n=head1 LICENSE\n\nThis code is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n\n=cut\n\n# -----------------------------------------------------------------------------\n\n1;\n\n# eof\n"},"avg_line_length":{"kind":"number","value":20.3080872914,"string":"20.308087"},"max_line_length":{"kind":"number","value":142,"string":"142"},"alphanum_fraction":{"kind":"number","value":0.5385903919,"string":"0.53859"}}},{"rowIdx":463297,"cells":{"hexsha":{"kind":"string","value":"ed6c1268dc34aef02435ad4741a5afd4b8589435"},"size":{"kind":"number","value":139,"string":"139"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"_templates/container/new/index.ejs.t"},"max_stars_repo_name":{"kind":"string","value":"Dewyer/arpad2020BGrad"},"max_stars_repo_head_hexsha":{"kind":"string","value":"f002bb2b8869a2953a561fd23d1bfba309036228"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2020-04-06T16:47:46.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2020-04-06T16:47:46.000Z"},"max_issues_repo_path":{"kind":"string","value":"pandamic-web/_templates/container/new/index.ejs.t"},"max_issues_repo_name":{"kind":"string","value":"Pandamic-App/pandamic"},"max_issues_repo_head_hexsha":{"kind":"string","value":"a0250fc9066471bdd39b84c84a51c9ee9d6b5760"},"max_issues_repo_licenses":{"kind":"list like","value":["MIT"],"string":"[\n \"MIT\"\n]"},"max_issues_count":{"kind":"number","value":6,"string":"6"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2020-07-12T08:31:20.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-02-27T02:41:45.000Z"},"max_forks_repo_path":{"kind":"string","value":"_templates/container/new/index.ejs.t"},"max_forks_repo_name":{"kind":"string","value":"Dewyer/arpad2020BGrad"},"max_forks_repo_head_hexsha":{"kind":"string","value":"f002bb2b8869a2953a561fd23d1bfba309036228"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"---\nto: src/components/<%= name %>/index.tsx\n---\nimport <%= name %>Container from \"./<%= name %>-container\";\n\nexport <%= name %>Container;\n"},"avg_line_length":{"kind":"number","value":19.8571428571,"string":"19.857143"},"max_line_length":{"kind":"number","value":59,"string":"59"},"alphanum_fraction":{"kind":"number","value":0.5899280576,"string":"0.589928"}}},{"rowIdx":463298,"cells":{"hexsha":{"kind":"string","value":"ed17a0dbdf719a194f32f6916b9c86231bbfe75f"},"size":{"kind":"number","value":6982,"string":"6,982"},"ext":{"kind":"string","value":"pl"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"scripts/generate_errors.pl"},"max_stars_repo_name":{"kind":"string","value":"paul-elliott-arm/mbedtls"},"max_stars_repo_head_hexsha":{"kind":"string","value":"17605f072b6bc85e1a9cf6a81bd6b5d5eb65440a"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":3553,"string":"3,553"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2015-01-29T21:43:36.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2022-03-31T08:41:59.000Z"},"max_issues_repo_path":{"kind":"string","value":"scripts/generate_errors.pl"},"max_issues_repo_name":{"kind":"string","value":"paul-elliott-arm/mbedtls"},"max_issues_repo_head_hexsha":{"kind":"string","value":"17605f072b6bc85e1a9cf6a81bd6b5d5eb65440a"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"number","value":5899,"string":"5,899"},"max_issues_repo_issues_event_min_datetime":{"kind":"string","value":"2016-05-11T19:21:49.000Z"},"max_issues_repo_issues_event_max_datetime":{"kind":"string","value":"2022-03-31T18:17:20.000Z"},"max_forks_repo_path":{"kind":"string","value":"scripts/generate_errors.pl"},"max_forks_repo_name":{"kind":"string","value":"paul-elliott-arm/mbedtls"},"max_forks_repo_head_hexsha":{"kind":"string","value":"17605f072b6bc85e1a9cf6a81bd6b5d5eb65440a"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"number","value":1176,"string":"1,176"},"max_forks_repo_forks_event_min_datetime":{"kind":"string","value":"2015-05-20T08:31:11.000Z"},"max_forks_repo_forks_event_max_datetime":{"kind":"string","value":"2022-03-31T22:40:08.000Z"},"content":{"kind":"string","value":"#!/usr/bin/env perl\n\n# Generate error.c\n#\n# Usage: ./generate_errors.pl or scripts/generate_errors.pl without arguments,\n# or generate_errors.pl include_dir data_dir error_file\n#\n# Copyright The Mbed TLS Contributors\n# SPDX-License-Identifier: Apache-2.0\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n# not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nuse strict;\n\nmy ($include_dir, $data_dir, $error_file);\n\nif( @ARGV ) {\n die \"Invalid number of arguments\" if scalar @ARGV != 3;\n ($include_dir, $data_dir, $error_file) = @ARGV;\n\n -d $include_dir or die \"No such directory: $include_dir\\n\";\n -d $data_dir or die \"No such directory: $data_dir\\n\";\n} else {\n $include_dir = 'include/mbedtls';\n $data_dir = 'scripts/data_files';\n $error_file = 'library/error.c';\n\n unless( -d $include_dir && -d $data_dir ) {\n chdir '..' or die;\n -d $include_dir && -d $data_dir\n or die \"Without arguments, must be run from root or scripts\\n\"\n }\n}\n\nmy $error_format_file = $data_dir.'/error.fmt';\n\nmy @low_level_modules = qw( AES ARC4 ARIA ASN1 BASE64 BIGNUM BLOWFISH\n CAMELLIA CCM CHACHA20 CHACHAPOLY CMAC CTR_DRBG DES\n ENTROPY ERROR GCM HKDF HMAC_DRBG MD2 MD4 MD5\n NET OID PADLOCK PBKDF2 PLATFORM POLY1305 RIPEMD160\n SHA1 SHA256 SHA512 THREADING XTEA );\nmy @high_level_modules = qw( CIPHER DHM ECP MD\n PEM PK PKCS12 PKCS5\n RSA SSL X509 );\n\nmy $line_separator = $/;\nundef $/;\n\nopen(FORMAT_FILE, \"$error_format_file\") or die \"Opening error format file '$error_format_file': $!\";\nmy $error_format = ;\nclose(FORMAT_FILE);\n\n$/ = $line_separator;\n\nmy @files = <$include_dir/*.h>;\nmy @necessary_include_files;\nmy @matches;\nforeach my $file (@files) {\n open(FILE, \"$file\");\n my @grep_res = grep(/^\\s*#define\\s+MBEDTLS_ERR_\\w+\\s+\\-0x[0-9A-Fa-f]+/, );\n push(@matches, @grep_res);\n close FILE;\n my $include_name = $file;\n $include_name =~ s!.*/!!;\n push @necessary_include_files, $include_name if @grep_res;\n}\n\nmy $ll_old_define = \"\";\nmy $hl_old_define = \"\";\n\nmy $ll_code_check = \"\";\nmy $hl_code_check = \"\";\n\nmy $headers = \"\";\nmy %included_headers;\n\nmy %error_codes_seen;\n\nforeach my $line (@matches)\n{\n next if ($line =~ /compat-1.2.h/);\n my ($error_name, $error_code) = $line =~ /(MBEDTLS_ERR_\\w+)\\s+\\-(0x\\w+)/;\n my ($description) = $line =~ /\\/\\*\\*< (.*?)\\.? \\*\\//;\n\n die \"Duplicated error code: $error_code ($error_name)\\n\"\n if( $error_codes_seen{$error_code}++ );\n\n $description =~ s/\\\\/\\\\\\\\/g;\n if ($description eq \"\") {\n $description = \"DESCRIPTION MISSING\";\n warn \"Missing description for $error_name\\n\";\n }\n\n my ($module_name) = $error_name =~ /^MBEDTLS_ERR_([^_]+)/;\n\n # Fix faulty ones\n $module_name = \"BIGNUM\" if ($module_name eq \"MPI\");\n $module_name = \"CTR_DRBG\" if ($module_name eq \"CTR\");\n $module_name = \"HMAC_DRBG\" if ($module_name eq \"HMAC\");\n\n my $define_name = $module_name;\n $define_name = \"X509_USE,X509_CREATE\" if ($define_name eq \"X509\");\n $define_name = \"ASN1_PARSE\" if ($define_name eq \"ASN1\");\n $define_name = \"SSL_TLS\" if ($define_name eq \"SSL\");\n $define_name = \"PEM_PARSE,PEM_WRITE\" if ($define_name eq \"PEM\");\n\n my $include_name = $module_name;\n $include_name =~ tr/A-Z/a-z/;\n\n # Fix faulty ones\n $include_name = \"net_sockets\" if ($module_name eq \"NET\");\n\n $included_headers{\"${include_name}.h\"} = $module_name;\n\n my $found_ll = grep $_ eq $module_name, @low_level_modules;\n my $found_hl = grep $_ eq $module_name, @high_level_modules;\n if (!$found_ll && !$found_hl)\n {\n printf(\"Error: Do not know how to handle: $module_name\\n\");\n exit 1;\n }\n\n my $code_check;\n my $old_define;\n my $white_space;\n my $first;\n\n if ($found_ll)\n {\n $code_check = \\$ll_code_check;\n $old_define = \\$ll_old_define;\n $white_space = ' ';\n }\n else\n {\n $code_check = \\$hl_code_check;\n $old_define = \\$hl_old_define;\n $white_space = ' ';\n }\n\n if ($define_name ne ${$old_define})\n {\n if (${$old_define} ne \"\")\n {\n ${$code_check} .= \"#endif /* \";\n $first = 0;\n foreach my $dep (split(/,/, ${$old_define}))\n {\n ${$code_check} .= \" || \" if ($first++);\n ${$code_check} .= \"MBEDTLS_${dep}_C\";\n }\n ${$code_check} .= \" */\\n\\n\";\n }\n\n ${$code_check} .= \"#if \";\n $headers .= \"#if \" if ($include_name ne \"\");\n $first = 0;\n foreach my $dep (split(/,/, ${define_name}))\n {\n ${$code_check} .= \" || \" if ($first);\n $headers .= \" || \" if ($first++);\n\n ${$code_check} .= \"defined(MBEDTLS_${dep}_C)\";\n $headers .= \"defined(MBEDTLS_${dep}_C)\" if\n ($include_name ne \"\");\n }\n ${$code_check} .= \"\\n\";\n $headers .= \"\\n#include \\\"mbedtls/${include_name}.h\\\"\\n\".\n \"#endif\\n\\n\" if ($include_name ne \"\");\n ${$old_define} = $define_name;\n }\n\n ${$code_check} .= \"${white_space}case -($error_name):\\n\".\n \"${white_space} return( \\\"$module_name - $description\\\" );\\n\"\n};\n\nif ($ll_old_define ne \"\")\n{\n $ll_code_check .= \"#endif /* \";\n my $first = 0;\n foreach my $dep (split(/,/, $ll_old_define))\n {\n $ll_code_check .= \" || \" if ($first++);\n $ll_code_check .= \"MBEDTLS_${dep}_C\";\n }\n $ll_code_check .= \" */\\n\";\n}\nif ($hl_old_define ne \"\")\n{\n $hl_code_check .= \"#endif /* \";\n my $first = 0;\n foreach my $dep (split(/,/, $hl_old_define))\n {\n $hl_code_check .= \" || \" if ($first++);\n $hl_code_check .= \"MBEDTLS_${dep}_C\";\n }\n $hl_code_check .= \" */\\n\";\n}\n\n$error_format =~ s/HEADER_INCLUDED\\n/$headers/g;\n$error_format =~ s/LOW_LEVEL_CODE_CHECKS\\n/$ll_code_check/g;\n$error_format =~ s/HIGH_LEVEL_CODE_CHECKS\\n/$hl_code_check/g;\n\nopen(ERROR_FILE, \">$error_file\") or die \"Opening destination file '$error_file': $!\";\nprint ERROR_FILE $error_format;\nclose(ERROR_FILE);\n\nmy $errors = 0;\nfor my $include_name (@necessary_include_files)\n{\n if (not $included_headers{$include_name})\n {\n print STDERR \"The header file \\\"$include_name\\\" defines error codes but has not been included!\\n\";\n ++$errors;\n }\n}\n\nexit !!$errors;\n"},"avg_line_length":{"kind":"number","value":30.4890829694,"string":"30.489083"},"max_line_length":{"kind":"number","value":106,"string":"106"},"alphanum_fraction":{"kind":"number","value":0.5794901174,"string":"0.57949"}}},{"rowIdx":463299,"cells":{"hexsha":{"kind":"string","value":"edab98fc5df762af91235392dc368aaf35b9b9ff"},"size":{"kind":"number","value":6118,"string":"6,118"},"ext":{"kind":"string","value":"t"},"lang":{"kind":"string","value":"Perl"},"max_stars_repo_path":{"kind":"string","value":"t/core/config_etcd.t"},"max_stars_repo_name":{"kind":"string","value":"philzhangrui/apisix"},"max_stars_repo_head_hexsha":{"kind":"string","value":"7abd9585cfab2bc69dfd2ccfd26bbac1b75ddbfc"},"max_stars_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_stars_count":{"kind":"number","value":1,"string":"1"},"max_stars_repo_stars_event_min_datetime":{"kind":"string","value":"2021-03-12T17:07:30.000Z"},"max_stars_repo_stars_event_max_datetime":{"kind":"string","value":"2021-03-12T17:07:30.000Z"},"max_issues_repo_path":{"kind":"string","value":"t/core/config_etcd.t"},"max_issues_repo_name":{"kind":"string","value":"philzhangrui/apisix"},"max_issues_repo_head_hexsha":{"kind":"string","value":"7abd9585cfab2bc69dfd2ccfd26bbac1b75ddbfc"},"max_issues_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_issues_count":{"kind":"null"},"max_issues_repo_issues_event_min_datetime":{"kind":"null"},"max_issues_repo_issues_event_max_datetime":{"kind":"null"},"max_forks_repo_path":{"kind":"string","value":"t/core/config_etcd.t"},"max_forks_repo_name":{"kind":"string","value":"philzhangrui/apisix"},"max_forks_repo_head_hexsha":{"kind":"string","value":"7abd9585cfab2bc69dfd2ccfd26bbac1b75ddbfc"},"max_forks_repo_licenses":{"kind":"list like","value":["Apache-2.0"],"string":"[\n \"Apache-2.0\"\n]"},"max_forks_count":{"kind":"null"},"max_forks_repo_forks_event_min_datetime":{"kind":"null"},"max_forks_repo_forks_event_max_datetime":{"kind":"null"},"content":{"kind":"string","value":"#\n# Licensed to the Apache Software Foundation (ASF) under one or more\n# contributor license agreements. See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License. You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\nuse t::APISIX 'no_plan';\n\nrepeat_each(1);\nno_long_string();\nno_root_location();\nlog_level(\"info\");\n\nrun_tests;\n\n__DATA__\n\n=== TEST 1: wrong etcd port\n--- yaml_config\napisix:\n node_listen: 1984\netcd:\n host:\n - \"http://127.0.0.1:7777\" -- wrong etcd port\n timeout: 1\n--- config\n location /t {\n content_by_lua_block {\n ngx.sleep(8)\n ngx.say(body)\n }\n }\n--- timeout: 12\n--- request\nGET /t\n--- grep_error_log eval\nqr{connection refused}\n--- grep_error_log_out eval\nqr/(connection refused){1,}/\n\n\n\n=== TEST 2: originate TLS connection to etcd cluster without TLS configuration\n--- yaml_config\napisix:\n node_listen: 1984\netcd:\n host:\n - \"https://127.0.0.1:2379\"\n--- config\n location /t {\n content_by_lua_block {\n ngx.sleep(4)\n ngx.say(\"ok\")\n }\n }\n--- timeout: 5\n--- request\nGET /t\n--- grep_error_log chop\nhandshake failed\n--- grep_error_log_out eval\nqr/(handshake failed){1,}/\n\n\n\n=== TEST 3: originate plain connection to etcd cluster which enables TLS\n--- yaml_config\napisix:\n node_listen: 1984\netcd:\n host:\n - \"http://127.0.0.1:12379\"\n--- config\n location /t {\n content_by_lua_block {\n ngx.sleep(4)\n ngx.say(\"ok\")\n }\n }\n--- timeout: 5\n--- request\nGET /t\n--- grep_error_log chop\nclosed\n--- grep_error_log_out eval\nqr/(closed){1,}/\n\n\n\n=== TEST 4: originate TLS connection to etcd cluster and verify TLS certificate (default behavior)\n--- yaml_config\napisix:\n node_listen: 1984\netcd:\n host:\n - \"https://127.0.0.1:12379\"\n--- config\n location /t {\n content_by_lua_block {\n ngx.sleep(4)\n ngx.say(\"ok\")\n }\n }\n--- timeout: 5\n--- request\nGET /t\n--- grep_error_log chop\n18: self signed certificate\n--- grep_error_log_out eval\nqr/(18: self signed certificate){1,}/\n\n\n\n=== TEST 5: set route(id: 1) to etcd cluster with TLS\n--- yaml_config\napisix:\n node_listen: 1984\n admin_key: null\netcd:\n host:\n - \"https://127.0.0.1:12379\"\n tls:\n verify: false\n--- config\n location /t {\n content_by_lua_block {\n local t = require(\"lib.test_admin\").test\n local code, body = t('/apisix/admin/routes/1',\n ngx.HTTP_PUT,\n [[{\n \"methods\": [\"GET\"],\n \"upstream\": {\n \"nodes\": {\n \"127.0.0.1:8080\": 1\n },\n \"type\": \"roundrobin\"\n },\n \"desc\": \"new route\",\n \"uri\": \"/index.html\"\n }]],\n [[{\n \"node\": {\n \"value\": {\n \"methods\": [\n \"GET\"\n ],\n \"uri\": \"/index.html\",\n \"desc\": \"new route\",\n \"upstream\": {\n \"nodes\": {\n \"127.0.0.1:8080\": 1\n },\n \"type\": \"roundrobin\"\n }\n },\n \"key\": \"/apisix/routes/1\"\n },\n \"action\": \"set\"\n }]]\n )\n\n ngx.status = code\n ngx.say(body)\n }\n }\n--- request\nGET /t\n--- response_body\npassed\n--- no_error_log\n[error]\n\n\n\n=== TEST 6: get route(id: 1) from etcd cluster with TLS\n--- yaml_config\napisix:\n node_listen: 1984\n admin_key: null\netcd:\n host:\n - \"https://127.0.0.1:12379\"\n tls:\n verify: false\n--- config\n location /t {\n content_by_lua_block {\n local t = require(\"lib.test_admin\").test\n local code, body = t('/apisix/admin/routes/1',\n ngx.HTTP_GET,\n nil,\n [[{\n \"node\": {\n \"value\": {\n \"methods\": [\n \"GET\"\n ],\n \"uri\": \"/index.html\",\n \"desc\": \"new route\",\n \"upstream\": {\n \"nodes\": {\n \"127.0.0.1:8080\": 1\n },\n \"type\": \"roundrobin\"\n }\n },\n \"key\": \"/apisix/routes/1\"\n },\n \"action\": \"get\"\n }]]\n )\n\n ngx.status = code\n ngx.say(body)\n }\n }\n--- request\nGET /t\n--- response_body\npassed\n--- no_error_log\n[error]\n\n\n\n=== TEST 7: ensure only one auth request per subsystem for all the etcd sync\n--- yaml_config\napisix:\n node_listen: 1984\netcd:\n host:\n - \"http://127.0.0.1:1980\" -- fake server port\n timeout: 1\n user: root # root username for etcd\n password: 5tHkHhYkjr6cQY # root password for etcd\n--- config\n location /t {\n content_by_lua_block {\n ngx.sleep(0.5)\n }\n }\n--- request\nGET /t\n--- grep_error_log eval\nqr/etcd auth failed/\n--- grep_error_log_out\netcd auth failed\netcd auth failed\netcd auth failed\netcd auth failed\n"},"avg_line_length":{"kind":"number","value":23.3511450382,"string":"23.351145"},"max_line_length":{"kind":"number","value":98,"string":"98"},"alphanum_fraction":{"kind":"number","value":0.487904544,"string":"0.487905"}}}],"truncated":false,"partial":true},"paginationData":{"pageIndex":4632,"numItemsPerPage":100,"numTotalItems":463457,"offset":463200,"length":100}},"jwt":"eyJhbGciOiJFZERTQSJ9.eyJyZWFkIjp0cnVlLCJwZXJtaXNzaW9ucyI6eyJyZXBvLmNvbnRlbnQucmVhZCI6dHJ1ZX0sImlhdCI6MTc1NjE5ODcwOSwic3ViIjoiL2RhdGFzZXRzL2JpZ2NvZGUvdGhlLXN0YWNrLXNtb2wteGwiLCJleHAiOjE3NTYyMDIzMDksImlzcyI6Imh0dHBzOi8vaHVnZ2luZ2ZhY2UuY28ifQ.Uig52J9eDlkacPfpk5jpIhPx1JX3bv8tNMQrce0bZzHirrzQ-3MUfASjT1iozWVE1aro8TS2t6R8YXIeO0RUDw","displayUrls":true},"discussionsStats":{"closed":0,"open":0,"total":0},"fullWidth":true,"hasGatedAccess":true,"hasFullAccess":true,"isEmbedded":false,"savedQueries":{"community":[{"views":[{"key":"default/train","displayName":"train","viewName":"train"}],"sql":"SELECT content AS text\nFROM train\nWHERE lang = 'HTML'\n AND LENGTH(content) > 8\n AND content NOT ILIKE '%