matt_platts has asked for the wisdom of the Perl Monks concerning the following question:

Greetings fellow Monks,

I've taken this to a couple of forums already, but with no ideas, I've come to seek the wisdom of the Perl Monks - probably the only people in the world who can shed any light on this!

I've been given an application - essentially a web site - to look over that's written in Perl. Or so they told me. On closer inspection, whilst it is pretty obviously Perl related, it's not pure Perl, and nothing like the Perl I've seen before. I'm just wondering if anyone can recognise this or tell me anything more about it, as Im guessing its related to a Perl module of some sort.

Essentially, its partly embedded into HTML files, and partly in libraries, so my first port of call was to look at syntax for embPerl and Mason - two ideas I've heard about but never seen or used, and its certainly neither of these. Its possibly some custom Perl-based script that runs through somebodys personal CMS. Im hoping however that somebody recognises this and can tell me what I need to run it.

Ive included a couple of examples from the code below. Any ideas anyone?

Thanks!
Matt

Example Code:

Lines of code that give it away as Perl: (this was found in a file of pure code (no HTML) with a .lib extension)

#--------------------------------------------------

function nextrow:method oracle { if (ServerOption('NoOracle') == 1) { return 0; } inline my $sth = $tomahawk->globalvars->{'oracle'}->{'sth'}; my $hashref = $sth->fetchrow_hashref(); if (defined $hashref) { while( my ($key, $value) = each %{$hashref}) { $tomahawk->globalvars->{'oracle'}->{'rowval['.lc($key).']' +} = $value; } $return = 1; } else { $return = 0; } endinline }
So far, yes looking closely like Perl. However in a page with a .html extension, I find "<[" tags and variables without the $ prefix as follows. I am told this is also Perl - it obviously isn't but is certainly related somehow (??!)
<[ if page.args.submitted { assert(page.post.un ne "", "<span><b>username is blank</b></span>< +br />"); assert(page.post.pw ne "", "<span><b>password is blank</b></span>< +br />"); unless (assert_error()) { login(page.args.un, page.args.pw, check_active => "yes", redir +ect => "/index.html", history => 1) loginfailed = 1 } } buffer "bodytagopen" { clearbuffer]> <body onLoad="document.getElementById('un').focus()"> <[}]>

Any ideas appreciated, thanks again!
Matt

Replies are listed 'Best First'.
Re: Strange Format Perl - anyone recoginse this?
by grinder (Bishop) on Mar 06, 2008 at 17:31 UTC

    There's a variable there named $tomahawk. It might be tomahawk, which seems to fit. Precious little documentation though.

    • another intruder with the mooring in the heart of the Perl

      Thanks, yes Tomahawk was something that the company that gave this to me talked about.

      I also found this: http://freshmeat.net/projects/tomahawk/?branch_id=10687&release_id=34380 - another project called Tomahawk, but not touched in over 7 years.

      Little documentation there as well, so can't be sure. Either way the chances of actually getting this to run on something are looking pretty slim right now, but any and all suggestions still very much welcome! Thanks, Matt