my new sony reader
My first ebook reader was a Sony PRS-300, which I bought just about a year ago. There was a lot to like about it, and I never felt particularly tempted to replace it with a Kindle. It really all comes down to one thing: the size. If you compare the Kindle and the Sony Reader sizes, you can see just how much bigger the Kindle 3 is than the PRS-300. The Sony reader fit much better in my pockets, so I could take it anywhere. Iโd take it on walks to 7-11, to the playground with Martha, on short car trips, or anything. The Kindle is just a little too big for that to be as comfortable.
Read more โcomposing your own behavior across Moose class structures
In my last entry, I wrote about how role composition and advice and BUILD
interact. A number
of times, Iโve wanted to get behavior that was like BUILD, but without
needing the stub method hacks that are needed to get roles to participate in
the method call. A very simple example came when I was writing
Throwable::X, which had a
mechanism for all of its contituent parts to contribute tags. The idea was
that any class or role that was part of your class hierarchy could implement an
x_tags method that would return a list of tag strings. These methods would
all get called and the resulting set of tags would be uniqued and returned.
roles, advice, and BUILD in Moose
A very common complaint on #moose is, โBUILD is broken. I put BUILD
methods in my code and they never got called.โ There are a lot of variations
on this. They tend to come from the fact that BUILD is not called like almost
any other method. Imagine the following class hierarchy:
Test::Fatal, for simpler exception testing
Right now, the most popular Perl library for testing code that throws exceptions is probably Test::Exception. It works like this:
Read more โwhat the heck is GVf_IMPORTED?
I was happy to learn about this bizarre flag in Perl, even though it took a lot of aggravation to learn it.
Read more โfinally started using dzil new
Ages ago, I got a lot of requests for a way to let Dist::Zilla create new
dists. Creating a useful command for doing that became part of the TPF grant
work that I did, and dzil new started to work in May. By June, it reached
the state itโs been in for months now, which seemed pretty good โ but I didnโt
really know, because I wasnโt using it.
Throwable::X: common behavior for thrown exceptions
When I first wrote about Test::Routine, I said it was a way of building a replacement for Test::Class that relied on Moose for all of its class composition. I compared it to replacing Exception::Class with Throwable, which let me get rid of a lot of features that were oriented toward building classes, and which were different from and inferior to those provided by Moose.
Read more โTest::Routine interface change
Iโve been trying to learn more about different patterns people use while writing test code, and to make sure that Test::Routine accomodates them all fairly easily. So far, Iโm happy with it, but Iโve had a few changes Iโve made. So far, only one is intended to be user visible. From now on, instead of writing:
Read more โTest::Routine: composable units of assertion
Test::Routine is a new system for
building reusable hunks of tests that can be written quickly as one-offs,
broken into modules for reuse, and that can use the large existing set of
Test:: libraries from the CPAN. It implements as few features as possible
and instead tries to let you use Mooseโs extensive and commonly-used object
system to get things done.