RE: Delimiter or no Delimiter, that's the question

"Roode, Eric" <[email protected]>
Newsgroups gmane.comp.lang.perl.active-perl
Message-ID <[email protected]>
Why not just change the delimiter for the duration of that one
subroutine, with the Delimiter() method, as shown in
http://search.cpan.org/~adamk/Win32-TieRegistry-0.26/lib/Win32/TieRegist
ry.pm#Examples ?

 

-Eric

 

From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Thursday, August 05, 2010 11:30 AM
To: [email protected]
Subject: Delimiter or no Delimiter, that's the question

 


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:

_______________________________________________
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.