Hi Joel --
Hey all. I'm starting out with CGI::Application, and I've got a littl
script that runs fine on one server, but on another server, it gives
me this error message.
[Sun Oct 28 17:29:23 2001] cc.cgi: Can't use string (start) as a
subroutine ref while strict refs in use at
.
-Jesse-
--
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Jesse Erlbaum ... CTO
[EMAIL PROTECTED] . Vanguard Media
v: 212.242.5317 x115 .. New York City
+-+-+-+-+-+- http://www.vm.com
Hi Mark --
Stephen Howard wrote:
I know i've had problems using 'use base' with perl
versions prior to 5.6, even though i believe it was supposed
to have been
implemented earlier than that. glad to see you got it worked out.
If it is an a Perl version issue, perhaps the CGI::App
Hi George --
OK, maybe I'm not too savvy at using ActiveState's PPM (Perl Package
Manager), but the latest version of CGI::Application I can find
in either of
the two repositories I can find (maybe there are more?!), is version 1.2.
Yeah. ActiveState is sorely out of date! Please go bug
into
function calls, and raw data into HTML::Template input. (HTML::Template is
the View part -- data into HTML.)
Have I misinterpreted your architecture?
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED
Hi Eric --
So, we should probably figure out just when it's too late to set the
run mode...Steve? I'll look if I get a chance.
When the HTML hits the web browser, it's too late to change the run-mode.
:-)
-Jesse-
-
To
-
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
different applications
will respond differently. That's a whole different thing, and it is not
incompatible with the design I have described.
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED
to accommodate this new
hook.
This hook should allow you to make additional FSMs which do whatever you
want. Does this accommodate your desired functionality?
Warmest regards,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED
Hi George --
I was _extremely_ happy to see that I could have
mode_param() execute a callback. Has anybody else
utilized this functionality yet, to your knowledge?
And as ever, thanks for your response(s).
I'm actually using it right now for a big application which uses the URI
path to set
Hi Elizabeth --
to generate the output. Alternatively, the preoutput hook could be
where
this decision making code exists. You would just need to have it return
a
bool that indicates whether run() should return *before* generating any
headers and actual output.
The placement of the
Hi All --
Have any of you seen the article on Perl.com earlier this month, XML and
Modern CGI Applications by Kip Hampton?
Evidently, Kip has written a module CGI::XMLApplication. It appears to be
90% about state management and 10% about XSL. It is the type of thing which
would be quite
-- it is HTML::Template. If Perl had an exception handling system,
HTML::Template would throw a not found error, and your app could catch it.
As it is, you have to just live with it, or catch it in an eval block, as I
have illustrated.
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
the feedback you received has helped you evaluate your implementation.
Warmest regards,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED
()-ing headers to STDOUT somewhere? Please
post your run mode method code so we can take a look at it.
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED]
-
To unsubscribe, e-mail
,$startloc) || die Failed to open Sysmon DB: $!;
The $! at the end will give the system error (e.g.: File not found, Bad
permissions, etc.), which should tell you a bit more about what went wrong.
Make this change and re-run the script. Post your error log to the list.
-Jesse-
Jesse
Can you make those methods into their own, independant
modules, that both
yoru SuperClass and your cron scripts make use of?
So:
package SuperClass;
use base CGI::Application;
use Package::Functions;
sub do_xyzzy{
my $self = shift;
These all sound like completely civilized solutions.
Wow! We're... *sniff*... CIVILIZED! Hehe... I'm imagining you saying
that in an English accent, smoking a pipe. Please pass the Grey Poupon.
:-)
Thanks for the accolades, Dan!
-Jesse-
Hi Terrence --
I've been meaning to respond to your post. Hopefully I can make this a
meaningful and cogent (albeit late) reply. It's a very complicated topic.
But what is missing from this strap-together approach? What is
better about it? I know for one that constant look-and-feel might
Hi Kenny --
The simple way (if I understand what you want) is:
if ($condition)
{
$self-Mode3();
}
Actually:
if ($condition) {
return $self-Mode3();
}
-Jesse-
-
To unsubscribe,
HTML::Template, however.)
Warmest regards,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
212.242.5317 x115
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL
Hey all --
There is now a web-archive of the CGI::Application mailing list:
http://www.mail-archive.com/cgiapp%40lists.vm.com/
(If any of you know of additional free web-archive services, let me know!)
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317
load_tmpl() with your own
function which uses TT. This seems to be how other TT users have solved
this problem. Perhaps some other TT user on the list can explain their
solution in more depth.
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL
not many people
understand sub-refs! Sub-refs will be faster -- about 10-times faster if I
remember my benchmark from ages ago. Sub-names will be a bit easier to
read, and will support inheritance.
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL
to support anything else, but this would
get you in the ball-park.
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL PROTECTED]
-
Web Archive: http://www.mail-archive.com/cgiapp
Hey Greg --
At 11:36 AM 04/03/2002, Jesse Erlbaum wrote:
Does this describe your situation? If so, why don't you simply
break your application into multiple applications, by required
authority? Each application could then have its own instance script.
At this point, you've lost much
reasons, from an ease-of-management point of
view, to deal with directories -- but you don't *have* to.) This is a
separate topic, however, and one more appropriate to a discussion about
mod_perl (or whatever web server API you're using).
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http
-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL PROTECTED]
-
Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
Hey Mark --
Jesse has written on a number occassions about the merits of handling
authentication for web applications at a level seperate from the
application logic. While this system appealed to me, I could see how it
do it without using mod_perl. Today I ran across another possible
in,
because it only cares about URLs. The application doesn't care, because it
knows that if it is called, the security system has already has its say:
The request has been authorized long before the app ever runs, no matter
what language that app is written in.
TTYL,
-Jesse-
Jesse Erlbaum
I received this message from a fellow who is interested in using
CGI::Application within his company's home-grown application architecture.
With Eric's permission I am forwarding him message to the list for comment.
(My reply will follow.)
-Original Message-
From: [EMAIL PROTECTED]
].
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL PROTECTED]
-
Web Archive: http://www.mail-archive.com/cgiapp@lists.vm.com/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
be used for a variety of other purposes. It could set
up an HTTP redirect, or perform some initialization which would not be
appropriate in cgiapp_init(). The new module, CGI::Application::Mailform,
utilizes this hook to verify run-time parameters.
Warmest regards,
-Jesse-
Jesse Erlbaum
() which sets it in a
variable:
sub cgiapp_prerun {
my ($self, $runmode) = @_;
$self-param('current_rm' = $runmode);
return $runmode;
}
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL PROTECTED
Hi Chris --
im both new to CGI::Application and perl programming in general,
so bear with me... :)
My question isn't to do with the actual CGI::Application module
(which works just fine), but the wrapper cgi that kicks it all off.
By wrapper cgi are you talking about what the
Hi Bal --
Commenting out the following lines in the CGI.PM resolved the
error. I don't
know if this is the correct way or not, if anyone has a
different way to
solve this, pls. let me know.
I would definitely NOT comment arbitrary lines from another module without
understanding WHY
Bal --
I checked my code and couldn't find anything wrong in it. I
don't know why
the browser thinks it's and xml where as I am printing HTML
all across the
script. I am attaching the script herewith as well. If you or
anyone on this
list finds the bug, pls. let me know.
My initial
will cause
any concurrent request to wait (block is the technical term) until the
first process is done. There are many Perl modules which support locking.
Search CPAN for one which suits your tastes.
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
Version 2.4 of CGI::Application is now available via CPAN!
Download site for CGI::Application:
http://www.cpan.org/authors/id/J/JE/JERLBAUM/
CHANGES SINCE VERSION 2.1:
- Added new module CGI::Application::Mailform as both an
example of how to use CGI::Application and a useful
(albeit
of wackiness with the installer tests. Let me know if anyone has any
problems.
TTYL,
-Jesse-
Jesse Erlbaum, CTO
Vanguard Media
http://www.vm.com
212.242.5317 x115
[EMAIL PROTECTED]
-
Web Archive: http://www.mail
Hi Sebastian --
Now, my index.cgi would look like this:
#!/usr/bin/perl
use CGI qw(:standard);
my $q = new CGI;
my $modules = {
sales = 'Sales',
invent = 'Inventory',
},
};
# Set a default
$q-param('mod' = 'main')
unless $q-param('mod');
# Dynamically pull in
41 matches
Mail list logo