Starting of reorganisation of zeroclickinfo-goodies to fit v2 of developer API

master
Torsten Raudssus 2012-02-29 04:11:55 +01:00
parent f6c47cd22c
commit 3293d0dffc
6 changed files with 59 additions and 12 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
DDG-*
.build

39
dist.ini Normal file
View File

@ -0,0 +1,39 @@
name = DDG::Goodies::OpenSourceDuckDuckGo
# PLEASE ADD YOURSELF TO THE AUTHOR LIST!!!!
author = Gabriel Weinberg <yegg@duckduckgo.com>
author = Torsten Raudssus <getty@duckduckgo.com>
license = Perl_5
copyright_holder = DuckDuckGo, Inc. L<http://duckduckgo.com/>
copyright_year = 2011
[Prereqs]
[Prereqs / TestRequires]
Test::More = 0.98
Test::Dirs = 0.03
File::Temp = 0.22
[GatherDir]
[PruneCruft]
[ManifestSkip]
[ExtraTests]
[ExecDir]
[ShareDir]
[MakeMaker]
[Manifest]
[TestRelease]
[ConfirmRelease]
[UploadToDuckPAN]
[MetaJSON]
[MetaYAML]
[Git::NextVersion]
version_regexp = ^(.+)$
[PkgVersion]
[PodSyntaxTests]
[GithubMeta]
[Repository]
[EOLTests]
trailing_whitespace = 0
[@Git]
tag_format = %v

12
lib/DDG/Goodie/Reverse.pm Normal file
View File

@ -0,0 +1,12 @@
package DDG::Goodie::Reverse;
# ABSTRACT: Reverse the order of chars in the remainder
use DDG::Goodie;
zci is_cached => 1;
triggers startend => 'reverse';
handle remainder => sub { join('',reverse split(//,$_)) };
1;

View File

@ -0,0 +1,6 @@
package DDG::Goodies::OpenSourceDuckDuckGo;
# ABSTRACT: The open source Goodies of DuckDuckGo
# This package is only a namespace/version holder
1;

View File

@ -1,12 +0,0 @@
# Outputs the query in reverse order.
if (!$type && $q_check =~ m/^reverse (.+)$/i) {
$answer_results = reverse $1;
if ($answer_results) {
$answer_type = 'reverse';
$type = 'E';
}
}