Uri Guttman wrote: > making a basic procedural sub into a class method for no reason > means you pass useless data (the class name) and ignore it in the > sub. that to me is a poor API.
Point well taken. > SB> Besides... I'm at a stage where I'd rather carry on with Perl BCP and > SB> coding, as opposed to changing gears and learning how the Exporter > SB> works. Uri's suggestion of the '_' private prefix keeps things well in > SB> check. > > that _ prefix isn't my idea, it is in perlstyle i believe and is a > common convention for internal methods (those only called by other > methods in the current class). My apologies to Chas. Owens, as it was him, and not Uri who first brought that particular style to my attention before I had engaged it's importance in any other doc. I thought that it was commented within a post along-side dispatch tables, but I was wrong. Here is the post where Chas. pointed it out: http://www.mail-archive.com/beginners%40perl.org/msg100966.html > class methods are external and shouldn't > use that (see the second call above). I use "_" for routines that should never be called unless $self is calling them from within the module itself. What I meant by the use of "_" was that it's an easy way to identify which routines are purely internal. I have no experience on calling my methods via the class... I always create an object first. Habit, I guess. Steve
smime.p7s
Description: S/MIME Cryptographic Signature