DDG

 view release on metacpan or  search on metacpan

lib/DDG/Meta/Information.pm  view on Meta::CPAN

package DDG::Meta::Information;
our $AUTHORITY = 'cpan:DDG';
# ABSTRACT: DDG plugin meta information storage
$DDG::Meta::Information::VERSION = '1018';
use strict;
use warnings;
use Carp qw( croak );
use Package::Stash;

require Moo::Role;

my %supported_types = (
	email => [ 'mailto:{{a}}', '{{b}}' ],
	twitter => [ 'https://twitter.com/{{a}}', '@{{b}}' ],
	web => [ '{{a}}', '{{b}}' ],
	github => [ 'https://github.com/{{a}}', '{{b}}' ],
	facebook => [ 'https://facebook.com/{{a}}', '{{b}}' ],
	cpan => [ 'https://metacpan.org/author/{{a}}', '{{a}}' ],
);

my @supported_categories = qw(
	bang
	calculations
	cheat_sheets
	computing_info
	computing_tools
	conversions
	dates
	entertainment
	facts
	finance
	food
	formulas
	forums
	geography
	ids
	language
	location_aware
	physical_properties
	programming
	q/a
	random
	reference
	special
	software
	time_sensitive
	transformations
);

my @supported_topics = qw(
	everyday
	economy_and_finance
        computing
	cryptography
	entertainment
	food_and_drink
	gaming
	geek
	geography
	math
	music
	programming
	science
	social
	special_interest
	sysadmin
	travel
	trivia
	web_design
	words_and_games
);


my %applied;

sub apply_keywords {
	my ( $class, $target ) = @_;

	return if exists $applied{$target};
	$applied{$target} = undef;

	my @attributions;
	my @topics;
	my @primary_example_queries;
	my @secondary_example_queries;
    	my $description;
    	my $source;
	my $icon;
	my $category;
	my $name;
	my $icon_url;
	my $code_url;
	my $status;



( run in 0.824 second using v1.01-cache-2.11-cpan-df04353d9ac )