Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: Threads and TCL DeleteInterpProc

by x-lours (Sexton)
on Jun 13, 2014 at 08:13 UTC ( #1089787=note: print w/replies, xml ) Need Help??

in reply to Re: Threads and TCL DeleteInterpProc
in thread Threads and TCL DeleteInterpProc

i already found this tip but don't know how to manage it in a Perl script ...

have you any suggestion ?

i put my code as a reply of the other answer. if you have any suggestion about better code i'll be happy to learn it ;-)

thanks for taking care

Replies are listed 'Best First'.
Re^3: Threads and TCL DeleteInterpProc
by Anonymous Monk on Jun 13, 2014 at 09:32 UTC

    A question for you, how far does your program go before the Tcl error shows up? Devel::Trace

    Reminds me of Re^3: TKX and closing windows (bug) ..

    L'anana ne parlais pas .... so this is the way I'd structure the program to avoid any Tkx noise .... I don't see an use for Thread::Semaphore

    As you can see, the more well named subs you have, the less comments you need

    See also Ask - ask your users about stuff / ask-introduction.pod

    You can use utf8 to signal to perl that your file is written in utf8, so you don't have to decode("utf8" all over the place

    Also see Win32::Unicode::Native since I assume you're on win32 ... for unicode version of mkdir/open... so you don't have to encode("iso-8859-1" ...

    Also, if you still need to encode("iso-8859-1" .... don't do it all over the place (repetition hurts your fingers), do it in one helper subroutine, say in recup_fic or MyMkdir ...

    I would also consider  my $answer = YesNo( "question", "title" ); and  ReadThis( $msg, $title ); ... although  Info( $msg, $title ); sounds good .... there is a Ask::Tk, a Ask::Tkx should be only a few tweaks to that

      as i wrote, i can't install any module (i don't know how installing them manualy, i read about but don't understand much...)

      so i can't use Devel::Trace , Win32::Unicode::Native or Ask::Tkx

      but thanks for the explanations and advices


      the use of Semaphore is in the "sub recup_fic" to avoid more than 5 threads when i save the nearly 30 files of the "@lst_log"
Re^3: Threads and TCL DeleteInterpProc
by Anonymous Monk on Jun 13, 2014 at 08:24 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1089787]
[Corion]: Meh. I get the feeling I should post a call-to-action for people to test their modules with the upcoming 5.26 (or 5.25.latest), as it seems that the smoke testers don't really weed out modules that fail without . in @INC
[Corion]: But without instructions on how to easily test things yourself, I don't think such a call to arms is helpful
[Corion]: (this post on / p5p makes it seem to me that smoke testers seem to have a blind spot there)
[Corion]: Hmmm. Maybe setting $ENV{PERL5LIB}=" some path without dot"; perl Makefile.PL; make test already is enough to locally test your module...
[Corion]: Meh, no, will need a BEGIN hook...
[Corion]: ... and PERL5OPT does not like -e in it :-(
[Corion]: Ah. The magic invocation is set PERL5OPT=-M-lib=. (equivalent of no lib '.';
[Corion]: )

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-03-27 08:06 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (317 votes). Check out past polls.