Skip to content

Commit

Permalink
Various code fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Mar 6, 2018
1 parent dd652b6 commit 86c3bc5
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 64 deletions.
118 changes: 57 additions & 61 deletions Build.PL
Expand Up @@ -4,67 +4,63 @@ use warnings;
use Module::Build;

my $build = Module::Build->new(
license => 'perl',
dist_author => 'Dave Cross <dave@mag-sol.com>',
module_name => 'Perlanet',
requires => {
'perl' => '5.6.0',
'Encode' => 0,
'List::Util' => 0,
'URI::Fetch' => 0,
'XML::Feed' => '0.22',
'Template' => 0,
'DateTime' => 0,
'DateTime::Duration' => 0,
'YAML' => 0,
'HTML::Tidy' => 0,
'HTML::Scrubber' => 0,
'Moose' => 0,
'Try::Tiny' => 0,
'MooseX::Traits' => 0,
'namespace::autoclean' => 0,
},
recommends => {
'CHI' => 0,
'Compress::Zlib' => 0,
'XML::OPML::SimpleGen' => 0,
'MooseX::ConfigFromFile' => 0,
},
build_requires => {
'Test::More' => 0,
'File::Path' => 0,
'MooseX::ConfigFromFile' => 0,
'Alien::Tidyp' => 0,
},
build_recommends => {
'Test::Pod' => 0,
'Test::Pod::Coverage' => 0,
},
create_makefile_pl => 'traditional',
script_files => [ 'bin/perlanet' ],
meta_merge => {
resources =>
{
repository => {
type => 'git',
url => 'git://github.com/davorg/perlanet.git',
web => 'https://github.com/davorg/perlanet',
},
homepage => "http://perlanet.mag-sol.com/",
},
keywords =>
[
qw(
aggregate
aggregator
atom
feed
planet
rss
xml
),
],
},
license => 'perl',
dist_author => 'Dave Cross <dave@mag-sol.com>',
module_name => 'Perlanet',
requires => {
'perl' => '5.6.0',
'Encode' => 0,
'List::Util' => 0,
'URI::Fetch' => 0,
'XML::Feed' => '0.22',
'Template' => 0,
'DateTime' => 0,
'DateTime::Duration' => 0,
'YAML' => 0,
'HTML::Tidy' => 0,
'HTML::Scrubber' => 0,
'Moose' => 0,
'Try::Tiny' => 0,
'MooseX::Traits' => 0,
'namespace::autoclean' => 0,
},
recommends => {
'CHI' => 0,
'Compress::Zlib' => 0,
'XML::OPML::SimpleGen' => 0,
'MooseX::ConfigFromFile' => 0,
},
build_requires => {
'Test::More' => 0,
'File::Path' => 0,
'MooseX::ConfigFromFile' => 0,
'Alien::Tidyp' => 0,
},
build_recommends => {
'Test::Pod' => 0,
'Test::Pod::Coverage' => 0,
},
create_makefile_pl => 'traditional',
script_files => [ 'bin/perlanet' ],
meta_merge => {
resources => {
repository => {
type => 'git',
url => 'git://github.com/davorg/perlanet.git',
web => 'https://github.com/davorg/perlanet',
},
homepage => "http://perlanet.mag-sol.com/",
},
keywords => [ qw(
aggregate
aggregator
atom
feed
planet
rss
xml
), ],
},
);

$build->create_build_script;
3 changes: 3 additions & 0 deletions lib/Perlanet.pm
Expand Up @@ -405,6 +405,9 @@ sub run {
$self->render($feed);
}

no Moose;
__PACKAGE__->meta->make_immutable;

=head1 TO DO
See L<http://wiki.github.com/davorg/perlanet/issues>
Expand Down
3 changes: 3 additions & 0 deletions lib/Perlanet/Simple.pm
Expand Up @@ -20,6 +20,9 @@ with qw(
Perlanet::Trait::FeedFile
);

no Moose;
__PACKAGE__->meta->make_immutable;

=head1 NAME
Perlanet::Simple - a DWIM Perlanet
Expand Down
2 changes: 2 additions & 0 deletions t/02_phases.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
use FindBin qw($Bin);
use_ok('Perlanet::Simple');
Expand Down
2 changes: 2 additions & 0 deletions t/03_noconf.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
use FindBin qw($Bin);
use Perlanet::Simple;
Expand Down
2 changes: 2 additions & 0 deletions t/04_mps.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
use FindBin qw($Bin);
use_ok('Perlanet::Simple');
Expand Down
2 changes: 2 additions & 0 deletions t/05_cache.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
use FindBin qw($Bin);
use File::Path;
Expand Down
8 changes: 5 additions & 3 deletions t/06_youtube.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
use FindBin qw($Bin);
use Perlanet::Simple;
Expand All @@ -16,9 +18,9 @@ is($sorted->[4]->modified->ymd, '2017-07-01', 'Last item sorted correctly');

$p = Perlanet::Simple->new_with_config(configfile => 'youtube2rc');

my $feeds = $p->fetch_feeds($p->feeds);
my $selected = $p->select_entries($feeds);
my $sorted = $p->sort_entries($selected);
$feeds = $p->fetch_feeds($p->feeds);
$selected = $p->select_entries($feeds);
$sorted = $p->sort_entries($selected);

is($sorted->[0]->issued->ymd, '2015-04-10', 'First item sorted correctly');
is($sorted->[0]->modified->ymd, '2017-07-02', 'First item sorted correctly');
Expand Down
2 changes: 2 additions & 0 deletions t/pod.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
eval "use Test::Pod 1.00";
plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
Expand Down
2 changes: 2 additions & 0 deletions t/pod_coverage.t
@@ -1,3 +1,5 @@
use strict;
use warnings;
use Test::More;
eval "use Test::Pod::Coverage 1.00";
plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
Expand Down

0 comments on commit 86c3bc5

Please sign in to comment.