From: "Johan Vromans" <[email protected]> > "Octavian Rasnita" <[email protected]> writes: > >> use parent 'Wx::Frame'; >> >> It gives the following error: >> >> Can't locate Wx/Frame.pm in @INC (@INC contains: E:/usr/site/lib E:/usr/lib >> .) at E:/usr/lib/parent.pm line 20. >> BEGIN failed--compilation aborted at E:\work\lib\Package\Name.pm line 7. > > ... > >> Is there anything in base.pm which is needed by WxPerl but it isn't >> offered by parent.pm? > > parent.pm insists on loading the module as Wx/Frame.pm, while most Wx > modules are loaded from other files when you did "use Wx".
Oh yes, Wx uses a strange design and I have forgotten that this could be a problem. :-) > base.pm seems to be much smarter. > > You can get the desired behaviour by using > > use parent -norequire, 'Wx::Frame'; > > (Which I consider an ugly hack...) Yes you're right. Better using 'base.pm'... Thank you. Octavian
