I am not using join I am just using $str="abc|def|xyz";
At some point, if not already, 'abc', ''def' & 'xyz' won't be constants but rather contained in variables. At which point using
$Q->enqueue( join $;, $abc, $def, $xyz ); starts to become prefereable.
Also do you know how I can remove installed module?
Depends how you installed it. If you used ppm/ppm-shell there is a 'remove' command. I don't think there is for cpan. If you did the 4-part mantra, then it would be a manual process.
But there is no real reason to uninstall a module. Just stop using it. Next time you upgrade, you won't bother installing it. In the meantime, it just occupies a little disk.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |
I have another question on another topic, If you don't mind it.
I have xml config file I am reading and I use XML Checker to validate against dtd.
I went to cpan to download XML::Checker and it as in big red letters "UNAUTHORIZED" release. Is it a problem for me to use it, would u use it. I already have code to use it.
Thanks for all your help.
| [reply] |
I wouldn't take much notice of the big red unauthorised. It just means it is a release by other than the original author/current maintainer. I have a module in a similar status that is demonstrably better than the "authorised" release.
I would however take notice of the following:
CAVEATS
This is an alpha release. It is not actively maintained, patches are accepted and incoporated in new releases, but that's about it. If you are interested in taking over maintimance of the module, email tjmather@tjmather.com.
For a much faster, and correct DTD validator, see XML::LibXML. It uses the libxml2 library to validate DTD.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] |
thre would be no delimiter for me to parse string once I dequeue If I used
$Q->enqueue( join $;, $abc, $def, $xyz );
| [reply] |
use Thread::Queue;
$Q = new Thread::Queue;;
$toQ = join $;, 'abc', 'cde', 'xyz';
print $toQ;;
abc∟cde∟xyz
$Q->enqueue( $toQ );;
$fromQ = $Q->dequeue();
print $fromQ;;
abc∟cde∟xyz
print split $;, $fromQ;;
abc cde xyz
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] |