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 20, 2001 at 02: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 20, 2001 at 03: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