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

[PATCH] move given/when ~~ note below item introducing it #13747

Closed
p5pRT opened this issue Apr 19, 2014 · 8 comments
Closed

[PATCH] move given/when ~~ note below item introducing it #13747

p5pRT opened this issue Apr 19, 2014 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented Apr 19, 2014

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

Searchable as RT121689$

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2014

From madcityzen@gmail.com

The note explaining to use $c ~~ $_ instead of $_ ~~ $c was put under the item
introducing all binary operators, and not the one mentioning the explicit
smartmatch operator.


pod/perlsyn.pod | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

@p5pRT
Copy link
Author

p5pRT commented Apr 19, 2014

From madcityzen@gmail.com

0001-move-given-when-note-below-item-introducing-it.patch
diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod
index 9ce8b3c..244372c 100644
--- a/pod/perlsyn.pod
+++ b/pod/perlsyn.pod
@@ -958,6 +958,9 @@ the form C<!/REGEX/>, C<$foo !~ /REGEX/>, or C<$foo !~ EXPR>.
 
 A smart match that uses an explicit C<~~> operator, such as C<EXPR ~~ EXPR>.
 
+B<NOTE:> You will often have to use C<$c ~~ $_> because the default case 
+uses C<$_ ~~ $c> , which is frequentlythe opposite of what you want.
+
 =item Z<>4.
 
 A boolean comparison operator such as C<$_ E<lt> 10> or C<$x eq "abc">.  The
@@ -965,10 +968,6 @@ relational operators that this applies to are the six numeric comparisons
 (C<< < >>, C<< > >>, C<< <= >>, C<< >= >>, C<< == >>, and C<< != >>), and
 the six string comparisons (C<lt>, C<gt>, C<le>, C<ge>, C<eq>, and C<ne>).
 
-B<NOTE:> You will often have to use C<$c ~~ $_> because
-the default case uses C<$_ ~~ $c> , which is frequently
-the opposite of what you want.
-
 =item Z<>5.
 
 At least the three builtin functions C<defined(...)>, C<exists(...)>, and

@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2014

From @tonycoz

On Sat Apr 19 16​:53​:43 2014, madcityzen@​gmail.com wrote​:

The note explaining to use $c ~~ $_ instead of $_ ~~ $c was put under
the item
introducing all binary operators, and not the one mentioning the
explicit
smartmatch operator.
---
pod/perlsyn.pod | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Could you supply the patch as an attachment please?

The changes look good, and I'll apply them once 5.20 has been released (it will just be simpler with the patch attached.)

Tony

@p5pRT
Copy link
Author

p5pRT commented Apr 28, 2014

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

@p5pRT
Copy link
Author

p5pRT commented May 13, 2014

From @tonycoz

On Sun Apr 27 22​:39​:12 2014, tonyc wrote​:

Could you supply the patch as an attachment please?

Oops, the patch was an attachment, just not a format-patch patch, which I've attached.

Tony

@p5pRT
Copy link
Author

p5pRT commented May 13, 2014

From @tonycoz

0001-move-given-when-note-below-item-introducing-it.patch
From 869d423e7fa4754715056c2df6800c96d7f5a890 Mon Sep 17 00:00:00 2001
From: Doug Bell <madcityzen@gmail.com>
Date: Tue, 13 May 2014 10:50:41 +1000
Subject: move given/when ~~ note below item introducing it

The note explaining to use $c ~~ $_ instead of $_ ~~ $c was put under the item
introducing all binary operators, and not the one mentioning the explicit
smartmatch operator.
---
 pod/perlsyn.pod |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod
index 9ce8b3c..244372c 100644
--- a/pod/perlsyn.pod
+++ b/pod/perlsyn.pod
@@ -958,6 +958,9 @@ the form C<!/REGEX/>, C<$foo !~ /REGEX/>, or C<$foo !~ EXPR>.
 
 A smart match that uses an explicit C<~~> operator, such as C<EXPR ~~ EXPR>.
 
+B<NOTE:> You will often have to use C<$c ~~ $_> because the default case 
+uses C<$_ ~~ $c> , which is frequentlythe opposite of what you want.
+
 =item Z<>4.
 
 A boolean comparison operator such as C<$_ E<lt> 10> or C<$x eq "abc">.  The
@@ -965,10 +968,6 @@ relational operators that this applies to are the six numeric comparisons
 (C<< < >>, C<< > >>, C<< <= >>, C<< >= >>, C<< == >>, and C<< != >>), and
 the six string comparisons (C<lt>, C<gt>, C<le>, C<ge>, C<eq>, and C<ne>).
 
-B<NOTE:> You will often have to use C<$c ~~ $_> because
-the default case uses C<$_ ~~ $c> , which is frequently
-the opposite of what you want.
-
 =item Z<>5.
 
 At least the three builtin functions C<defined(...)>, C<exists(...)>, and
-- 
1.7.10.4

@p5pRT
Copy link
Author

p5pRT commented May 29, 2014

From @tonycoz

On Sat Apr 19 16​:53​:43 2014, madcityzen@​gmail.com wrote​:

The note explaining to use $c ~~ $_ instead of $_ ~~ $c was put under
the item
introducing all binary operators, and not the one mentioning the
explicit
smartmatch operator.
---
pod/perlsyn.pod | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

Thanks, applied as e10c9f6.

Tony

@p5pRT p5pRT closed this as completed May 29, 2014
@p5pRT
Copy link
Author

p5pRT commented May 29, 2014

@tonycoz - 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