Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Multiple inheritance of %FIELDS

Thread Tools

Multiple inheritance of %FIELDS

Posts: n/a
There are 5 small files in this example: use p4; package p1; use fields qw(a b); 1; package p2; use base 'p1'; 1; package p3; use base 'p1'; 1; package p4; use base qw(p2 p3); 1;

When I compile I get the following error:

Can't multiply inherit %FIELDS at /home/tony/Projects/bin/ line 1

Now I can see that if both p2 and p3 had introduced additional fileds
then they would occupy the same space and cause potential runtime
confusion. But, if only one of the packages p2 and p3 introduced
additional fields or (as in the above example) neither of them did, it
ought to work.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
inheritance, multiple inheritance and the weaklist and instance dictionaries Rouslan Korneychuk Python 8 02-10-2011 04:02 AM
epydoc: How to add new fields as the building fields? Cyril.Liu Python 0 12-02-2008 05:01 AM
print struct fields and its member structs' fields recursively, generically call_me_anything C++ 4 09-30-2007 10:12 PM
Search for Multiple keywords in multiple fields JP SIngh ASP General 5 01-24-2006 01:53 PM
Netscape hidden fields - array - multiple fields with same name Javascript 0 07-17-2003 03:05 PM