If Perl support inline scripting...

Discussion in 'Perl Misc' started by howa, Dec 2, 2006.

  1. howa

    howa Guest

    e.g.

    <?pl


    echo "hello perl";

    >


    it would definitely become my choice of dynamic scripting language!
     
    howa, Dec 2, 2006
    #1
    1. Advertising

  2. >>>>> "SP" == Sherm Pendley <> writes:

    SP> "howa" <> writes:
    >> e.g.
    >>
    >> <?pl
    >>
    >>
    >> echo "hello perl";
    >>
    >>>

    >> it would definitely become my choice of dynamic scripting
    >> language!


    SP> Have a look at HTML::Mason or Template::Toolkit.

    or ePerl (http://www.ossp.org/pkg/tool/eperl/), which is exactly what
    the OP is asking for.

    Charlton


    --
    Charlton Wilbur
     
    Charlton Wilbur, Dec 2, 2006
    #2
    1. Advertising

  3. howa

    howa Guest

    Sherm Pendley wrote:
    > "howa" <> writes:
    >
    > > e.g.
    > >
    > > <?pl
    > >
    > >
    > > echo "hello perl";
    > >
    > >>

    > >
    > > it would definitely become my choice of dynamic scripting language!

    >
    > Have a look at HTML::Mason or Template::Toolkit.
    >
    > sherm--
    >
    > --
    > Web Hosting by West Virginians, for West Virginians: http://wv-www.net
    > Cocoa programming in Perl: http://camelbones.sourceforge.net


    yes, i know about other library can do this.. but the main point is,
    they are not offical Perl standard...
     
    howa, Dec 2, 2006
    #3
  4. >>>>> "howa" == howa <> writes:

    howa> yes, i know about other library can do this.. but the main point is,
    howa> they are not offical Perl standard...

    They are in the CPAN. It doesn't get much better than that. If you mean
    "part of the Perl core", then no, it's not in the initial Perl distro
    download. Why is that important?

    print "Just another Perl hacker,"; # the original

    --
    Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    <> <URL:http://www.stonehenge.com/merlyn/>
    Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

    --
    Posted via a free Usenet account from http://www.teranews.com
     
    Randal L. Schwartz, Dec 2, 2006
    #4
  5. howa

    howa Guest

    Randal L. Schwartz ¼g¹D¡G

    > >>>>> "howa" == howa <> writes:

    >
    > howa> yes, i know about other library can do this.. but the main point is,
    > howa> they are not offical Perl standard...
    >
    > They are in the CPAN. It doesn't get much better than that. If you mean
    > "part of the Perl core", then no, it's not in the initial Perl distro
    > download. Why is that important?
    >
    > print "Just another Perl hacker,"; # the original
    >
    > --
    > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
    > <> <URL:http://www.stonehenge.com/merlyn/>
    > Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
    > See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
    >
    > --
    > Posted via a free Usenet account from http://www.teranews.com


    well, i just thought that, if it is part-of-the-perl, then a lot of
    people will consider using perl as the dynamic scripting language for
    web page, rather than php, for example.

    yes, i know that many perl hackers have a strong sense of
    there-is-more-than-one-way-to-do-it, but standard is standard, people
    think php is easy as <?php echo 'hello" ?> works. There is no need to
    use CGI module, blah blah for example....

    i just thought that this can be a future direction of perl...
     
    howa, Dec 2, 2006
    #5
  6. >>>>> "h" == howa <> writes:

    h> well, i just thought that, if it is part-of-the-perl, then a
    h> lot of people will consider using perl as the dynamic scripting
    h> language for web page, rather than php, for example.

    Mixing logic and presentation code in the way that PHP and ePerl
    encourage is, frankly, stupid. It works well enough for small one-off
    sites, but leads to poor architecture and poor maintainability.

    h> people think php is easy as <?php echo 'hello" ?> works. There
    h> is no need to use CGI module, blah blah for example....

    Why do you think that altering Perl to make it more attractive to the
    ignorant and lazy will be an improvement?

    If you want PHP, you know where to find it.

    Charlton



    --
    Charlton Wilbur
     
    Charlton Wilbur, Dec 2, 2006
    #6
  7. howa

    Guest

    "howa" <> wrote:
    > Sherm Pendley wrote:
    >
    > yes, i know about other library can do this.. but the main point is,
    > they are not offical Perl standard...


    Is any of Perl "official Perl standard"?

    Xho

    --
    -------------------- http://NewsReader.Com/ --------------------
    Usenet Newsgroup Service $9.95/Month 30GB
     
    , Dec 2, 2006
    #7
  8. howa

    Tintin Guest

    "howa" <> wrote in message
    news:...
    > >>>>> "howa" == howa <> writes:



    >well, i just thought that, if it is part-of-the-perl, then a lot of
    >people will consider using perl as the dynamic scripting language for
    >web page, rather than php, for example.
    >
    >yes, i know that many perl hackers have a strong sense of
    >there-is-more-than-one-way-to-do-it, but standard is standard, people
    >think php is easy as <?php echo 'hello" ?> works. There is no need to
    >use CGI module, blah blah for example....


    But there is a need to install and configure PHP, which can sometimes get
    very complicated and you run into dependancy nightmares when you try to get
    all the various PHP modules and components talking to each other.

    So if you look at it objectively, writing a dynamic web page with Mason or
    similar, is no more complicated (and you could say a lot easier) than
    setting up PHP and writing PHP pages.



    --
    Posted via a free Usenet account from http://www.teranews.com
     
    Tintin, Dec 2, 2006
    #8
  9. Charlton Wilbur wrote:
    > h> well, i just thought that, if it is part-of-the-perl, then a
    > h> lot of people will consider using perl as the dynamic scripting
    > h> language for web page, rather than php, for example.
    >
    > Mixing logic and presentation code in the way that PHP and ePerl
    > encourage is, frankly, stupid. It works well enough for small one-off
    > sites, but leads to poor architecture and poor maintainability.

    Yeah like all of those PHP forums and apps like Jinzora. Those are all
    totally useless...
    > h> people think php is easy as <?php echo 'hello" ?> works. There
    > h> is no need to use CGI module, blah blah for example....
    >
    > Why do you think that altering Perl to make it more attractive to the
    > ignorant and lazy will be an improvement?

    Huh? Do you even understand what he's asking for? How is it "attractive
    to the ignorant and lazy" to want to have Perl easily available when
    writing a web page?!? Oh sure you can use CGI but then everything has to
    be handled by Perl. And no I've never seen a poorly architected and
    poorly maintainable web page written with Perl and CGI - and neither
    have you! Give me a frigging break...

    --

    Andrew DeFaria <http://defaria.com>
    Why do you need a driver's license to buy alcohol when you can't drink
    and drive?
     
    Andrew DeFaria, Dec 3, 2006
    #9
  10. howa

    Justin C Guest

    In article <>,
    Andrew DeFaria <> wrote:

    > Charlton Wilbur wrote:
    > > h> well, i just thought that, if it is part-of-the-perl, then a
    > > h> lot of people will consider using perl as the dynamic scripting
    > > h> language for web page, rather than php, for example.
    > >
    > > Mixing logic and presentation code in the way that PHP and ePerl
    > > encourage is, frankly, stupid. It works well enough for small one-off
    > > sites, but leads to poor architecture and poor maintainability.

    > Yeah like all of those PHP forums and apps like Jinzora. Those are all
    > totally useless...


    Charlton didn't say they were useless.


    > > Why do you think that altering Perl to make it more attractive to the
    > > ignorant and lazy will be an improvement?

    > Huh? Do you even understand what he's asking for? How is it "attractive
    > to the ignorant and lazy" to want to have Perl easily available when
    > writing a web page?!? Oh sure you can use CGI but then everything has to
    > be handled by Perl.


    It does? I think you've only seen web-servers that are poorly
    configured. I have one here that runs perl and php scripts side by side
    all day long. You're obviously mis-informed, but I don't know where I
    should point you for the information you are lacking. Sorry.


    > And no I've never seen a poorly architected and
    > poorly maintainable web page written with Perl and CGI - and neither
    > have you! Give me a frigging break...


    Your logic is seriously flawed. Charlton was saying that mixing
    programming code and layout code leads to poor maintainability. It
    doesn't follow that using perl instead means your site will be more
    easily maintained; that requires skill. Poorly maintainable code can be
    written in any language, it's just that, with a language like php, it's
    almost inevitable.

    --
    Justin C, by the sea.
     
    Justin C, Dec 3, 2006
    #10
  11. >>>>> "AD" == Andrew DeFaria <> writes:

    >> Mixing logic and presentation code in the way that PHP and
    >> ePerl encourage is, frankly, stupid. It works well enough for
    >> small one-off sites, but leads to poor architecture and poor
    >> maintainability.


    AD> Yeah like all of those PHP forums and apps like Jinzora. Those
    AD> are all totally useless...

    Do you understand the difference between "poorly designed and
    difficult to maintain" and "useless"?

    My experience in PHP, what little I've done, is that once you hit a
    certain size this thing that you consider a useful feature becomes a
    liability, and the programmers wind up needing to enforce a separation
    between logic and presentation themselves or the project becomes
    unmaintainable. As I've said, it works well enough for small one-off
    sites, but leads to poor architecture and maintainbility.

    Hint: if you want to refute that, point out ways in which mixing logic
    and presentation leads to good architecture and maintainability;
    introducing things like "usefulness" that are irrelevant to the point
    gets you nowhere.

    >> Why do you think that altering Perl to make it more attractive
    >> to the ignorant and lazy will be an improvement?


    AD> Huh? Do you even understand what he's asking for?

    Yes, I do; as you may note, I pointed him to a project that does
    *exactly* what he wants. Of course, he wasn't happy with that, as he
    wants it to have some official imprimatur.

    AD> How is it "attractive to the ignorant and lazy" to want to
    AD> have Perl easily available when writing a web page?!?

    It's not attractive to the ignorant and lazy to have Perl *available*;
    it's attractive to the ignorant and lazy to have Perl easily
    embeddable with PHP-like syntax. It's attractive to the ignorant,
    because they don't yet realize how much pain they're in for if they
    persist on that course; it's attractive to the lazy because for just a
    bit more work they could have something like Text::Template or
    HTML::Mason that gives them significant advantages over the
    embedded-code approach.

    Charlton



    --
    Charlton Wilbur
     
    Charlton Wilbur, Dec 3, 2006
    #11
  12. howa

    John Bokma Guest

    Andrew DeFaria <> wrote:

    > Charlton Wilbur wrote:


    >> Mixing logic and presentation code in the way that PHP and ePerl
    >> encourage is, frankly, stupid. It works well enough for small one-off
    >> sites, but leads to poor architecture and poor maintainability.

    > Yeah like all of those PHP forums and apps like Jinzora. Those are all
    > totally useless...


    Ever tried to make your own templates for PHPbb, or modify an existing
    one? And then tried to update?

    >> Why do you think that altering Perl to make it more attractive to the
    >> ignorant and lazy will be an improvement?

    > Huh? Do you even understand what he's asking for? How is it "attractive
    > to the ignorant and lazy" to want to have Perl easily available when
    > writing a web page?!? Oh sure you can use CGI but then everything has to
    > be handled by Perl. And no I've never seen a poorly architected and
    > poorly maintainable web page written with Perl and CGI - and neither
    > have you! Give me a frigging break...


    Yup, I have seen a lot of Perl CGI, and in the beginning I thought I had
    seen the worse code in my life. Until I looked at PHP "programs". Just
    read the user comments at php.net for several functions and you might get
    my point (but this being Usenet, I guess not).


    --
    John Experienced Perl programmer: http://castleamber.com/

    Perl help, tutorials, and examples: http://johnbokma.com/perl/
     
    John Bokma, Dec 3, 2006
    #12
  13. Justin C wrote:
    > In article <>, Andrew
    > DeFaria <> wrote:
    >> Charlton Wilbur wrote:
    >>> h> well, i just thought that, if it is part-of-the-perl, then a
    >>> h> lot of people will consider using perl as the dynamic scripting
    >>> h> language for web page, rather than php, for example.
    >>>
    >>> Mixing logic and presentation code in the way that PHP and ePerl
    >>> encourage is, frankly, stupid. It works well enough for small
    >>> one-off sites, but leads to poor architecture and poor maintainability.

    >> Yeah like all of those PHP forums and apps like Jinzora. Those are
    >> all totally useless...

    > Charlton didn't say they were useless.

    OK, those are all totally stupid.
    >>> Why do you think that altering Perl to make it more attractive to
    >>> the ignorant and lazy will be an improvement?

    >> Huh? Do you even understand what he's asking for? How is it
    >> "attractive to the ignorant and lazy" to want to have Perl easily
    >> available when writing a web page?!? Oh sure you can use CGI but then
    >> everything has to be handled by Perl.

    > It does? I think you've only seen web-servers that are poorly
    > configured. I have one here that runs perl and php scripts side by
    > side all day long. You're obviously mis-informed, but I don't know
    > where I should point you for the information you are lacking. Sorry.
    >> And no I've never seen a poorly architected and poorly maintainable
    >> web page written with Perl and CGI - and neither
    >> have you! Give me a frigging break...

    > Your logic is seriously flawed. Charlton was saying that mixing
    > programming code and layout code leads to poor maintainability.

    I guess everybody's entitled to their own opinions, including myself. To
    me, when writing a dynamic web page most of it is still static. Thus you
    have to either write all of that static stuff out via Perl or you can do
    it more like PHP where you write HTML then only write code for those
    portions that need code.
    > It doesn't follow that using perl instead means your site will be more
    > easily maintained; that requires skill.

    Oh so then you got my sarcastic point after all.
    > Poorly maintainable code can be written in any language, it's just
    > that, with a language like php, it's almost inevitable.

    With that sir I respectfully disagree.
    --
    Andrew DeFaria <http://defaria.com>
    If a book about failures does not sell, is it a success?
     
    Andrew DeFaria, Dec 4, 2006
    #13
  14. Charlton Wilbur wrote:
    >>>>>> "AD" == Andrew DeFaria <> writes:

    >
    > >> Mixing logic and presentation code in the way that PHP and
    > >> ePerl encourage is, frankly, stupid. It works well enough for
    > >> small one-off sites, but leads to poor architecture and poor
    > >> maintainability.

    >
    > AD> Yeah like all of those PHP forums and apps like Jinzora. Those
    > AD> are all totally useless...
    >
    > Do you understand the difference between "poorly designed and
    > difficult to maintain" and "useless"?

    Yes. Do you understand the difference between stupid and useless?
    > My experience in PHP, what little I've done, is that once you hit a
    > certain size this thing that you consider a useful feature becomes a
    > liability, and the programmers wind up needing to enforce a separation
    > between logic and presentation themselves or the project becomes
    > unmaintainable. As I've said, it works well enough for small one-off
    > sites, but leads to poor architecture and maintainbility.

    Which is why I pointed out such already written, well architected PHP
    based applications like I did. These are not small, one-off
    applications. Just because you can't write good applications in PHP (as
    you already admit that you've only used it a little yet apparently feel
    qualified enough to dismiss it - amazing) doesn't mean that it can't be
    done. IOW perhaps it's just you!
    > Hint: if you want to refute that, point out ways in which mixing logic
    > and presentation leads to good architecture and maintainability;
    > introducing things like "usefulness" that are irrelevant to the point
    > gets you nowhere.

    As I see it you haven't gotten anywhere to start with. You bemoan a
    language you admit you don't really know or use. As such your statements
    are suspect in my mind.
    --
    Andrew DeFaria <http://defaria.com>
    Beauty is in the eye of the beer holder.
     
    Andrew DeFaria, Dec 4, 2006
    #14
  15. >>>>> "AD" == Andrew DeFaria <> writes:

    >> Hint: if you want to refute that, point out ways in which
    >> mixing logic and presentation leads to good architecture and
    >> maintainability; introducing things like "usefulness" that are
    >> irrelevant to the point gets you nowhere.


    AD> As I see it you haven't gotten anywhere to start with. You
    AD> bemoan a language you admit you don't really know or use. As
    AD> such your statements are suspect in my mind.

    One does not need to eat the whole egg to determine it is rotten.

    Charlton



    --
    Charlton Wilbur
     
    Charlton Wilbur, Dec 4, 2006
    #15
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Abhi
    Replies:
    2
    Views:
    742
    E. Robert Tisdale
    Jul 3, 2003
  2. Alvin
    Replies:
    7
    Views:
    480
    E. Robert Tisdale
    May 6, 2005
  3. Replies:
    3
    Views:
    460
  4. Ron Stephens
    Replies:
    23
    Views:
    2,858
    Ron Stephens
    Apr 12, 2004
  5. DaveInSidney
    Replies:
    0
    Views:
    423
    DaveInSidney
    May 9, 2005
Loading...

Share This Page