Re: import perl module after edit

2007-08-13 Thread Chris Pax
On Aug 13, 5:26 pm, [EMAIL PROTECTED] (Chas Owens) wrote: > On 8/12/07, Chris Pax <[EMAIL PROTECTED]> wrote: > snip> so I tried require and do. > > I guess its best to explain my goal here. I am using perl for gtk > > programming. The main code will use the glade bind

Re: import perl module after edit

2007-08-12 Thread Chris Pax
On Aug 12, 12:17 pm, [EMAIL PROTECTED] (Mr. Shawn H. Corey) wrote: > Paul Lalli wrote: > > On Aug 11, 7:18 pm, [EMAIL PROTECTED] (Chris Pax) wrote: > >> i have two files > > >> ###callbacks.pm### > >> sub foo{ > >> return &qu

import perl module after edit

2007-08-12 Thread Chris Pax
i have two files ###callbacks.pm### sub foo{ return "foo"; } sub bar{ return "foo"; } 1; # main.pl## #!/usr/bin/perl #PSUDO CODE# #open callbacks.pm #remove 1; #write "sub moo{\n\treturn \"moo\";\n}\n" #write "1;" package ma

how do I Append to Perl's @INC array using a variable

2007-07-23 Thread Chris Pax
I know that if i use: use lib "/path/to/dir" works. but when I try to use a variable it does not work. here is my code: @dirs = split /\// , $0; delete $dirs[-1]; my $runningDir = join "/",@dirs; $runningDir.="/"; use lib $runningDir; what I am trying to do with this coded is add the running direc