Perhaps you don't think very much about what that bareword Int is actually doing. Well, it's a function that returns a blessed object. This object is used by Moose to check whether values are integers. Yes, Moose uses the object, and you can use it too!
On request of Neil Bowers i pushed this release back a day, so now on CPAN Day in 2014 the first update of PPI in 3.5 years has been released to CPAN and will be available on a mirror near you soon.
Since the release candidate only minor changes affecting the release process itself have been made.
The change log has a detailed listing and the git repository is even more detailed (it even has tags if you clone it). That said, the summary of the changes is:
a number of fixes to how Perl is parsed, notably around the x operator and some case sensitivity
many speed optimizations, allowing PPI to parse big files in reasonable time
My project for CPAN Day has been to pull together a history of CPAN:
How it was started, and by whom
The other services that make up the CPAN ecosystem
The key modules that have helped shape CPAN
In best CPAN tradition, this is the work of dozens of people, who patiently responded to my pestering via email over the last few weeks. Thanks to everyone who helped get it to this point.
To celebrate CPAN Day, NEILB and BOOK are proud to announce a new CPAN-related site,
specifically targetted towards playing with CPAN (with the underlying goal of improving it).
Please join us in celebrating the first the day of cpan.io!
The site is rather empty now, but we have grand plans for it. Come play the CPAN game with us, fork cpan.io on github and send us patches and feature requests.
Though that example isn't especially useful. Do you remember Venn diagrammes? Intersections are that small overlapping section in the middle. So the value for foo needs to be something that is simultaneously an arrayref and a hashref. (Which no value could satisfy.)
But there are ways intersections can be used more usefully.
Lately there has been a buzz of activity in the Test-More project (Test::More, Test::Simple, Test::Builder). In fact, it is safe to say that very little code has gone untouched in this process. We are currently on the 34th alpha release of the new Test::Builder, and I wanted to take a moment to discuss the things that are happening!
This is the first of several blog posts that will cover the changes to Test::Builder. This one covers the "why".
Why are things changing? The simple answer of course is "Testing". A more helpful answer is this: Test::Builder is the de facto standard when you go to write a test. Just about any testing tool you use will rely on Test::Builder under the hood. The problem though, is that testing your testing tools is still somewhat archaic.
Currently, if you want to test a test library, you have two choices:
Test::Builder::Tester
Test::Tester
While I know many of you have CPAN Day projects, some of you might still be searching. There is a very well known benchmark from TechEmpower which compares web frameworks. It gets plenty of press and generates much interest. Unfortunately, the Perl results look like this:
We all know the reputation that Perl has to the outside world, and sadly these results would tend to reinforce it. The person or persons who added these apps seems to have long since forgotten about them. At least the Mojolicious app was a port of one of the others and did not exemplify either the style or power of the framework. The others likely share those traits.
But all is not lost! TechEmpower has recently made it much easier to contribute, and I have fixed the deployment and toolchain problems. I have also updated the Mojolicious app. Would you like to improve the submission of your favorite framework or add your own? Read on!
CPAN Day (August 16th, UTC) is nearly here. Someone asked me what the goals are,
if any, for CPAN Day. When BOOK came up with the idea, we both
thought it was an opportunity to celebrate CPAN, but also a chance
to reflect on how we got here, and to think about how we can keep
driving it forward.
I also saw it as an opportunity to bang on my curation drum —
give everyone ideas for how they might improve their distributions,
or those of others, and in doing so improve the overall quality of CPAN.
CPAN was created by us, for us, so do whatever feels right to you.
If you do something for CPAN Day,
please tweet about it with the #cpanday hashtag.
It's been almost 17 months, and over 160 releases to get there, but Type-Tiny 1.000000 has been released on CPAN Day 2014.
Type-Tiny is a framework for type constraints and coercions. It can be used for isa checks in Moose, Mouse, and Moo attributes, function parameter checking, and so on. It's already used by over a hundred CPAN distributions.
Over the next few days I'll be posting some tips and tricks explaining some Type-Tiny features that you may find useful.
Oslo Perl Mongers are organizing a CPAN Day event! \o/
Tomorrow (Saturday August 16th 2014), we’ll be hanging out at the Hackeriet (Norwegian for “The Hackery”) hackerspace, helping anyone dropping by with CPAN and Perl issues they may have!
We can help with…
Getting your modules published
Sign up for PAUSE
Answering your Perl quesions, of any difficulty!
Telling about Perl and CPAN best practices
Show how to create a CPAN distribution
Help toubleshooting module deployment and installation issues
Offer therapy, constructive criticism or Real Help for anyone struggling with Perl or CPAN
Hang out and have fun!
We’ll have Club Mate in the fridge (unless it’s sold out) and even a short presentation about CPAN and Perl module basics, courtesy Arne Sommer.
In addition to perlpolls.com and perlsurveys.com I just found out that the domain
perlprogramming.org
is also about to expire. As I don't want to pay for these any more I'll let all of these expire.
If you have an idea what to do with any of these domains, please let me know and I'd be glad to transfer the ownership to you instead of letting random people register them after they expire.
Travis is a continuous integration (CI) platform for github users,
which is free to use.
You can set it up so that
every time you push one of your CPAN distributions to github,
Travis will test it against different versions of Perl.
I've only just started playing with Travis, but I can already see
benefits for using it in parallel with CPAN Testers.
Why not give it a go on CPAN Day? :-)
Just a quick reminder that noted perl luminary brian d foy will be at Chicago Perl Mongers tonight. He will be running his Become a CPAN Author Workshop which is a great way to start contributing to this famous repository. So if you have wanted to start playing with CPAN or you just want to meet brian then come on over! It is free as in beer AND there will be free beer!
Some time later a RESTful interface was needed so I added RESTful controllers using Catalyst::Controller::REST
But that broke Plack::Middleware::CSRFBlock, because the REST calls don't request a form and thus cannot add the secure token to POST requests.
Thinking about a solution it dawned on my that having a single App serving HTML and RESTful requests is probably a bad design choice.
Thankfully most of my business logic is in my DBIx::Class schema so splitting up one Catalyst App into two Catalyst Apps under the same namespace shouldn't be much of a problem.
Let's call the old App 'MyApp'. I wanted the new Apps to be named 'MyApp::Web::HTML' and 'MyApp::Web::API'
First part was to create lib/MyApp/Web/API and lib/MyApp/Web/HTML folders and moving as much components (Controllers/Views/Forms) there as possible. This part meant quite some renaming of file and package names. Your IDE can be quite helpful with that.
It's a good idea to specify the minimum Perl version required by your distribution. It's useful information for people looking at your code, it's helpful for CPAN Testers (which will report NA for old perls, rather than failing), and it makes the requirement clear to people who are trying to install your module on an older Perl.
Don't you just hate it? You've finished reading, again, that blog entry about database design and you're feeling that you can design something reasonable, and then you see this table:
EmployeeID|
SalesPerson|
SalesOffice|
OfficeNumber|
Customer1|
Customer2|
Customer3
1003
Mary Smith
Chicago
312-555-1212
Ford
GM
1004
John Hunt
New York
212-555-1212
Dell
HP
Apple
1005
Martin Hap
Chicago
312-555-1212
Boeing
You can easily see that Customer1, Customer2, and Customer3 are wrong, but what about the rest? Try as you might, you can't quite put all of the rules together that easily to figure out what's wrong with the above table.
There's a shortcut, though, and it makes it very easy to start understanding database design.
Sawyer X, one of the most prolific Dancer core developer and excellent
presenter, is attending the Perl::Dancer conference.
He is going to be in charge of the first training day, with the help
of other presenters.
Also, Sawyer X will also give presentations on the main conference days
on Wednesday and Thursday. He'll be around to answer your questions
about Dancer during these days.
Thanks to Booking.com for sponsoring the event and Sawyer X being there.
If your CPAN distributions aren't already on github, then I think you should consider adding them. Github is the most popular code hosting service, so it's the first place many people will look for your code.
If your distributions are on github, it makes it a lot easier for people to submit changes (like bug fixes) via pull requests. And if it's easier, it's more likely that people will.
If you do add your dists to github, then you should make sure that you give the repo in the dist's metadata and the documentation too.