Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Renaming CPAN modules

by Bro. Doug (Monk)
on Oct 28, 2006 at 15:45 UTC ( [id://581092]=note: print w/replies, xml ) Need Help??


in reply to Renaming CPAN modules

The biggest problem with renaming your modules is, of course, the many references made to your module throughout your code. It's usually a fairly morbid experience to grep through thousands of lines of code and make sure all names are correctly changed. Global search and replace makes this easier, but the problem can be pre-empted in initial development.

my $pkg = "My::Package" ; eval "use $pkg ;" #you can also reference the package base class from a var my $obj = $pkg->new ;


Now you can easily change the package names just by changing the definition of $pkg.

I hope that helps.

Bro. Doug :wq

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://581092]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-04-16 07:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found