Hi,

I'm trying to catch errors on readflex using
eval{$x=readflex($filename)} || message ("Reading $filename
failed,mb::Error);

This runs into the mutlielement-piddle-in-conditional issue since eval
returns the piddle.

I am using some dummy operation on the loaded data,

eval{($x=readflex($filename))->nelem} || message ("Reading $filename
failed,mb::Error);

but it feels very ugly. Wouldn't it be better to return false or undef
instead of dying in some way when this case occurs? I remember there was
a recent discussion on the list, but I forgot what the result was.

Just a thought, though, please ignore if you believe the current
handling is working as wanted.

Ingo

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to