SPUG: How to deal with same name packages?

c k thasone at yahoo.com
Mon Jan 14 16:24:15 CST 2002


Is there a way to deal with same name
packages/modules/classes/objects in perl?  

I created a Link.pm and used that with LWP in a main
script (e.g., put use Link; and use LWP; near the
top).  I believe my Link.pm is clashing with another
module named Link.pm in LWP, because when I change my
Link.pm to Lynk.pm things work fine.

Besides changing my module name from Link.pm to
Lynk.pm, is there another way to deal with same name
packages in Perl?  For example, in C you can do this,

#if !defined LinkH
#define      LinkH

some stuff ...

#endif

Can I do that in Perl?  Is there a technique for doing
that?  

Thanks!

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
     Seattle Perl Users Group (SPUG) Home Page: http://zipcon.net/spug/





More information about the spug-list mailing list