A couple of years ago I had a simplistic way to run Test::Class methods on my use.perl blog. Unfortunately, it littered the test class with $ENV{TEST_METHOD} assignments. I should have fixed that. Here's a better version:
With that, if your cursor is inside of a test method, typing ",tm" (without the quotes and assuming that a comma is your leader), will run just that test method.
I didn't play drums to make money. I played drums because I loved
them. [...] It was a conscious moment in my life when I said the rest
of things were getting in the way. I didn't do it to be [be]come rich and
famous, I did it because it was the love of my life.
I never said it. [...] Why did I
rob banks? Because I enjoyed it. I loved it. I was more alive when I was
inside a bank, robbing it, than at any other time in my life.
Money moves job indexes.
But where the following for a language is only cash-driven,
that following may become as broad as the ocean,
but it will never be more than a millimeter deep.
And it will dry up the moment the cash disappears.
Working on a book about something is one of the best ways to discover issues with interfaces. When I have to explain some process and think about all the ways that things can go wrong so I can make the explanation as bulletproof as possible, all sorts of issues pop up.
I'm working on the distributions part of the next edition of Intermediate Perl. All of the h2xs stuff is being shoved into a couple of paragraphs and everything else now uses Module::Starter. I'm not a particular fan of the module (I have my own: Distribution::Cooker), but I do think it's the best thing to use if you don't know what you want to use.
When just registering to use.perl.org, I started using RSS feeds. Currently I have roughly 25 or so subscriptions, which is lightweight, I know. Mostly are specific Perl programmers (mst, nothingmuch, elliotjs, dagolden, drolsky), some are aggregators, a few friends' personal/political blogs, etc.
Work-wise, the best feed I've had was the "use.perl.org generated feeds", which shows me on a daily basis which modules/distros were released. It helps me by:
Keeping me up to date with modules I use.
Keeping me up to date with modules I want to use.
Keeping me up to date with modules I intend to use (once they go stable).
Keeping me up to date with modules I don't even know that could benefit my work.
Back in September 2008, I had a list of the most popular testing modules on the CPAN. I created this list because I was writing Test::Most and I needed to know them. Tonight, after hearing that the next Perl-QA hackathon is in Vienna, I thought about what I might want to accomplish and decided to see if the most popular modules had changes. In 2008, out of 373 test modules, we had the following top 20:
I'm heading off to Chennai, India next week and I would love to see some Perl people while I am there, but Madras.pm looks a little dead. Would any mongers in or around Chennai like to meet up for a technical meeting / dinner / tea?
Yeah, Perl 6 is going to allow us to do very interesting things. Given this code:
use v6;
subset Filename of Str where { $_ ~~ :f };
sub foo (Filename $name) {
say "Houston, we have a filename: $name";
}
my Filename $foo = $*EXECUTABLE_NAME;
foo($foo);
foo($*EXECUTABLE_NAME);
foo('no_such_file');
We get this output:
Houston, we have a filename: /Users/ovid/bin/perl6
Houston, we have a filename: /Users/ovid/bin/perl6
Constraint type check failed for parameter '$name'
in Main (file src/gen_setting.pm, line 324)
Obviously the error message needs some work (and I would love to be able to generate custom error messages for subsets), but proper use of subsets are going to save a lot of code and prevent a lot of errors.
Since Cantella::JobQueue has been put on hold after the discovery of Beanstalkd, I've moved on to other projects. The first on my list was to add some new views to a Reaction-based application. Specifically, I needed a couple of ways to export tabular data. I needed to display it as inline XHTML tables, export it as PDF sheets and allow for spreadsheet downloads. Because none of the current offerings gave me the flexibility I wanted, I decided to write my own.
Well, I'm not a native Perl speaker. ;-)
I'm not even a native English speaker. Obviously. This can be hard sometimes.
Altough I would like to qualify my English as "quite o.k." I encounter problems reading documentation and code.
My problem (as I analyze it) is that I'm often unsure if I understood something correctly. And if I clearly don't, I find it hard to identify if it is due to complicated content, peculiarly used words or technical terms I don't know.
For the non-native speakers: Do you have similar problems?
For the native speakers: Imagine reading when you are really tired. I think this should feel more or less the same than reading technical writing in a foreign language.
And then all these little jokes. I really enjoy them, but they sometimes make it really hard to get the main content.
Another question for the native speakers: How do you feel when you are reading non-natively spoken (baby) English? Are you annoyed at the many mistakes?
And then: If you compare this to computing languages? Most of us are non native speakers. At least I hope so. :-)
I do backup... but as I'm sure with most other people, it's probably not enough.
As a Mac user I've been relying on TimeMachine for a while now and it is fantastic.
For my unix based stuff I then use git or svn and rely on my laptop having a checkout as well as a set being on the server (and the server does some backups as well).
But the main issue is it's lots of bits of "It will probably be ok" and "I'm fine if it's a hardware failure". But this doesn't cover the "what if my house burned down" type scenarios.
So anyway, with the scene set... I started thinking I needed offsite backup for everything. A service (or services) where I can upload everything to and then not worry about it.
Enter Dackup, I can upload to Amazons S3, or Rackspace's CloudFiles, or to another server over SSH, or another disk over Filesystem.
I'm already using Amazon's S3 for some stuff, so this seemed the easiest.
As part of the Perl track committee, I gave some guidance in what you might propose in "How to tell your Perl story at OSCON". There are many interesting things you could talk about, even if you don't think it's interesting.
I mentioned several categories your talk might fall into:
The Perl language itself, and how it works
Using Perl features to provide programmer capabilities
Using other technologies from Perl
The process of using Perl to get work done
A 5 minute lightning talk
Every proposal is judged both by a committee of subject matter experts as well as the entire OSCON program committee and the organizers. Take the time to let OSCON know why your talk is the best, and remember that some of the people judging it might not know who you are or why your really cool thing is important. You're also in competition with other Perl talks, so we need a reason to pick yours over the many other Perl talks for the limited space each track gets.
I've renamed the Config::INI repository to something more sensible (since no one had watched/forked it) and now you can write out Config::INI files.
my Config::INI $config .= new;
my %properties = (
a => 'b',
c => 'd',
);
my %next = (
one => 'two',
three => 'four',
);
$config.add_properties(:%properties);
$config.add_properties(properties => %next, name => 'next');
$config.write($ini_filename);
It needs more work (primarily solid error checking), but so far I'm fairly pleased with it.
Despite what you often hear, one can produce very readable perl code.
It is just not enforced.
I feel that readabilty of my code has improved since I've started my IT bachelor studies. I'm wondering if it is because
- we are forced to learn java which enforces a lot of things
- I am much worse at java than at I am at perl which forces me to write really simple code
- I code more and am humiliated more often when trying to read my own code
- I have more confidence in my solutions and think longer before hacking.
I'm not very afraid of baby perl. I want to code efficiently and want to understand my code in a year or two.
I've been curious how one would match the following with Perl 6 grammars/regexen (spaces represented by dots)?
XXXX
..XXXX
....XXXX
....XXXX
......XXXX
..XXXX
In short, you can indent or unindent by a particular amount, with allowed indentation levels being multiples of the first indentation amount found. Each level of indentation must equal the previous or be one greater. You can unindent as much as you want so long as it's a multiple of that first indentation level. Seems like you need to have a recursive grammar that allows you to maintain state.
This is to play with the idea of matching a "YAMLish" document.
Side note: since Perl 6 is "Perl 6" and not "Perl6", it's awfully hard to search Google for.
Every so often you may have found yourself puzzled by the results the cpantesters provided, wondering which reasons may stand behind the fails or passes.
So you click on one of the FAIL reports and it doesn't reveal anything useful to you?
Chances are that if the reports contain some common pattern the new analysis site will point it out to you. Analysis uses some well known basic statistical tools that estimate the influence of independent variables on the result of the test runs.