[17831] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 5251 Volume: 9

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jan 4 23:58:36 2001

Date: Thu, 4 Jan 2001 20:58:19 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <978670699-v9-i5251@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Thu, 4 Jan 2001     Volume: 9 Number: 5251

Today's topics:
        Useless code.... (Me)
    Re: Useless code.... (Martien Verbruggen)
    Re: Useless code.... (Tad McClellan)
    Re: Useless code.... <joe+usenet@sunstarsys.com>
    Re: Useless code.... (Me)
    Re: Useless code.... (Jerome O'Neil)
        using CPAN module and su for install (Paul Phillips)
    Re: using CPAN module and su for install (Garry Williams)
    Re: using CPAN module and su for install (Martien Verbruggen)
    Re: using CPAN module and su for install (Paul Phillips)
    Re: using CPAN module and su for install (Garry Williams)
    Re: using CPAN module and su for install (Abigail)
        using pack/unpack to make network-friendly data <spammers_suck@[127.0.0.1]>
        Using perdoc <lmoran@wtsg.com>
    Re: Using perdoc <a.v.a@home.nl>
    Re: Using perdoc (Tad McClellan)
    Re: Using perdoc <mischief@velma.motion.net>
    Re: Using perdoc <lmoran@wtsg.com>
    Re: Using perdoc (Tad McClellan)
    Re: Using perdoc <ellem@webcombo.net>
    Re: Using Rational Rose with Perl for UML <steve_button@my-deja.com>
    Re: Using Rational Rose with Perl for UML <steve_button@my-deja.com>
    Re: Using Rational Rose with Perl for UML (Chris Fedde)
        Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)

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

Date: 30 Dec 2000 09:11:08 GMT
From: me@nospam.com (Me)
Subject: Useless code....
Message-Id: <Xns901A1EEFCmememeyeahme@206.165.3.80>

I just had to laugh...  How's this for useless code?

$_ = $adverts_dir; /^(.+)$/; $adverts_dir = $1;


What possible use could the author see in doing that?  It's not even as 
if it's one of those sorry-ass attempts at taint checking. The script 
doesn't use -T.

The scary part is, it was done in a fairly popular cgi script 
(Webadverts), the author who has been programming in Perl for 4+ years.  
You'd think he knew better.

*sigh*

K, it provided me with some amusement.


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

Date: Sat, 30 Dec 2000 22:55:55 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: Useless code....
Message-Id: <slrn94rjab.6lr.mgjv@martien.heliotrope.home>

On 30 Dec 2000 09:11:08 GMT,
	Me <me@nospam.com> wrote:
> I just had to laugh...  How's this for useless code?
> 
> $_ = $adverts_dir; /^(.+)$/; $adverts_dir = $1;
> 
> 
> What possible use could the author see in doing that?  It's not even as 
> if it's one of those sorry-ass attempts at taint checking. The script 
> doesn't use -T.

I'd still say that it was probably done as an untainting step, however
useless it is. Maybe the code was originally developed under -T, and
later the developer, unwisely, decided that it was too much work. The
only person who can tell is the author.

Whatever it is, it's at best a bad example of how to not untaint data.
If you use -T, then untaint data decently.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Think of the average person. Half of
Commercial Dynamics Pty. Ltd.   | the people out there are dumber.
NSW, Australia                  | 


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

Date: Sat, 30 Dec 2000 07:38:40 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Useless code....
Message-Id: <slrn94rlqg.36l.tadmc@magna.metronet.com>

Me <me@nospam.com> wrote:

>I just had to laugh...  How's this for useless code?


Worse than useless, it is dangerous (has potential for a
Very Hard to find bug).


>$_ = $adverts_dir; /^(.+)$/; $adverts_dir = $1;
>
>
>What possible use could the author see in doing that?  


If $adverts_dir contains more than one newline (or an interior
newline), then it will be set to some value from a previous
match that _did_ succeed (undef if no previous successful
matches).

$1 is *only* set on a *successful* match, and he didn't test
to see if it succeeded or not.

(but the (l)user deserves some pain if they have newlines in
 a directory name...
)


>It's not even as 
>if it's one of those sorry-ass attempts at taint checking.


It is likely a vestigal sorry-ass attempt.

Does the script go on to do Something Dangerous using $adverts_dir?

(users better be hoping that a cracker isn't reading this...)


>K, it provided me with some amusement.


Me too.

It should provide a healthy dose of fear for the users of said
software as well.


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


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

Date: 30 Dec 2000 11:36:53 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: Useless code....
Message-Id: <m366k17tne.fsf@mumonkan.sunstarsys.com>

tadmc@metronet.com (Tad McClellan) writes:

> Me <me@nospam.com> wrote:
> 
> >I just had to laugh...  How's this for useless code?
> 
> 
> Worse than useless, it is dangerous (has potential for a
> Very Hard to find bug).
> 
> 
> >$_ = $adverts_dir; /^(.+)$/; $adverts_dir = $1;
> >
> >
> >What possible use could the author see in doing that?  

Personally, I would have never made it that far in evaluating
a particular CGI script.  There are basically three things I'd
look for before examining the source:

1) warnings enabled (-w) and taint checks enabled (-T)
2) use strict
3) file contains pod documentation

(1) is the most serious, since if the script was developed
    without them, a cracker can simply add them to the shebang (top)
    line, and perl will tell them right where to look for security
    flaws.

(2) is more subtle, but can be just as bad if symrefs are used.
    Same technique applies- cracker enables them and lets perl do
    all the dirty work.

(3) basically it's a maturity issue, and usually distinguishes
    one-offs from code that someone intends to support.

That being said, the first place to look for code outside
the standard perl distribution should be CPAN, not yahoo.

> If $adverts_dir contains more than one newline (or an interior
> newline), then it will be set to some value from a previous
> match that _did_ succeed (undef if no previous successful
> matches).
> 
> $1 is *only* set on a *successful* match, and he didn't test
> to see if it succeeded or not.
> 
> (but the (l)user deserves some pain if they have newlines in
>  a directory name...
> )
> 
> 
> >It's not even as 
> >if it's one of those sorry-ass attempts at taint checking.
> 
> 
> It is likely a vestigal sorry-ass attempt.
> 
> Does the script go on to do Something Dangerous using $adverts_dir?
> 
> (users better be hoping that a cracker isn't reading this...)
> 
> >K, it provided me with some amusement.
> 
> 
> Me too.
> 
> It should provide a healthy dose of fear for the users of said
> software as well.

Curiosity got the better of me, so I had a look at the 
script(s) also. 

It fails all three "tests".  

Since it's "shareware" code, reproducing it here and 
commenting on it would be inappropriate, but unless 
you're a beekeeper I'd recommend looking somewhere else.

YMMV
-- 
Joe Schaefer


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

Date: 30 Dec 2000 19:47:07 GMT
From: me@nospam.com (Me)
Subject: Re: Useless code....
Message-Id: <Xns901A82EF2mememeyeahme@206.165.3.80>

Joe Schaefer <joe+usenet@sunstarsys.com> wrote in 
<m366k17tne.fsf@mumonkan.sunstarsys.com>:

>Curiosity got the better of me, so I had a look at the 
>script(s) also. 
>
>It fails all three "tests".  
>
>Since it's "shareware" code, reproducing it here and 
>commenting on it would be inappropriate, but unless 
>you're a beekeeper I'd recommend looking somewhere else.

I wasnt looking at it to use the script.  That script was one of the 
first I looked at 4 years ago, and as I was learning Perl I quickly 
realized that his skills needed refining.

I just happnened to see that a new version of the script got released 
so went to look at the source out of boredom, as I am now quite a bit 
further along in my coding abilities.

I was just shocked to see that

I agree about the -w, -T, use strict, but I knew he wouldn't have 
those, before I looked at the code.  I just wanted to see what else he 
was doing in there, and how the script has progressed.  Not well, I'd 
say...

It's a shame.  Fairly popular script.


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

Date: Tue, 02 Jan 2001 17:28:08 GMT
From: jerome@activeindexing.com (Jerome O'Neil)
Subject: Re: Useless code....
Message-Id: <Ico46.673$6O3.204145@news.uswest.net>

me@nospam.com (Me) elucidates:
> I just had to laugh...  How's this for useless code?
> 
> $_ = $adverts_dir; /^(.+)$/; $adverts_dir = $1;
> 
> 
> What possible use could the author see in doing that?  It's not even as 
> if it's one of those sorry-ass attempts at taint checking. The script 
> doesn't use -T.

My bet is it's a sorry assed attempt at taint checking.  A lot of times -T
is used for development, but not deployment.

> 
> The scary part is, it was done in a fairly popular cgi script 
> (Webadverts), the author who has been programming in Perl for 4+ years.  
> You'd think he knew better.
> 
> *sigh*
> 
> K, it provided me with some amusement.

-- 
If men could learn from history, what lessons it might teach us!  But
passion and party blind our eyes, and the light which experience gives
is a lantern on the stern, which shines only on the waves behind us.
				--Samuel Taylor Coleridge, "Recollections"


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

Date: Tue, 02 Jan 2001 23:54:33 -0600
From: paul@partitura.com (Paul Phillips)
Subject: using CPAN module and su for install
Message-Id: <F48E577643C620DC.3DCCED5ACE1B0DBC.6BB3EB3F2A661811@lp.airnews.net>

I've tried to figure this out by reading the CPAN module readme, and
didn't see anything to help me.

I'm running Solaris 8, and trying to use the CPAN module for the first time.

If I run CPAN interactively as a regular user, all seems fine until it
starts an actual install, then it fails (lack pf priviledges).

If I su root, then run CPAN interactively, it has other failures, I
suppose because necessary things aren't in root's path.  (not sure about
that)

Traditionally, I can easily install perl modules by being a regular user
for the make, and the su root only for make install.

How do I do this with CPAN/

Thanks!

Paul Phillips


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

Date: Wed, 03 Jan 2001 04:59:51 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: using CPAN module and su for install
Message-Id: <bly46.1115$Dm5.34271@eagle.america.net>

On Tue, 02 Jan 2001 23:54:33 -0600, Paul Phillips <paul@partitura.com> wrote:
>
>If I run CPAN interactively as a regular user, all seems fine until it
>starts an actual install, then it fails (lack pf priviledges).
>
>If I su root, then run CPAN interactively, it has other failures, I
>suppose because necessary things aren't in root's path.  (not sure about
>that)

Well, it would help to find out.  I suspect that the "other failures"
have messages accompanying them.  

>Traditionally, I can easily install perl modules by being a regular user
>for the make, and the su root only for make install.

Traditionally, I configure my systems to allow *me* to install perl
and Perl modules *without* root.  I guess it's a matter of style, but
you might consider that instead.  

>How do I do this with CPAN/

  $ perl -MCPAN -eshell
  cpan> make module
  cpan> test module
  cpan> q
  $ sudo perl -MCPAN -eshell
  Password:
  cpan> install module
  cpan> q
  $

-- 
Garry Williams


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

Date: Wed, 3 Jan 2001 16:32:00 +1100
From: mgjv@tradingpost.com.au (Martien Verbruggen)
Subject: Re: using CPAN module and su for install
Message-Id: <slrn955eag.edk.mgjv@martien.heliotrope.home>

On Tue, 02 Jan 2001 23:54:33 -0600,
	Paul Phillips <paul@partitura.com> wrote:
> I've tried to figure this out by reading the CPAN module readme, and
> didn't see anything to help me.
> 
> I'm running Solaris 8, and trying to use the CPAN module for the first time.
> 
> If I run CPAN interactively as a regular user, all seems fine until it
> starts an actual install, then it fails (lack pf priviledges).

The best thing to do is to allow an unprivileged user (or better even, a
group) to install perl modules. Just change the group ownership of the
$PERL/lib tree to that group (typically admin or perl or so), and make
sure all directories are writeable by group. If you feel like it, you
could also do this for other parts of the installation tree, or not,
depending on how paranoid you are.

> If I su root, then run CPAN interactively, it has other failures, I
> suppose because necessary things aren't in root's path.  (not sure about
> that)

You could copy your $HOME/.cpan directory to root's home directory, but
I'd recommend against doing these things as root.

> Traditionally, I can easily install perl modules by being a regular user
> for the make, and the su root only for make install.
> 
> How do I do this with CPAN/

$ perl -MCPAN -e shell
cpan> get Module
cpan> make Module
cpan> test Module
cpan> look Module
MODULEDIR$ \su
Password:
MODULEDIR# make install
MODULEDIR# exit
MODULEDIR$ exit
cpan>

But again, I'd rather manage the permissions of the Perl library tree.

Martien
-- 
Martien Verbruggen              | 
Interactive Media Division      | Useful Statistic: 75% of the people
Commercial Dynamics Pty. Ltd.   | make up 3/4 of the population.
NSW, Australia                  | 


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

Date: Wed, 03 Jan 2001 00:40:13 -0600
From: paul@partitura.com (Paul Phillips)
Subject: Re: using CPAN module and su for install
Message-Id: <48B292E6AEDAB1CC.414139A434A61A73.2016AF8B5742DB0A@lp.airnews.net>


> 
> Well, it would help to find out.  I suspect that the "other failures"
> have messages accompanying them. 

It loooks like when I run CPAN interactivly as root, it can't find gcc. 
(Path problems for root...)  Hmm,, on Solaris 8 I don't even know how to
define the path for root. (I'm new at Solaris also...)


> 
> >How do I do this with CPAN/
> 
>   $ perl -MCPAN -eshell
>   cpan> make module
>   cpan> test module
>   cpan> q
>   $ sudo perl -MCPAN -eshell
>   Password:
>   cpan> install module
>   cpan> q
>   $
> 

That would work for individual modules, but probably not when doing an
"install Bundle::xxxxx" - right?

Paul Phillips


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

Date: Wed, 03 Jan 2001 06:27:18 GMT
From: garry@zvolve.com (Garry Williams)
Subject: Re: using CPAN module and su for install
Message-Id: <aDz46.1118$Dm5.34930@eagle.america.net>

On Wed, 03 Jan 2001 00:40:13 -0600, Paul Phillips <paul@partitura.com> wrote:
>
>It loooks like when I run CPAN interactivly as root, it can't find gcc. 
>(Path problems for root...)  Hmm,, on Solaris 8 I don't even know how to
>define the path for root. (I'm new at Solaris also...)

You would set the path for the root user just like you'd set the path
for any other user.  That would depend on the user's shell as to what
is appropriate.  

But this is _off topic_.  And the fact that you're asking indicates
that you should *really* change your habits.  Martien Verbruggen's
follow-up to your article was stronger than mine.  

Listen to our advice: don't run as the root user.  

Just say no!  

And install sudo.  

-- 
Garry Williams


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

Date: 3 Jan 2001 16:39:53 GMT
From: abigail@foad.org (Abigail)
Subject: Re: using CPAN module and su for install
Message-Id: <slrn956lep.nmu.abigail@tsathoggua.rlyeh.net>

Garry Williams (garry@zvolve.com) wrote on MMDCLXXXII September MCMXCIII
in <URL:news:aDz46.1118$Dm5.34930@eagle.america.net>:
== On Wed, 03 Jan 2001 00:40:13 -0600, Paul Phillips <paul@partitura.com> wrote:
== >
== >It loooks like when I run CPAN interactivly as root, it can't find gcc. 
== >(Path problems for root...)  Hmm,, on Solaris 8 I don't even know how to
== >define the path for root. (I'm new at Solaris also...)
== 
== You would set the path for the root user just like you'd set the path
== for any other user.  That would depend on the user's shell as to what
== is appropriate.  
== 
== But this is _off topic_.  And the fact that you're asking indicates
== that you should *really* change your habits.  Martien Verbruggen's
== follow-up to your article was stronger than mine.  
== 
== Listen to our advice: don't run as the root user.  
== 
== Just say no!  
== 
== And install sudo.  


Which in the example given *still* runs 'make install' as root.

Running 'make install' of alien packages is only half a step away from
using Outlook with word macros enabled, which caused the I-LOVE-YOU virus.

I usually make a dedicated account under which I install Perl.



Abigail
-- 
$;                                   # A lone dollar?
=$";                                 # Pod?
$;                                   # The return of the lone dollar?
{Just=>another=>Perl=>Hacker=>}      # Bare block?
=$/;                                 # More pod?
print%;                              # No right operand for %?


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

Date: 3 Jan 2001 18:01:32 -0800
From: zeadeATstanfordalumni.org <spammers_suck@[127.0.0.1]>
Subject: using pack/unpack to make network-friendly data
Message-Id: <930lhs$bon@cyclone.stanford.edu>

I couldn't really think of a good subject.

What I need to do: send data over a network in network-byte order (big
endian) in 4 byte chunks (XDR data format description, RFC 1832).
Integers are 4 bytes long, strings of variable size are preceded by an
int (4 bytes) which gives the real data length and then null padded to
be a multiple of 4 bytes long (sorta pascal-esque), etc.  A byte is
defined as 8 bits.

Two problems (at least) I've found thinking through this: 

1) First I don't know how to use pack/unpack in a way that I can
convert perl data into big-endian, binary forms of the correct sizes
(I assume I need to use the "N" template for pack/unpack).

2) I'd like to start working on string data as soon as I possibly can;
I don't want to wait for the complete string to be in the buffer
before I can pass it along to needy clients.  Let's say I've encoded
"Hello, world!" to an XDR string where the size is not known ahead of
time.  It should be 20 bytes long (first 4 bytes is an int containing
the size of the string, 13, the next 16 bytes will be "Hello,
world!\0\0\0").  Now say I have the first 8 bytes of this datagram, I
decode the first 4 bytes and learn the string is 13 chars long, now
what I would like to do is decode the next 4 bytes and get that much
of the string ("Hell").  How can I pack the original perl string in a
way that these 4 byte boundaries can be observed when unpacking?

This is perl-to-perl over the net for now but will need to be
perl-to-C very soon.

Also wondering, can length, substr, join, // and other various perl
string functions be used to look at/modify packed data/bytes safely?
Any pitfalls here?

Lastly is there documentation on pack/unpack anywhere that describes
in more detail than the Camel book (specificly I'd love to see a lot a
lot of commented examples).  pack/unpack has always been a time sink
for me when I've needed to use it.


thanks,
Micah
-- 
perl -e's;^;nsiC%by:n19%o>o2z4on19%`"t2z`fn3o.%.2o.z.2o.g4og.5o.g.4o.4%;;\
s;$;f%.2o.n`fP"Y2>bP"Y2>bz`fzd2>t%`"Y>%`Pz)2>bgfP"Y2>bn%p#f8%.oP"#n%p#p;;\
s;$;.o>%d>(z#n____`Y>bod>Pt%`Yf2">o%__n;;s;#;ppfz;g;s;p;fg;g;s;_;ofo%;g;;\
s;z;2%;g;s;g;3%;g;s;f;3>;g;s;(\d+)(.);$2x$1;eg;y;t>%nC;\x278 \ng;;print;'


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

Date: Fri, 29 Dec 2000 11:43:04 -0500
From: Lou Moran <lmoran@wtsg.com>
Subject: Using perdoc
Message-Id: <edfp4tobfgabiqcn9asvioaea4njfmpcfg@4ax.com>

-I wanted to know how to do this

print "He said, "No."";

which of course you cannot do.

So I looked up:

perldoc -q quote
perldoc -q quotes
perldoc -q quoting

none which gave me the answer.

I looked in perlfaq4 b/c that looked like the right spot, it wasn't.

Ultimately I (finally) cracked open PP3 and found:

print qq(He said, "No.");

which worked as I expected.

How can I better search the perldocs and faqs?  

What did I do wrong here?

 

lmoran@wtsgSPAM.com
print "\x{263a}"


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

Date: Fri, 29 Dec 2000 17:44:13 GMT
From: AvA <a.v.a@home.nl>
Subject: Re: Using perdoc
Message-Id: <3A4CCED6.940C7855@home.nl>

Lou Moran wrote:

> -I wanted to know how to do this
>
> print "He said, "No."";
>
> which of course you cannot do.
>

print "He said, \"No.\""; #works for me



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

Date: Fri, 29 Dec 2000 11:50:29 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Using perdoc
Message-Id: <slrn94pg6l.u3.tadmc@magna.metronet.com>

Lou Moran <lmoran@wtsg.com> wrote:
>-I wanted to know how to do this
>
>print "He said, "No."";

>So I looked up:
>
>perldoc -q quote
>perldoc -q quotes
>perldoc -q quoting


The FAQs are only a small part of Perl's standard documentation.

If you don't find what you are looking for there, it's time to
try looking in one of the _other_ 70 or so doc files.


>How can I better search the perldocs and faqs?  


Find out where they got installed on your system, and word
search them to your heart's content.

I have an alias that cd's me to the pod/ directory, then
start a-grepping.


>What did I do wrong here?

Checking "some" rather than "most" of the standard docs :-)

I like to make a list of "headlines" for easy word-searching:

    cd /some/place/pod/
    grep '^=' *.pod  >all.heads

Then,

   grep -i quote all.heads

finds (among others):

perlop.pod:=head2 Quote and Quote-like Operators

bingo!


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


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

Date: Fri, 29 Dec 2000 21:09:12 -0000
From: Chris Stith <mischief@velma.motion.net>
Subject: Re: Using perdoc
Message-Id: <t4pvbobqe8e9c6@corp.supernews.com>

Lou Moran <lmoran@wtsg.com> wrote:
> -I wanted to know how to do this

> print "He said, "No."";

> which of course you cannot do.

Sure you can. 

print "He said, \"No.\"";
print 'He said, "No."';
print q/He said, "No."/;

> So I looked up:

> perldoc -q quote
> perldoc -q quotes
> perldoc -q quoting

perldoc perlop

Chris

-- 
Christopher E. Stith

Even in the worst of times, there is always someone who's never had it better.
Even in the best of times, there is always someone who's never had it worse.



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

Date: Fri, 29 Dec 2000 21:53:36 -0500
From: Lou Moran <lmoran@wtsg.com>
Subject: Re: Using perdoc
Message-Id: <d3jq4tgus4fddke6g4pq2j0f0pf34a0tra@4ax.com>

On Fri, 29 Dec 2000 21:09:12 -0000, Chris Stith
<mischief@velma.motion.net> wrote wonderful things about sparkplugs:

>Lou Moran <lmoran@wtsg.com> wrote:
>> -I wanted to know how to do this
>
>> print "He said, "No."";
>
>> which of course you cannot do.
>
>Sure you can. 
>
>print "He said, \"No.\"";
>print 'He said, "No."';
>print q/He said, "No."/;

- But none of those are
 print "He said, "No."";
that doesn't work. -w complains vigorously.

Yes, they all output:

He said, "No."

But I never tried any of that, what with the whole me not knowing
about them.

So certainly TMTOWTDI but I was clearly on the very wrong track.
Although with enough looking I did find an answer that *seems* OK.  I
don't know if there are any ramifications of qq( ) vs. \\ or q// and
in fact at this very moment I don't know what differences occur
between ' ' and " " and q/ / and qq( ) and all the other permutations
of quoting.  Fortunately (barring the impending blizzard) I have two
hours to read all about it on the plane to Disney.

Cheers.



lmoran@wtsgSPAM.com
print "\x{263a}"


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

Date: Fri, 29 Dec 2000 21:28:38 -0500
From: tadmc@metronet.com (Tad McClellan)
Subject: Re: Using perdoc
Message-Id: <slrn94qi2m.2e3.tadmc@magna.metronet.com>

Lou Moran <lmoran@wtsg.com> wrote:
>On Fri, 29 Dec 2000 21:09:12 -0000, Chris Stith
><mischief@velma.motion.net> wrote wonderful things about sparkplugs:

> print "He said, "No."";
>that doesn't work. -w complains vigorously.
                    ^^

No it doesn't.

You will get vigorous complaints with or without warnings enabled.

The complaints are not warnings, they are errors. Big difference.


>don't know if there are any ramifications of qq( ) vs. \\ or q// and


There are 2 kinds of quoting. Single quoteish and double quotish.

\\ is no kind of quoting, I don't know why it is in your list.

There are many ways of writing a single/double quoted string, but
they all have the _same behavior_ (errr, except when they don't).


>in fact at this very moment I don't know what differences occur
>between ' ' and " " and q/ / and qq( ) and all the other permutations
>of quoting.  Fortunately (barring the impending blizzard) I have two
>hours to read all about it on the plane to Disney.


It better not take 2 hours.

Double-quotish has variable interpolation and backslash escapes,
single-quotish doesn't:

   "$foo"
   qq($foo)
   qq/$foo/

all work the same (all probably compile to exactly the same byte codes).


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


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

Date: Sat, 30 Dec 2000 15:54:02 -0500
From: Lou M <ellem@webcombo.net>
Subject: Re: Using perdoc
Message-Id: <v4is4t455ima5mulof149hh0eekiesjc52@4ax.com>

On Fri, 29 Dec 2000 21:28:38 -0500, tadmc@metronet.com (Tad McClellan)
wrote wonderful things about sparkplugs:

>Fortunately (barring the impending blizzard) I have two
>hours to read all about it on the plane to Disney.
$
$
$It better not take 2 hours.
$

Ugh the blizzard won.  I just got back from LGA.  The snow was super
bad (especially if you factor in the fact that NY hasn't *really* seen
snow since '96.

Thanks to all for setting me straight


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

Date: Tue, 02 Jan 2001 16:08:25 GMT
From: Steve Button <steve_button@my-deja.com>
Subject: Re: Using Rational Rose with Perl for UML
Message-Id: <92sudk$2dt$1@nnrp1.deja.com>

In article <ivh16.442$B9.189123072@news.frii.net>,
  cfedde@fedde.littleton.co.us (Chris Fedde) wrote:
> In article <91snbd$rrg$1@nnrp1.deja.com>,
> Steve Button  <steve_button@my-deja.com> wrote:
> >Hi,
> >
> >We've recently started using Rational Rose to model our systems and
> >will ultimately be building the systems in Perl.
> >
> >Does anyone have any experiences of using UML with Perl ?
> >
>
> Rational will probably bark at you when you say you are using their

No, I think they are quite happy to take lots of money away from my
company so that we can use their tools.

>
> In Perl all that stuff disappears in a puff of AUTOLOAD.  If you
> are really in the market for a design methodology that applies
> itself well to design and development using Perl or other typeless
> languages take a look at XP.

Yes, I've looked briefly at XP but I get the feeling it really only
covers a subset of what Rational Unified Process defines. I didn't
think it went into class diagrams and code generation etc., like Rose
does. I thought it was more about Best Practices like pair programming
and iterative development, I could be wrong though.

Cheers,

Steve

--
HuntAHome      http://www.huntahome.com
Properties throughout the UK and Europe
Subscribe to receive a free daily email of all
matching properties. Free to advertise your property


Sent via Deja.com
http://www.deja.com/


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

Date: Tue, 02 Jan 2001 16:16:43 GMT
From: Steve Button <steve_button@my-deja.com>
Subject: Re: Using Rational Rose with Perl for UML
Message-Id: <92sut5$2mn$1@nnrp1.deja.com>

In article <92919h$if4$1@nnrp1.deja.com>,
  microgold@pipeline.com wrote:
> Hi,
>
> Microgold has an add-in for perl for its WithClass tool that allows
you
> to reverse engineer perl files into a class diagram.  The source for
> the add-in is included (in VBA) so you can change it.  There is also a
> script for generating classes for perl.  You can download a trial
> version of the product at http://www.microgold.com
>
> -Mike Diamond

thanks Mike. That's a bit eager replying on Christmas Day!! (making a
few assumptions here about your geography/religion)

I did have a quick look at WithClass as I saw a previous reply in
perl.misc that you had given. Unfortunately my company has already
heavily commited to Rational, and so probably wont change until they
get really fed up with them (which could take a few months). When that
happens though I'll bear you in mind.

Thanks,

Steve



Sent via Deja.com
http://www.deja.com/


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

Date: Wed, 03 Jan 2001 05:09:36 GMT
From: cfedde@fedde.littleton.co.us (Chris Fedde)
Subject: Re: Using Rational Rose with Perl for UML
Message-Id: <kuy46.600$B9.191672320@news.frii.net>

In article <92sudk$2dt$1@nnrp1.deja.com>,
Steve Button  <steve_button@my-deja.com> wrote:
>In article <ivh16.442$B9.189123072@news.frii.net>,
>  cfedde@fedde.littleton.co.us (Chris Fedde) wrote:
>> In article <91snbd$rrg$1@nnrp1.deja.com>,
>
>>
>> In Perl all that stuff disappears in a puff of AUTOLOAD.  If you
>> are really in the market for a design methodology that applies
>> itself well to design and development using Perl or other typeless
>> languages take a look at XP.
>
>Yes, I've looked briefly at XP but I get the feeling it really only
>covers a subset of what Rational Unified Process defines. I didn't
>think it went into class diagrams and code generation etc., like Rose
>does. I thought it was more about Best Practices like pair programming
>and iterative development, I could be wrong though.
>

You are right. XP _is_ about the systematic application of good
practices.  So is RUP.  It surprises me to hear that someone that
is willing to consider using Perl for serious development is also
willing to spend thousands per seat on Rational Rose.  Don't be
fooled by the pretty pictures, only a small part of what RUP
automates for you is applicable to Perl.  It seems as silly to me
as using Word to edit your Perl code.  XP solves 80% of the problem
with only 20% of the effort required by heavy weight methodologies
On the other hand, while RUP addresses 90% of the software development
cycle, most development organizations can only take advantage of
about 10% of what it offers.

If you want to get an advantage from using RUP then you need to
switch to programming in C++ ;-)

Just my opinions
chris
-- 
    This space intentionally left blank


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

Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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.  

| NOTE: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.

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 V9 Issue 5251
**************************************


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