in reply to First steps in OO-Perl , suggestions please!

Here's a bunch of points that sprung to mind from looking over the code

Of course perl is all about TIMTOWTDI and if it ain't broke don't fix it. But if you're serious about getting OO in perl down then I'd recommend checking out other OO languages, not only will you get a feeling for how OO works you'll also appreciate the freedom you get from perl's OO system.
HTH

_________
broquaint

  • Comment on Re: First steps in OO-Perl , suggestions please!

Replies are listed 'Best First'.
Re: Re: First steps in OO-Perl , suggestions please!
by kodo (Hermit) on Jul 25, 2002 at 13:29 UTC
  • Well to be honest I didn't think much about using ref($proto) || $proto, I did because I've read Planning for the Future - Better constructors in perltoot.
  • Yes I'll do a POD once it's really finished
  • About the 80-char-standard: Should I just break the lines?
  • All other points: Agreed. :)
  • thanks!

    giant
      About the 80-char-standard: Should I just break the lines?
      Break the lines where it's logical. For example when you assign the new Net::FTP object to $self->{ftp} you could restructure it like so
      $self->{ftp} = Net::FTP->new( $self->{'host'}, Port => $self->{'port'}, Timeout => $self->{'timeout'}, Debug => $self->{'debug'} ); unless($self->{ftp}) { ... }
      Play around with it and see what looks best to you. You might even notice some improvements that could be made to your code along the way.
      HTH

      _________
      broquaint