Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

ajt (2546)

  (email not shown publicly)

UK based. Perl, XML/HTTP, SAP, Debian hacker.

  • PerlMonks: ajt []
  • Local LUG: AdamTrickett []
  • Debian Administration: ajt []
  • LinkedIn: drajt []

Journal of ajt (2546)

Friday April 18, 2008
07:07 AM

Perl / SAP / Medical Devices / Windows

We have a fun but potentially challenging project at work coming up. It will involve getting our infusion pumps to talk to a PC using a RS232 interface and within the same application speak with SAP via the SAP RFC interface. Getting Perl and SAP talking is easy I've done that before with the SAP::Rfc module, talking to our pump and a Mentron electrical test unit via RS232 on Windows may be more fun...

My preference would be to use Linux for all this, as it comes with a compiler which will make building SAP::Rfc easier and I understand how Linux works. However as the users will probably need the SAP Windows GUI in case things don't work, I'm being forced to do the development on Windows - which is always painful and unpleasant.

Sunday April 06, 2008
07:08 AM


This week I bothered to set myself up on LinkedIn. It's yet-another-social-web-site, but apparently this one is for professionals and not teenagers with too much angst. While there are lots of people in big enterprise groupings I was pleasantly surprised to find a Debian, Perl Mongers and CPAN group. I have no idea if it's any real value but time will tell...

My LinkedIn profile.

Monday March 17, 2008
09:12 AM

XML::RSS::Tools or Life

I recently took some time off work to get various things done at home and partially to run down unused holiday. It was good to be away from work and I do feel much better as a result.

I started working on my module XML::RSS::Tools fixing a build bug that has nagged me for a while. I also added more tests and improved to the way the tests are implemented. I haven't got round to releasing the changes yet...

I also started on my ambitious plan to rebuild my web sites. Like XML::RSS::Tools it's mostly done but not yet complete.

My new home server arrived and that is yet another project that's not complete yet...

Last night we learned that our land lady wants to sell-up, so we now have to find a new place to live, or buy at over inflated prices our current house. I don't really want to spend GBP230k/USD460k on a tiny/cold two-bed Edwardian cottage...

Could this be the opportune time to move to another county or country? Anyone looking for a Debian using, Perl/Web developer, with a working knowledge of SAP R3?

Tuesday February 12, 2008
03:07 PM

Catalog support in LibXML

Yesterday I had another look at getting XML catalogs (sic.) to work in XML::LibXML. I could get my catalog working from xmllint on the command line, but within a small Perl script using XML::LibXML it refused to process the same source XML and catalog files - it constantly refused to recognise an entity in the source file.

Today I was going to dig deeper, to see if I could produce a nice clean example to submit to the Perl-XML mailing list, only it seems to be working as billed today - and I've not done anything to the box since yesterday and my test script is as I had it last night...

Strange... I'll now try and test in my original application, not my test script. It could be that things got upgraded in Debian Lenny at some point and I didn't notice when things got fixed - it happens.

Thursday February 07, 2008
01:50 PM

Spam from the British Computer Society

In my usual list of junk email from various spammers - that our company anti-spam system fails abysmally to detect - I got an email advertising the British Computer Society. As the BCS is an allegedly legitimate organisation I sent them and email complaining that they were being used by a spammer. Today they responded and admitted that New Wave were an official partner in some BCS promotion currently being run.

If you give money to spammer scum then you are as guilty as the spammer. As far as I'm concerned that makes the BCS a scum organisation. I felt really good telling they were scum for dealing with spammers, and even better as I have reported New Wave to the Information Commissioner's Office (not that it will do any good) for sending spam.

Monday January 07, 2008
09:21 AM

Fixing Analog dns cache file

The text file used as a DNS cache by the Analog web server log analyser gets rather long and out of date if you don't manage it. At the weekend I took my 20MiB file and ran my usual shell scripts to clean up the log, I'm not a shell guru, and after a days wait I had a pristine 2.6MiB cache file with no duplicates in. I then made some changes to how Analog is configured to keep things trim

All these DNS look-ups in series are very slow, especially as once they fail, the usually fail on every subsequent attempt, which is what most of the log consists off. Using a bit of Perl (hashes) and the parallel DNS look-up from Net::DNS, got a script that is marginally longer the the shell script, but can process a 20MiB file in under 5 minutes...

I'd be the first to admit that my Perl code is better than my shell, but the Perl version is both MUCH faster, and according to top, lighter on the CPU... very cool.

Friday January 04, 2008
08:58 AM

Fixing PHP with Perl

At work a colleague is frantically trying to finish a project he is working on in in PHP/MySQL via Dreamweaver. Every now and then he hits a problem at the limit of his PHP skill and asks for help. I don't really know PHP much, so I just use Perl foo and hope it works. So far my guesses from Perl and a bit of Googling have been more than sufficient.

His boss really should buy him a book or send him on a training course - he'd be much happier and productive then...


Friday December 28, 2007
07:44 AM

XML on old Perls

I'm working on parsing the XML files output by a UPS WorldShip client application. It looked straight forward, just pass in a bunch of XPATHs and out comes a bunch of values...

The problem is that the stupid XML file from UPS comes in a non-named namespace and the old version of Perl and LibXML I'm using can't get at the xpath I want. Apparently it is easy to fix, but it requires a newer version of XML::LibXML, which won't install on this antique box.

Argh.....! I could use the older XML::XPath which is slower and less standard compliant so it just blunders on ignoring the namespace, so it works, even though it's the wrong thing to do. Or I could just hack the XML that the stupid UPS WorldShip system outputs...

Friday December 21, 2007
04:18 AM

Beginner's Guide to Achieving the Impossible

The week after this year's LPW was my last LUG meeting of the year. I decided to give a small talk about using CPAN to get other people to write your code for you. Alas between the two meetings I went down with yet another cold, so it wasn't as well prepared or presented as I would have hoped for.

Anyhow the talk is available from my LUG and the Internet Archive in several formats, Google Video will follow no doubt.

Tuesday November 06, 2007
06:05 AM

Hateful GUI

I hate people who think software should only have a Graphical User Interface (GUI). I can cope with only a Command Line Interface (CLI), though I accept that many applications benefit from both.

At work for a Lean 6 sigma project I need to automate a step but alas it requires a Windows GUI application, that does not have a CLI. It's hateful enough that it requires Windows, but not offering a decent CLI means that at the end of the day someone has to remember to push a bunch of buttons to dump a shipping database for import into SAP. As you can expect people forget and the SAP system does not have a proper copy of the database.