b) Add the header() function to CGI::Minimal.
Since this is Perl, you can just add methods to classes at runtime:
Thanks for the example. (It worked!). I put it in my wrapper class (which
inherits CGI::Minimal) and it worked too. I don't understand why the method
name had to be fully qualified
testing the whole shebang CGI::Simple is just over 80% faster performing
the same task.
Anyway, thanks! I'll be using this instead of Minimal.
Mark
- Original Message -
From: Mark Fuller [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 23, 2003 11:03 PM
Subject: Re: [cgiapp
I've been using cgi::application (and html::template) for the last few days.
Wow, this is the cloest thing to perfection I've seen.
I believe the documentation should note that header_props should be set only
*after* header_type. I was setting my cookie after creating a session
tracking object.
From: Mark Stosberg [EMAIL PROTECTED]
I believe your finding is incorrect.
I think you are correct. Now I believe that I overlayed my header_props by
setting one property (a cookie) and then setting it again with the
redirection URL. (I thought that setting the header-type to redirect did it.
What's a good way to abort normal processing and display a simple error
message?
For example, let's say I insert a row into a MySQL table and it fails. I
don't want to develop a lot of processing (beyond perhaps sleeping 5 seconds
and trying again) to accomodate this. I just want to display a
For session tracking, I keep the values in a hash and update the table in
the teardown method. I thought this would be a faster way to update the
session-tracking table because, by then, I the runmode would have emitted
its output and the visitor would be receiving the page while the teardown
My first thought is to just use different run modes and make use of header
redirect's.
I did something like this. But, I ended up getting rid of cgi::session and
writing my own little session manager. For a few reasons. I felt
cgi::session provided more than I needed. And, if I did my own I
I want to do some cleanup after the HTML has been emitted. I believe the
teardown method is the place to do it. I have a few questions.
1. The browser doesn't display the page until teardown returns. If I put a
sleep(10) in teardown, the browser waits 10 seconds. I can fork a copy,
close
From: Thilo Planz [EMAIL PROTECTED]
So what I usually do here is make packages
That makes sense. I put my database stuff in db.pl and require it. So,
what's the advantage of putting it in db.pm as a package. I've never quite
understood why packages are preferred. To me, it seems like requiring a
I have a question about using superclasses in C::A. Using the example in the
C::A documentation, I have had a superclass (myApp.pm) for a long time. It
contains routines common to the application (cgiapp_init, etc.).
Today, I got the idea of having multiple levels of inheritance. I thought I
I've been working on how to perform 2-phase processing of a template. This
involves 1) initializing the template with page-specific language-specific
evaluation, 2) output that template to a scalar, 3) regex my munged tmpl_var
tags so they will now be recognizeable, 4) load this template (from
I understand that the purpose of the param method is to give me a way to
store variables in $self without potentially colliding with C::A's use of
the same name.
If that's correct, wouldn't it be easier just to choose a naming convention
within C::A (perhaps a prefix: __C_A__) and document that
From: Michael Peters [EMAIL PROTECTED]
Not just that, but it also provides an easy way to pass variables
between methods as well as communicating between plugins and other base
classes.
I'm not an OO guru. If I'm off base please forgive me. But, what's the
difference between
From: Andrew Brosnan [EMAIL PROTECTED]
Just speaking generally about OO, I always figure it's dangerous to
monkey with the object's underlying data structure. Might it change in
the future? Who knows.
I agree with that if I'm acessing C::A's underlying data structure. What I'm
getting at is why
From: Michael Peters [EMAIL PROTECTED]
If you want to store your stuff in the $self blessed hash, then go ahead
and do it.
Wait. That sounds like what I'd like to do. Is there a way I can bless my
own sliver of $self and store my own data structure there without trampling
on C:A's use of $self
Following are replies to Dan and Andrew:
From: Dan Horne [EMAIL PROTECTED]
It seems to me that the namespace issue is problematic. ... but what if I
unknowingly wrote a plugin that uses the same attribute,
From what I gather, plug-ins rely upon a namespace mechanism C::A
recommends. Why can't
From: Cees Hek [EMAIL PROTECTED]
1. You need to make sure that you use your own namespace so as not to
collide with anyone else. You suggested that CGI::App use __C_A__ as
a prefix, but it really should be you that uses a prefix.
If C::A provided the namespace, wouldn't this reduce the chances
From: Timothy Appnel [EMAIL PROTECTED]
* State management like Sessions or Cookies are a cardinal sin.
Why are cookies (session tracking) wrong? I use a cookie to keep a session
ID. I could put the session ID as a paramater on the URL. But, when a user
visits the site later his/her preferences
It seems like there's been a significant increase in development-related topics
over the past month. I'm not complaining. But, is there a risk that newbies
might find it harder to locate information in the archives? Or, feel less
inclined to subscribe if they're less interested in development
From: Ron Savage [EMAIL PROTECTED]
The negatives, as I see them, are:
- Complexity. It's not just a list, it's /another/ list. For what gain?
Hi Ron. Why are general user and developer lists complex? Developers should
be able to cope with this. Your average newbie wouldn't have to.
- Confusion.
From: Jeff MacDonald [EMAIL PROTECTED]
There are alot of users out there that LOVE back buttons to screw
things up, and LOVE clicking a submit button about a milllion times. I
What I've done is stuff a unique value into the form as a hidden field. I
use a time-based value like that available from
From: B10m [EMAIL PROTECTED]
* Brett Sanger [EMAIL PROTECTED] [2005-10-19 15:04:42-0400]
[Highlighting runmode navigation in template]
So I tried to move to include a Nav template. For that to work,
however, I need to make my run_mode visible to my template, which bugs
me in some way.
From: Ron Savage [EMAIL PROTECTED]
I don't use timeout, I send every char back to a Perl module (RPC.pm),
which
connects to the db, and then does:
Isn't that a lot of resources for each character without *any* timeout? If
it's not running in mod_perl (or one of the persistent perl environments)
From: Ron Savage [EMAIL PROTECTED]
I don't use timeout, I send every char back to a Perl module (RPC.pm),
which connects to the db, and then does:
Ron, since AJAX is asynchronous, what are the risks that typing savag
would result in 6 search results arriving back to the client out of order?
* George Hartzell [EMAIL PROTECTED] [2007-09-10T18:38:13]
Maybe some notes in the MIME::Lite docs about its shortcomings, or
requests for help fixing them, are in order?
I agree. I feel blindsided to learn I shouldn't be using MIME:Lite
(after dozens of uses over the years) in the way I just
I vote a gigantic -1. I like H:T and don't believe it's bad C:A
requires it as a default. Those savvy enough to use TT (or others)
shouldn't be affected by the required install of a simple default.
Mark
# CGI::Application community mailing list
##
o Add the session id to the URL. This method has the most problems, and
is not recommended.
What are the problems with the last option? ...
Google for XSS - Cross-site scripting attacks, as a starter.
I thought the problem with putting the session ID in the URL is that
the user might
On Feb 12, 2008 5:25 PM, Joshua Miller [EMAIL PROTECTED] wrote:
Developing on a central server is nice for dmz'd db access, and it saves
each dev from installing all the perl libs, apache, etc, on their own box
(or vm).
There's also CGI::Application::Server (which uses
HTTP::Server::Simple).
On Feb 13, 2008 5:33 PM, Lou Hernsen [EMAIL PROTECTED] wrote:
I sorta understandand then not..
It takes awhile to get your head around how C::A works (or, maybe
objects generally). Read these. Maybe they'll get you thinking in the
right direction.
I'm preparing to upload a plugin to CPAN. (My first. I'm waiting for a
PAUSE password). I'd like to make sure others agree with how I name
it.
Summary:
===
The module mimics Catalyst's behavior: When you return from a
controller action (runmode in C::A) it automatically renders your H::T
I would be interested to know of any flaws in my logic...
I did something like that, but went further. I started out with the
goal not to connect to the DB until necessary, and ended up with a
goal not to even test if I've already connected to the DB, or if the
handle is still alive, etc. I
On Fri, Feb 22, 2008 at 5:04 PM, Ron Savage [EMAIL PROTECTED] wrote:
Here's a demo:
This might be better asked on Perlmonks, but do you have a feel for
how widely used is fastcgi? I got the impression it's not because the
CPAN module isn't easy to find. Searching CPAN for fcgi returns a
Curious. Still, reliable (software) technology doesn't have to be
updated. This topic blew up
Sorry. It just looked like nothing was happening with these various
tools. For example: The SpeedyCGI/PersistentPerl web site has binaries
for download which are ancient. The fastcgi site's FAQ has a
IIRC there's a link from the FastCGI web site to the CPAN module.
Can you provide a link to the site that provides the link? :) If I go
to www.fastcgi.com it has a link to CPAN's main page.
The only way I found FCGI in the past was to browse FCGI::ProcManager
(which turned up in a search for
1. how can those unnecessary sessions be deleted?
If you're on a unix system you can use the find command with the
-mtime option to find files in a directory older than a certain time
(-name to limit it to a certain pattern of filename). If you're not on
unix you could write a simple Perl
On Sun, Feb 24, 2008 at 3:34 AM, Giannis Economou [EMAIL PROTECTED] wrote:
Actually, the best thing for me was to use the mod_fcgid module
(http://fastcgi.coremail.cn/) instead of the old fastcgi (www.fastcgi.com).
mod_fcgid is binary compatibility to mod_fastcgi, but I like it much more.
On Sun, Feb 24, 2008 at 1:42 AM, David Emery [EMAIL PROTECTED] wrote:
You'd be getting whatever version of Perl is on that machine.
Thanks. I had the idea that it was creating it's own statically linked
Perl executable.
It works very well for me. The ability to group scripts together to
I am using HTML::Template and CGI::Application::Plugin::ValidateRM.
Page content is generated dynamically which works fine until a
validation error occurs. Unfortunately err_TMPL_VAR field_name is
not valid H::T.
If your form fieldnames are dynamic I can think of a couple of options.
1.
On Wed, Mar 5, 2008 at 4:47 AM, Mike Tonks [EMAIL PROTECTED] wrote:
I'm struggling to accept the form method, because as you say no more
a href=myapp.cgi?rm=next - unless of course we use javascript.
Now I like the old links, so cookies seems like a no brainer to me.
Can anyone explain
On Fri, Mar 7, 2008 at 8:34 AM, Todd Ross [EMAIL PROTECTED] wrote:
I've seen quite a few posts on this list concerning
CGI::Application::Dispatch.
Was it Dispatch or Plugin::ActionDispatch?
http://search.cpan.org/perldoc?CGI%3A%3AApplication%3A%3APlugin%3A%3AActionDispatch
I know I mentioned
On Sat, Mar 8, 2008 at 3:05 AM, Torsten [EMAIL PROTECTED] wrote:
I attached a little test application showing the problem.
I don't think the mailing list accepts/distributes attachments. If you
want to email it to me directly I can look at it.
Mark
# CGI::Application community mailing
On Sat, Mar 8, 2008 at 4:04 PM, Ron Savage [EMAIL PROTECTED] wrote:
Hi Torsten
Ron, Torsten emailed it to me yesterday. What I found is that it
doesn't work with N::S's PreFork personality. But, it works fine
with the Fork personality. So, it has something to do with how N::S
creates (and
On Sun, Mar 9, 2008 at 4:17 PM, Ron Savage [EMAIL PROTECTED] wrote:
The sample code uses Net::Server::PreFork. I'm not sure, but if you have
multiple server processes waiting for connexions, it's possible the
first run mode is run inside one process, and the second run mode is run
inside a
Browsing the source for CGI.pm I noticed it calls
initialize_globals() when the class is loaded, but not when
instances are created. But, it does call it for each instance if the
mod_perl environment variable is set. (But, that does other things you
wouldn't want to do if you're not really using
On Mon, Mar 10, 2008 at 3:56 AM, Ricardo SIGNES
[EMAIL PROTECTED] wrote:
stores your whole session in the cookie. It's stored as a base64-encoded,
Rijndael-enciphered, JSON-encoded string. This seemed like a swell idea for
me,
I hear a lot about brute-force attacks on encryption. Also,
On Mon, Mar 10, 2008 at 6:15 AM, Michael Peters [EMAIL PROTECTED] wrote:
I just use a URL encoded JSON cookie. I don't put anything sensitive in
there.
Is there a risk that this contributes to the bad reputation of
cookies? One person puts stuff in a cookie and obfuscates it
(presumably for
On Mon, Mar 10, 2008 at 8:28 AM, Perrin Harkins [EMAIL PROTECTED] wrote:
Have you tried browsing the web without cookies recently? It doesn't
work at all on a large number of popular sites. For better or worse,
cookies are a part of the deal now.
But that doesn't mean anything belongs in
On Tue, Mar 11, 2008 at 8:19 AM, Ricardo SIGNES
[EMAIL PROTECTED] wrote:
Is your objection just that you don't want me storing anything in your
browser's cookie jar that isn't plaintext ...
Yes. I thought I'd said that more than once. A unfortunate perception
exists among many that cookies
On Sun, Mar 16, 2008 at 4:31 PM, James.Q.L [EMAIL PROTECTED] wrote:
I store ONLY $uuid in param because i need it in other controller. i
am passing $dbh to
Company:: modules because these modules are not inherited from C::A.
The example your provided showed them being passed as parameters to
On Mon, Mar 17, 2008 at 7:05 AM, James.Q.L [EMAIL PROTECTED] wrote:
I might be missing the point, but what's wrong with storing $uuid in
Company::Util as an our variable and accessing it from anywhere as
$Company::Util::uuid ?
correct me if i am wrong. that won't work under mod_perl.
On Mon, Mar 17, 2008 at 1:00 PM, James.Q.L [EMAIL PROTECTED] wrote:
i think you are right. it is fine as long as the global variable is
explicitly initialized.
No problem. So, what I was thinking is that you could initialize the
our $uuid with specific method you'd call from cgiapp_init (like
On Wed, May 7, 2008 at 12:18 PM, Robert Hicks [EMAIL PROTECTED] wrote:
I have a runmode that goes back to home when finished:
$self-home;
I would like to send a flag back to home (0 for bad and 1 for good) so a
param in home can be set.
From the runmode (method) you want to return back
On Thu, May 15, 2008 at 9:03 AM, Stephen Carville
[EMAIL PROTECTED] wrote:
Is there any way to have a template where the number of columns is
determined at run time?
I don't know if this is a good idea, but you can use HTML::Template's
filter option to modify the template's content when it's
On Sun, Nov 23, 2008 at 7:10 AM, Mark Stosberg [EMAIL PROTECTED] wrote:
Some ask Why bother with vanilla CGI anymore?
I agree. The frameworks seem like the typical good idea that turns
into a nightmare because of the devils in the details. I'm not
familiar with all of them. (I'm thinking of
On Tue, Jan 13, 2009 at 5:41 PM, Lyle webmas...@cosmicperl.com wrote:
People wrote:
(various comments)
I think you're right, I shouldn't worry and just let the browser handle it.
I might make it remember the username by default for convenience if they
choose to enter their password each
On Wed, Jan 14, 2009 at 3:41 AM, Lyle webmas...@cosmicperl.com wrote:
Runs the risk of the session ID being found, but I guess if I verify the
cookie and IP address...
I think the risk of the session ID (cookie) hijacking is the same
either way. So, whether they are forced to a login page as a
On Tue, Apr 14, 2009 at 8:16 AM, Mark Stosberg m...@summersault.com wrote:
However, only validation can check if in fact I have all parameters I
need in the right format. That protects against the case where my
application generates a link with a valid checksum, but somehow has the
wrong data
On Sat, Apr 25, 2009 at 2:17 PM, Richard Jones ra.jo...@dpw.clara.co.uk wrote:
I vote we stick with Titanium.
I like the name Titanium. But, I get a previous poster's comment about
it being difficult to google for. It does seem a bit non-specific,
unlike names like Jifty or Ruby on Rails. (But,
On Thu, Jul 9, 2009 at 6:07 PM, Ron Savager...@savage.net.au wrote:
However, in a module I'm about to release, I can't ship their database.
Shouldn't the data be Public Domain? For one thing it is merely a
collection of facts. In the US a collection can be copyrighted to the
extent that it
Our company pays for a database of US Zipcodes. You may be able to make
your own DB of it with WWW::Mechanize scraping,
If the interface is a Windows GUI, I've liberated my fair share of
Public Domain data using www.autoitscript.com (a free scripting
language to automate Windows apps.).
Mark
On Wed, Aug 12, 2009 at 8:27 AM, P Kishorpunk.k...@gmail.com wrote:
I have read the article on Order of Operations at
http://cgiapp.erlbaum.net/index.cgi?OrderOfOperations ...
I can't answer your question. But, I never saw that document before.
It's really useful.
I think it would be
On Thu, Sep 3, 2009 at 1:56 PM, Mark Rajcokmraj...@gmail.com wrote:
When I think of CGI::App though, I don't think of onions or leaves...
I agree. The proposed logos are very nice. But, I don't get the
connection to leaves. When I think of a Powered by logo, I just
think of the phrase CGI::App
On Fri, Oct 30, 2009 at 11:47 AM, Gurunandan R. Bhat
g...@informationmatters.in wrote:
I want to insert a login
form on every page or a logged-in status depending on whether
$app-authen-username is defined or not (I am using
CAP-Authentication).
Why wouldn't this just be an include file,
Would it make sense to have a mailing list specific to these wiki page
notices? Allowing folks who don't want to receive them could opt out?
It's not a big deal. I've created a filter to delete them on arrival.
Mark
On Thu, Jan 28, 2010 at 9:54 AM, cgi...@erlbaum.net wrote:
CGI::Application
It's my last attempt to save the Wiki.
Sorry. What you explained made sense. If the daily edits could come in
a digest, that might be better (IMO).
A completely different idea: What I've seen work really well is
1. Use forum software (like phpbb, but you guys would probably lean
toward a
On Mon, Feb 1, 2010 at 11:01 PM, David Kaufman da...@gigawatt.com wrote:
I think we definitely need to put some some anti-spam techniques to
discourage the spammers, but I am worried that real users with ideas or
corrections to contribute would not bother to ask for access.
I want to mention
Someone said:
Something like Google Groups that was open source would certainly be
nice.
I like phpbb. It's heavy, but it's the most widely used forum
software. The older I get, the more I subscribe to the ancient Chinese
proverb: 10 million flies can't be wrong.
Phpbb can be integrated with
On Tue, Feb 2, 2010 at 5:20 PM, Lyle webmas...@cosmicperl.com wrote:
I personally loathe Perl sites that use PHP.
I used to feel guilty about what others would think if they knew I
edited Perl with a non-Perl editor.
I got over it. The result was better than forever talking about how
someone
On Thu, Feb 4, 2010 at 2:31 PM, Paul Miller listm...@voltar-confed.org wrote:
If the website for it doesn't have some
kind of demo and in fact uses mostly PHP code, what good is the lib.
I understand your point and it has some validity. But, that's not what
Lyle said, and I was addressing. He
On Thu, Feb 4, 2010 at 3:26 PM, Lyle webmas...@cosmicperl.com wrote:
Look at www.yabbforum.com, it's a Perl forum script, but it's site is in
php. I've contacted them about this before, to be told I wasn't the
first to bring it up.
I agree with you guys. But, first it was loathing a Perl site
On Sat, Apr 3, 2010 at 1:43 PM, John Cianfarani jcianfar...@rogers.comwrote:
In one faq page it says to stay around the 4-12 runmodes for a project am
I
creating too many? How would you deal with multiple pages to edit?
You can have multiple modules, each with multiple run modes. So, you
On Mon, Jul 19, 2010 at 4:16 AM, Dietrich Streifert
dietrich.streif...@visionet.de wrote:
I'm currently using speedy_cgi as a persistent perl process and wanted
to test if fcgi would be an option for me.
Is speedy_cgi safe to use for a larger, longer-term application?
(I.e., widely used, still
On Mon, Jul 19, 2010 at 8:29 AM, Dietrich Streifert
dietrich.streif...@visionet.de wrote:
That is what I'm actually doing. I use dbh-ping() to test if the
connection is still active and reconnect to the db if needed.
If you're using the class variable to store your DB handle, what was
your
On Tue, Aug 3, 2010 at 12:07 PM, bfc0...@comcast.net wrote:
If CGI::Application doesn't have it's own web-serving engine,
does anyone have a favorite very small server that they've used
with cgiapp?
The documentation for C::A says:
===
Offline website development
You
74 matches
Mail list logo