> > On 2/12/06, Kathryn Andersen <[EMAIL PROTECTED]> wrote: > > Why is that hard to parse? Use perl regular expressions, > that's one > > of the things it is good at. > > > > You'd just have to go > > > > foreach (@errors) { > > if (/FIXME/) { > > # respond to this error > > } > > } > > > > That should enable you to respond to all the "FIXME" errors. > > I agree that this is easy to do in the case of errors which > are simply strings. However I would like to be able to > return hash references as errors, such as > with: croak \%error > > The way that Execute returns errors right now, all I end up > with is the string representation HASH=0xdeadbeef. >
Sorry, but Embperl converts it to a string. There is currently no chance to get the hash back. Of course you can store the hash else where and return only a string and retrive the hash from this other location. E.g. [- $hashstore::error = \%hash ; die "FIXME" ; -] And foreach (@errors) { if (/FIXME/) { # respond to this error $hashstore::error -> holds the error } } That is not quite as elegant as returning hashs directly, but it should work. Gerald ** Virus checked by BB-5000 Mailfilter ** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]