Delimiter or no Delimiter, that's the question

[email protected]
Newsgroups gmane.comp.lang.perl.active-perl
Message-ID <OFFC02ECFB.A523FFFA-ON86257776.0051F19B-86257776.00551E38@walgreens.com>
Gurus,

I have a problem with TieRegistry in a code module. The TieRegistry code 
is used in several methods in the module, but the rub is this: in at least 
one method, I need the Delimiter set to '/', while in just one method it 
needs to be undefined.

As currently coded, TieRegistry gets "used" at the module level like this:

use Win32::TieRegistry (Delimiter => '/');

I'm wondering, is it possible to "use" TieRegistry inside the subroutine 
that requires the undefined Delimiter, so that the ones requiring the 
*defined* Delimiter can rely on the module-level statement, while the one 
requiring that Delimiter be undefined can rely its own use statement? That 
is, can I do this:

# At the module level...
package wsinfo::Hardware;
# ... other use statements ...
use Win32::TieRegistry (Delimiter => '/');

# methods that use TieRegistry with the Delimiter

sub different_sub {
   use Win32::TieRegistry;
 
   #do its thing with undefined Delimiter
}

# more methods that use the Delimiter...

Just to keep things interesting, I need this rolled out by end of day 
tomorrow (eek). 

Thanks,

Deane Rothenmaier
Programmer/Analyst -- IT-StdCfg
Walgreens Corp.
2 Overlook Point #N5102D
MS 6515
Lincolnshire, IL 60069
224-542-5150

If stupidity got us into this mess, then why can't it get us out? -- Will 
Rogers

_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.