Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
"be consistent"
 
PerlMonks  

not waiting for module to return

by melguin (Pilgrim)
on Dec 19, 2001 at 21:30 UTC ( [id://133296]=perlquestion: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.

melguin has asked for the wisdom of the Perl Monks concerning the following question:

I have a program that calls several modules that I have written. However, I noticed that when I do a call to one of the subroutines (edit_categories) in one of them (Category.pm), the main program keeps going. It doesn't wait for edit_categories to finish.

Is that normal? Is there a way to get it to wait?

Also, for some reason in the main program I had to call it using Category::edit_categories() rather than just edit_categories() even though I have use Category; at the top. This does not seem to be the case for other modules.

thanks,

melguin.

Replies are listed 'Best First'.
Re: not waiting for module to return
by BMaximus (Chaplain) on Dec 19, 2001 at 21:48 UTC
    Could you please post some code up for us to have a look see? I doubt that perl is going on through edit_categories() without having it return work. Its probably returning nothing.

    BMaximus
Re: not waiting for module to return
by melguin (Pilgrim) on Dec 19, 2001 at 22:09 UTC
    Why asking can give you your own answer:

    I've been looking at this off and on for over a month, and as I went through the code again to see what to post, it just hit me that the reason it is returning is because the sub is opening a GTK window (that way the original window can keep functioning).

    sorry everyone, and thanks for asking for more info. :)

    BTW, any clues on the problem with having to call it with Category::edit_categories?

    melguin.

      using a module doesn't import the functions into the namespace you are using. So you will have to call edit_categories() through the included module unless you use Exporter to import the function into the current namespace to call it like:
      edit_categories();

      instead of
      &Categories::edit_categories();

      BMaximus

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://133296]
Approved by root
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.