Merge pull request #1018 from duckduckgo/mintsoft/forever-strict

Whacking use strict into all goodies
master
Zaahir Moolla 2015-02-23 13:36:11 -05:00
commit 675ddb306a
149 changed files with 149 additions and 10 deletions

View File

@ -1,6 +1,7 @@
package DDG::Goodie::ABC;
# ABSTRACT: Randomly pick one of several different choices delimited by "or"
use strict;
use DDG::Goodie;
use List::AllUtils qw/none/;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::AltCalendars;
# ABSTRACT: Convert non-Gregorian years to the Gregorian calendar
use strict;
use DDG::Goodie;
primary_example_queries 'heisei 24';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Anagram;
# ABSTRACT: Returns an anagram based on the supplied query.
use strict;
use DDG::Goodie;
use List::Util qw( shuffle );

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Ascii;
# ABSTRACT: ASCII
use strict;
use DDG::Goodie;
triggers end => "ascii";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::AspectRatio;
# ABSTRACT: Calculates aspect ratio based on previously defined one
use strict;
use DDG::Goodie;
triggers start => "aspect ratio";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Atbash;
# ABSTRACT: A simple substitution cipher using a reversed alphabet
use strict;
use DDG::Goodie;
primary_example_queries 'atbash hello';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Average;
# ABSTRACT: take statistics for a list of numbers
use strict;
use DDG::Goodie;
triggers startend => "avg", "average", "mean", "median", "root mean square";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::BPMToMs;
# ABSTRACT: Displays common note values in milliseconds for a given tempo measured in quarter notes per minute.
use strict;
use DDG::Goodie;
zci answer_type => "bpmto_ms";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Base;
# ABSTRACT: convert numbers between arbitrary bases
use strict;
use DDG::Goodie;
use Math::Int2Base qw/int2base/;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Base64;
# ABSTRACT: Base64 <-> Unicode
use strict;
use DDG::Goodie;
use MIME::Base64;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Binary;
# ABSTRACT: Convert decimal, hex and string to binary.
use strict;
use DDG::Goodie;
use Bit::Vector;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::BinaryLogic;
# ABSTRACT: bit-wise logical operations.
use strict;
use DDG::Goodie;
use utf8;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::BirthStone;
# ABSTRACT: Returns the birthstone of the queried month
use strict;
use DDG::Goodie;
triggers startend => 'birthstone', 'birth stone';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::BloodDonor;
# ABSTRACT: Returns available donors for a blood type
use strict;
use DDG::Goodie;
use strict;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Braille;
# ABSTRACT: Braille <-> ASCII/Unicode
use strict;
use DDG::Goodie;
use Convert::Braille;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::CalcRoots;
# ABSTRACT: compute the n-th root of a number
use strict;
use DDG::Goodie;
use Lingua::EN::Numericalize;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Calculator;
# ABSTRACT: do simple arthimetical calculations
use strict;
use DDG::Goodie;
with 'DDG::GoodieRole::NumberStyler';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::CalendarConversion;
# ABSTRACT: convert between various calendars.
use strict;
use DDG::Goodie;
with 'DDG::GoodieRole::Dates';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::CalendarToday;
# ABSTRACT: Print calendar of current / given month and highlight (to)day
use strict;
use DDG::Goodie;
use DateTime;
use Try::Tiny;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::CallingCodes;
# ABSTRACT: Matches country names to international calling codes
use strict;
use DDG::Goodie;
use Locale::Country qw/country2code code2country/;
use Telephony::CountryDialingCodes;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::CanadaPost;
# ABSTRACT: Track a package through Canada Post
use strict;
use DDG::Goodie;
primary_example_queries 'canada post 123456789';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Chars;
# ABSTRACT: Give the number of characters (length) of the query.
use strict;
use DDG::Goodie;
triggers startend =>

View File

@ -2,7 +2,6 @@ package DDG::Goodie::Chess960;
# ABSTRACT: return a random Chess 960 starting position.
use strict;
use DDG::Goodie;
triggers any => 'random', 'chess960';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::ChineseZodiac;
# ABSTRACT: Return the Chinese zodiac animal for a given year.
use strict;
use DDG::Goodie;
with 'DDG::GoodieRole::Dates';
use DateTime::Calendar::Chinese;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Coin;
# ABSTRACT: flip a (fair) coin.
use strict;
use DDG::Goodie;
zci is_cached => 0;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::ColorCodes;
# ABSTRACT: Copious information about various ways ofencoding colors.
use strict;
use DDG::Goodie;
use Color::Library;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Combination;
# ABSTRACT: Compute combinations and permutations
use strict;
use DDG::Goodie;
with 'DDG::GoodieRole::NumberStyler';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Conversions;
# ABSTRACT: convert between various units of measurement
use strict;
use DDG::Goodie;
with 'DDG::GoodieRole::NumberStyler';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::ConvertLatLon;
# ABSTRACT: Convert between latitudes and longitudes expressed in degrees of arc and decimal
use strict;
use DDG::Goodie;
use utf8;
use Geo::Coordinates::DecimalDegrees;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::CountryCodes;
# ABSTRACT: Matches country names to ISO 3166 codes and vice versa
use strict;
use DDG::Goodie;
use Locale::Country qw/country2code code2country/;

View File

@ -1,8 +1,7 @@
package DDG::Goodie::CrontabCheatSheet;
# ABSTRACT: Some examples of crontab syntax
# Adapted from VimCheatSheet.pm
use strict;
use DDG::Goodie;
zci answer_type => "cron_cheat";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::CryptHashCheck;
# ABSTRACT: Identifies cryptographic hash type.
use strict;
use DDG::Goodie;
# A comprehensive reference for hashing functions from Wikipedia.

View File

@ -17,6 +17,7 @@ package DDG::Goodie::CurrencyIn;
# currency in Russia
# What type of currency do I need for Russia?
use strict;
use DDG::Goodie;
use Locale::SubCountry;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Cusip;
# ABSTRACT: Validate a CUSIP ID's check digit.
use strict;
use DDG::Goodie;
use Business::CUSIP;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::DHL;
# ABSTRACT: track a package through DHL.
use strict;
use DDG::Goodie;
zci is_cached => 1;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::DateMath;
# ABSTRACT: add/subtract days/weeks/months/years to/from a date
use strict;
use DDG::Goodie;
with 'DDG::GoodieRole::Dates';
use DateTime::Duration;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::DaysBetween;
# ABSTRACT: Give the number of days between two given dates.
use strict;
use DDG::Goodie;
with 'DDG::GoodieRole::Dates';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Dessert;
# ABSTRACT: find desserts starting with a given letter.
use strict;
use DDG::Goodie;
use utf8;
use warnings;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Dewey;
# ABSTRACT: Identify and find dewey decimal system numbers
use strict;
use DDG::Goodie;
triggers any => 'dewey';

View File

@ -2,6 +2,7 @@ package DDG::Goodie::Dice;
# ABSTRACT: roll a number of (abstract) dice.
# https://en.wikipedia.org/wiki/Dice_notation
use strict;
use DDG::Goodie;
triggers start => "roll", "throw";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::DuckDuckGo;
# ABSTRACT: Return hard-coded descriptions for DuckDuckGo terms
use strict;
use DDG::Goodie;
use YAML qw( Load );

View File

@ -1,6 +1,7 @@
package DDG::Goodie::EmToPx;
# ABSTRACT: em <-> px for font sizes.
use strict;
use DDG::Goodie;
triggers any => "em", "px";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::EmailValidator;
# ABSTRACT: Checks given email address
use strict;
use DDG::Goodie;
use Email::Valid;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::FIGlet;
# ABSTRACT: Uses FIGlet to make large letters out of ordinary text.
use strict;
use utf8;
use DDG::Goodie;
use Text::FIGlet;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Factors;
# ABSTRACT: Returns the factors of the entered number
use strict;
use DDG::Goodie;
use Math::Prime::Util 'divisors';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::FedEx;
# ABSTRACT: Track a package through FedEx
use strict;
use DDG::Goodie;
zci is_cached => 1;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::FlipText;
# ABSTRACT: appear to flip text upside down via UNICODE.
use strict;
use DDG::Goodie;
use Text::UpsideDown;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Fortune;
# ABSTRACT: UNIX fortune quips.
use strict;
use DDG::Goodie;
use Fortune;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Frequency;
# ABSTRACT: Displays frequency of alphabet character (a-z)
use strict;
use DDG::Goodie;
triggers start => 'frequency', 'freq';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::GUID;
# ABSTRACT: Generated a GUID on-demand.
use strict;
use DDG::Goodie;
use Data::GUID;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::GenerateMAC;
# ABSTRACT: generates a random network MAC address
use strict;
use DDG::Goodie;
triggers startend => "generate mac addr",

View File

@ -1,8 +1,7 @@
package DDG::Goodie::GimpCheatSheet;
# ABSTRACT: Some GIMP keyboard and mouse shortcuts
# Adapted from CrontabCheatSheet.pm
use strict;
use DDG::Goodie;
zci answer_type => "gimp_cheat";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::GoldenRatio;
# ABSTRACT: find number related to the given number by the Golden Ratio.
use strict;
use DDG::Goodie;
zci answer_type => "golden_ratio";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::GreatestCommonFactor;
# ABSTRACT: Returns the greatest common factor of the two numbers entered
use strict;
use DDG::Goodie;
zci answer_type => "greatest_common_factor";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::HKDK;
# ABSTRACT: Track a package through HKDK.
use strict;
use DDG::Goodie;
zci is_cached => 1;

View File

@ -2,6 +2,7 @@ package DDG::Goodie::HTMLEntitiesDecode;
# ABSTRACT: Decode HTML Entities.
# HTML Entity Encoding has been moved to a separate module
use strict;
use DDG::Goodie;
use HTML::Entities 'decode_entities';
use Unicode::UCD 'charinfo';

View File

@ -1,9 +1,9 @@
package DDG::Goodie::HTMLEntitiesEncode;
# ABSTRACT: Displays the HTML entity code for the query name.
use DDG::Goodie;
use strict;
use warnings;
use DDG::Goodie;
# '&' and ';' not included in the hash value -- they are added in make_text() and make_html()
my %codes = (

View File

@ -1,6 +1,7 @@
package DDG::Goodie::HelpLine;
# ABSTRACT: Provide localized suicide intervention phone numbers.
use strict;
use DDG::Goodie;
use YAML::XS qw( Load );

View File

@ -2,8 +2,8 @@ package DDG::Goodie::HexToASCII;
# ABSTRACT: Returns the ASCII representaion of a given hexadecimal value. (If printbale of course).
use strict;
use DDG::Goodie;
# Used to restrict long generated outputs
use constant MAX_INPUT_CHARS => 128;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::HexToDec;
# ABSTRACT: Convert hexidecimal to decimal
use strict;
use DDG::Goodie;
use Math::BigInt;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Hiragana;
# ABSTRACT: converts romaji syllables into hiragana
use strict;
use DDG::Goodie;
triggers startend =>'japanese hiragana','hiragana', 'hiragana japanese';
zci answer_type => 'hiragana';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IDN;
# ABSTRACT: Convert domain names from/to Punycode.
use strict;
use DDG::Goodie;
use Net::IDN::Encode ':all';
use utf8;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IPS;
# ABSTRACT: track a package through IPS.
use strict;
use DDG::Goodie;
zci is_cached => 1;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::ISO639;
# ABSTRACT: ISO 639 language names and codes
use strict;
use DDG::Goodie;
use Locale::Language;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IndependenceDay;
# ABSTRACT: Goodie answer for different countries' national independence days
use strict;
use DDG::Goodie;
use JSON;
use utf8;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::TheAdamGalloway;
# ABSTRACT: TheAdamGalloway's first Goodie
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_the_adam_galloway";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::tarun29061990;
# ABSTRACT: tarun29061990's first Goodie
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_tarun29061990";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::thejdeep;
# ABSTRACT: thejdeep's first Goodie !
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_thejdeep";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::valnermedeiros;
# ABSTRACT: valnermedeiros's first Goodie
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_valnermedeiros";

View File

@ -1,5 +1,6 @@
package DDG::Goodie::IsAwesome::vedantham;
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_vedantham";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::watermelonwarrior;
# ABSTRACT: Watermelonwarrior's first Goodie
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_watermelonwarrior";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::xinhhuynh;
# ABSTRACT: xinhhuynh's first goodie.
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_xinhhuynh";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::ymzong;
# ABSTRACT: ymzong's first Goodie!
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_ymzong";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::zekiel;
# ABSTRACT: A simple goodie by zekiel
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_zekiel";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::IsAwesome::zhou;
# ABSTRACT: zhou's first Goodie
use strict;
use DDG::Goodie;
zci answer_type => "is_awesome_zhou";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Jira;
# ABSTRACT: returns the URL of an Apache or Codehaus JIRA bug ticket according to its identifier
use strict;
use DDG::Goodie;
use utf8;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::JsKeycodes;
# ABSTRACT: Give the equivalent JavaScript Keycode.
use strict;
use DDG::Goodie;
triggers any => 'keycode', 'keycodes', 'char', 'chars', 'charcode', 'charcodes';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::KernelTaint;
# ABSTRACT: Parses and explains the OR'd values of /proc/sys/kernel/tainted
use strict;
use DDG::Goodie;
primary_example_queries 'kernel taint 5121', 'kernel taint description 2';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::LaserShip;
# ABSTRACT: Track a package through Lasership
use strict;
use DDG::Goodie;
zci is_cached => 1;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Latex;
# ABSTRACT: Show the Latex command for a keyword
use strict;
use DDG::Goodie;
triggers startend => 'latex', 'tex';

View File

@ -1,8 +1,8 @@
package DDG::Goodie::LeapYear;
# ABSTRACT: Check if a year is leap year
use strict;
use DDG::Goodie;
use Date::Leapyear;
zci answer_type => "leap_year";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::LeetSpeak;
# ABSTRACT: Translate the query into leet speak.
use strict;
use DDG::Goodie;
triggers startend => 'leetspeak', 'l33tsp34k', 'l33t', 'leet speak', 'l33t sp34k';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Loan;
# ABSTRACT: Calculate monthly payment and total interest payment for a conventional mortgage loan
use strict;
use DDG::Goodie;
use Locale::Currency::Format;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Lowercase;
# ABSTRACT: Convert a string into lowercase.
use strict;
use DDG::Goodie;
name "Lowercase";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::MD5;
# ABSTRACT: Calculate the MD5 digest of a string.
use strict;
use utf8;
use DDG::Goodie;
use Digest::MD5 qw(md5_base64 md5_hex);

View File

@ -1,6 +1,7 @@
package DDG::Goodie::MacAddress;
# ABSTRACT: Vendor information lookup for MAC addresses
use strict;
use DDG::Goodie;
zci answer_type => "mac_address";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::MakeMeASandwich;
# ABSTRACT: XKCD #149 Easter Egg
use strict;
use DDG::Goodie;
name 'Make Me A Sandwich';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::MarkdownCheatSheet;
# ABSTRACT: Provide a cheatsheet for common Markdown syntax
use strict;
use DDG::Goodie;
use HTML::Entities;

View File

@ -1,5 +1,6 @@
package DDG::Goodie::Meta;
use strict;
use DDG::Goodie;
triggers start => "///***never trigger***///";

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Minecraft;
# ABSTRACT: Minecraft crafting recipes.
use strict;
use DDG::Goodie;
use JSON;
use utf8;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::MoonPhases;
# ABSTRACT: answer queries for the current phase of the moon.
use strict;
use DDG::Goodie;
use Astro::MoonPhase;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Morse;
# ABSTRACT: Converts to/from Morse code
use strict;
use DDG::Goodie;
use Convert::Morse qw(is_morse as_ascii as_morse);

View File

@ -1,6 +1,7 @@
package DDG::Goodie::NLetterWords;
# ABSTRACT: find words of a certain length
use strict;
use DDG::Goodie;
use Lingua::EN::Numericalize;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::POTUS;
# ABSTRACT: Returns requested President of the United States
use strict;
use DDG::Goodie;
use Lingua::EN::Numbers::Ordinate qw(ordsuf ordinate);
use Lingua::EN::Words2Nums;

View File

@ -2,6 +2,7 @@ package DDG::Goodie::Palindrome;
# ABSTRACT: Return if the a string is a palindrome, formatted requests:
# 'is <string> a[n] palindrome[?]' or 'isPalindrome <string>'
use strict;
use DDG::Goodie;
triggers any => 'palindrome';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Paper;
# ABSTRACT: Return the dimensions of a defined paper size
use strict;
use DDG::Goodie;
use YAML;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Parcelforce;
# ABSTRACT: track a package through Parcelforce.
use strict;
use DDG::Goodie;
zci is_cached => 1;

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Passphrase;
# ABSTRACT: Randomly generate a passphrase with the selected number of words.
use strict;
use DDG::Goodie;
zci answer_type => 'random_passphrase';

View File

@ -1,6 +1,7 @@
package DDG::Goodie::Password;
# ABSTRACT: Generate a random password.
use strict;
use DDG::Goodie;
use List::MoreUtils qw( none );

View File

@ -1,6 +1,7 @@
package DDG::Goodie::PercentError;
# ABSTRACT: find the percent error given accepted and experimental values
use strict;
use DDG::Goodie;
triggers start => "percent error", "% error", "%err", "%error", "percenterror", "percent err", "%-error";

Some files were not shown because too many files have changed in this diff Show More