Re: subroutine in seperate file, question

2012-08-11 Thread Rob Dixon
On 11/08/2012 12:43, Shawn H Corey wrote: No, @ISA is used only by Exporter.pm Exporter makes no use of @ISA at all. This array is a per-package variable used by Perl internally to implement object-oriented inheritance. It is very often used to make a package a subclass of Exporter, but that i

Re: subroutine in seperate file, question

2012-08-11 Thread Rajeev Prasad
August 11, 2012 6:43 AM Subject: Re: subroutine in seperate file, question On Sat, 11 Aug 2012 02:49:56 -0400 shawn wilson wrote: > On Aug 10, 2012 11:41 PM, wrote: > > > > > I mean to ask, wether they will clash with the same loaded modules > loaded > > > in ca

Re: subroutine in seperate file, question

2012-08-11 Thread Shawn H Corey
On Sat, 11 Aug 2012 02:49:56 -0400 shawn wilson wrote: > On Aug 10, 2012 11:41 PM, wrote: > > > > > I mean to ask, wether they will clash with the same loaded modules > loaded > > > in calling script? > > > > > > > No. they are loaded only once. > > > > Well, they will both be in ISA to look up

Re: subroutine in seperate file, question

2012-08-10 Thread shawn wilson
On Aug 10, 2012 11:41 PM, wrote: > > > I mean to ask, wether they will clash with the same loaded modules loaded > > in calling script? > > > > No. they are loaded only once. > Well, they will both be in ISA to look up separately but there is no conflict.

Re: subroutine in seperate file, question

2012-08-10 Thread pangj
> I mean to ask, wether they will clash with the same loaded modules loaded > in calling script? > No. they are loaded only once. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: subroutine in seperate file, question

2012-08-10 Thread Rajeev Prasad
I mean to ask, wether they will clash with the same loaded modules loaded in calling script? From: "pa...@riseup.net" To: Rajeev Prasad Cc: perl list Sent: Friday, August 10, 2012 9:05 PM Subject: Re: subroutine in seperate file, question Yes, t

Re: subroutine in seperate file, question

2012-08-10 Thread pangj
Yes, the modules in required file will be loaded. $ cat ext.pl use CGI; use DBI; 1; $ cat main.pl require 'ext.pl'; use Data::Dumper; print Dumper \%INC; Thus run perl main.pl to see what prints. > i want to keep a peice of code which uses CGI and DBIx module in a > seperate file, and want t

subroutine in seperate file, question

2012-08-10 Thread Rajeev Prasad
i want to keep a peice of code which uses CGI and DBIx module in a seperate file, and want to include it in all my scripts as follows:   require "/path/to/script/file";   I am not sure if the calling program is also using same modules CGI and DBIx what kind of unknown errors i might get? anyone k