Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

splain vs. -w #7359

Closed
p5pRT opened this issue Jun 11, 2004 · 14 comments
Closed

splain vs. -w #7359

p5pRT opened this issue Jun 11, 2004 · 14 comments

Comments

@p5pRT
Copy link

p5pRT commented Jun 11, 2004

Migrated from rt.perl.org#30227 (status was 'resolved')

Searchable as RT30227$

@p5pRT
Copy link
Author

p5pRT commented Jun 11, 2004

From @jidanni

Though the splain man page mentions
  at the start (or near the start) of your program. (Note that this does enable perl's
  -w flag.) Your whole compilation will then be subject(ed :-) to the enhanced diag-
It still isn't clear if
  use diagnostics;
will do more, or less, or equal, than -w. So please mention it there.
Ok, it probably doesn't do less.
If it is equal, then
  perl -w
should be put in SYNOPSIS.

@p5pRT
Copy link
Author

p5pRT commented Jun 12, 2004

From service-clientele@fnac.com

Chère Cliente, Cher Client,

Merci de nous avoir contactés.

Vous venez d'envoyer un message à une adresse ne permettant pas
de recevoir d'e-mail.

Pour trouver les réponses à vos questions sur vos commandes, sur
les produits, sur le site, consultez nos pages d'aide en ligne
en cliquant sur :
http​://www.fnac.com/Help/A01.asp

Vous pouvez également suivre en direct l'évolution de vos commandes
en cours, en consultant la rubrique "Vos Commandes en un clin d'oeil"
en cliquant sur :
https://www.fnac.com/Account/Profil/default.asp

Nous espérons que ces pages vous apporteront toutes les informations
nécessaires. Dans le cas contraire, vous pouvez nous contacter par
e-mail en cliquant sur le lien :
http​://www.fnac.com/Service_Client/FnacSUGG.asp

Merci de votre fidélité a www.fnac.com

Très cordialement,

L'équipe Fnac.com

@p5pRT
Copy link
Author

p5pRT commented Jun 12, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jun 12, 2004

From @iabyn

On Fri, Jun 11, 2004 at 11​:51​:20PM -0000, Dan Jacobson wrote​:

Though the splain man page mentions
at the start (or near the start) of your program. (Note that this does enable perl's
-w flag.) Your whole compilation will then be subject(ed :-) to the enhanced diag-
It still isn't clear if
use diagnostics;
will do more, or less, or equal, than -w. So please mention it there.
Ok, it probably doesn't do less.
If it is equal, then
perl -w
should be put in SYNOPSIS.

  DESCRIPTION
  The `diagnostics' Pragma

  This module extends the terse diagnostics normally emitted
  by both the perl compiler and the perl interpreter, aug­
  menting them with the more explicative and endearing
  descriptions found in the perldiag manpage.

I think that's pretty clear that 'use diagnostics' does more than just -w.

What's not clear about this?

--
To collect all the latest movies, simply place an unprotected ftp server
on the Internet, and wait for the disk to fill....

@p5pRT
Copy link
Author

p5pRT commented Jun 13, 2004

From @jidanni

D> The `diagnostics' Pragma

D> This module extends the terse diagnostics normally emitted
D> by both the perl compiler and the perl interpreter, aug­
D> menting them with the more explicative and endearing
D> descriptions found in the perldiag manpage.

D> I think that's pretty clear that 'use diagnostics' does more than just -w.

D> What's not clear about this?

We don't see what -w is equal to. The compiler? The interpreter?
looking on perldiag and perlrun, we don't get any "quick answers"
either. Anyway, as this is the "splain" man page, one would hope that
it would come out and say "hey kids, how's this different from the -w
mom told us about". Yes, sounds silly, but there are non-pros reading.
Sorry to dumb-down the man pages, but why not.

@p5pRT
Copy link
Author

p5pRT commented Jun 13, 2004

From @iabyn

On Sun, Jun 13, 2004 at 03​:26​:30AM +0800, Dan Jacobson wrote​:

D> The `diagnostics' Pragma

D> This module extends the terse diagnostics normally emitted
D> by both the perl compiler and the perl interpreter, aug­
D> menting them with the more explicative and endearing
D> descriptions found in the perldiag manpage.

D> I think that's pretty clear that 'use diagnostics' does more than just -w.

D> What's not clear about this?

We don't see what -w is equal to. The compiler? The interpreter?
looking on perldiag and perlrun, we don't get any "quick answers"
either. Anyway, as this is the "splain" man page, one would hope that
it would come out and say "hey kids, how's this different from the -w
mom told us about".

It's in that paragraph I just quoted you above !!!!

It takes the messages produced by -w, "augmenting them with the more
explicative and endearing descriptions found in the perldiag manpage."

--
O Unicef Clearasil!
Gibberish and Drivel!
  - "Bored of the Rings"

@p5pRT
Copy link
Author

p5pRT commented Jun 13, 2004

From @jidanni

D> It's in that paragraph I just quoted you above !!!!

No, it, -w, is not. It's in the paragraph below​:

D> It takes the messages produced by -w, "augmenting them with the more
D> explicative and endearing descriptions found in the perldiag manpage."

But not on the splain manpage. Therefore, perhaps please add the stuff in ()'s​:

This module extends the terse diagnostics normally emitted by both the
perl compiler and the perl interpreter, (produced e.g., by perl -w),
augmenting them with...

if indeed correct, or otherwise compare splain and -w, mentioning -w by name.

@p5pRT
Copy link
Author

p5pRT commented Jun 14, 2004

From @tamias

On Sun, Jun 13, 2004 at 03​:26​:30AM +0800, Dan Jacobson wrote​:

D> The `diagnostics' Pragma

D> This module extends the terse diagnostics normally emitted
D> by both the perl compiler and the perl interpreter, aug??
D> menting them with the more explicative and endearing
D> descriptions found in the perldiag manpage.

D> I think that's pretty clear that 'use diagnostics' does more than just -w.

D> What's not clear about this?

We don't see what -w is equal to. The compiler? The interpreter?
looking on perldiag and perlrun, we don't get any "quick answers"
either. Anyway, as this is the "splain" man page, one would hope that
it would come out and say "hey kids, how's this different from the -w
mom told us about". Yes, sounds silly, but there are non-pros reading.
Sorry to dumb-down the man pages, but why not.

In a nutshell, all the diagnostics pragma does, besides enabling -w, is
append the corresponding text from perldiag.pod to each error and warning
message produced by perl.

It seems to me that the quoted paragraph, while accurate, is not very
clear.

BTW, here's an example​:

% cat tmp.pl
#!perl

$_ += undef;
$_ /= 0;

% perl tmp.pl
Illegal division by zero at tmp.pl line 4.

% perl -w tmp.pl
Use of uninitialized value in addition (+) at tmp.pl line 3.
Illegal division by zero at tmp.pl line 4.

% perl -Mdiagnostics tmp.pl
Use of uninitialized value in addition (+) at tmp.pl line 3 (#1)
  (W uninitialized) An undefined value was used as if it were already
  defined. It was interpreted as a "" or a 0, but maybe it was a
  mistake.
  To suppress this warning assign a defined value to your variables.
 
  To help you figure out what was undefined, perl tells you what
  operation
  you used the undefined value in. Note, however, that perl optimizes
  your
  program and the operation displayed in the warning may not necessarily
  appear literally in your program. For example, "that $foo" is
  usually optimized into "that " . $foo, and the warning will refer to
  the concatenation (.) operator, even though there is no . in your
  program.
 
Illegal division by zero at tmp.pl line 4 (#2)
  (F) You tried to divide a number by 0. Either something was wrong in
  your logic, or you need to put a conditional in to guard against
  meaningless input.
 

Ronald

@p5pRT
Copy link
Author

p5pRT commented Oct 23, 2004

From @smpeters

[jidanni@​jidanni.org - Sun Jun 13 16​:10​:35 2004]​:

D> It's in that paragraph I just quoted you above !!!!

No, it, -w, is not. It's in the paragraph below​:

D> It takes the messages produced by -w, "augmenting them with the
more
D> explicative and endearing descriptions found in the perldiag
manpage."

But not on the splain manpage. Therefore, perhaps please add the
stuff in ()'s​:

This module extends the terse diagnostics normally emitted by both
the
perl compiler and the perl interpreter, (produced e.g., by perl -w),
augmenting them with...

if indeed correct, or otherwise compare splain and -w, mentioning -w
by name.

The attached patch adds that clarification.

--- diagnostics.pm 2004-08-04 01​:52​:56.000000000 -0500
+++ diagnostics.pm.new 2004-10-23 08​:45​:27.000000000 -0500
@​@​ -28,7 +28,8 @​@​
=head2 The C<diagnostics> Pragma

This module extends the terse diagnostics normally emitted by both
the
-perl compiler and the perl interpreter, augmenting them with the more
+perl compiler and the perl interpreter (from running perl with a -w
+switch or use warnings), augmenting them with the more
explicative and endearing descriptions found in L<perldiag>. Like
the
other pragmata, it affects the compilation phase of your program
rather
than merely the execution phase.

@p5pRT
Copy link
Author

p5pRT commented Oct 23, 2004

From @smpeters

diagnostics.patch
--- diagnostics.pm	2004-08-04 01:52:56.000000000 -0500
+++ diagnostics.pm.new	2004-10-23 08:45:27.000000000 -0500
@@ -28,7 +28,8 @@
 =head2 The C<diagnostics> Pragma
 
 This module extends the terse diagnostics normally emitted by both the
-perl compiler and the perl interpreter, augmenting them with the more
+perl compiler and the perl interpreter (from running perl with a -w 
+switch or use warnings), augmenting them with the more
 explicative and endearing descriptions found in L<perldiag>.  Like the
 other pragmata, it affects the compilation phase of your program rather
 than merely the execution phase.

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2004

From @jidanni

Odd, when you guys say
D> The attached patch adds that clarification.
The patch is in the mail twice, once in the body and once in the
attachment. Seems kind of wasteful.

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2004

From @rgs

Dan Jacobson wrote​:

Odd, when you guys say
D> The attached patch adds that clarification.
The patch is in the mail twice, once in the body and once in the
attachment. Seems kind of wasteful.

Not always -- in the body, it gets eyeballs from subscribers -- as
an attachement, it remains uncluttered by overzealous mailers and
is applicable with patch(1).

@p5pRT
Copy link
Author

p5pRT commented Oct 25, 2004

From @rgs

Steve Peters via RT wrote​:

The attached patch adds that clarification.

--- diagnostics.pm 2004-08-04 01​:52​:56.000000000 -0500
+++ diagnostics.pm.new 2004-10-23 08​:45​:27.000000000 -0500

Thanks, applied as #23422.

@p5pRT p5pRT closed this as completed Oct 25, 2004
@p5pRT
Copy link
Author

p5pRT commented Oct 25, 2004

@rgs - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant