test card

Programming grumbles

So, I've got this Perl module, Net::IPAddress::Util, and it's not-quite-randomly failing its test suite on not-quite-random platforms.

The testing summary is here.

As you'll be able to tell (with some digging), the tests that are failing are one or more of the tests named /01-try-.*/. These tests are all sanity-checks put in place to test the underlying modules and/or libraries that my module itself actually relies on. Those tests don't even use my module -- they run directly on the underlying modules.

Now, I know for sure that the libraries themselves can't possibly be broken: they're used by gazillions of people all day every day, even for "real" comp sci problems. I'm pretty sure the Perl modules that use the libraries aren't broken: they also seem to be used by other people all day every day.

So, after eliminating the impossible, what remains is that I'm misreading the docs badly enough that even my trivial "are you alive?" tests are written badly enough that they're crashing hard.

Is anyone here ready, willing, and able to help me figure out what I'm doing wrong?
test card

Need help with Math::BigInt subclass

It's official. I'm completely stumped.

I need a Perl genius with a non-Linux system (preferably a small army of them) to help me figure out why this one particular subtest is failing while everything else is passing, and why it's only doing it on platforms I don't currently have direct access to:

http://matrix.cpantesters.org/?aut…

Anyone got any hints, tips or suggestions? The latest SVN source is available from:

http://code.google.com/p/perl-ipad…
  • Current Location
    27603
test card

Announcing DBIx::Nailgun (unstable alpha version)

The project hasn't got very far yet -- it's usable, but not massively functional -- but I thought I'd announce something I've been working on. It's yet another ORM module, based on the "Active Record" pattern. The goal is to make database access as transparent as possible for Perl coders: database records look & feel like hashrefs, and record sets look & feel like arrayrefs (and hashrefs, if needed).

Once I get past the "v0.01" stage, I'll be making it CPAN-ready, and moving the official project home to CPAN. For the time being, the project home is:

http://code.google.com/p/perl-dbix…

All comments, questions, suggestions, and so forth about the project are welcome. I'd especially like suggestions about unit tests that need to be written, and tips on how to make it CPAN-ready.
  • Current Location
    27603
centipedes

Need help with DBD::File

Has anyone here written a module that subclasses DBD::File?

Does it still work with DBI v1.609? If so, what (if anything) did you have to do to make it work? If not, would you like to join me as I investigate what would need to be done to make it work?

Specifically, I'm trying and failing to install DBD::RAM, and kinda flailing around in a sea of badly-formatted code trying to figure out why it wont install for me.

As far as I can tell, DBD::File::db->STORE() is where it's failing (the DBD::RAM test script is trying to set a driver option, and crashing hard), but I can't yet pin down where the problem really is -- do I need to fix (and submit a patch for) DBD::RAM or DBD::File?
  • Current Location
    27603
Recent Me

Looking for collaborators

Does anyone here use jEdit, Perl, and Moose.pm?

I'm trying to work on a Moose project, and while jEdit's builtin Perl edit mode and Perl Sidekick are both more than adequate for normal Perl use, the lack of Moose support is starting to get on my nerves. I'm getting closer and closer to breaking down and taking on the workload of making a Moose mode and a Moose Sidekick.

The edit mode should be a simple matter of hacking the extra keywords into a copy of the XML file used for the Perl mode, and I think I'm up to that task all by myself, but the Sidekick is going to take some Java knowhow, and some jEdit API knowhow. Being the lazy layabout that I am, I'm looking for someone to help out.

Any takers?

Perl N00b

Hey guys,

I am more a C person, and am having some trouble here.

I have an array, and I want to delete all the characters of a line after a character. I have been using the split command with poor success:

foreach $TextLine (@OutLabText)
{
@Tokens = split("/[[]/", "$TextLine"); #doesnt work at all...
@Tokens = split(/\n/, "$TextLine");
@Tokens = split(/;/, "$TextLine");
}

Is there an easy way to specify "Delete everything after " [ " or ";"?

Thanks!
patrickwonders

Idiom question

So, I have lots of perl code that parses XML to a dom using XML::Simple and then tries to iterate over particular tags. When I inherited this code, there were many loops like this:

    if ( $dom->{'foo'} ) {
	foreach my $foo ( @{ $dom->{'foo'} } ) {
	    # blah, blah, blah
	}
    }

Some daringly omitted the if. But, then along came some XML without the <foo> tag and the cron jobs gacked.

I find the whole if-wrapper thing to be distracting from the main-line of the code. I've adopted this idiom instead:

    foreach my $foo ( @{ $dom->{'foo'} || [ ] } ) {
	# blah, blah, blah
    }

...which is what I wish Perl would do for me anyway when I try to coerce undef to an array context.

My question is: is this too obscure or arcane? Is this going to confuse people or will they just say... Ah, it's looping over the foo things and just ignore the rest of the line noise?

  • Current Mood
    curious curious