Re: Problem with package

2005-09-20 Thread Todd W
Charles K. Clarkson [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] snip / In script: #!/usr/bin/perl use strict; use warnings; use lib '.'; use Inn; Not trying to be pedantic but just want to add here, the current directory is set in @INC by default when perl is compiled: $

Problem with package

2005-09-15 Thread Luinrandir
package Inn; BEGIN {} END {} return 1; An error comes up when I include the END{} but not the BEGIN{} any clues? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: Problem with package

2005-09-15 Thread Bob Showalter
Luinrandir wrote: package Inn; BEGIN {} END {} return 1; An error comes up when I include the END{} but not the BEGIN{} any clues? Er, WTF are you trying to do? What is the error? You can't use return outside of a sub. The normal idiom is a bare 1 to provide a true result for

RE: Problem with package

2005-09-15 Thread Charles K. Clarkson
Luinrandir mailto:[EMAIL PROTECTED] wrote: : package Inn; : : BEGIN : {} : : END : {} : : return 1; : : : An error comes up when I include the END{} but not the BEGIN{} Which error are you getting? I don't get any errors. In './Inn.pm': package Inn; BEGIN{} END {} return 1;

Re: Problem with package

2005-09-15 Thread Luinrandir
there must be a problem with my web host. cause now I can't even run the program. Lou - Original Message - From: Charles K. Clarkson [EMAIL PROTECTED] To: beginners@perl.org Sent: Thursday, September 15, 2005 6:49 PM Subject: RE: Problem with package Luinrandir mailto:[EMAIL

Re: Problem with package

2005-09-15 Thread Bob Showalter
Bob Showalter wrote: You can't use return outside of a sub. The normal idiom is a bare 1 to provide a true result for require(). I'm wrong. You _can_ return from a do FILE construct. So there shouldn't be an error. (suggest you remove the return anyway; it isn't normally used in that

problem about package, continually

2001-06-26 Thread tobobo
All right, Thanks for all people and help! Let me seriously read document of Perlref and try again. An additional problem is when I share a package with several application synchronously, whether result in conflect, one application is using the routine, another call it at the same time.