March 2014 Archives

You Can Have Your Moose and Eat it Too

It seems that my never ending story of AD&D Moose posts are coming to an end. I have a good bunch of code written and things are working quite well. I did run into a slight problem. If you remember this post where I was adding in the available classes seems I let a cheat get in there.


Does it Really only take a min?

I have been a Mojo::head for a few years now and I have heard alot a good things and bad things over the years. One thing that has always sort of seemed funny to me was the cliam that it taks less than 1 min to install.

Of couse you need a good connection and a fast computer. The are a numbe of demos of this out there and Glen Hinkle even did it live during an intro to Mojo talk.

So my mission tonight was to see if it really does install in a min.

Well Glen was wrong, It took almost 6 mins on my box. But my box is a 6 year…

Most Useful Letter on CPAN

This one have been around for a while but it has only been recently that I had a need to use it more often. So here goes my little story on it.

Well the best letter on CPAN is 'V',

The story begins with me needing to install some new code on my production box. Well of course the dev and test environments where much more up to date in terms of perl and modules so my code had about 5+ dependencies to clean up. Never fun to do these sorts of fixes.

So out I whipped good old 'V' and just typed this*/users/byterock/2014/03/index.html

Zap that thing!

One of the really fun aspects playing D&D was the plethora of spells that where available to the various player characters. To a programmer they introduce a whole nightmare of very vague rules that have to be implements some-how hopefully without an endless chain of it thens, given whens or, God help us, gotos or even gosub (yikes any one remember Applesoft BASIC basic?)


A Moose at the Door


Getting Cocky With Moose


In my last AD&D p…

Acme we are not just 500 Pound Anvils

Well I finally did learned something interesting looking at an Acme modules today.

I spotted Acme::Curse and at first glance it seemed to be just another of those silly play things in this namespace.

However the POD entry intrigued me.

Did you ever want to droo the blessing of an object? Well, now you can: Acme::Curse unblesses reference by returning a shallow, non-blessed copy of the object.

Well I do not know hot to 'droo' something (sounds painful) but the idea of a …

YAMADDP (Yet Another Moose ADD Post)

Well there is always more things to post on and today I found yet another.

There was a flaw with this as it is true I was not longer able to set starting gold or hit points by doing something this

 return $se…

Life is good

Well you might remember the few post I did on my little pet mod Orignal and how its tests where broken how I fixed that and made it more broken!

But now the good news it I 100% Green well I known I am not going to win any prize for this module as a matter of fa…

Is 10% really mean perl is Dead??

Looking at any number of differing sites that rate programming languages it is clear that since the early 2000s perl started a decline but has be happily chugging along at anywhere from 7.5% to 10% depending on which site you look at.

The TIOBE index is one as is langpop and they have their way to create their results. Mostly they look at github, Stack Overflow and Google searches.

Somehow F# is trending upward. But is it because its is better or is it becaus…

The Road to Hell is Paved With Good Intentions

Ok you might remember this post a week or so ago. Our might even remember the last line

one more quick fix and then they all pass, package and stick on CPAN.

Famous last words of the dammed as I took a look today and


CPAN Testers PASS (25) FAIL (263)

and with 0.02

CPAN Testers PASS (225) …

Shame Is in

sc-public-schools-epic-fail.jpg="text-align: center;…

Keep yer notes

I was cleaning up some papers out of a notes binder this AM and blundered across something I scribbled down during a YACEU, (not sure if it ws 08 or 09). On closer examination it was a number of notes taken during one of the lighting talk session.

Nothing that I would want 5 years later the only interesting bits where some of those magic/secret/sacred code one-lines that somebody always presentes during one the the lightning talks.

I rarely use them myself except for the good old spaceship operator or


Useful w…

Ok No is not Moose

A many readers of this blog know I have been spending a good deal of time lately playing about with Moose doing all sorts of silly little things with AD&D character creation and alike.

Well I was curious today and started to take apart a little bit of Moose and see what was under the hood so to speak. So far I have discover that all the nice Moose sugar are really just function calls and since some programming I was doing today requires me to use 'no Moose', he much preferred 'namespace::autoclean;' not being install on the box I was playing with yet.

So I started to look in …

Blast From the Past

Was cleaning up a few files on the server today and blundered across a few code files that look something like this on the inside
H3 >Process Query /H3 >
while my $row (DB->fetc) {
TR > TD >[+$row->[0]+] TD > TD >[+$row->[1]+] TD >...



[$ if ($err) $]
P > FONT COLOR='RED' > B >Error: [+ $err->{code} +] /B > /FONT >
[$ endif $]

Ok it kinda look like perl in some sort of bizarre hybrid with really ba…

Final Little Moose Droppings

Well I am getting close to finishing off my 'Creator' class that I started in this post I really have only three little parts to add on to get to the end. Character Starting Monies, Alignment, and equipping the character.

Well equipping is more a game play than a character creation part as buying something and stuffing it in your sack happens at any point in the game. So all I will have to do is give the character his starting tithe then let them loose i…

Moose, Mouse, Moo what next 'M'

My step into what I wood call the world of Moose was actually job related a few years ago and have been happy with it ever since.

One thing in the community I have seen it the rise of other flavors of 'postmodern object system' perl namely the first 'Mouse' and the more recent 'Moo'. Will 'M' will be next? I had some time after bashing in walls and laying wire so I had a look at them.

Both I guess try to solve the same problem mainly the over head of Moose. Mouse drops some parts of moose and redoes others and tries to retain most of Moose's syntax, Moo takes a use only w…

A Character with to much class.

Well in my last post I found the usefulness of builders when using roles and I quickly found another opportunity to use them about 10 minutes after I finished the post.

Seems I forgot that multi-classed characters are special when it comes to Hit Points (HP).


Once more unto the breach

It has been a few post since my last full Moose and AD&D post so I though I would get at least one more rule into my 'Creator' Class now that I have may Character Classes and races all sorted out.

This time we are going to look at Hit Points or HP for short.

A touchy subject, for many, as I am sure the black Knight has taken quite a few beyond normal and still fights on.


A-tisket a-tasket a little perl hash basket

Well Bucket actually.

It has been bugging me for a while why my silly little Orignal mod if failing CPAN Testers in all sorts of odd ways. In one version of perl nothing the next something dies and it is just basic code.

Finally had a few mins today and no Idea of what to blog on so I worked on finding the answer.

The tests would usually fail here

#   Failed test 'correct value of '6/8'!'
#   at t/03_hash.t…

New Moose for Old.

Some of you might remember an earlier post where I was playing about with ARIS Express and created an org chart to map out some of the roles that might be used in my AD&D Character class.

At the end of the post I mused about reading the ARIS file and gleaning out the data I just typed in and generating roles with them. Well I did spend a little time puttering about and even looked at 'FreeMind' and even at a new one called /users/byterock/2014/03/index.html

I Hate Cheats

I never liked cheats and while playing with Acme::Moose I figured out I can easily cheat by setting any of my values or peeking at them while I was playing. As we are able to do this sort of thing

my $moose = Acme::Moose->new; 
if ( $moose->happiness ){

Of course as my variables are 'rw' this little problem is all my fault.

In the original Acme::Llama the internal global variable hash value

package Acme::Llama;

our %llama;

Which buried it …

Tip-toe in the Moose Patch

Well my last post I explored a little bit of the shinny new Test::Moose::More by adding a few tests to my Acme::Moose class.

I left off with the idea that I could use a test that tells me that I have extra attributes in my 'class'. Not being much afraid to muck about in source code I had a look in 'Test::Moose::More' to see what would be involved in creating such a test.

Does it Pass the Moose Test?

The title of this entry will only mean something to a very select few in the world and if you think it has anything to do with perl look below


Not a Llama

Really did not have much to do before heading out to a show and was randomly looking at a few things and bumbled across this pic


Building A Better Moose Trap

Seem there are a number of little oddities in Moose that take a little time to absorb, but once you figure them out you wonder what you ever did before. In my last post I was doing a little refactoring and I decide to look at a few more things.


Moose Fine Print

Well scooping about looking at way to refactor some of my AD&D 'Creator' class code I stumbled on a nice little feature of Moose.


perl Surprises me Yet Again

I have said it in many other posts over the years perl just never ceases to surprise me.

Well I was down and dirty with some code today doing an ongoing migration from Informix to Prostgres of a very very large perl code-base.

Needless to say one of the most important tools in this migration is the good old 'inline if' or ' ternary if' or just plain old '? :'

The code base has a largely hash based so it is a simple matter to find the offending lines of Informix SQL and using the '? :' to add in the Postgres SQL. Of course only part of the client base is migrating so…

Well only 359 Pages and 4 Edtions to go.

Well I have a good deal of post on my AD&D and Moose and looking at the time line below


Git with it.

I always surprises me how much one can get out out of the perl community without asking. Something like 3 years ago I had my first git-hub account not really for myself but for a 'job' interview that required it.

Long story short, in the interview they said they couldn't find my twitter feed and I hadn't friend-ed them on facebook yet. I said tweets are for budgies and I don't have a facebook account and have never even been to that site in my life (and still have never been there). The interview went down hill from there, especially as I said why would I wast my valuable time on s…

Back on the Moose Track

Well with my last post I managed to get a little closer to my original goal of selecting a 'Character Class' after I have selected a 'Race' as the image below explains


About byterock

user-pic Long time Perl guy, a few CPAN mods allot of work on DBD::Oracle and a few YAPC presentations