By Karjala
on
May 29, 2014 10:44 PM
Hi people.
I just developed perlmodules.net, a website that can be of use to Perl developers.
Say you’re a Perl developer working on a project that depends on a number of modules from CPAN. Or you’re maintaining a module on CPAN with any number of dependencies.
You need to know when one of your dependencies’ interface changes (because then you should have your module updated as well), and you’d like to be notified when a new and exciting feature arrive to your dependencies, because you might want to use it.
Then PerlModules.net could be just what you need. It will notify you (through an RSS feed) whenever one of your dependencies has a new version that’s come out. The new item in the RSS feed will contain the new lines from the module’s Changes file. You can pass this RSS feed to an RSS-to-Email service, such as Feed My Inbox, to get email alerts as well.
If you login to the site, you can then also create your own private RSS feed that consists of all the modules that interest you. So you only need to add one feed to your RSS reader.
PerlModules.net needs your feedback. Either start using it, or please tell me what should be added / changed.
It is a Mojolicious site, and is free to use.
Well back on the Moose path again and today a little post on my next test for my first little Moosex. Like I said in my last post I like my tests to be simple and functional.
I did have look at the test suite for MooseX-AuthorizedMethods and for me it was a little too Mooseish fro my tastes, I guess he was very keen on testing to see if bits of Moose worked rather than focusing on the functionality of the modual. For example I did not see test of using a Custom Verifiers at least one that I could figure out. Like I said in a previous post, one of those would been nice.
So lets just stick with the basic functionality no need I think to get into all the Moose side of stuff with the meta etc.
So I start with
#!perl -T
use Test::More tests => 1;
use Test::Moose::More;
use_ok('MooseX::AuthorizedMethodRoles');
This is a blog about a new documentation project for Catalyst, and its cross posted from my personal blog:
Perl Catalyst - Concepts, Components and (use) Cases.
Thanks!
jnap
mop provide class, extends, and method keyword to perl. but I think these keyword should be independent from mop because these keyword is useful for non-mop modules.
I opposite only mop use these keywords. I hope these keyword is used for other modules the keywords need.
For example, current hash based module is rewrite in the following way.
Before:
package Point3D;
use Object::Simple -base => 'Point';
has z => 1;
sub clear {
my $self = shift;
...
}
After:
use Object::Simple::Syntax;
class Point3D extends Point {
has x => 1;
method clear {
...
}
}
I think class, extends, and method keyword is not for only meta-object protocol. I think these keyword should be designed for hash-based object.
Hash based object is current perl major implementation of Object-Oriented program. New syntax should help hash based object, not only mop.
Well one of those days again,

well not that bad just a little frustrating and not very productive for about 3 hours of time.
Was playing about with Test-WWW-Selenium and going at it great guns after about a four year absence since I had to use Test::WWW::Mechanize in the last place I worked that was doing a little testing, Needless to say I was just a little rusty in my Selenium skills and I didn't have my code base from when I used it last but I was glad to see one can get the Selenium server running headless on ubuntu.
So I get into the programming swing of things and the I get stuck. I have to test all the links on a page to make sure there are no bad ones. So easy I remeber how to do that just
my @links = $agent->get_all_links();
and to my surprise when I dump the @links I get
$var=['',
'',
'',
...
During Polish Perl Workshop 2014 Carl M?sak showed us how to model Feline Hotel application.
But he forgot one thing - that cats own the Internet and they want to browse and reserve rooms online!
I will pick up where he left off and show you how to publish API and go live in a blink of an eye.
So let's create modern Feline Hotel in Perl 6!
class FelineHotel;
has %!rooms =
403 => {
'type' => 'Standard',
'equipment' => [ 'bed', 'bowl' ],
'price' => 64,
'available' => True,
},
406 => {
'type' => 'Purrific',
'equipment' => [ 'bed', 'bowl', 'toys', 'jacuzzi' ],
'price' => 128,
'available' => True
};
method browse_rooms ( ) {
return %!rooms.grep( { .value{ 'available' } } ).hash;
}
method reserve_room ( Str $name!, Int $number! ) {
self!check_room( $number );
return not %!rooms{ $number }{ 'available' } = False;
}
method !check_room ( Int $number ) {
die 'No such room'
unless %!rooms{ $number }:exists;
die 'Room not available'
unless %!rooms{ $number }{ 'available' };
}
Someone started using Test::Pretty and now I can't run tests. I get:
GraphViz2::Marpa: Start ... # $Test::Builder::Level is invalid. Testing library you are using is broken. : 2 at /home/ron/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Test/Version.pm line 134.
Googling didn't help.
I've run cpanm on a range of modules:
o Test::Pretty
o Test::More
o Test::Version
o Test::Exception
o TryCatch
Any ideas?
Well reaching the end of the road here now that I did my code review I think it is now about time I sit down and write up my first .t files for my Moosex.
I always think it is best to keep your tests simple and small, but not too small so I usually use Test::More as that give me just a few dependencies but a good load of extras. I am also little old school with my testing style as I like the good old numbered and named test that cover only one part of functionality.
So to start off I am going to start with good old 00-load.t
#!perl -T
use Test::More tests => 1;
use_ok('MooseX::AuthorizedMethodRoles');
and I give it a go
D:\Blogs\Moosex-AuthorizedMethodRoles\t\00-Load.t ..
1..1
ok 1 - use MooseX::AuthorizedMethodRoles;
ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.02 usr + 0.03 sys = 0.05 CPU)
Result: PASS