Well this is a bit embarrassing. My script to tell me the date of the first CPAN/PAUSE upload told me the 16th August, but somehow when writing the first post about it, I changed the date to the 14th. Doh.
The good news is that 16th August is a Saturday this year, which gives us all a better chance at uploading a release or two. And two more days to prepare.
I've updated the previous posts, and regenerated the charts.
This is a slightly expanded version of a comment I posted a couple of days ago on NEILB's blog.
Neil was mostly talking about private functions, while I'll be talking mostly about private methods (i.e. object-oriented programming), but I think there's probably a good deal of overlap between the two concepts.
The traditional way of indicating a method is private is to name it with a leading underscore:
The assumption is even baked into the Perl development and testing toolchain in a few places. For example Pod::Coverage won't complain about missing documentation for a sub if that sub happens to be named with a leading underscore.
I used to think the underscore convention was good enough. But partly because of this upcoming project and partly because of problems I've encountered working on various codebases, I've been forced to re-evaluate my thinking, and have come to the conclusion that the underscore convention is insufficient.
Recently I encountered an issue with
Expect.pm
on OSX. I think it is caused by a bug in
IO::Pty
(Expect.pm is a subclass of IO::Pty) and thus filed a
bug report there
. I even created a test-case and released an
unofficial version of Expect.pm
with a
test
exposing the problem.
Today, thanks to the countless CPAN smokers of BinGOs (aka Chris Williams) I got the first test reports that indicate the same problem exists on OpenBSD and NetBSD as well. (Surprisingly, there are no reports at all on FreeBSD and OSX!)
As I don't have any knowledge of BSDs and this IO::Pty stuff, I wonder if there is anyone out there with such expertise? Could you look into this issue?
The SEE ALSO section in your module's pod is where you direct the reader to other things of interest. In this post I'll briefly outline what constitutes a good SEE ALSO, and why it benefits you to create one.
My thoughts on this topic have evolved over time, and in writing this I've realised that a lot of my modules could do with a brush up. I'll be releasing those on CPAN Day, of course :-)
YAPC::EU is a great place to meet face to face with others in the community that share your interests, even non-Perl ones. To make it easier for you organise these informal gatherings - known as BoFs - we have created a page on the wiki.
Fancy getting together to watch the premier of the new season of Dr Who, going for a run, or discussing the future of Act (A Conference Toolkit? Then sign-up now!
If none of the current BoFs interest you then please feel free to make your own suggestions for a meet-up on the wiki and help us make the conference even better.
Race conditions are a fact of life. What can we do when one knocks upon our door?
Often we mark race conditions that are not immediately solvable with a comment:
if (!-l $config && -f _ && -r _) {
# RACE! config file could go away, change type, or become unreadable between file test and file read
open my $fh, '<', $config …
…
That is good so that future us can be easily reminded of the issue. It is really hard/impossible to debug or test the various possible race conditions though.
Race::Condition gives us a way to still mark the race condition but also adds in the ability to hook into it for debugging or testing purposes.
Once in a while, I search the web for Perl/Tk. I'm always happy to find some old jewels. This time, it was keen little rabbit ears, which is a simple ear training program for Linux and Windows. It has a Perl/Tk GUI and comes with good installation instructions.
I downloaded the script, got the dependencies (it relies on timidity to play MIDI files) and tried it out. Then I did some changes, like use FindBin to locate files relatively to the script in the file system, use File::Spec to build paths, and use File::Temp to create the temporary MIDI file for timidity in a proper place.
But, then I wanted to share the code with Matthias Nutt, the original author. He has a web site: matthias-nutt.no-limit.de. But the feedback form is dead (have a look at the anti-spam picture).
So, does anybody know Matthias Nutt? Or: does anybody know how to handle this kind of code? Can I set up a git repo with the new code without risking expensive lawsuits?
If the abstract for your module is up to snuff, then have a look at the SYNOPSIS to see whether you could improve that in a CPAN Day release. The SYNOPSIS should briefly show typical usage of the headline features of your module.
Most Perl programmers using named captures in regex probably pick the (?<NAME>...) syntax, as that's what's displayed more prominently in the Perl documentation and tutorials.
However, Python does not support this syntax and uses (?P<NAME>...) instead (notice the extra P character). Incidentally, visual regex tool like kiki is built with Python and only support this syntax.
(?P<NAME>...) is also supported by Perl. So if you work with Python or use kiki, you might, like me, want to accustom yourself to using the P syntax.
PCRE (and thus PHP and other PCRE-using languages) supports both syntax. Komodo IDE's Rx toolkit support both. However, Ruby and .NET only support the non-P syntax. Well, that's how the real world works.
Without even speculating by what kind of dedication/witchcraft this number is even possible, it made me curious about stats in general for GitHub, and some googling turned up this page:
This is a report of the “Most Active” 256 GitHub users. Well, not quite… The current number 1 on the list has HALF the contribs (kevinsawicki at “11,430”).
kentfredric doesn’t show up because of this second caveat: "Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search.
I have app which do some stuff via HTTP/HTTPS. Here it is, already posted about it on blogs.perl.org
There is simple logic:
1) Use http. If user wants https, use https but check that LWP version >= 6 AND LWP::UserAgent->is_protocol_supported("https")
2) Retry HTTP 500 server errors. There can be a lot (coming from server, it's normal)
3) Retry HTTP 500 errors with Client-Warning=Internal response (LWP could raise this in case of conenction problem and socket timeout) with warning "connection problem"
So now I got two reports at once that everything completely broken and HTTPS does not work.
After some investigation I found that:
LWP 6.00 and 6.01:
1) ship LWP::Protocol::https as part of LWP::UserAgent distr, not a separate dist.
2) Do not ship and depend on Mozilla::CA. Instead there is note in docs:
If you're looking for something to release on CPAN day, check the abstract for your modules, and make sure they have a good abstract. The abstract should not only be compliant pod, but should succinctly describe what your module does. The name and abstract are often the first thing that potential users see, so make them count.
We've tried our hardest to balance the wealth of topics that our lovely speakers have proposed. But please let us know if you notice any issues with scheduling, as we will be fine-tuning this over the next weeks.
The final dependency for Dezi has been released as Dezi::App on CPAN. In addition Search::OpenSearch::Engine::Lucy 0.400 has been released which supports Dezi::App.
This module is a drop-in replacement for the venerable Getopt::Long. Most of the time, you should be able to take your existing script which uses Getopt::Long, replace the use statement use Getopt::Long; with use Getopt::Long::Complete and suddenly your script supports tab completion.
How many releases were done on previous CPAN Days? I know you've been dying to find out, so here are a few graphs, and I'll also compare with the top days in CPAN history. If 100 people each do one release on this coming CPAN Day (16th August, UTC), then it'd be the best CPAN Day yet. If between us we manager 151 releases, that would be the highest day ever.
CPAN and PAUSE record their timestamps in UTC, as all sane systems do. So if you're planning to release on CPAN, please take that into consideration.
There’s only one month left until YAPC::Europe 2014. The conference takes place on the 22nd - 24th of August in Sofia, Bulgaria.
We’ve done our best to keep the cost of the conference low and if you still haven’t bought a ticket - don’t delay, buy it today!
Regular price 99 EUR
Student price 60 EUR
Business price 500 EUR
Bulgaria, Romania, Macedonia, Serbia and Baltic states(proof of citizenship is required)
Regular price 60 EUR
Student price 35 EUR (student card is required)
Once you’ve bought your ticket remember to take a look at the scheduled talks and “star” the ones you’re planning on attending. The finalised schedule will be ready by the 1st August.
I started a new job. One that requires me to leave the house on a regular basis. And talk to people in the day time, in person. In fact I'm finding it not much different to normal. It seems that instant message is the first line of communication, and people will come and talk to you if you have mutual cycles available at the time. Plus there's a contingent of remote staff, so IM is still important.
When you have IM communication between programmers, you need a pastebin as well. The new guys are using bitbucket that doesn't have that facility, and I wasn't happy with suggesting using a public pastebot. So here's something that does the job. I don't think it's ideal but it achieves 90% of the job in a tiny amount of time.
I'm writing a Dancer2 web application which contains configuration (config.yml, development.yml, production.yml, and-so-on.xml), application data (js, css, templates) and application binary (Perl bootstrapper, Perl tools) parts.
Usualy a web distribution is installed via extracting a ZIP file and there you have your e.g. /public, /environments, /lib and /bin. You start your web application with perl ./bin/app.pl or similar.
What I currently think about is to actual install a Dancer2 web application like normal (linux/unix) applications would do. So /public would end up at /usr/share/mydist/public, /views would be /usr/share/mydist/views, /environments including /config.yml are located at /etc/mydist/environments and /etc/mydist/config.yml. /logs moved to /var/log/mydist and /lib is system wide installed like you install a normal dist with cpan. Scripts in /bin would "installed" to /usr/bin
Assuming I use Dist::Zilla to create dists how could I achieve this?
I remember there was a previous discussion about installing web application with CPAN but I can't find it anymore. Neither - IIRC - was the discussion concluded.