AW: [Xml-compile] Save web service reply on disk and process later

Michael Ludwig m.ludwig at epages.com
Mon Mar 19 15:10:10 GMT 2012


> * Michael Ludwig (m.ludwig at epages.com) [120319 14:41]:
> > Is there a way to obtain the same Perl data structure
> > from the file stored on disk as you'd have received
> > from the call directly? What would it look like?
> 
>    my ($data, $trace) = $call->($request);
> 
>    use Data::Dumper;
>    $fh->print(Dumper $data);    # save to $fh
>    my $data = do "$filename";   # load it back

Good idea :)

>    use Storable;
>    nstore $data, $filename;
>    my $data = retrieve $filename;
> 
>    use YAML::Tiny;
>    Dumpfile $filename, $data;
>    my $data = (LoadFile $filename)[0];

Thanks,

Michael



More information about the Xml-compile mailing list