As what I've learnt, 'use' is working during the compile time, where 'require' works at runtime, however, I have problem on understand this..
### code ### sub A { my ($case) = shift; if ($case == 0) { require "lib0.pl" ; use somePm; use anotherPm ; &doSth(...) } if ($case == 1) { require "lib1.pl" ; use somePm; use anotherPm ; &doSthEls(...) } if ($case == 2) { require "lib2.pl" ; use somePm; use anotherPm ; &doSthAnotherEls(...)} } sub B { my ($case) = shift; # something similar to A } sub C { my ($case) = shift; # something similar to A } ### EOF Code ### Say, if above is called by require, then I think it probrably those inline reqire and use are calling when the sub is called and when the case is matched... however, what about the above finally becomes a .pm would those use, require will be loaded once I use the above pm ? I do really concern about the loading of system... so which is a better method for lower the loading ? I think exporter can help to lower some loading, but how about those.... Sorry, I don't know how to phrase the question... =), unless I have some more clear concept on what is the real practise of runtime and compile time... Thanks in advice, Connie