[23058] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5279 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Jul 28 06:05:54 2003

Date: Mon, 28 Jul 2003 03:05:06 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Mon, 28 Jul 2003     Volume: 10 Number: 5279

Today's topics:
    Re: Called as method or subroutine? <bart.lateur@pandora.be>
    Re: Called as method or subroutine? <tassilo.parseval@rwth-aachen.de>
    Re: can this one-liner be squeezed any shorter? <jidanni@jidanni.org>
    Re: can this one-liner be squeezed any shorter? <tassilo.parseval@rwth-aachen.de>
    Re: Concatenation (Tad McClellan)
    Re: Concatenation <usenet@expires082003.tinita.de>
    Re: Currying functions (was "theory vs practice" ceases <ramen@lackingtalent.com>
        EARN$£$600\week downloading free software <earn@cash.com>
        File type compatibility issue with Perl <ducott@hotmail.com>
    Re: File type compatibility issue with Perl <usenet@expires082003.tinita.de>
    Re: File type compatibility issue with Perl <ducott@hotmail.com>
    Re: File type compatibility issue with Perl <mbudash@sonic.net>
    Re: Gnuplot module (Yuchung Cheng)
        Perl variable data "replacement" <ducott@hotmail.com>
    Re: Perl variable data "replacement" <tassilo.parseval@rwth-aachen.de>
    Re: Simple site index (reggie)
    Re: Simple site index (reggie)
        Tainting and use lib... (Bryon Bean)
    Re: Tracking Number (Jeff Mott)
    Re: UTF-8 module <pkent77tea@yahoo.com.tea>
    Re: UTF-8 module <flavell@mail.cern.ch>
        what is perl's no op operator? <jidanni@jidanni.org>
    Re: what is perl's no op operator? <REMOVEsdnCAPS@comcast.net>
    Re:  <bwalton@rochester.rr.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 28 Jul 2003 08:46:55 GMT
From: Bart Lateur <bart.lateur@pandora.be>
Subject: Re: Called as method or subroutine?
Message-Id: <gfo9iv8p92au6vmsug1m7f9hrjgh111b6l@4ax.com>

Tassilo v. Parseval wrote:

>This distinction
>between class-method and plain function (or lack thereof) is one of the
>true Perl-oddities. CGI.pm fell into this trap:
>
>    ethan@ethan:~$ perl -lMCGI=b1
>    print CGI->b1("CGI");
>    print b1("CGI");
>    print b1("cgi");
>    <b1>CGI</b1>
>    <b1></b1>
>    <b1>cgi</b1>
>
>Lincoln fixed that in the latest release, though.

He did?

It's too sad Perl provides no official way to distinguish whether a sub
has been called as a function, or as a method. Like by setting a special
variable with the same dynamic behaviour as @_, for example.

And with every pointing towards CGI.pm on how it handled this: it's not
a good example, IMO. What it should have done, IMO, is put the functions
and the methods in a different package, so that different subs get
called for each. I'm a bit sketchy on the details, as it's not exactly
clear to me either, how it should work. For example, all functions could
have been imported from a package CGI::Functions, while the OO methods
could be in CGI. Something like that.

-- 
	Bart.


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

Date: 28 Jul 2003 09:25:18 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Called as method or subroutine?
Message-Id: <bg2q5u$ho8$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Bart Lateur:

> Tassilo v. Parseval wrote:
> 
>>This distinction
>>between class-method and plain function (or lack thereof) is one of the
>>true Perl-oddities. CGI.pm fell into this trap:
>>
>>    ethan@ethan:~$ perl -lMCGI=b1
>>    print CGI->b1("CGI");
>>    print b1("CGI");
>>    print b1("cgi");
>>    <b1>CGI</b1>
>>    <b1></b1>
>>    <b1>cgi</b1>
>>
>>Lincoln fixed that in the latest release, though.
> 
> He did?

Hrrmpfh, no, apparently he did not. I saw it in the changelog but
testing the latest release gives me:

    ethan@ethan:~$ perl -lMCGI=b1
    print b1("CGI");
    __END__
    <b1 />

So he replaced one bug with another one.

> It's too sad Perl provides no official way to distinguish whether a sub
> has been called as a function, or as a method. Like by setting a special
> variable with the same dynamic behaviour as @_, for example.

As the sub-thread on inheritance-or-not has shown, perl knows to
distinguish these cases internally. So perhaps this information could be
retrieved using some XS-trickery. The op-tree looks different, too:

    ethan@ethan:~$ perl -MO=Terse
    t::test();
    t->test();
    __END__
    LISTOP (0x8121f78) leave [1]
        OP (0x8122068) enter
        COP (0x8121f38) nextstate
        UNOP (0x8121f18) entersub [1]
            UNOP (0x8121ef0) null [141]
                OP (0x812be50) pushmark
                UNOP (0x8125368) null [17]
                    SVOP (0x8159220) gv  GV (0x8128ac0) *t::test
        COP (0x8121fc0) nextstate
        UNOP (0x8122020) entersub [2]
            OP (0x8122048) pushmark
            SVOP (0x8121fa0) const PV (0x8128b50) "t"
            SVOP (0x8122000) method_named PVIV (0x8128b20) "test"
    - syntax OK

Not sure whether retrieving this information might invoke inspecting
this op-tree, though. In this case, there'd be no way to turn this
functionality in a little module (other than a compiler-backend).

> And with every pointing towards CGI.pm on how it handled this: it's not
> a good example, IMO. 

Traditionally, CGI.pm is given as example when one needs a justification
for contorting Perl's object-model to its outer bounds. :-)

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Mon, 28 Jul 2003 11:43:56 +0800
From: Dan Jacobson <jidanni@jidanni.org>
Subject: Re: can this one-liner be squeezed any shorter?
Message-Id: <87n0ezuxhf.fsf@jidanni.org>

J>  perl -pe 's%\d+%sprintf"%4d",7.2*3600/$&%e'
Better use s@. By the way are you sure I don't need to do the * in a
BEGIN lest it get recomputed each input line?  You say the compiler or
whatever takes care of that?  (Yes I could write 25920/$& but
I want the user to see what we did, but do it only once.)


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

Date: 28 Jul 2003 09:06:10 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: can this one-liner be squeezed any shorter?
Message-Id: <bg2p22$gff$1@nets3.rz.RWTH-Aachen.DE>

Also sprach Dan Jacobson:

> J>  perl -pe 's%\d+%sprintf"%4d",7.2*3600/$&%e'
> Better use s@. By the way are you sure I don't need to do the * in a
> BEGIN lest it get recomputed each input line?  You say the compiler or
> whatever takes care of that?  (Yes I could write 25920/$& but
> I want the user to see what we did, but do it only once.)

Yes, perl will constant-fold this. If you aren't sure about such things,
let the Deparse module tell you:

    ethan@ethan:~$ perl -MO=Deparse
    s@\d+@sprintf"%4d",7.2*3600/$&@e;
    __END__
    s[\d+][do {
        sprintf '%4d', 25920 / $&;
    };]e;
    - syntax OK

As you can see, 7.2*3600 has been turned into 25920.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: Sun, 27 Jul 2003 16:04:11 -0500
From: tadmc@augustmail.com (Tad McClellan)
Subject: Re: Concatenation
Message-Id: <slrnbi8fib.2et.tadmc@magna.augustmail.com>

Greg <gdsafford@hotmail.com> wrote:

> Can someone give me any insight into why


It must have been a bug.


> my $s = undef() . '';
> 
> executes without complaint in my Perl 5.6 installation. But
> 
> my $s = '' . undef();
> 
> emits
> 
> "Use of uninitialized value in concatenation (.) or string"
> 
> Seems to me that I'm using an uninitialized value in either case.


5.6.1 does that for me too.

5.8.0 issues warnings for either one.


-- 
    Tad McClellan                          SGML consulting
    tadmc@augustmail.com                   Perl programming
    Fort Worth, Texas


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

Date: 28 Jul 2003 00:06:13 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: Re: Concatenation
Message-Id: <bg1pdl$ivau4$1@ID-24002.news.uni-berlin.de>

Tad McClellan wrote:
> Greg <gdsafford@hotmail.com> wrote:
>> my $s = undef() . '';
>> 
>> executes without complaint in my Perl 5.6 installation. But
>> 
>> my $s = '' . undef();
>> 
>> emits
>> 
>> "Use of uninitialized value in concatenation (.) or string"

> 5.6.1 does that for me too.
> 5.8.0 issues warnings for either one.

that's interesting. it does that for me, too, but there
seems to be a similar thing happening with strict and
barewords, which I recently found in a perl forum. it
can be reproduced by this:
 use strict;
 print "".test;

which strict complains about and:

 use strict;
 print test."";

which prints "test" (instead of complaining)
(perl 5.8.0, linux)

is that a bug or do I oversee something?
(in article <afs6gg$tbn$1@news.netmar.com> there seems to
be described a similar problem)

regards, tina
-- 
http://www.tinita.de/     \  enter__| |__the___ _ _ ___
http://Movies.tinita.de/   \     / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/   \    \ _,_\ __/\ __/_| /__/ perception
- my mail address expires end of august 2003 -


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

Date: Mon, 28 Jul 2003 00:45:03 -0000
From: Dave Benjamin <ramen@lackingtalent.com>
Subject: Re: Currying functions (was "theory vs practice" ceases power)
Message-Id: <slrnbi8sn6.gg0.ramen@lackingtalent.com>

In article <Xns93C54EC2873DAsdn.comcast@206.127.4.25>, Eric J. Roode wrote:
> - From time to time I've heard people discussing currying functions, but 
> only from either a computer science theoretical point of view, or how to 
> implement them in Perl (or whatever language).
> 
> What the heck would one ever use them for?   I mean, in the real world, 
> not as some funky way to solve the Towers of Hanoi or something.

Well, if we assume a function of one argument, we can generalize a lot. The
most common, obvious example (in my opinion) is the "map" function, which as
you probably know takes a list and applies a function to each element in the
list, returning a list of the results. Now, what if we wanted to use "map",
but the function we wanted to use to map the input list takes two
parameters, not one, and the first parameter is going to be given the same
value for each call?

For example, say we have a function that does a regex match and returns true
or false. It looks like this:

regex_match(pattern, input)

Where pattern is a regular expression, input is whatever string you want to
match, and the result is a boolean. Now, suppose we want a list that
contains [true, false, true, true, ...] for a given input list, depending on
whether or not each string in the input list matches a particular regular
expression.

If we can curry regex_match, we can produce a new function that already
knows the pattern, and just takes the input. Then, we can just use the
regular map function to apply the curried function to the list:

map(curry(regex_match, pattern), input)

Or, Perl-style:

fmap(curry(\&regex_match, $pattern), @input)

Or, in a language like Haskell that does currying implicitly:

map (regex_match pattern) input

This is just a ficticious example, since Perl's built-in map can easily do
regular expression matches within its code blocks, and other languages like
Python and Java use a more OO (and efficient) way of caching the pattern
than using the method I described. I'm just trying to provide a simple
illustration.

Hope this helped a little,
(and apologies to Ed for continuing to abuse the word,)
Dave


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

Date: Mon, 28 Jul 2003 03:01:21 +0100
From: earn@cash.com<earn@cash.com>
Subject: EARN$£$600\week downloading free software
Message-Id: <1059357555.91944.3214@dyke.uk.clara.net>

http://131695.PlugUsIn4Cash.com
We know it sounds TOO good to BE true, but it’s REAL!
Our International Technology firm will pay you hard cash
each time FREE software is downloaded.
Best of all you will only have to download ONE piece
of software ONE time for FREE and you can be on your way to earning BIG! 

FIND OUT MORE BY VISITING
http://StevenBrown1.PlugUsIn4Cash.com/



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

Date: Mon, 28 Jul 2003 00:16:59 GMT
From: "\"Dandy\" Randy" <ducott@hotmail.com>
Subject: File type compatibility issue with Perl
Message-Id: <%XZUa.539250$3C2.13945380@news3.calgary.shaw.ca>

Hey everyone, perhaps someone could shed some light on this issue. I'm
writing a script that maintains an addressbook online with a Perl flatfile
database. The script was working fine until I renamed the database files
from ".txt". to ".db" All entries in the database are on separate lines.
When the database had a ".txt" extension, and I viewed the data, all data
appeared on separate lines as constructed.

Name 1
Name 2
Name 3

When I renamed the extensions to ".db", the data appears on a single line.

Name 1Name 2Name 3

Can anyone tell me why this is happening? I would like to retain the .db
extensions if at all possible. TIA!

R




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

Date: 28 Jul 2003 00:55:40 GMT
From: Tina Mueller <usenet@expires082003.tinita.de>
Subject: Re: File type compatibility issue with Perl
Message-Id: <bg1sab$k0gu3$1@ID-24002.news.uni-berlin.de>

"\"Dandy\" Randy" wrote:
> Hey everyone, perhaps someone could shed some light on this issue. I'm
> writing a script that maintains an addressbook online with a Perl flatfile
> database. The script was working fine until I renamed the database files
> from ".txt". to ".db" All entries in the database are on separate lines.
> When the database had a ".txt" extension, and I viewed the data, all data
> appeared on separate lines as constructed.

> Name 1
> Name 2
> Name 3

> When I renamed the extensions to ".db", the data appears on a single line.

> Name 1Name 2Name 3

maybe i'm missing something. what do you mean by "appears".
viewing it in an editor or printing it?
the following works for me:
02:48am tina@lux:tests 498> cat test.txt                      
Name 1
Name 2
Name 3
02:49am tina@lux:tests 499> mv test.txt test.db
02:49am tina@lux:tests 500> cat test.db 
Name 1
Name 2
Name 3
02:49am tina@lux:tests 501> 

maybe you should as well show some relevant lines of the
script...

hth, tina
-- 
http://www.tinita.de/     \  enter__| |__the___ _ _ ___
http://Movies.tinita.de/   \     / _` / _ \/ _ \ '_(_-< of
http://www.perlquotes.de/   \    \ _,_\ __/\ __/_| /__/ perception
- my mail address expires end of august 2003 -


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

Date: Mon, 28 Jul 2003 01:06:04 GMT
From: "\"Dandy\" Randy" <ducott@hotmail.com>
Subject: Re: File type compatibility issue with Perl
Message-Id: <0G_Ua.567622$Vi5.14131529@news1.calgary.shaw.ca>

The data appears on the same line when I view the data in notepad.

> maybe i'm missing something. what do you mean by "appears".
> viewing it in an editor or printing it?
> the following works for me:
> 02:48am tina@lux:tests 498> cat test.txt
> Name 1
> Name 2
> Name 3
> 02:49am tina@lux:tests 499> mv test.txt test.db
> 02:49am tina@lux:tests 500> cat test.db
> Name 1
> Name 2
> Name 3
> 02:49am tina@lux:tests 501>
>
> maybe you should as well show some relevant lines of the
> script...
>
> hth, tina
> -- 
> http://www.tinita.de/     \  enter__| |__the___ _ _ ___
> http://Movies.tinita.de/   \     / _` / _ \/ _ \ '_(_-< of
> http://www.perlquotes.de/   \    \ _,_\ __/\ __/_| /__/ perception
> - my mail address expires end of august 2003 -




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

Date: Mon, 28 Jul 2003 01:17:57 GMT
From: Michael Budash <mbudash@sonic.net>
Subject: Re: File type compatibility issue with Perl
Message-Id: <mbudash-888405.18175627072003@typhoon.sonic.net>

In article <0G_Ua.567622$Vi5.14131529@news1.calgary.shaw.ca>,
 "\"Dandy\" Randy" <ducott@hotmail.com> wrote:

> > maybe i'm missing something. what do you mean by "appears".
> > viewing it in an editor or printing it?
> > the following works for me:
> > 02:48am tina@lux:tests 498> cat test.txt
> > Name 1
> > Name 2
> > Name 3
> > 02:49am tina@lux:tests 499> mv test.txt test.db
> > 02:49am tina@lux:tests 500> cat test.db
> > Name 1
> > Name 2
> > Name 3
> > 02:49am tina@lux:tests 501>
> >
> > maybe you should as well show some relevant lines of the
> > script...
>
> The data appears on the same line when I view the data in notepad.

one more case of a micro$oft product trying to think for us...

-- 
Michael Budash


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

Date: 27 Jul 2003 23:30:57 -0700
From: yuchung@mail.com (Yuchung Cheng)
Subject: Re: Gnuplot module
Message-Id: <c5a86edd.0307272230.4c41d129@posting.google.com>

alythh@netscape.net (Alythh) wrote in message news:<6a25ba72.0307230050.57da7475@posting.google.com>...
> I just installed  Chart::Graph::Gnuplot, and I'm fairly satisfied.
> But...
> 
> My wish is to be able to make a  gnuplot() call, make it display the
> graph, and stay there while other data becomes available... while
> replotting the updated data.
> 
> Is there a way to communicate between the two processes in this way?
> Or is this module just to output to a file?
> 
AFAIK, gnuplot only parse static data and generate the graph, even with
"gnuplot -persist" command. The simplist way to do above is to call 
gnuplot every once while and re-plot to the same file. 

-yuchung


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

Date: Mon, 28 Jul 2003 07:34:08 GMT
From: "\"Dandy\" Randy" <ducott@hotmail.com>
Subject: Perl variable data "replacement"
Message-Id: <Ql4Va.570250$Vi5.14211514@news1.calgary.shaw.ca>

Hello. Could use some assistance replacing data called from a text file.
Lets call the text file "bodymessage.txt" This file might contain something
similair to the following data:

[BEFORE]
This is the body content. now please visit www.mysite.com

When this data is printed, it's printed in HTML format. I need help writing
a piece of code that will:

a) detect www.*.* occurances
b) replace/modify the occurance with the needed "<a href>" etc html commands

Here is an example of what I'm looking Perl to do:

1) open bodymessage.txt and assign all data to @content
2) search each line and detect occurances of www.*.* (any valid web address)
3) when detected, add the needed html command before and after the occurance

The script would then replace the web address occurance like so:

[AFTER]
This is the body content. now please visit <a
href="www.mysite.com">www.mysite.com</a>

I've seen Perl driven online forums perform such a task ... I've read
relevant perdoc's but have been unable to locate the solution. Ideas and/or
examples welcomed! TIA!

Randy




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

Date: 28 Jul 2003 09:02:48 GMT
From: "Tassilo v. Parseval" <tassilo.parseval@rwth-aachen.de>
Subject: Re: Perl variable data "replacement"
Message-Id: <bg2oro$g4o$1@nets3.rz.RWTH-Aachen.DE>

Also sprach "Dandy" Randy:

> Hello. Could use some assistance replacing data called from a text file.
> Lets call the text file "bodymessage.txt" This file might contain something
> similair to the following data:
> 
> [BEFORE]
> This is the body content. now please visit www.mysite.com
> 
> When this data is printed, it's printed in HTML format. I need help writing
> a piece of code that will:
> 
> a) detect www.*.* occurances
> b) replace/modify the occurance with the needed "<a href>" etc html commands
> 
> Here is an example of what I'm looking Perl to do:
> 
> 1) open bodymessage.txt and assign all data to @content
> 2) search each line and detect occurances of www.*.* (any valid web address)
> 3) when detected, add the needed html command before and after the occurance
> 
> The script would then replace the web address occurance like so:
> 
> [AFTER]
> This is the body content. now please visit <a
> href="www.mysite.com">www.mysite.com</a>
> 
> I've seen Perl driven online forums perform such a task ... I've read
> relevant perdoc's but have been unable to locate the solution. Ideas and/or
> examples welcomed! TIA!

You should use URI::Find for this task. It comes with a subclass
(URI::Find::Schemeless) that can be used for finding URIs that actually
aren't URIs (such as 'www.host.com'):

    use URI::Find::Schemeless;

    my $u = URI::Find::Schemeless->new (
        sub { my $scheme = "http://" if $_[1] !~ m!^http://!;
              qq!<a href="$scheme$_[1]">$_[1]</a>! } 
    );

    my $text = "please visit www.mysite.com";

    # this changes $text in-place
    $u->find(\$text);
    
    print $text;
    __END__
    please visit <a href="http://www.mysite.com">www.mysite.com</a>

The above also adds a naive heuristic to see whether the URI scheme
needs to be prepended to the address.

Tassilo
-- 
$_=q#",}])!JAPH!qq(tsuJ[{@"tnirp}3..0}_$;//::niam/s~=)]3[))_$-3(rellac(=_$({
pam{rekcahbus})(rekcah{lrePbus})(lreP{rehtonabus})!JAPH!qq(rehtona{tsuJbus#;
$_=reverse,s+(?<=sub).+q#q!'"qq.\t$&."'!#+sexisexiixesixeseg;y~\n~~dddd;eval


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

Date: 27 Jul 2003 17:05:24 -0700
From: reggie@reggieband.com (reggie)
Subject: Re: Simple site index
Message-Id: <5117aba8.0307271605.4bfd67c1@posting.google.com>

Ryan Thompson wrote

> > but I am concerned at my own 'local link' routines (to ensure my code
> > follows <all but only> local links).  Any suggestions there?
> 
> That's an awkward statement. I'm assuming you mean "Ensure my code only
> follows local links".

Please let me clarify:

I mean I am worried about following all internal links
e.g. local files)
    href="http://www.someserver.com/"
    href="http://server.com/"
    href="/"
    href="httpbadlynamedfile.html"

I assume the following regexps are relatively adequate (when applied
to values parsed from the href attribute of a tags)?

m|^http://(www\.)?someserver.com(.*)$|
m|(?<!http://)(*.)$|

However, I am no regexp wizard, so I was hoping someone had a canned
solution for checking for local links.

Thanks for your helpful post.

reggie.


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

Date: 27 Jul 2003 17:10:09 -0700
From: reggie@reggieband.com (reggie)
Subject: Re: Simple site index
Message-Id: <5117aba8.0307271610.72193759@posting.google.com>

Ryan Thompson wrote

> > I am looking for help on choosing Perl modules for the following task:
> >
> > Create an index of all html files on a site
> >   file - <title>

<snip>

> Consider existing applications that may already fit this
> purpose.

I've looked for one that would easily be configurable to this
specialized task, and finally decided that rolling my own would be a
good exercise.  Still, if you know of an existing written tool that
will handle this, I would appreciate and off-list message.

reggie.


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

Date: 27 Jul 2003 22:47:42 -0700
From: bryon_bean@msn.com (Bryon Bean)
Subject: Tainting and use lib...
Message-Id: <8daa12a2.0307272147.143e9a8@posting.google.com>

Hi,

I was wondering if anyone could help me out with a problem that I'm
having while using the -T switch as well as a module that I've
written. The script works fine (below) until I add the -T switch to
it. When I look in the log files or compile at the command prompt I
get the "Can't locate RTG/Project.pm in @INC" even though the path to
Project.pm is right there in the "(@INC contains /path/to/my/mod
etc.)." I've looked through perlsec and lib to see if I could find
anything, but nothing. Has anyone experienced this. Any help is
greatly appreciated. Thanks

#!/usr/bin/perl -Tw

use strict;
use lib qw( /var/www/cgi-bin/war/RTG );
use RTG::Project;
use CGI::Carp qw( fatalsToBrowser );

my $app = RTG::Project->new();
$app->run;  ## RTG::Project is a sub-class of CGI::Application ##

-- snip [from cmd prompt] --

$ perl -cT project.cgi
Can't locate RTG/Project.pm in @INC (@INC contains:
/var/www/cgi-bin/war/RTG /usr/lib/perl5/5.8.0/cygwin-multi-64i
t /usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/cygwin-multi-64int
/usr/lib/perl5/site_perl/5.8.0 /usr/lib/p
rl5/site_perl) at project.cgi line 7.
BEGIN failed--compilation aborted at project.cgi line 7.

-- snip --


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

Date: 27 Jul 2003 16:40:03 -0700
From: mjeff1@twcny.rr.com (Jeff Mott)
Subject: Re: Tracking Number
Message-Id: <970676ed.0307271540.18d69523@posting.google.com>

> I figured that something called Business::UPS would have some validation
> rules in it.

Nope. In fact all it does do is query the UPS Web site and parse the
result. It really does nothing of its own.


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

Date: Mon, 28 Jul 2003 00:18:02 +0100
From: pkent <pkent77tea@yahoo.com.tea>
Subject: Re: UTF-8 module
Message-Id: <pkent77tea-0B75F7.00180228072003@usenet.force9.net>

In article <Pine.LNX.4.53.0307261059370.15522@lxplus065.cern.ch>,
 "Alan J. Flavell" <flavell@mail.cern.ch> wrote:

> On Sat, Jul 26, pkent inscribed on the eternal scroll:

> The two formats are evidently designed to be equivalent in some sense,
> but there might be subtle issues, I'm not certain.  One difference is
> the representation of a space ("+" in forms submission format, "%20"
> in URIencoding format).

AIUI, and ICBW, a '+' in a URL is basically equivalent to a '%20'. That 
said, I haven't actually checked the RFCs but everythign I've seen shows 
that this is the case. It's a handy special-case though.

> > In my limited experiments (e.g. submitting an HTML form where I'd typed
> > in some text with accented chars) IE6 will create a URL like:
> >
> > http://example.com/cgi-bin/t.pl?spanish=se%C0%A2or%20manuel
> 
> I would never use IE as my reference implementation - it deliberately
> violates some mandatory requirements of the applicable
> specifications.[1]

Neither would I use IE6 as a general reference implementation, but as 
most of our users use IE we tend to try things out quite early on it. 
Although I didn't mention that Mozilla did the same thing when we tried. 
I'm not saying they're right but the behaviour supports the 'high order 
char becomes two octets %hh%hh in url' theory.

Oh the fun we've had with perl5.6.1, XML::Parser, high-order characters, 
web browsers and CGI.

P

-- 
pkent 77 at yahoo dot, er... what's the last bit, oh yes, com
Remove the tea to reply


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

Date: Mon, 28 Jul 2003 01:42:21 +0200
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: UTF-8 module
Message-Id: <Pine.LNX.4.53.0307280128350.22453@lxplus073.cern.ch>

On Mon, Jul 28, pkent inscribed on the eternal scroll:

> > The two formats are evidently designed to be equivalent in some sense,
> > but there might be subtle issues, I'm not certain.  One difference is
> > the representation of a space ("+" in forms submission format, "%20"
> > in URIencoding format).
>
> AIUI, and ICBW, a '+' in a URL is basically equivalent to a '%20'.

This is the problem when folks raise issues that are off-topic - and
without consulting the relevant specifications.

> That said, I haven't actually checked the RFCs

I can assure you that I did so, directly before posting what I had
said.

> Neither would I use IE6 as a general reference implementation, but as
> most of our users use IE we tend to try things out quite early on it.

But that wasn't my point, though.

> Although I didn't mention that Mozilla did the same thing when we tried.

Sure, and on the whole I'd trust Mozilla to get things right, though
I've seen the occasional unfortunate compromise ("we've got to do it
this way because web pages made for IE look bad otherwise").

But I think I cited enough references to specifications too.

> I'm not saying they're right but the behaviour supports the 'high order
> char becomes two octets %hh%hh in url' theory.

Yes, but not necessarily two, in general!

> Oh the fun we've had with perl5.6.1, XML::Parser, high-order characters,
> web browsers and CGI.

More so than with 5.8 ?

cheers

-- 
                        "This is not rocket surgery"  - Stan Brown


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

Date: Mon, 28 Jul 2003 14:22:04 +0800
From: Dan Jacobson <jidanni@jidanni.org>
Subject: what is perl's no op operator?
Message-Id: <87d6fvuq5v.fsf@jidanni.org>

In the shell, I can do echo $a; : echo $b; echo $c
to turn off b with minimal disturbance to the one-liner.
In perl, one can't get away with just adding a ": ":
print $a; if(0){print $b}; print $c; #best I know
Is there a way less disruptive to this one-liner?


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

Date: Mon, 28 Jul 2003 04:43:22 -0500
From: "Eric J. Roode" <REMOVEsdnCAPS@comcast.net>
Subject: Re: what is perl's no op operator?
Message-Id: <Xns93C63A34815C6sdn.comcast@206.127.4.25>

-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1

Dan Jacobson <jidanni@jidanni.org> wrote in 
news:87d6fvuq5v.fsf@jidanni.org:

> In the shell, I can do echo $a; : echo $b; echo $c
> to turn off b with minimal disturbance to the one-liner.
> In perl, one can't get away with just adding a ": ":
> print $a; if(0){print $b}; print $c; #best I know
> Is there a way less disruptive to this one-liner?

Mmmm, probably prepend "0 and".

- -- 
Eric
$_ =  reverse sort qw p ekca lre Js reh ts
p, $/.r, map $_.$", qw e p h tona e; print

-----BEGIN xxx SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>

iQA/AwUBPyTwNGPeouIeTNHoEQLTbQCfdBi/vXv2NxmuDrJDq8bN+qiLNSsAnibC
5ha2eBcmTuhjIYoG+SJZoUe+
=w024
-----END PGP SIGNATURE-----


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

Date: Sat, 19 Jul 2003 01:59:56 GMT
From: Bob Walton <bwalton@rochester.rr.com>
Subject: Re: 
Message-Id: <3F18A600.3040306@rochester.rr.com>

Ron wrote:

> Tried this code get a server 500 error.
> 
> Anyone know what's wrong with it?
> 
> if $DayName eq "Select a Day" or $RouteName eq "Select A Route") {

(---^


>     dienice("Please use the back button on your browser to fill out the Day
> & Route fields.");
> }
 ...
> Ron

 ...
-- 
Bob Walton



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

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:

The Perl-Users Digest is a retransmission of the USENET newsgroup
comp.lang.perl.misc.  For subscription or unsubscription requests, send
the single line:

	subscribe perl-users
or:
	unsubscribe perl-users

to almanac@ruby.oce.orst.edu.  

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

To request back copies (available for a week or so), send your request
to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
where x is the volume number and y is the issue number.

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 V10 Issue 5279
***************************************


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