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

perlop doc error #7507

Closed
p5pRT opened this issue Sep 22, 2004 · 7 comments
Closed

perlop doc error #7507

p5pRT opened this issue Sep 22, 2004 · 7 comments

Comments

@p5pRT
Copy link

p5pRT commented Sep 22, 2004

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

Searchable as RT31678$

@p5pRT
Copy link
Author

p5pRT commented Sep 22, 2004

From gyepi@praxis-sw.com

This is a bug report for perl from gyepi@​praxis-sw.com,
generated with the help of perlbug 1.34 running under perl v5.8.3.


[Please enter your report here]

In the following paragraph, found in perlop, the second instance of
"-bareword" should read "+bareword"

  Unary "-" performs arithmetic negation if the operand is numeric. If
  the operand is an identifier, a string consisting of a minus sign con-
  catenated with the identifier is returned. Otherwise, if the string
  starts with a plus or minus, a string starting with the opposite sign
  is returned. One effect of these rules is that "-bareword" is equiva-
  lent to "-bareword".

[vPlease do not change anything below this line]



Flags​:
  category=docs
  severity=low


Site configuration information for perl v5.8.3​:

Irrelevant stuff elided.

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2004

From @tamias

On Wed, Sep 22, 2004 at 06​:12​:12PM -0000, gyepi @​ praxis-sw. com wrote​:

In the following paragraph, found in perlop, the second instance of
"-bareword" should read "+bareword"

   Unary "\-" performs arithmetic negation if the operand is numeric\.  If
   the operand is an identifier\, a string consisting of a minus sign con\-
   catenated with the identifier is returned\.  Otherwise\, if the string
   starts with a plus or minus\, a string starting with the opposite sign
   is returned\.  One effect of these rules is that "\-bareword" is equiva\-
   lent to "\-bareword"\.

No, it's correct as is. -bareword is not equivalent to +bareword. The
problem is the rendering. Here's the unrendered POD​:

One effect of these rules is that C<-bareword> is equivalent
to C<"-bareword">.

Unfortunately, the addition of quotes obscures the meaning of the sentence.

Ronald

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2004

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

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2004

From @rgs

Ronald J Kimball wrote​:

On Wed, Sep 22, 2004 at 06​:12​:12PM -0000, gyepi @​ praxis-sw. com wrote​:

In the following paragraph, found in perlop, the second instance of
"-bareword" should read "+bareword"

   Unary "\-" performs arithmetic negation if the operand is numeric\.  If
   the operand is an identifier\, a string consisting of a minus sign con\-
   catenated with the identifier is returned\.  Otherwise\, if the string
   starts with a plus or minus\, a string starting with the opposite sign
   is returned\.  One effect of these rules is that "\-bareword" is equiva\-
   lent to "\-bareword"\.

No, it's correct as is. -bareword is not equivalent to +bareword. The
problem is the rendering. Here's the unrendered POD​:

One effect of these rules is that C<-bareword> is equivalent
to C<"-bareword">.

Unfortunately, the addition of quotes obscures the meaning of the sentence.

I just removed the C<>.

@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2004

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

@p5pRT p5pRT closed this as completed Sep 23, 2004
@p5pRT
Copy link
Author

p5pRT commented Sep 23, 2004

From @brentdax

via RT gyepi @​ praxis-sw. com <perlbug-followup@​perl.org> wrote​:

In the following paragraph, found in perlop, the second instance of
"-bareword" should read "+bareword"

   Unary "\-" performs arithmetic negation if the operand is numeric\.  If
   the operand is an identifier\, a string consisting of a minus sign con\-
   catenated with the identifier is returned\.  Otherwise\, if the string
   starts with a plus or minus\, a string starting with the opposite sign
   is returned\.  One effect of these rules is that "\-bareword" is equiva\-
   lent to "\-bareword"\.

This is a quirk of the way POD is rendered for viewing on a console.
The source for the part in question looks something like this​:

  One effect of these rules is that C<-bareword> is equivalent to
C<"-bareword">.

(Unless the copy on perldoc.com has been altered.)

--
Brent 'Dax' Royal-Gordon <brent@​brentdax.com>
Perl and Parrot hacker

There is no cabal.
[I currently have a couple Gmail invites--contact me if you're interested.]

@p5pRT
Copy link
Author

p5pRT commented Oct 8, 2004

From @davidnicol

C<> becomes quotes, which is correct, and the bits in question are code,
so why not use the C<q> operator rather than quote marks, to differentiate
the two cases, and both versions get wrapped in no-longer-confusing quote marks.

One effect of these rules is that C<-bareword> is equivalent
to C<q/-bareword/>.

but aren't barewords deprecated?

No, it's correct as is. -bareword is not equivalent to +bareword. The
problem is the rendering. Here's the unrendered POD​:

One effect of these rules is that C<-bareword> is equivalent
to C<"-bareword">.

Unfortunately, the addition of quotes obscures the meaning of the sentence.

I just removed the C<>.

--
David L Nicol
"Valuable ideas can withstand scrutiny" -- authors of /XP Explained/

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