dotandimet / mojo-feed Goto Github PK
View Code? Open in Web Editor NEWMojo::DOM based Feed Parser
License: Other
Mojo::DOM based Feed Parser
License: Other
The t/24-plugin.t test fails:
# Failed test 'undef isa 'HASH''
# at t/24-plugin.t line 46.
# undef isn't defined
# Failed test at t/24-plugin.t line 47.
# got: undef
# expected: 'First Weblog'
# Failed test 'undef isa 'HASH''
# at t/24-plugin.t line 52.
# undef isn't defined
# Failed test at t/24-plugin.t line 53.
# got: undef
# expected: 'First Weblog'
# Failed test 'undef isa 'HASH''
# at t/24-plugin.t line 57.
# undef isn't defined
# Failed test 'string ref from body'
# at t/24-plugin.t line 58.
# got: undef
# expected: 'First Weblog'
Mojo::Transaction::success is DEPRECATED in favor of Mojo::Transaction::result and Mojo::Transaction::error at /home/cpansand/.cpan/build/2018110316/Mojo-Feed-0.16-mhgEZe/blib/lib/Mojo/Feed/Reader.pm line 73.
Error getting feed from url http://127.0.0.1:53713/atom.xml: Not Found at /home/cpansand/.cpan/build/2018110316/Mojo-Feed-0.16-mhgEZe/blib/lib/Mojolicious/Plugin/FeedReader.pm line 62.
# Child (parse) exited without calling finalize()
# Failed test 'parse'
# at /usr/perl5.20.1Dp/lib/site_perl/5.20.1/Test/Builder.pm line 279.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 1.
t/24-plugin.t ......
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 1/1 subtests
Statistical analysis suggests that this happens with new Mojolicious version:
****************************************************************
Regression 'mod:Mojolicious'
****************************************************************
Name Theta StdErr T-stat
[0='const'] 1.0000 0.0000 9097471055264232.00
[1='eq_7.57'] 0.0000 0.0000 3.57
[2='eq_7.58'] -0.0000 0.0000 -1.24
[3='eq_7.62'] 0.0000 0.0000 2.06
[4='eq_7.64'] 0.0000 0.0000 0.82
[5='eq_7.65'] 0.0000 0.0000 1.65
[6='eq_7.68'] 0.0000 0.0000 4.29
[7='eq_7.70'] 0.0000 0.0000 4.96
[8='eq_7.71'] -0.0000 0.0000 -0.49
[9='eq_7.72'] 0.0000 0.0000 3.91
[10='eq_7.75'] 0.0000 0.0000 4.37
[11='eq_7.81'] 0.0000 0.0000 1.75
[12='eq_7.83'] 0.0000 0.0000 0.00
[13='eq_7.84'] 0.0000 0.0000 4.37
[14='eq_7.85'] -0.0000 0.0000 -1.65
[15='eq_7.88'] 0.0000 0.0000 0.00
[16='eq_8.0'] -0.0000 0.0000 -2.86
[17='eq_8.03'] -1.0000 0.0000 -7878641044052450.00
[18='eq_8.04'] -1.0000 0.0000 -8674098307939065.00
[19='eq_8.05'] -1.0000 0.0000 -8973690171151438.00
R^2= 1.000, N= 139, K= 20
****************************************************************
Also I see a deprecation warning:
Mojo::Transaction::success is DEPRECATED in favor of Mojo::Transaction::result and Mojo::Transaction::error at /home/cpansand/.cpan/build/2018110316/Mojo-Feed-0.16-mhgEZe/blib/lib/Mojo/Feed/Reader.pm line 73.
It uses =head2 author
from the pod, there's probably a way to force a value in minil.toml ...
Mojo::Feed
and Mojo::Feed::Item
both expose a dom
object, so it should be simple to extract more specialized fields from these objects. It would be nice to allow a simple extension mechanism for this.
Both Mojo::Feed
and Mojo::Feed::Item
derive from Mojo::Base
, so we can use roles to extend their functionality. I added a simple role example, with a method that returns the type of a feed:
https://github.com/dotandimet/Mojo-Feed/blob/master/examples/extending.pl
However, there are complications. To extend Mojo::Feed::item
, you need to override items
in Mojo::Feed
; to smoothly extend Mojo::Feed
, you need to modify the internals of Mojo::Feed::Reader
.
Or we could make all these classes injectable (ie, Mojo::Feed
has item_class => 'Mojo::Feed::Item';
, etc)
@mdom said:
why not just add type to Mojo::Feed? I would even go so far and add all attributes mentioned in the spec. That shouldn't be too much work and have a negligent runtime cost. And even if we worry about that, we could just use a specialised import list to generate a minimal set of accessors or an extended list. I would love to use atoms expired to save updating feeds if they run their course. :)
I say, +1.
The load method in Mojo::Feed should probably absorb the logic that's currently in the discover method in Mojo::Feed::Reader
The test suite started to fail:
Can't locate object method "delay" via package "Mojo::IOLoop" at t/24-plugin.t line 77.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 255 just after 1.
t/24-plugin.t ...............
Dubious, test returned 255 (wstat 65280, 0xff00)
All 1 subtests passed
Statistical analysis suggests that this problem is caused by Mojolicious 9.x:
****************************************************************
Regression 'mod:Mojolicious'
****************************************************************
Name Theta StdErr T-stat
[0='const'] 1.0000 0.0581 17.20
[1='eq_8.12'] 0.0000 0.0712 0.00
[2='eq_8.17'] 0.0000 0.0822 0.00
[3='eq_8.26'] 0.0000 0.0822 0.00
[4='eq_8.40'] -1.0000 0.0822 -12.17
[5='eq_8.41'] -0.5000 0.0712 -7.02
[6='eq_8.43'] 0.0000 0.0822 0.00
[7='eq_8.51'] 0.0000 0.0621 0.00
[8='eq_8.52'] 0.0000 0.0650 0.00
[9='eq_8.55'] 0.0000 0.0822 0.00
[10='eq_8.56'] 0.0000 0.0602 0.00
[11='eq_8.57'] 0.0000 0.0587 0.00
[12='eq_9.0'] -1.0000 0.0650 -15.39
[13='eq_9.01'] -1.0000 0.0593 -16.86
[14='eq_9.02'] -1.0000 0.0587 -17.03
R^2= 0.988, N= 163, K= 15
****************************************************************
Hi, as discussed in pull request #1, it's probably a good idea to split Mojo::Feed in two seperate package. I had some time and started a mojo_feed_reader branch. The branch may not pass test or even work at all, as my commits are more dictated by family life than code milestones. Sorry for that.
The old plugin code should be adapted to use Mojo::Feed::Reader, and incorporated into this module with its relevant tests.
I've started work on this, but haven't pushed the branch
Requested by @mohawk2 - add the ability to modify and create feeds (in Atom 1 and RSS 2 format).
Write documention for Mojo::Feed::Item::Enclosure
. Feel free to assign that to me... :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.