|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
use of external modules...
is it possible to include a module in a subroutine, or do you have to include it at the start of a script ?? I want to make 2 subroutines which use the HTML::TagFilter module so I can use it in multiple pages, but can I put the "use HTML::TagFilter" in the subroutine or do I have to put it in each file which will use this subroutine.
sub MessageFilter { use HTML::TagFilter; do some stuff with it...... } thanx, Marc |
|
#2
|
||||
|
||||
|
why not try it and find out?
(that's a coy way of saying "yes", with a nudge to try stuff out before posting) The only caveat- if you're going to be calling the subroutine multiple times in an invocation of a script, you're going to be incurring a significant overhead reinitializing the object each time the sub is called. Something to think about. . . |
|
#3
|
||||
|
||||
|
I just use it once per file...so that won't be a problem, but thanx anyway. It seems to be working....
Marc |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > use of external modules... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|