in reply to Re: Style Question: Throwaway Objects
in thread Style Question: Throwaway Objects

Ah, good point about testing for an error in the constructor. I've got an or die... clause following the Parse call in the actual code, though I omitted it for simplicity's sake in the example above. But I suppose you're right that if Spreadsheet::ParseExcel->new() returned an invalid object reference for some reason, then that would bungle up the method call and generate an error that might not be very obvious.

        $perlmonks{seattlejohn} = 'John Clyman';

  • Comment on Re: Re: Style Question: Throwaway Objects