Click here to get back home

Perl Class::Struct

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Perl Class::Struct Ed Wadge 10-13-2005
---> Re: Perl Class::Struct metaperl@gmail....10-14-2005
Get Chitika Premium
Posted by Ed Wadge on October 13, 2005, 3:18 am
Please log in for more thread options


Hi

This may be a real newbie question and covered by a simple FAQ or
something. I have looked and have not found a solution so appologies in
advance if this is the case.

Effectivly this is two seperate questions. The first is to do with over
riding the new() method of Class::Struct. ie can you do it? So that the
Class::Struct original is called and then extra methods carried out
afterwards. I dont think this is inheritance of the kind used with
@ISA.

Second. I have in my object several other objects as members. One of
these contains a function called GetValue(). This seems to be called
every time i use one of the member functions of the top level object
during the $self = shift first line in the function. I cant see the
method mentioned in any Class::Struct documentation.

Thanks for any help you can give.

Ed



Posted by metaperl@gmail.com on October 14, 2005, 3:56 am
Please log in for more thread options


Hi Ed,

I think I had problems over-riding new a long time ago. Any of the more
widely use method makers (Class::MethodMaker or Class::MakeMethods)
allows you to do that and more.

Re: "Second. I have in my object several other objects as members." --
sounds like a job for Class::Container.

Re: "One of these contains a function called GetValue(). " -- that
sounds suspicious. A generic getValue instead of a get/set for each
attribute? Again, the popular method makers make these methods for you.

Class::Struct really is not the most widely used module for this
purpose. I would look on CPAN a bit harder for something with more
recent updates and other signs of life.



Posted by Ed Wadge on October 17, 2005, 4:42 am
Please log in for more thread options


Thanks. For the reply. I am aware of the more widely used ones on CPAN.
Unfortunatly company coding standards require the use of CLASS::Struct.
So I must comply.

Class::Container looks good though so cheers for that one.



Similar ThreadsPosted
A doubt in using Class::Struct October 5, 2006, 2:33 pm
Class::Struct - want to access structure within structure April 29, 2006, 3:33 pm
Class::DBI::Schema2Code V 1.01 July 29, 2004, 7:14 am
Class::Tree V 1.24 July 29, 2004, 7:15 am
[RFC] Class::DataStore May 13, 2005, 2:45 pm
RFC: new module Class::MakeIntrospecMethods October 18, 2004, 4:30 pm
[ANNOUNCE] New module Class::IntrospectionMethods December 6, 2004, 2:12 pm
Class::MethodMaker v2 syntax help requested February 7, 2005, 9:33 pm
Namespace for MMS Parser class and a request for help August 13, 2005, 8:43 pm
Class::Std causing compilation errors November 24, 2007, 5:08 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap