develooper Front page | perl.perl5.porters | Postings from March 2007

file reloading

Thread Next
From:
Irene Ladyko
Date:
March 29, 2007 03:49
Subject:
file reloading
Message ID:
1063097115.20070329174835@odesk.com
Hello, perl5-porters.

I use embeded perl (version 5.8.8) interpreter in my application.

Situation:
1. I load test.pm file per eval_pv function.
                        perl_eval_pv ("require 'test.pm';", FALSE);
2. Then call IncreaseGlobalVariable. It increases by 1.
3. Then I reload test.pm file again. As I understand reloading, it
means variable reloading too, i.e. int_var variable must be set on 75.
But it doesn't happened.

Questions:
          What must I do to reload file completely. (Global variables from
other files will not be reloaded). Please, point me to solution.


//----------test.pm---------------
$int_var = 75;

sub IncreaseGlobalVariable
{
        $int_var = $int_var + 1;
        $int_var;
}
1;
//--------------------------------

-- 
Best Regards,
Irene ,
C++ Developer
of ISS Art, Ltd., Omsk, Russia.
http://issart.com
http://issart.com/index/Portfolio/cpp&lang=eng
mailto:your@address.com


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About