Martin Moss wrote:

> I want the reply to contain lines of perl which (after a little tinkering)
> I could then place into an eval statement in a different script which would
> be able to refer to the XML::Simple object based upon the same XML document
> used above.
> 
> The email handling and parsing is ok, just the data manipulation I'm not
> clear about.

This is no problem, generally.

You can specify the name to use for the resultant variable.

You may want to set $Data::Dumper::Bless to something if there's any
significant
construction activity involved. By default, Data::Dumper will output raw
Perl
with bless() statements. So if you're making anything where the
constructor has
side effects, you may want to make your own (re)constructor that can be
passed
the output of the eval.

Note that if you set $Data::Dumper::Bless, it will be used for
EVERYTHING in the
structure. You can do something like:

sub mybless($$)
{
        my ( $data, $class ) = @_;
        if ($class eq 'XML::Simple')
        {
                # do something with $data or XML::Simple
                # return properly constructed XML::Simple
        }
        else
        {
                return bless($data, $class);
        }
}

If the data structure has circular references, you may have to look at
$Data::Dumper::Purity.

If you have a couple of structures that point to each other, pass
Data::Dumper a ref to
a hash or array that contains refs to both.

-- 
Ned Konz
currently: Stanwood, WA
email:     [EMAIL PROTECTED]
homepage:  http://www.bike-nomad.com

---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to