Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Is it possible to reload a Module?

    I want to be able to change the Users.pm, and then make the main program to use the changes, without restarting it. Is this possible, and how?

    //Walle

  • #2
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,944
    Thanks
    2
    Thanked 170 Times in 165 Posts
    No it won't work.

    The modules are loaded at compile time, so you need to restart the script.

  • #3
    Senior Coder
    Join Date
    Mar 2006
    Posts
    1,274
    Thanks
    2
    Thanked 39 Times in 38 Posts
    He could maybe use "require module" which is loaded at run time.

  • #4
    Super Moderator
    Join Date
    May 2005
    Location
    Southern tip of Silicon Valley
    Posts
    2,944
    Thanks
    2
    Thanked 170 Times in 165 Posts
    That is true. However, my reading of the question was that he wanted to edit then relaod the module, which can't be done without a restart of the script.

  • #5
    Senior Coder
    Join Date
    Mar 2006
    Posts
    1,274
    Thanks
    2
    Thanked 39 Times in 38 Posts
    Quote Originally Posted by FishMonger View Post
    That is true. However, my reading of the question was that he wanted to edit then relaod the module, which can't be done without a restart of the script.
    After rereading his question, I think you're right. As Gilda Radner playing the role of Emily Litella would have said: "Never mind".

  • #6
    New to the CF scene
    Join Date
    Aug 2009
    Posts
    6
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for the replay. Maybe I could use Require instead of Use.
    Btw, found this on google, Module-Reload-Sel-1.02
    http://search.cpan.org/~chthorman/Mo...2/Selective.pm

  • #7
    Senior Coder
    Join Date
    Mar 2006
    Posts
    1,274
    Thanks
    2
    Thanked 39 Times in 38 Posts
    A 7 year old module that has never been updated..... either its really good and never needed updating, or its obsolete by now. Let us know if you use it and if it works or not.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •