[32684] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3842 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jun 3 14:55:52 2013

Date: Fri, 21 Dec 2012 02:17:11 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Fri, 21 Dec 2012     Volume: 11 Number: 3842

Today's topics:
    Re: Company web-site (all perl CGI) re-design, suggesti <justin.1211@purestblue.com>
    Re: Examining the existence of a hash key instantiates  <rweikusat@mssgmbh.com>
    Re: help - how to find what is the code for "+/-" symbo <rvtol+usenet@xs4all.nl>
    Re: help - how to find what is the code for "+/-" symbo <rvtol+usenet@xs4all.nl>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 20 Dec 2012 11:06:06 +0000
From: Justin C <justin.1211@purestblue.com>
Subject: Re: Company web-site (all perl CGI) re-design, suggestions?
Message-Id: <u18bq9-2dn.ln1@zem.masonsmusic.co.uk>

On 2012-12-17, ccc31807 <cartercc@gmail.com> wrote:
> On Monday, December 17, 2012 9:24:00 AM UTC-5, Justin C wrote:
>
> Justin,
>
> I've never down any real big sites, but I've done a bunch of smallish sites, some with as many as 50 pages, almost all of them (if not all of them) are interfaces to databases.
>
> I use CGI and it's done every thing I've asked it to do. I have learned to do it the way i describe below mostly by trial and error, and by writing a lot of very bad code over the years. I am completely comfortable with this approach.
>
> The only HTML page I write is the main entry page to the 'site.' All the other HTMl 'pages' are dynamically created from the query parameters passed in by the user and the content in the database.

[snip]

Thank you for the reply, CC. I wanted to try one of the web-frameworks
to further my education - though I'm sure I would have done that your
way too.

After spending a day with a book on Catalyst and not seeing how what 
they were talking about related to what I wanted to do, and running 
through their tutorials... which wouldn't work! I looked a little deep-
er into Mojolicious, and within five minutes I had a working web-app, 
and can already see how I redo our site using this.

I'm probably going to run into major obstacles, but this looks like a 
much shallower learning curve, rather than the brickwall I found with
Catalyst.

   Justin.

-- 
Justin C, by the sea.


------------------------------

Date: Wed, 19 Dec 2012 21:55:07 +0000
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Examining the existence of a hash key instantiates higher level keys
Message-Id: <87pq25yaf8.fsf@sapphire.mobileactivedefense.com>

Rainer Weikusat <rweikusat@mssgmbh.com> writes:

[...]

> Personally, I would omit the check and use something like
>
> sub mexists($@)
> {
>     my $cur;
>
>     $cur = shift;
>     for (@_) {
>         exists($cur->{$_}) or return;
>         $cur = $cur->{$_};
>     }
>     
>     return 1;
> }
>
> and in case I had to deal with input values where this wouldn't work,
> I would either extend it to cover these cases as well or get rid of
> the 'annoying' inputs, whatever seemed more feasible.

Slight alteration: Since the 'object stored in a hash' case is rather
common, I'd probably make that

use Scalar::Util qw(blessed);

sub mexists($@)
{
    my $cur;

    $cur = shift;
    for (@_) {
	!blessed($cur) and exists($cur->{$_}) or return;
	$cur = $cur->{$_};
    }
    
    return 1;
}

instead, at least after thinking about it for some time.


------------------------------

Date: Thu, 20 Dec 2012 16:56:39 +0100
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
Subject: Re: help - how to find what is the code for "+/-" symbol copied from Windows app
Message-Id: <50d33537$0$6849$e4fe514c@news2.news.xs4all.nl>

On 2012-12-19 15:04, Shmuel (Seymour J.) Metz wrote:

> What's wrong with use charnames? While \N{foo} may be more verbose
> than a hex code, it's also more legible.

Nothing wrong with 'use charnames'. In fact, the more it is used,
the better it will be implemented.

Does it already know the HTML-entities?
\N{&plusmn;} would be handy to have.

-- 
Ruud



------------------------------

Date: Thu, 20 Dec 2012 17:32:39 +0100
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
Subject: Re: help - how to find what is the code for "+/-" symbol copied from Windows app
Message-Id: <50d33da7$0$6948$e4fe514c@news2.news.xs4all.nl>

On 2012-12-20 16:56, Dr.Ruud wrote:
> On 2012-12-19 15:04, Shmuel (Seymour J.) Metz wrote:

>> What's wrong with use charnames? While \N{foo} may be more verbose
>> than a hex code, it's also more legible.
>
> Nothing wrong with 'use charnames'. In fact, the more it is used,
> the better it will be implemented.
>
> Does it already know the HTML-entities?
> \N{&plusmn;} would be handy to have.

See also:

   http://98.245.80.27/tcpc/scripts/unicore/  html_alias.pl

(seems to be missing a closing ')' though)

-- 
Ruud



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3842
***************************************


home help back first fref pref prev next nref lref last post