Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > XML::Twig -- help with something small

Reply
Thread Tools

XML::Twig -- help with something small

 
 
rishid@gmail.com
Guest
Posts: n/a
 
      06-07-2005
Hi,

In my perl application, I need to create a lot of twigs, I wanted a way
to quickly create a twig by just passing a subroute Node, Function and
File to parse. I created this, the problem is the Function that is
called ($temp[1]), Perl believe it is a bareword and halts. Is there
anyway to "cast" it so Perl knows it is a subroutine?

Thanks a lot,

Rishi D

use XML::Twig;
use strict;

quickTwig("DBMS", "getXMLDBInfo", "tmp/$inputHash{'host'}/DBList.xml");
sub quickTwig {
# @temp = [Node, Function, File]
my @temp = @_;
my $twig = XML::Twig->new(twig_handlers => { $temp[0] => $temp[1] });
$twig->parsefile($temp[2]);
$twig->purge;
}

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET User Controls - missing something small? mivhaelveloz ASP .Net 0 05-01-2006 12:38 PM
Small cameras getting too small? GRL Digital Photography 50 02-03-2006 03:12 AM
Small Square with small red X Peter Coddington Computer Support 4 01-03-2006 06:58 AM
XML::Twig -- help with something small rishid@gmail.com Perl Misc 1 06-07-2005 03:03 PM
small 1M or 2M camera (something like Epic Stylus of digital cameras) H. S. Digital Photography 4 10-24-2003 12:15 PM



Advertisments