Re: How do I force a 'Save Window?'
For IE 5.5, IE doesn't respect the Content-Disposition header and will prompt the user to save a file as "foo.pl" (or whatever the name of your script happens to be) M$ claims that this was fixed in IE 5.5 SP1. They document this bug (as fixed) here: http://support.microsoft.com/default.aspx?scid=kb;EN-US;267991 -kb [EMAIL PROTECTED] wrote: Quick google search shows : http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html Send the mime type as : application/vnd.ms-project I do this with excel using application/vnd.ms-excel and the marketing folks love it. So, you would have to provide a link to your modperl app that opens the file and pushes it out with this content type. Bonus Points : Use Content-Disposition: attachment;filename=blabla and pre-set the name of the file on disk. John- John- On Tue, 19 Nov 2002 16:27:33 -0700 "Tim Tompkins" wrote: > You can always set the content type to "application/octet-steam" but I > wouldn't expect IE to honor the content type. > > > Regards, > > Tim Tompkins > -- > Programmer > http://www.clipart.com/ > http://www.rebelartist.com/ > -- > - Original Message - > From: "Dennis Daupert" > To: > Sent: Tuesday, November 19, 2002 4:02 PM > Subject: How do I force a 'Save Window?' > > >> I have file upload working, can upload files of ascii or binary format. >> But a problem when you browse to a page that dynamically displays >> hyperlinks to files. Text and html files display normally in a browser, >> and Word docs popup MS Word as a helper app, and the word doc >> opens fine. But MS Project files popup a browser instance and MS >> Project, and you get the usual "Enable macros" and such popups as >> normal, but only a subset of the project displays in the browser >> window, >> and none of the buttons are active in the Project application. Bummer. >> >> How can I force a "Save File" dialog screen for selected files, so the > > user > >> will have the option to download the file, then open it in Project or >> whatever? >> >> >> Thanks for any help or information. >> >> /dennis >> >> -- >> > > - > >> Office phone: 817-762-8304 >> >> -- >> > > - > >> "Great leaders never tell people how to do their jobs. >>Great leaders tell people what to do and establish a >> framework within which it must be done. >> Then they let people on the front lines, >>who know best, figure out how to get it done." >> ~ General H. Norman Schwarzkopf >> >> >> >> > -- Kevin Berggren760-480-1828 System Maker, Inc 3913 Sierra Linda Dr. Escondido, CA 92025
RE: Obfusacating the source
Hi Francesc -- > I need some tool that gets all the perl modules and > mason components, of an application we made, and obfucaste > it a little. > > The idea is get something just a little difficult to > read, so the customer engineers have a hard time if > they try to read the source. I have two suggestions for you. First, you can make your code "un-maintainable" by following the excellent advice in this little primer: http://mindprod.com/unmain.html Second, you can hire Damian Conway. Here is an example of his expertise in the world of hidden meaning: http://libarynth.f0.am/cgi-bin/view/Libarynth/SelfGOL Back-in-the-day there was the idea of doing a core-dump and then "un-dumping" your core into a running state. I don't know how this would work with a Mason-based system, however. Then, there is always creating a special installation of Perl which can decrypt the code prior to parsing. That sounds like a weekend project for the suitably twisted. Warmest regards, -Jesse- -- Jesse Erlbaum The Erlbaum Group [EMAIL PROTECTED] Phone: 212-684-6161 Fax: 212-684-6226
RE: Migrating from CGI.pm to Apache::Request question.
Hi Coexec -- > I am experienced with using the CGI.pm, and now I want > to rewrite all of my CGI's using mod_perl and > Apache::Request. Maybe a silly question: What are you hoping to gain by doing this? If you're already using Apache::Registry, then your CGI.pm apps are ALREADY running as mod_perl modules. The move from CGI.pm to Apache::Request, in this case, is not likely to give you any real speed advantage. As you've pointed out, Apache::Request is only a partial replacement for CGI.pm. Ken suggested that you could continue to use CGI.pm in addition to Apache::Request if you need the functionality. If you choose to do so you will be using even MORE code than CGI.pm alone. More code means more memory, at very least -- not to mention the complexity of the system. Finally, you have to throw away all that time you spent learning the finer points of CGI.pm, and spend time learning the finer points of Apache::Request. Multiply that by the number of developers you have. I see that a few people have been doing this over the years, but I still don't see the advantage. Other than the Siren call of "don't use CGI.pm -- it's evil", I can't imagine that Apache::Request has any really compelling advantages. Personally, I use CGI.pm (via CGI::Application) for my applications and straight mod_perl handlers for low-level functionality such as authentication, authorization and custom logging. This allows the majority of my developers, who are engaged in writing application code (the vast majority of the work on the typical project), to leverage their expertise. More advanced mod_perl hacks work on the "heavy lifting" handlers, which are few and far between. On a related topic, I strongly agree with Ken that you should move your HTML generation into a templating system. HTML::Template is my personal preference. I use H::T in conjunction with CGI::Application to implement all my web apps. FWIW, CGI::Application works equally well with Template Toolkit, if that's your preference. Warmest regards, -Jesse- -- Jesse Erlbaum The Erlbaum Group [EMAIL PROTECTED] Phone: 212-684-6161 Fax: 212-684-6226
Re: References for modperl usage in financial institutions?
Does it have to be mod_perl in order to help your case? I gave a talk on Perl being used for webapps for investment banking at the 1999 Perl Conference and Morgan Stanley allowed a champion of Perl deliver a keynote at the OReilly Open Source Conference in the year 2000. But neither of us talked about mod_perl specifically. Both presentations might be available from OReilly if you register for their conference portal. I think there may also be a chapter or two on using Perl in a financial institution in the book "Applied Perl" from the publisher Hungry Minds (IDG or Wiley subsidiary?) (compiled advocacy articles with Peter Williams as editor and author of a couple chapters). Marcin Kasperski wrote: I am looking for some examples of modperl being used in financial institutions (banks, brokers, ... but also large e-commerce). I spent a few hours searching the internet but it seems such a information is not easily available. I am interested in both official and unofficial information. Technical details are not necessary. Thanks in advance for any reply.
Re: Migrating from CGI.pm to Apache::Request question.
On Tue, 19 Nov 2002, Coexec wrote: > Date: Tue, 19 Nov 2002 15:40:37 -0800 (PST) > From: Coexec <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Migrating from CGI.pm to Apache::Request question. > > Hello all, I have been searching through the mailing > list archives for the answer to my question, but I > have not found it. > > I am experienced with using the CGI.pm, and now I want > to rewrite all of my CGI's using mod_perl and > Apache::Request. According to everything that I have > been reading, the Apache::Request module handles only > GET, POST and Cookie data, and no HTML. Basically, my > question is, what is the most commonly used module for > generating HTML like the CGI.pm does ? > > Thanks There are so many different ways to handle HTML generation that it will make your head spin. You're always welcome to continue using CGI.pm's methods for generating HTML, but that usually couples the logic and presentation of your application so tightly that it makes for less-than-maintainable code -- less than what, however, remains the question. Many people like to use templating systems (HTML::Template, Template::Toolkit), some like to use more all-inclusive packages (Mason, Apache::ASP, Embperl), some people just use "print" statements (arguably the worst choice). Asking what is the most common way people on this list won't likely generate a consensus; ask 10 people how they do this and you'll probably get 10 different answers. As for me, I'm quite partial to Template::Toolkit. You'll have to decide what works best for you. No need to use a sledgehammer to drive a finishing nail. Use whatever tool is the simplest to use for your situation, but no simpler. :-) ky
Re: References for modperl usage in financial institutions?
This is unofficial, since I haven't been affiliated with them for several years, but... Morgan Stanley Online (the discount brokerage, not the main corporate stuff - formerly "Morgan Stanley Dean Witter Online", "Discover Brokerage Direct", and "Lombard Brokerage") switched from straight CGI to mod_perl early in 1997, and was still running most of the site that way whey they ceased operations this past summer. HTH. Marcin Kasperski wrote: I am looking for some examples of modperl being used in financial institutions (banks, brokers, ... but also large e-commerce). I spent a few hours searching the internet but it seems such a information is not easily available. I am interested in both official and unofficial information. Technical details are not necessary. Thanks in advance for any reply.
Migrating from CGI.pm to Apache::Request question.
Hello all, I have been searching through the mailing list archives for the answer to my question, but I have not found it. I am experienced with using the CGI.pm, and now I want to rewrite all of my CGI's using mod_perl and Apache::Request. According to everything that I have been reading, the Apache::Request module handles only GET, POST and Cookie data, and no HTML. Basically, my question is, what is the most commonly used module for generating HTML like the CGI.pm does ? Thanks __ Do you Yahoo!? Yahoo! Web Hosting - Let the expert host your site http://webhosting.yahoo.com
Re: How do I force a 'Save Window?'
Quick google search shows : http://www.utoronto.ca/webdocs/HTMLdocs/Book/Book-3ed/appb/mimetype.html Send the mime type as : application/vnd.ms-project I do this with excel using application/vnd.ms-excel and the marketing folks love it. So, you would have to provide a link to your modperl app that opens the file and pushes it out with this content type. Bonus Points : Use Content-Disposition: attachment;filename=blabla and pre-set the name of the file on disk. John- John- On Tue, 19 Nov 2002 16:27:33 -0700 "Tim Tompkins" <[EMAIL PROTECTED]> wrote: You can always set the content type to "application/octet-steam" but I wouldn't expect IE to honor the content type. Regards, Tim Tompkins -- Programmer http://www.clipart.com/ http://www.rebelartist.com/ -- - Original Message - From: "Dennis Daupert" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 4:02 PM Subject: How do I force a 'Save Window?' I have file upload working, can upload files of ascii or binary format. But a problem when you browse to a page that dynamically displays hyperlinks to files. Text and html files display normally in a browser, and Word docs popup MS Word as a helper app, and the word doc opens fine. But MS Project files popup a browser instance and MS Project, and you get the usual "Enable macros" and such popups as normal, but only a subset of the project displays in the browser window, and none of the buttons are active in the Project application. Bummer. How can I force a "Save File" dialog screen for selected files, so the user will have the option to download the file, then open it in Project or whatever? Thanks for any help or information. /dennis -- - Office phone: 817-762-8304 -- - "Great leaders never tell people how to do their jobs. Great leaders tell people what to do and establish a framework within which it must be done. Then they let people on the front lines, who know best, figure out how to get it done." ~ General H. Norman Schwarzkopf
Re: How do I force a 'Save Window?'
That should be "stream" not "steam" :) Regards, Tim Tompkins -- Programmer http://www.clipart.com/ http://www.rebelartist.com/ -- - Original Message - From: "Tim Tompkins" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Dennis Daupert" <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 4:27 PM Subject: Re: How do I force a 'Save Window?' > You can always set the content type to "application/octet-steam" but I > wouldn't expect IE to honor the content type. > > > Regards, > > Tim Tompkins > -- > Programmer > http://www.clipart.com/ > http://www.rebelartist.com/ > -- > - Original Message - > From: "Dennis Daupert" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, November 19, 2002 4:02 PM > Subject: How do I force a 'Save Window?' > > > > I have file upload working, can upload files of ascii or binary format. > > But a problem when you browse to a page that dynamically displays > > hyperlinks to files. Text and html files display normally in a browser, > > and Word docs popup MS Word as a helper app, and the word doc > > opens fine. But MS Project files popup a browser instance and MS > > Project, and you get the usual "Enable macros" and such popups as > > normal, but only a subset of the project displays in the browser window, > > and none of the buttons are active in the Project application. Bummer. > > > > How can I force a "Save File" dialog screen for selected files, so the > user > > will have the option to download the file, then open it in Project or > > whatever? > > > > > > Thanks for any help or information. > > > > /dennis > > > > -- > - > > Office phone: 817-762-8304 > > > > -- > - > > "Great leaders never tell people how to do their jobs. > >Great leaders tell people what to do and establish a > > framework within which it must be done. > > Then they let people on the front lines, > >who know best, figure out how to get it done." > > ~ General H. Norman Schwarzkopf > > > > > > > > >
Re: How do I force a 'Save Window?'
You can always set the content type to "application/octet-steam" but I wouldn't expect IE to honor the content type. Regards, Tim Tompkins -- Programmer http://www.clipart.com/ http://www.rebelartist.com/ -- - Original Message - From: "Dennis Daupert" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 19, 2002 4:02 PM Subject: How do I force a 'Save Window?' > I have file upload working, can upload files of ascii or binary format. > But a problem when you browse to a page that dynamically displays > hyperlinks to files. Text and html files display normally in a browser, > and Word docs popup MS Word as a helper app, and the word doc > opens fine. But MS Project files popup a browser instance and MS > Project, and you get the usual "Enable macros" and such popups as > normal, but only a subset of the project displays in the browser window, > and none of the buttons are active in the Project application. Bummer. > > How can I force a "Save File" dialog screen for selected files, so the user > will have the option to download the file, then open it in Project or > whatever? > > > Thanks for any help or information. > > /dennis > > -- - > Office phone: 817-762-8304 > > -- - > "Great leaders never tell people how to do their jobs. >Great leaders tell people what to do and establish a > framework within which it must be done. > Then they let people on the front lines, >who know best, figure out how to get it done." > ~ General H. Norman Schwarzkopf > > > >
How do I force a 'Save Window?'
I have file upload working, can upload files of ascii or binary format. But a problem when you browse to a page that dynamically displays hyperlinks to files. Text and html files display normally in a browser, and Word docs popup MS Word as a helper app, and the word doc opens fine. But MS Project files popup a browser instance and MS Project, and you get the usual "Enable macros" and such popups as normal, but only a subset of the project displays in the browser window, and none of the buttons are active in the Project application. Bummer. How can I force a "Save File" dialog screen for selected files, so the user will have the option to download the file, then open it in Project or whatever? Thanks for any help or information. /dennis --- Office phone: 817-762-8304 --- "Great leaders never tell people how to do their jobs. Great leaders tell people what to do and establish a framework within which it must be done. Then they let people on the front lines, who know best, figure out how to get it done." ~ General H. Norman Schwarzkopf
References for modperl usage in financial institutions?
I am looking for some examples of modperl being used in financial institutions (banks, brokers, ... but also large e-commerce). I spent a few hours searching the internet but it seems such a information is not easily available. I am interested in both official and unofficial information. Technical details are not necessary. Thanks in advance for any reply. -- ( Marcin Kasperski | Working overtime sucks the spirit and motivation ) ( http://www.mk.w.pl | out of a team. (Wells) ) () ( Dokument biznesowy w LaTeXu: http://www.mk.w.pl/porady/latex/mkofficial_cls)
Re: Apache logging phase
Not a mod_perl issue; in your apache conf do this: # I keep all images and javascripts etc under /_[something] SetEnvIf Request_URI "/_" dontlog CustomLog /home/nick/logs/httpdlog common env=!dontlog - nick Nick Tonkin {|8^)> On Tue, 19 Nov 2002, Cure wrote: > I'm curious --> is there a way in mod_perl to skip > the apache logging phase for certain directory or script request ? > > > Cure > >
Apache logging phase
I'm curious --> is there a way in mod_perl to skip the apache logging phase for certain directory or script request ? Cure
Advice/Help with embedding perl
Please forgive me this off topic post. I figure there are Perl embedding experts reading this list and I could use their help. Background: 1. I have embedded Perl in a (non open source) third party product using an API provided with the product. I've also written xsubs to the product API. We use this product on both Unix and MSW2K/XP so I want my embeded Perl to be at least that portable. I am currently doing my development on MSW2K though I started on Unix. 2. The application is a user application in contrast to mod_perl which is a server. 3. Users can interact with perl scripts run by the embedded Perl via a callback mechanism provided by the product API. 4. Having USE_ITHREADS and(/or?) PERL_IMPLICIT_SYS defined seems to be a real pain when it comes to memory allocation and IO, i.e you have to jump through lots of hoops to do any until you've created at least one interpreter. Questions: 1. In my application I don't believe there is any advantage to running multiple interpreters concurrently. My design stops and destroys any previous interpreter and starts a new interpreter per user request to run a script. If I need to maintain Perl data from one script to another I can have a top level script "do" lower level scripts (possibly even as a result of callbacks) or write it to and read it back from files. Any comments/advice? 2. The Perl fork() function is nice but not essential - there are alternatives. Is there any other reason to define USE_MULTI, USE_ITHREADS, and USE_IMP_SYS in the perl*/win32/Makefile (or the equivalent on Unix systems)? 3. If I don't have USE_MULTI, USE_ITHREADS, or USE_IMP_SYS defined, is there any advantage to defining PERL_NO_GET_CONTEXT? (I currently do not define it.) 4. Is there any advantage to having PERL_CORE defined for my embedded Perl? (I currently do not define it.) 5. After an unpredictable number (more than one) of successful cycles of starting and stopping interpreters either the start of a new interpreter or the destruction of a running interpreter will fail with a memory access violation (my memory fails me but I think really only the latter has occurred). I assumed that this was because my code was some how corrupting memory (maybe aided and abetted by USE_MULTI, USE_ITHREADS, and USE_IMP_SYS), but now I've noticed certain code and comments in mod_perl_perl_destruct() in mod_perl-1.99_07/src/modules/perl/modperl_perl.c which lead me to believe I've found at least a major part of my problem: perl_free() is broken for WIN32 and Perl's handling of environ is broken. Could someone elaborate on this? Are these problems limited to the way Perl is used in modperl? Are they fixed in Perl 5.8? Thanks very much. Richard Kandarian http://www.lanl.gov/cgi-bin/fonelink.pl/085598 Any opinions stated in this message are mine and not expressed on behalf of any other individual or entity unless explicitly noted otherwise. As for the links linked at the very end, my opinion is that they are interesting. http://www.cundiyo.com/N8LqSO5kPqTYYg/
Re: Obfusacating the source
Hi! On Tue, Nov 19, 2002 at 07:08:00PM +, Mark Fowler wrote: > > > I need some tool that gets all the perl modules and > > mason components, of an application we made, and obfucaste > > it a little. > > See Acme::Bleach In fact you're probably better off using Acme::EyeDrops http://search.cpan.org/author/ASAVIGE/Acme-EyeDrops-1.16/lib/Acme/EyeDrops.pm With Acme::Bleach, you'll need to say use Acme::Bleach at the beginning of your bleached module. Acme::EyeDrops uses a big Regex, or (probably saver for your needs) call it with Regex => 0 to generate a string to be evaled. So no need for 'use Acme::EyeDrops', so no telltale sign for the "cracker". But no matter what Obfuscator you use: Obfuscation won't stop a determined reader to get to the source. You might want to check out the slides of my talk "The Dark Art of Obfuscation", held at YAPC::Europe 2002: http://domm.zsi.at:/talks/obfu_yapc2002/ -- #!/usr/bin/perlhttp://domm.zsi.at for(ref(bless[],just'another'perl'hacker)){s-:+-$"-g&&print$_.$/}
Re: Obfusacating the source
John Saylor wrote: Hi ( 02.11.19 19:48 +0100 ) Francesc Guasch: The idea is get something just a little difficult to read, so the customer engineers have a hard time if they try to read the source. Call all variables 1 char names Replace all comments with 'comment here' That looks like what my boss wants me to do. But I think it's one of those things that looks easy to do, and you can have most of it done in very little time. But make it completely could be overkill. Just like a templating module. ;)
Re: Obfusacating the source
> I need some tool that gets all the perl modules and > mason components, of an application we made, and obfucaste > it a little. See Acme::Bleach http://search.cpan.org/author/DCONWAY/Acme-Bleach/lib/Acme/Bleach.pm It works by source filtering and encoding the source as whitespace chars. (see also Acme::Bleach, Acme::Pony...) -- s'' Mark Fowler London.pm Bath.pm http://www.twoshortplanks.com/ [EMAIL PROTECTED] ';use Term'Cap;$t=Tgetent Term'Cap{};print$t->Tputs(cl);for$w(split/ +/ ){for(0..30){$|=print$t->Tgoto(cm,$_,$y)." $w";select$k,$k,$k,.03}$y+=2}
Re: Obfusacating the source
Hi ( 02.11.19 19:48 +0100 ) Francesc Guasch: > The idea is get something just a little difficult to > read, so the customer engineers have a hard time if > they try to read the source. Call all variables 1 char names Replace all comments with 'comment here' -- .--- ...
Obfusacating the source
I know it's not the way to go, but anyway I must do it. I need some tool that gets all the perl modules and mason components, of an application we made, and obfucaste it a little. The idea is get something just a little difficult to read, so the customer engineers have a hard time if they try to read the source.
Re: Where do you specify APR::HOOK...
Ok, thanks now it makes sense ;) It's in the mp2 docs and it wasn't clear if it was not implemeted or the docs were behind the code. Maybe you guys could stick a note on it or something. - Original Message - From: "Stas Bekman" <[EMAIL PROTECTED]> To: "Erich Oliphant" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Monday, November 11, 2002 5:45 AM Subject: Re: Where do you specify APR::HOOK... > Erich Oliphant wrote: > > Hi, > > I am trying to place a handler at the end of the list of > > PerlLogHandler's. I know I want to use APR::HOOK_REALLY_LAST but I'm > > not sure how or where to specify it for my handler. I tried > > "PerlLogHandler My::Handler APR::HOOK_REALLY_LAST" in the httpd.conf > > file w/ no success. Should it be in the handler code itself? > > That API doesn't exist yet in mod_perl 2.0. > > I believe the reason for that is that Apache hooks ordering API wasn't > finalized yet. > > > __ > Stas BekmanJAm_pH --> Just Another mod_perl Hacker > http://stason.org/ mod_perl Guide ---> http://perl.apache.org > mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com > http://modperlbook.org http://apache.org http://ticketmaster.com > >
am i heading for disaster... ?
In the process of building apache_1.3.27 / mod_perl 1.3.27 / openssl0.9.6g / mod_ssl mod_ssl-2.8.12-1.3.27 on a Solaris OS 2 UltraSparc, with Perl 5.8, the apache make failed because of an undefined "url_delims". I was using the method where you build mod_ssl, then build mod_perl, then configure apache, loading mod_perl statically. Anyway, I poked around and found that indeed the uri_delims.h file in src/main was empty! So still in src/main, I manually ran "gcc gen_uri_delims.c", then ran "a.out > uri_delims.h" to regenerate that header file, and got this. /* this file is automatically generated by gen_uri_delims, do not edit */static const unsigned char uri_delims[256] = { T_NUL,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,T_HASH,0,0,0,0, 0,0,0,0,0,0,0,T_SLASH,0,0,0,0,0,0,0,0,0,0,T_COLON,0, 0,0,0,T_QUESTION,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; Then when I ran make again, everything was hunky-dory. Now what I want to know is, why would this have happened in the first place? Is it a sign that something is fundamentally wrong with the build, but I just haven't seen it yet? Or should I just breathe easy and hope for the best?
Re: RFC: Template::YetAnother
I've said it before... :) http://mathforum.org/epigone/modperl/zhixswahar/v04210105b76eecf6c2be@%5b192.168.1.3%5d Rob On Sat, Nov 16, 2002 at 10:33:44PM +0100, Thomas Klausner wrote: > Hi! > > On Sat, Nov 16, 2002 at 03:31:39PM -0500, Perrin Harkins wrote: > > >I also posted this on perlmonks: > > >http://www.perlmonks.org/index.pl?node_id=213300 > > > > Ovid on Perlmonks already said some of the things I would have said > > about needing a presentation language. For a templating system to be > > useful, it has to be able to deal with loops and conditionals. Your > > system pushes those into the Perl code, splitting the presentation > > control into multiple places. This fails one of my major goals: the > > template coders should be able to change the presentation without help > > from a Perl coder. What if they decide they don't want to loop through > > the links, but rather just print a message saying there are some? What > > if they only want to show the first two? What if they want to display a > > list with commas between the elements where they didn't use a separator > > before? A mature templating system can handle all of these issues > > without changing the main Perl module code. > > That's a very good point I didn't really think about. I was thinking > of templates as DUMB frontends that should just display > data. Period. > > Thinking of them as tools that handle presentation logic (as Ovid > pointed out) seems to make more sense. > > It does pay of to write RFCs before starting to code... > > > >Because IMO, the main reason for using templates is to seperate code > > >from markup. > > > > It sounds to me like you want one of the HTML attribute ones, like Petal > > or HTML::Seamstress. What was wrong with those? > > One problem I see with HTML::Seamstress is that it uses the HTML > attributes 'class' and 'id' for templating info. But those attributes > are used by CSS and JavaScript and might conflict somehow. I do not > know if you can change the behaviour of HTML::Seamstress to use other > attributes, though. But this stopped my from looking further. > > And I didn't look at Petal. For now. > > > >There is one module, CGI::FastTemplate, that does seperate code from > > >markup completly. But the way different templates are strung together > > >seems rather comlicated to me. > > > > It's not complicated, but it is somewhat confusing the first time you > > look at it. I don't find your approach much easier though. > > Well, I found mine easier :-) > (But I guess this is the reason for the Template Flood on CPAN - > everbody finds his own solution easier...) > > > Isn't your fill method just doing a sort of multi-level join here? All > > of the data is passed in already, so there is no reason to delay > > evaluation of the templates. > > The main reason for doing this was to simplify testing. I planned to > just test the plain data structures, that should be free of HTML at > this time (before the fill). This (testing) was in fact the reason I > started thinking about this proposal in the first place. > > > More importantly, your use of AUTOLOAD to treat method calls as file > > names looks neat, but is not a good approach. It's limiting (all > > templates in one directory!) and has potential security issues with > > namespace clashes. These are all just the same method call with a > > single argument changed, so why not write them that way? > > I planned to handle those namespace and filename issues. > > > .. > > force you to use them. They are flexible modules. I think you should > > look at them more closely before you go off on your own. > > That's what I'll do. Thanks for the excellent feedback. > > -- > #!/usr/bin/perlhttp://domm.zsi.at > for(ref(bless[],just'another'perl'hacker)){s-:+-$"-g&&print$_.$/}
Re: mod_perl + CSS
Sorry everyone, Answered my own question, what I did what reference my second non-mod_perl server and stored the CSS information there. i.e. http://XXX.XXX.XXX.XXX/css/general.css"; type ="text/css"> where XXX... is the IP address of the non-mod_perl server. Brett Brett.Gillett @tsx.ca To: [EMAIL PROTECTED] cc: 11/19/2002 Subject: mod_perl + CSS 10:50 AM Hiya everyone, Another newbie question, I have an apache server setup with two instances, one for static pages and one for mod_perl dynamic pages. I use HTML::Template to generate my content. I would like to use CSS for styling but I can't seem to get it to work with mod_perl. I am assuming that it's a configuration issue, since I see mod_perl attempting to execute the css file. Does anyone have any configuration suggestions for mod_perl + css. TIA, Brett
Re: mod_perl + CSS
On Tue, 19 Nov 2002 10:50:05 -0500 [EMAIL PROTECTED] wrote: > Hiya everyone, > > Another newbie question, I have an apache server setup with two instances, > one for static pages and one for mod_perl dynamic pages. I use > HTML::Template to generate my content. I would like to use CSS for styling > but I can't seem to get it to work with mod_perl. I am assuming that it's > a configuration issue, since I see mod_perl attempting to execute the css > file. Does anyone have any configuration suggestions for mod_perl + css. > > TIA, > > Brett > Hi. You should better explain your actual configuration in order to help you. Have you a proxy front-end/mod_perl middle-end architecture or you use two Apache running on different ports? - Enrico
mod_perl + CSS
Hiya everyone, Another newbie question, I have an apache server setup with two instances, one for static pages and one for mod_perl dynamic pages. I use HTML::Template to generate my content. I would like to use CSS for styling but I can't seem to get it to work with mod_perl. I am assuming that it's a configuration issue, since I see mod_perl attempting to execute the css file. Does anyone have any configuration suggestions for mod_perl + css. TIA, Brett