Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
purge windows carriage returns
Browse files Browse the repository at this point in the history
grep -rl $'\r' * | xargs dos2unix
  • Loading branch information
majuscule committed Jan 29, 2013
1 parent 28eca9a commit ab8bf95
Show file tree
Hide file tree
Showing 11 changed files with 1,076 additions and 1,076 deletions.
14 changes: 7 additions & 7 deletions docs/test.pod
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
34 changes: 17 additions & 17 deletions lib/DDG/Block/Blockable/Any.pm
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;
74 changes: 37 additions & 37 deletions lib/DDG/Language.pm
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;
80 changes: 40 additions & 40 deletions lib/DDG/Location.pm
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;
24 changes: 12 additions & 12 deletions lib/DDG/Manual.pod
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>

Loading

0 comments on commit ab8bf95

Please sign in to comment.