This repository has been archived by the owner on Oct 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
grep -rl $'\r' * | xargs dos2unix
- Loading branch information
Showing
11 changed files
with
1,076 additions
and
1,076 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
=head1 TEST | ||
=begin html | ||
<img src="https://raw.github.com/duckduckgo/duckduckgo/master/docs/ddg_request.png" alt="The big picture of DDG::Request" /> | ||
=end html | ||
=head1 TEST | ||
|
||
=begin html | ||
|
||
<img src="https://raw.github.com/duckduckgo/duckduckgo/master/docs/ddg_request.png" alt="The big picture of DDG::Request" /> | ||
|
||
=end html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
package DDG::Block::Blockable::Any; | ||
# ABSTRACT: Role for something blockable that has no triggers | ||
|
||
use Moo::Role; | ||
|
||
with 'DDG::Block::Blockable'; | ||
|
||
sub get_triggers {} | ||
sub triggers {} | ||
|
||
sub has_triggers { 0 } | ||
sub triggers_block_type { 'Any' } | ||
|
||
=head1 DESCRIPTION | ||
=cut | ||
|
||
package DDG::Block::Blockable::Any; | ||
# ABSTRACT: Role for something blockable that has no triggers | ||
|
||
use Moo::Role; | ||
|
||
with 'DDG::Block::Blockable'; | ||
|
||
sub get_triggers {} | ||
sub triggers {} | ||
|
||
sub has_triggers { 0 } | ||
sub triggers_block_type { 'Any' } | ||
|
||
=head1 DESCRIPTION | ||
=cut | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,38 @@ | ||
package DDG::Language; | ||
# ABSTRACT: A language, can be empty [TODO] | ||
|
||
use Moo; | ||
|
||
my @language_attributes = qw( | ||
flagicon | ||
flag_url | ||
name_in_local | ||
rtl | ||
locale | ||
nplurals | ||
name_in_english | ||
); | ||
|
||
# 'en_US' => { | ||
# 'flagicon' => 'us', | ||
# 'flag_url' => 'https://duckduckgo.com/f2/us.png', | ||
# 'name_in_local' => 'English of United States', | ||
# -'translation_count' => 24, | ||
# -'percent' => '24', | ||
# 'rtl' => 0, | ||
# 'locale' => 'en_US', | ||
# 'nplurals' => 2, | ||
# 'name_in_english' => 'English of United States' | ||
# }, | ||
|
||
has $_ => ( | ||
is => 'ro', | ||
default => sub { '' } | ||
) for (@language_attributes); | ||
|
||
use overload '""' => sub { | ||
my $self = shift; | ||
return $self->locale; | ||
}, fallback => 1; | ||
|
||
package DDG::Language; | ||
# ABSTRACT: A language, can be empty [TODO] | ||
|
||
use Moo; | ||
|
||
my @language_attributes = qw( | ||
flagicon | ||
flag_url | ||
name_in_local | ||
rtl | ||
locale | ||
nplurals | ||
name_in_english | ||
); | ||
|
||
# 'en_US' => { | ||
# 'flagicon' => 'us', | ||
# 'flag_url' => 'https://duckduckgo.com/f2/us.png', | ||
# 'name_in_local' => 'English of United States', | ||
# -'translation_count' => 24, | ||
# -'percent' => '24', | ||
# 'rtl' => 0, | ||
# 'locale' => 'en_US', | ||
# 'nplurals' => 2, | ||
# 'name_in_english' => 'English of United States' | ||
# }, | ||
|
||
has $_ => ( | ||
is => 'ro', | ||
default => sub { '' } | ||
) for (@language_attributes); | ||
|
||
use overload '""' => sub { | ||
my $self = shift; | ||
return $self->locale; | ||
}, fallback => 1; | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,41 @@ | ||
package DDG::Location; | ||
# ABSTRACT: A location, can be empty (given by Geo::IP::Record) | ||
|
||
use Moo; | ||
|
||
my @geo_ip_record_attrs = qw( country_code country_code3 country_name region | ||
region_name city postal_code latitude longitude time_zone area_code | ||
continent_code metro_code ); | ||
|
||
sub new_from_geo_ip_record { | ||
my ( $class, $geo_ip_record ) = @_; | ||
if ($geo_ip_record) { | ||
my %args; | ||
for (@geo_ip_record_attrs) { | ||
$args{$_} = $geo_ip_record->$_ if defined $geo_ip_record->$_; | ||
} | ||
return $class->new( | ||
geo_ip_record => $geo_ip_record, | ||
%args, | ||
); | ||
} else { | ||
return $class->new; | ||
} | ||
} | ||
|
||
has $_ => ( | ||
is => 'ro', | ||
default => sub { '' } | ||
) for (@geo_ip_record_attrs); | ||
|
||
has geo_ip_record => ( | ||
is => 'ro', | ||
predicate => 'has_geo_ip_record', | ||
); | ||
|
||
use overload '""' => sub { | ||
my $self = shift; | ||
return $self->country_code; | ||
}, fallback => 1; | ||
|
||
package DDG::Location; | ||
# ABSTRACT: A location, can be empty (given by Geo::IP::Record) | ||
|
||
use Moo; | ||
|
||
my @geo_ip_record_attrs = qw( country_code country_code3 country_name region | ||
region_name city postal_code latitude longitude time_zone area_code | ||
continent_code metro_code ); | ||
|
||
sub new_from_geo_ip_record { | ||
my ( $class, $geo_ip_record ) = @_; | ||
if ($geo_ip_record) { | ||
my %args; | ||
for (@geo_ip_record_attrs) { | ||
$args{$_} = $geo_ip_record->$_ if defined $geo_ip_record->$_; | ||
} | ||
return $class->new( | ||
geo_ip_record => $geo_ip_record, | ||
%args, | ||
); | ||
} else { | ||
return $class->new; | ||
} | ||
} | ||
|
||
has $_ => ( | ||
is => 'ro', | ||
default => sub { '' } | ||
) for (@geo_ip_record_attrs); | ||
|
||
has geo_ip_record => ( | ||
is => 'ro', | ||
predicate => 'has_geo_ip_record', | ||
); | ||
|
||
use overload '""' => sub { | ||
my $self = shift; | ||
return $self->country_code; | ||
}, fallback => 1; | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
# PODNAME: DDG::Manual | ||
=head1 NAME | ||
DDG::Manual - Overview of opensource documentations of DuckDuckGo | ||
=head1 GENERAL TOPICS | ||
* L<Overview of our translation system|DDG::Manual::Translation> | ||
* L<Overview of DuckPAN|DDG::Manual::DuckPAN> B<TODO> | ||
# PODNAME: DDG::Manual | ||
|
||
=head1 NAME | ||
|
||
DDG::Manual - Overview of opensource documentations of DuckDuckGo | ||
|
||
=head1 GENERAL TOPICS | ||
|
||
* L<Overview of our translation system|DDG::Manual::Translation> | ||
|
||
* L<Overview of DuckPAN|DDG::Manual::DuckPAN> B<TODO> | ||
|
Oops, something went wrong.