dakedesu has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I am creating a module, for my own use, that will take an object an create an XML document based on the data inside that object, whether the object be a SCALAR, ARRAY, HASH, or an object defined by a user.
I have it set up, so that it starts by taking an object, and then either asking if it has a certain function that returns allow of the methods that the person wants to store data returned from, or checking if the object is a hash, array, or scalar. I have not debugged it yet, and I want to know ahead of time will the code:
my $object = whatever; my $function = whatever; my $returneddata = $object->$function; # with the other option of: my $returnedData = $object->&{ $function };
Does anybody here know which one I should attempt to do, to get the fruits of my wants?
DakeDesu teh Confused Werewolf.
In perl, only those who are bless'd are treated as objects
"Apparent confusion is a product of good Order" -- Sun Tzu
(Webpages under construction)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Module Data Dump.
by jeffa (Bishop) on Mar 25, 2002 at 22:38 UTC | |
|
Re: Module Data Dump.
by IlyaM (Parson) on Mar 25, 2002 at 22:40 UTC | |
by dakedesu (Scribe) on Mar 27, 2002 at 20:25 UTC | |
by IlyaM (Parson) on Mar 27, 2002 at 22:58 UTC | |
by dakedesu (Scribe) on Apr 01, 2002 at 09:33 UTC | |
by IlyaM (Parson) on Apr 01, 2002 at 10:13 UTC | |
|