Ask a Question related to PERL Modules, Design and Development.
-
Rob #1
Custom PM Modules Won't Work
Hello
I have written a website using Perl which runs in IIS and I now want to
divide the functionality into modules but as soon as I try I get the error
"The CGI Application Missbehaved"
Can someone give me a simple example Perl script that uses a module so I can
test to see if this is a server issue and can anyone recommend a way to fix
this?
I have tried both Use and Require with the same results
Thanks
Rob
Rob Guest
-
Flex 3 GA Designer doesn't work with my modules
This is absolutely critical to our application. In Flex 3 Beta I had no issues doing this, in Flex 3 GA it does not work and I'm wondering if any... -
Yahoo! Merchant Custom modules?
I am having the same problem and was wondering how/if you ever resovled. Thanks:disgust; -
Custom Font does not work in Acrobat 6
We have a Custom designed True Type Font for the company, this Font is used for all MS Word documents. This was fine with Acrobat 5, but we have just... -
Custom print settings won't work
I am printing on 13x16 inch paper. In page setup photoshop ignores the custom settings when I specify my Epson 1280 printer. It will print 11x17 or... -
Custom HTTP Modules and Web Services
I created a Web Service and a custom HTTP Module. I've put the HTTP Module dll in the Web Service's bin folder. I've put in the Web Service's... -
Sisyphus #2
Re: Custom PM Modules Won't Work
"Rob" <support@16pentlandclose.com> wrote in message
news:OLR5g.1170$LU3.898@newsfe2-gui.ntli.net...can> Hello
>
> I have written a website using Perl which runs in IIS and I now want to
> divide the functionality into modules but as soon as I try I get the error
> "The CGI Application Missbehaved"
> Can someone give me a simple example Perl script that uses a module so Ifix> test to see if this is a server issue and can anyone recommend a way toThe module (Foo.pm):> this?
>
> I have tried both Use and Require with the same results
>
> Thanks
> Rob
---------------------------------------
package Foo;
#require Exporter;
#@ISA = qw(Exporter);
#@EXPORT = qw(greeting);
sub greeting {
print "Hello from foo\n";
}
1;
---------------------------------------
The script that uses Foo.pm:
---------------------------------------
use warnings;
use Foo;
Foo::greeting();
---------------------------------------
If, in Foo.pm, you include the code that is currently commented out, then
the script could be changed to:
---------------------------------------
use warnings;
use Foo;
greeting();
---------------------------------------
See 'perldoc Exporter' for more info and other (better) options regarding
export of functions from modules.
Cheers,
Rob
Sisyphus Guest
-
Rob #3
Re: Custom PM Modules Won't Work
Thanks
This works in a command prompt but won't work in a web script in IIS with
the CGI module also loaded
It says
CGI Error
The specified CGI application misbehaved by not returning a complete set of
HTTP headers.
Is it a permisions problem on the directory?
Or is Perl not looking in the same directory as the script for .pm files?
Thanks
Rob
"Sisyphus" <sisyphus1@nomail.afraid.org> wrote in message
news:4458089e$0$14494$afc38c87@news.optusnet.com.a u...>
> "Rob" <support@16pentlandclose.com> wrote in message
> news:OLR5g.1170$LU3.898@newsfe2-gui.ntli.net...> can>> Hello
>>
>> I have written a website using Perl which runs in IIS and I now want to
>> divide the functionality into modules but as soon as I try I get the
>> error
>> "The CGI Application Missbehaved"
>> Can someone give me a simple example Perl script that uses a module so I> fix>> test to see if this is a server issue and can anyone recommend a way to>>> this?
>>
>> I have tried both Use and Require with the same results
>>
>> Thanks
>> Rob
> The module (Foo.pm):
> ---------------------------------------
> package Foo;
>
> #require Exporter;
> #@ISA = qw(Exporter);
> #@EXPORT = qw(greeting);
>
> sub greeting {
> print "Hello from foo\n";
> }
>
> 1;
> ---------------------------------------
>
> The script that uses Foo.pm:
> ---------------------------------------
> use warnings;
> use Foo;
> Foo::greeting();
> ---------------------------------------
>
> If, in Foo.pm, you include the code that is currently commented out, then
> the script could be changed to:
> ---------------------------------------
> use warnings;
> use Foo;
> greeting();
> ---------------------------------------
>
> See 'perldoc Exporter' for more info and other (better) options regarding
> export of functions from modules.
>
> Cheers,
> Rob
>
>
Rob Guest
-
Brian McCauley #4
Re: Custom PM Modules Won't Work
Rob spits TOFU in our faces:
[please don't]
Perl does not do this by default. If you are sure that you want it to,> [...] is Perl not looking in the same directory as the script for .pm files?
see the solution given in the FAQ. But it's probably better to stop
wanting to.
Brian McCauley Guest
-
Rob #5
Re: Custom PM Modules Won't Work
Thanks
I've got it now
FAQs are wonderful things!
I had to add this to the top of the main page and now everything is sorted:
use FindBin;
use lib "$FindBin::Bin";
Thanks
Rob
"Brian McCauley" <nobull67@gmail.com> wrote in message
news:1146654831.454140.194800@v46g2000cwv.googlegr oups.com...>
> Rob spits TOFU in our faces:
>
> [please don't]
>>>> [...] is Perl not looking in the same directory as the script for .pm
>> files?
> Perl does not do this by default. If you are sure that you want it to,
> see the solution given in the FAQ. But it's probably better to stop
> wanting to.
>
Rob Guest



Reply With Quote

