perl

How can I automate website testing with Perl?

Possible Duplicate: Integration Testing for a Web App I've recently delved into Perl and I'd like to learn how to automate web site testing. To that end I'd appreciate answers to the following: What modules from CPAN should I look into? Is there something similar to Watir (I know there's a Windows only port of it in Perl)? I...

What are 'weak references' in KiokuDB?

What exactly are the weak references that KiokuDB tutorial mentions? How do they differ from 'normal' references? ...

How can I configure all the Catalyst actions in a given controller using Config::General?

I want to configure all the actions in my controller using my app's config file. According to Catalyst::Controller I can do this in the controller itself: __PACKAGE__->config( action => { '*' => { Chained => 'base', Args => 0 }, }, ); So I tried this in my config: <controller Foo> <action "*"> ...

Issues with stored JSON encoded POSTs in MySQL

I have a situation where after several years of use we are suddenly have some JSON-encoded values that are giving our Perl script fits due to backslashes. The issues are with accented characters like í and é. An example is Matí encoded as Mat\ud873. It is unclear what may have changed in the environment. PHP, Perl, and MySQL are involv...

How should I copy objects between two KiokuDB dirs?

I would like to make sure I get KiokuDB's scope concept correctly. Suppose I would like to load an object from db1 and store it in db2. Must I have both scopes 'open' at the same time? ...

Problem: Swish-e escapes the / in links to a subdirectory?

I'm running swish-e on a subdirectory htm/. On any search results page, the urls have the directory separator escaped, giving unusable links like htm%2Fpage.htm. How do I get swish-e or search.cgi to not escape the urls in the results? I'm using the standard search.tt in search.cgi that came with the distribution, and my swish.config fi...

How can I convert a number to its English form in Perl?

I need a Perl script which takes numbers as input example 222 and it should output as two hundred twenty two. ...

How can I require a Moose constructor arg that is not a attribute?

I have a Moose object module that should accept a relatively large data structure (ds) as one of its constructor arguments. It is used to calculate some of the object's attributes. However, I do not wish to store ds itself as an attributes -- it is only needed during the construction of the object. I thought of using BUILDARGS but then ...

How can I extract non-standard HTTP headers using Perl's LWP?

I'm working with a web application that sends some non-standard HTTP headers in its response to a login request. The header in question is: SSO_STATUS: LoginFailed I tried to extract it with LWP::Response as $response->header('SSO_STATUS') but it does not work. It does work for standard headers such as Set-Cookie, Expires etc. Is th...

How can I display text from an external command in Perl Tk?

I have to display some print statements (which I get while running a Perl script) in the Tk GUI. I tried to show an example in pictorial format, for example: Initializing the parser ... Running the parser ... Enabling the codec ... Connected to the socket ... Sending ipv4 traffic into the code ... It goes on like this. I don't kno...

How can use Perl to assign a task in Outlook to some person?

How can I assign a task in Outlook to some person as sending a mail using Perl or using any command in unix? ...

What is the CORE:match (opcode) subroutine in Perl profiling?

I previously wrote some utilities in Perl, and I am now rewriting them in order to give some new/better features. However, things seem to be going much more slowly than in the original utilities, so I decided to run one with the NYTProf profiler. Great profiler btw, still trying to figure out all its useful features. So anyway, it turns...

How can I make my Perl method more Moose-like?

I am practising Kata Nine: Back to the CheckOut in Perl whilst also trying to use Moose for the first time. So far, I've created the following class: package Checkout; # $Id$ # use strict; use warnings; our $VERSION = '0.01'; use Moose; use Readonly; Readonly::Scalar our $PRICE_OF_A => 50; sub price { my ( $self, $items ) = @...

What does () accomplish in a subroutine definition in Perl?

The following code is lifted directly from the source of the Tie::File module. What do the empty parentheses accomplish in the definition of O_ACCMODE in this context? I know what subroutine prototypes are used for, but this usage doesn't seem to relate to that. use Fcntl 'O_CREAT', 'O_RDWR', 'LOCK_EX', 'LOCK_SH', 'O_WRONLY', 'O_RDONL...

separate layout from templates in perl cgi::application

I am building a perl cgi::application using html::template. I am using 7-8 different templates having the same layout - header, footer, left column etc. How can I separate this html out of the template files into a single layout file. What perl modules do I need in addition to cgi::app and html::template. Thanks ...

perl substitute multiple lines

Hi all, I have a file which looks like: <QUERY name="Secondary"> <SQLStmt>select * from my_tb; </SQLStmt> <QUERY name="primary"> <SQLStmt>select * from my_tb; </SQLStmt> <QUERY name="last"> <SQLStmt>select * from my_tb; </SQLStmt> I need to substitute the SQLStmn...

How can I read from continuously updated file in Perl?

Possible Duplicate: How can I read from continuously updated file in Perl? I want to parse changeable server log. How to corrent read this file in Perl for parsing ? ...

Which KiokuDB backend is suitable for my serialization needs?

I use KiokuDB to store a couple of Moose objects and a couple of simple array structures (hashes and arrays). I do not need any fancy searches, transactions etc., simple the ability to fetch (lookup) an object. Also, as soon as I'm done creating the DB, it can be set read-only. No changes will ever be made to it. The main (only?) reaso...

Why would Perl's CGI::cookie be able to set a cookie in IE, but not Firefox?

I have a bit of Perl CGI code which I'm trying to run in the project web space of a SourceForge account. The code is able to set a browser cookie just fine when talking to IE, but the cookie is not set when talking to Firefox. When I test with Apache on "localhost", both browsers work fine. It's only on the remote SourceForge URL that...

perl text::csv - filtering specific columns in a csv document and discarding others

Hi, I would like to filter out particular columns with a regex and discard others. For example, if I had the following column names: date mem_total cpu.usagemhz.average_0 cpu.usagemhz.average_1 cpu.usagemhz.average_2 I would like to capture only columns that begin with "cpu.usage.mhz.average" Is their a particular function of text...