Perhaps this is a case for writing Apache::PHP or some such module?
Seriously though, to convince people to move back from PHP to Perl would be quite a task. You would have to provide case studies on similar tasks and how easier/better/more scalable it is in Perl, how you did it and what the person would have to do/install to do it too.
Also bear in mind that the user is going to have to use mod_perl in most cases to get the same kind of web content speed that mod_php + Zend provides. No small task and quite a step for someone dipping their toe. This is where, I think at least, is where your main problem will lie. Its very easy to get started with PHP and it looks enough like ASP for people to get started:
<?php print "hi" ?>
compared to (one example of many):
use strict;
use warnings;
use CGI;
my $q = CGI->new;
print $q->header;
print "hi";
Ok, now before I risk getting flamed - I am not starting a code war (nor do I intend to) I am just implying to the unwashed masses the first will have a greater appeal. The same emulation in Perl can come via Mason, EmbPerl, Apache::Asp (et al) but all require more effort and in the case of Mason - require mod_perl to be compiled in rather than loaded as a DSO.
This raises a question - what audience would you target with your tutorial. Web content builders? Sys admins? Medium size development houses? You also have to bear in mind there has been a lot of bad publicity about the slowness of the CGI protocol. To the untutored (sadly of which there are many) Perl and CGI are one and the same (yes I have been there :/). There are also a lot of misconceptions to overcome.
I can just imagine someone being forced by some PHB to write a script to do a 5 min task in Java purely for this reason. I'm sure its happened :)
My main driving reason for this is that there is a lot of web content (I'd hate to call it anything else) that vehemently supports moving from Perl to PHP (Python, Java, C# etc). This would have to be quite a comprehensive article or set of articles.
No small task :). However, if you can think of a structured outline and propose it here I am sure you would get some interest. I'm not trying to be down on the idea, I think it is a good one and I would like to see it succeed. I just thought I'd share what I considered to be my thoughts on just how widespread the issues are.
I'd help where possible for one.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.