in reply to Re (tilly) 4: Perl and Objects, how do you resolve the two?
in thread Perl and Objects, how do you resolve the two?

Fair enough with the "medium-sized" issue. Also, the templates are Perl code, not some data file. Which means I don't have to auto-generate anything. It's already been generated for me. :)

I have been looking at possibly adding Autoloader as well as the package that splits your functions into their own files. (I'm too lazy to look it up, plus I'm eating!) However, the startup time hasn't been an issue in that my users don't really care much. This isn't a real-time application, which is one reason why OO Perl is useable.

We're not fully-qualifying package names anywhere else. (In fact, the reason for my import question is because I didn't want to qualify package names outside of Global::Generic_Object, but found myself needing to because of the default import method.) The reason I'm doing it here is because of the lack of use strict. I'm not using strict in this one package because I want to have the ability to play with references. I should probably add strict vars, but I haven't gotten around to it.

Thanx for the idea regarding over-riding import. I had thought of it, but seeing an example helps a lot.

As for the actual topic at hand ... yes, if you over-use anything, the whole becomes more difficult to maintain. This goes for comments, regexps, avoidance of regexps, etc. And, yes, I agree that AUTOLOAD is very good for rapid prototyping and initial templating. But, I still maintain that AUTOLOAD in production code should be extremely carefully examined before deciding to go ahead with it. And, this is someplace where 3:1 comments:code should be there. Why you're using AUTOLOAD and why another method wouldn't be better definitely needs to be fully explained for the person who's stuck reading your code in 6 months. (Can you tell I was a little annoyed at my predecssor and why?)

  • Comment on Re: Re (tilly) 4: Perl and Objects, how do you resolve the two?