Developers and admins who are new to Perl might wonder how they can install one of the 18.000 available Perl Modules from http://search.cpan.org.
One of the many ways to do this is to call the CPAN shell from the Unix command line, like so:
cpan Modern::Perl
You could also go and give the cpan command a list of modules that you like to install:
cpan Modern::Perl DBI YAML JSON::XS
However, if you just type in "cpan" you start the interactive CPAN shell, where you can install a module by typing:
install Modern::Perl
If you just type in “i Modern::Perl” you get just some information about the module.
The CPAN shell downloads the archive into your ~/.cpan/build directory and extracts the content there. If the module can not be installed because tests are failing, you could go into that directory and do a
perl Makefile.PL
make
make test
make install
by hand and eventually fix the problem that caused the tests to fail - or just force to install the module and ignore the tests if you know what you’re doing.
A new version of xml_grep2, packaged as App::xml_grep2 is coming to a CPAN near you. This time with extra goodness: the --XL option, which uses XML::Liberal to parse even broken XML.
If you have ideas about other useful options, please let me know.
Note: I actually wrote this on my personal blog a couple weeks ago, but it’s perfect for blogs.perl.org!
The FFmpeg::Command Perl module is a convenient way to drive the ffmpeg command-line utility for converting multimedia files.
For work, I have developed some scripts that make heavy use of FFmpeg::Command. Yesterday, one of the other developers told me they need a conversion script to be able to merge separate video and audio streams into one file that contains both audio and video. The ffmpeg command-line utility can do this by accepting more than one input file. For example:
The FFmpeg::Command Perl module, however, assumed there can only be one input file. I made the necessary changes to the module code so that it would accept multiple input files, created a patch file, and sent it to the Module owner Gosuke Miyashita. This morning, I received e-mail from Gosuke thanking me for the patch and informing me that he has uploaded a new version (v0.12) of FFmpeg::Command to CPAN.
Just a quick note to let everyone know I have abandoned my use.perl.org journal. If I get ambitious, I will write some code to pull everything over there to over here.
I'm crawling out of the rock I've been hiding under for the last months to write my first post here and to (again) proclaim the huge grand-ness of git.
My use case today: A week ago I fixed a rather small bug in a branch that has not been merged into master. Today I stumbled over the same bug in another branch and of course remembered that I fixed the problem already.
so:
git co master
git log -Sinit_job # gives me a306cfc = the commit that fixed the bug
git co the-branch-I'm-currently-working-on
git cherry-pick a306cfc
done!
And now I have to go back to not spend time on the lovely Perl community...
You ever have days when you can't stop giggling? As an ex-COBOL programmer, I laughed out loud at the idea of object-oriented COBOL. Today I'm giggling at a paper entitled What does aspect-oriented programming mean to Cobol? (PDF). I can tell you want it means, but this should be a family-friendly blog. AOP was another way to get around the limitations of inheritance, but I think it's fundamentally broken. Applying a fundamentally broken technology to an obsolete (yet needed) technology just leaves me in a fit of giggles.
I have visions of COBOL programmers screaming "we're relevant, honestly", but no one hearing them. They're only relevant because there's so much legacy code out there written in COBOL. We've no choice but to keep this coal-fired programming language running.
Spreadsheet::WriteExcel includes over 70 example programs so I put together a program that could be called from the makefile to build a Pod document of the examples.
Example programs are invaluable. They act as a first line of defense against frequently asked questions and they also help people who prefer a "Cookbook" approach to learning a new API or language.
I'm looking forward to use this new blog portal. Blogging from use.perl.org was starting to be a bit painful as sessions tend to expire randomly and the posts are limited to text only.
Congratulations to those who had the initiative to start the project and the volunteers that made it possible.
I've finally found some time to play again with the Rackspace API manual, and added a couple features to the Net-RackSpace-CloudServers module I hadn't touched since moving home some months ago.
On the scripts/ directory there are some examples on how to use the module: it's possible to list all images, flavors, and servers you own, as well as delete servers by ID or create new servers in what I think is quite a simple syntax.
After a substantial round of tweaking, I've managed to assemble a more complete and non-broken release of the Australian 2006 Census (in formats that don't suck), focusing on the SQLite version.
This second release resolves my previous problems with the broken SQLite file, and supplements the 45 raw tables (and 7600 raw columns) with a table metadata table, a column metadata table, and a hierachy table that will allow the generalisation from the raw Census Collection Districts (around 200-1000 people) into larger areas such as Local Government Areas, Postal Areas, States, and so on.
In addition to the fixed file formatting issues and the metadata tables, I've also added in a permalink for the main gzipped SQLite file. Shortly after the OSDC conference and my sister's wedding next week, I'll be throwing together and uploading a ORDB::AU::Census2006 module to automate the process of fetching and ORM-bootstrapping the census data.
The streets were pretty quiet, which was nice. They're always quiet here
at that time: you have to be wearing a black jacket to be out on the
streets between seven and nine in the evening, and not many people in the
area have black jackets. It's just one of those things. I currently live
in Colour Neighbourhood, which is for people who are heavily into colour.
All the streets and buildings are set for instant colourmatch: as you
walk down the road they change hue to offset whatever you're wearing.
When the streets are busy it's kind of intense, and anyone prone to
epileptic seizures isn't allowed to live in the Neighbourhood, however
much they're into colour.
- Michael Marshall Smith, "Only Forward"
It gives me great pleasure to announce the release of Perl 5.11.2.
So, like I mentioned in my intro post, I work a bit on a project called CPAN testers. My current project is to get a smoker running for perl 5.11.1.
My system is set up in an odd way. Reports aren't sent out right away. Instead, each smoker (a separate environment, differing in the version of perl installed) saves reports as files in a set directory, and then a script which I run manually will send these reports out via Gmail.
I got my new smoker set up, and am in shock at the number of failing distros. Test::Warn, for example, threw about 100 pages of errors at my terminal (in red text, even!). The strangest thing is that many of the distros which initially failed are now passing without me changing anything except installing a few new modules, which should only happen it a prerequisite wasn't present, and now is. Which shouldn't happen. This makes me suspect prerequisite finding as being broken.
Or something. Has anyone else had issues with 5.11.1 and modules failing tests for lack of a prereq that was never installed or tested?
I'll spend a while hacking at this, but do need sleep, since tomorrow is the third and final show of a series I'm working at the local theater.
I'm hoping this will let me finally leave use.perl.org and move to somewhere that supports more-interesting post elements such as pictures and what not.
For example, when I talked about Padre's iconography a few months ago, I would have preferred greatly to have been able to show this.
And now, thankfully, I can do that kind of thing.
Of course, for reasons I don't understand, my posts have no look and feel at all, because (I guess) some files aren't being written properly?
Fortunately, that problem now seems to be resolved
Is it really possible that this is the first outsider's entry on the shiny new blog site? That's exciting! This site ticks all the boxes, and that cannot be said for most of the alternatives. Well done to the Dave Cross and the developer team! At #perl6 on irc.freenode.net there are occasional discussions about writing a blogging engine in Perl 6. Search for "yarn" in http://irclog.perlgeek.de/perl6/today and you will see how little has been done so far. When it does begin to grow, it will be a good idea to stea^W adopt some layout annd style ideas from this wonderful site :)
(This will not become a Blogging Iron Man entry - guaranteed the flow of postings will be fairly sparse). Right, let's try the Save button...
As much as the title is cliche, especially in a programming community, it's something that has to be done.
I'm Dan Collins, a CPAN contributor, though not recently, with userid DCOLLINS. I mostly wrote and maintained a framework for bots using Wikipedia and other similar websites. I've since moved on from that project.
Mostly now I work on CPAN testers, which is an amalgamation of a number of people who all simply report via email on the success or failure of CPAN installs. There are a number of tools which make this easier and more automatic, and at this moment I have 5 dedicated testing environments for new CPAN modules.
I really don't know what I'll blog about here, I don't much see the point, since I don't do too much Perl actively. But we'll see.