From: jkeenan Date: Sun, 20 Nov 2011 00:37:03 +0000 (-0500) Subject: [RT #36079] Convert ` to '. X-Git-Tag: accepted/trunk/20130322.191538~2001^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1f874cb6cda8ff355ea232af026e2429ee2e9afb;p=platform%2Fupstream%2Fperl.git [RT #36079] Convert ` to '. --- diff --git a/lib/DB.pm b/lib/DB.pm index 16ff99a..7048354 100644 --- a/lib/DB.pm +++ b/lib/DB.pm @@ -258,7 +258,7 @@ sub backtrace { } elsif ($s eq '(eval)') { $s = "eval {...}"; } - $f = "file `$f'" unless $f eq '-e'; + $f = "file '$f'" unless $f eq '-e'; push @ret, "$w&$s$a from $f line $l"; last if $DB::signal; } diff --git a/lib/File/Basename.pm b/lib/File/Basename.pm index e6681d2..fb72a0d 100644 --- a/lib/File/Basename.pm +++ b/lib/File/Basename.pm @@ -215,7 +215,7 @@ sub basename { my($path) = shift; # From BSD basename(1) - # The basename utility deletes any prefix ending with the last slash `/' + # The basename utility deletes any prefix ending with the last slash '/' # character present in string (after first stripping trailing slashes) _strip_trailing_sep($path); diff --git a/lib/Getopt/Std.pm b/lib/Getopt/Std.pm index 823bc4d..920b5b4 100644 --- a/lib/Getopt/Std.pm +++ b/lib/Getopt/Std.pm @@ -147,7 +147,7 @@ sub try_exit () { my $p = __PACKAGE__; print {output_h()} < above as code references can be # blessed, and C would return the package the ref is blessed into. if (warnings::enabled) { $_ [1] = "undef" unless defined $_ [1]; - warnings::warn ("`$_[1]' is not a code reference"); + warnings::warn ("'$_[1]' is not a code reference"); } } else { @@ -890,9 +890,9 @@ See L. =head2 Losing Overloading The restriction for the comparison operation is that even if, for example, -`C' should return a blessed reference, the autogenerated `C' +C should return a blessed reference, the autogenerated C function will produce only a standard logical value based on the -numerical value of the result of `C'. In particular, a working +numerical value of the result of C. In particular, a working numeric conversion is needed in this case (possibly expressed in terms of other conversions). @@ -1100,13 +1100,13 @@ Use it as follows: require two_face; my $seven = two_face->new("vii", 7); printf "seven=$seven, seven=%d, eight=%d\n", $seven, $seven+1; - print "seven contains `i'\n" if $seven =~ /i/; + print "seven contains 'i'\n" if $seven =~ /i/; (The second line creates a scalar which has both a string value, and a numeric value.) This prints: seven=vii, seven=7, eight=8 - seven contains `i' + seven contains 'i' =head2 Two-face References @@ -1387,7 +1387,7 @@ Use this module like this: my $cnt = $iter; while ($cnt) { - $cnt = $cnt - 1; # Mutator `--' not implemented + $cnt = $cnt - 1; # Mutator '--' not implemented $side = (sqrt(1 + $side**2) - 1)/$side; } printf "%s=%f\n", $side, $side; @@ -1417,7 +1417,7 @@ the tables of operations, and change the code which fills %subr to $subr{$op} = eval "sub {shift() $op shift()}"; } foreach my $op (split " ", "@overload::ops{qw(unary func)}") { - print "defining `$op'\n"; + print "defining '$op'\n"; $subr{$op} = eval "sub {$op shift()}"; } @@ -1583,11 +1583,11 @@ The module might issue the following warnings: (W) The call to overload::constant contained an odd number of arguments. The arguments should come in pairs. -=item `%s' is not an overloadable type +=item '%s' is not an overloadable type (W) You tried to overload a constant type the overload package is unaware of. -=item `%s' is not a code reference +=item '%s' is not a code reference (W) The second (fourth, sixth, ...) argument of overload::constant needs to be a code reference. Either an anonymous subroutine, or a reference diff --git a/lib/overload.t b/lib/overload.t index 1021a5f..5d6e38d 100644 --- a/lib/overload.t +++ b/lib/overload.t @@ -297,7 +297,7 @@ like($@, qr/no method found/); bless \$x, Oscalar; $na = eval { ~$a }; # Hash updated -warn "`$na', $@" if $@; +warn "'$na', $@" if $@; ok !$@; is($na, '_!_xx_!_'); @@ -935,25 +935,25 @@ unless ($aaa) { } { - # check the `$_[0]' is not an overloadable type warning + # check the '$_[0]' is not an overloadable type warning my $a = "" ; local $SIG{__WARN__} = sub {$a = $_[0]} ; $x = eval ' overload::constant "fred" => sub {} ; ' ; is($a, ""); use warnings 'overload' ; $x = eval ' overload::constant "fred" => sub {} ; ' ; - like($a, qr/^`fred' is not an overloadable type at/); + like($a, qr/^'fred' is not an overloadable type at/); } { - # check the `$_[1]' is not a code reference warning + # check the '$_[1]' is not a code reference warning my $a = "" ; local $SIG{__WARN__} = sub {$a = $_[0]} ; $x = eval ' overload::constant "integer" => 1; ' ; is($a, ""); use warnings 'overload' ; $x = eval ' overload::constant "integer" => 1; ' ; - like($a, qr/^`1' is not a code reference at/); + like($a, qr/^'1' is not a code reference at/); } { diff --git a/lib/perl5db.pl b/lib/perl5db.pl index 3d17d8f..fd08970 100644 --- a/lib/perl5db.pl +++ b/lib/perl5db.pl @@ -722,7 +722,7 @@ sub eval { # Changes: 0.94 # + A lot of things changed after 0.94. First of all, core now informs # debugger about entry into XSUBs, overloaded operators, tied operations, -# BEGIN and END. Handy with `O f=2'. +# BEGIN and END. Handy with 'O f=2'. # + This can make debugger a little bit too verbose, please be patient # and report your problems promptly. # + Now the option frame has 3 values: 0,1,2. XXX Document! @@ -731,24 +731,24 @@ sub eval { # due to the need to examine the return value. # # Changes: 0.95 -# + `v' command shows versions. +# + 'v' command shows versions. # # Changes: 0.96 -# + `v' command shows version of readline. -# primitive completion works (dynamic variables, subs for `b' and `l', -# options). Can `p %var' -# + Better help (`h <' now works). New commands <<, >>, {, {{. +# + 'v' command shows version of readline. +# primitive completion works (dynamic variables, subs for 'b' and 'l', +# options). Can 'p %var' +# + Better help ('h <' now works). New commands <<, >>, {, {{. # {dump|print}_trace() coded (to be able to do it from < bits control attempts to create a new TTY on events: # 1: on fork() # 2: debugger is started inside debugger @@ -844,7 +844,7 @@ sub eval { # function; # + Consistent support for TTY names of the form "TTYin,TTYout"; # + Switch line-tracing output too to the created TTY window; -# + make `b fork' DWIM with CORE::GLOBAL::fork; +# + make 'b fork' DWIM with CORE::GLOBAL::fork; # + High-level debugger API cmd_*(): # cmd_b_load($filenamepart) # b load filenamepart # cmd_b_line($lineno [, $cond]) # b lineno [cond] @@ -1818,7 +1818,7 @@ and then call the C subroutine if there is one. $slave_editor ? "enabled" : "available", ".\n" ); print $OUT -"\nEnter h or `h h' for help, or `$doccmd perldebug' for more help.\n\n"; +"\nEnter h or 'h h' for help, or '$doccmd perldebug' for more help.\n\n"; } ## end else [ if ($term_pid eq '-1') } ## end unless ($runnonstop) } ## end else [ if ($notty) @@ -2319,7 +2319,7 @@ completely replacing it. eval "\$cmd =~ $alias{$i}"; if ($@) { local $\ = ''; - print $OUT "Couldn't evaluate `$i' alias: $@"; + print $OUT "Couldn't evaluate '$i' alias: $@"; next CMD; } } ## end if ($alias{$i}) @@ -2510,7 +2510,7 @@ Just uses C to determine what methods are available. if ( ($try) = grep( m#^_<.*$file#, keys %main:: ) ) { { $try = substr( $try, 2 ); - print $OUT "Choosing $try matching `$file':\n"; + print $OUT "Choosing $try matching '$file':\n"; $file = $try; } } ## end if (($try) = grep(m#^_<.*$file#... @@ -2518,7 +2518,7 @@ Just uses C to determine what methods are available. # If not successfully switched now, we failed. if ( !defined $main::{ '_<' . $file } ) { - print $OUT "No file matching `$file' is loaded.\n"; + print $OUT "No file matching '$file' is loaded.\n"; next CMD; } @@ -3271,7 +3271,7 @@ pick it up. else { # Couldn't open it. - &warn("Can't execute `$1': $!\n"); + &warn("Can't execute '$1': $!\n"); } next CMD; }; @@ -3411,7 +3411,7 @@ reading another. unless ( $piped = open( OUT, $pager ) ) { # Couldn't open pipe to pager. - &warn("Can't pipe output to `$pager'"); + &warn("Can't pipe output to '$pager'"); if ( $pager =~ /^\|/ ) { # Redirect I/O back again. @@ -3515,7 +3515,7 @@ our standard filehandles for input and output. # most of the $? crud was coping with broken cshisms # $? is explicitly set to 0, so this never runs. if ($?) { - print SAVEOUT "Pager `$pager' failed: "; + print SAVEOUT "Pager '$pager' failed: "; if ( $? == -1 ) { print SAVEOUT "shell returned -1\n"; } @@ -3569,7 +3569,7 @@ again. =cut # No more commands? Quit. - $fall_off_end = 1 unless defined $cmd; # Emulate `q' on EOF + $fall_off_end = 1 unless defined $cmd; # Emulate 'q' on EOF # Evaluate post-prompt commands. foreach $evalarg (@$post) { @@ -4290,7 +4290,7 @@ sub cmd_b_load { # Normalize for the purposes of our printing this. local $\ = ''; local $" = ' '; - print $OUT "Will stop on load of `@files'.\n"; + print $OUT "Will stop on load of '@files'.\n"; } ## end sub cmd_b_load =head3 C<$filename_error> (API package global) @@ -4435,7 +4435,7 @@ sub breakable_line_in_filename { local *dbline = $main::{ '_<' . $f }; # If there's an error, it's in this other file. - local $filename_error = " of `$f'"; + local $filename_error = " of '$f'"; # Find the breakable line. breakable_line(@_); @@ -4528,7 +4528,7 @@ sub break_on_filename_line { local *dbline = $main::{ '_<' . $f }; # Localize the variables that break_on_line uses to make its message. - local $filename_error = " of `$f'"; + local $filename_error = " of '$f'"; local $filename = $f; # Add the breakpoint. @@ -5579,7 +5579,7 @@ sub postponed_sub { } ## end if ($postponed{$subname... elsif ( $postponed{$subname} eq 'compile' ) { $signal = 1 } - #print $OUT "In postponed_sub for `$subname'.\n"; + #print $OUT "In postponed_sub for '$subname'.\n"; } ## end sub postponed_sub =head2 C @@ -5809,7 +5809,7 @@ sub print_trace { my $file = $sub[$i]{file}; # Put in a filename header if short is off. - $file = $file eq '-e' ? $file : "file `$file'" unless $short; + $file = $file eq '-e' ? $file : "file '$file'" unless $short; # Get the actual sub's name, and shorten to $maxtrace's requirement. $s = $sub[$i]{sub}; @@ -6131,8 +6131,8 @@ sub setterm { if ($tty) { my ( $i, $o ) = split $tty, /,/; $o = $i unless defined $o; - open( IN, "<$i" ) or die "Cannot open TTY `$i' for read: $!"; - open( OUT, ">$o" ) or die "Cannot open TTY `$o' for write: $!"; + open( IN, "<$i" ) or die "Cannot open TTY '$i' for read: $!"; + open( OUT, ">$o" ) or die "Cannot open TTY '$o' for write: $!"; $IN = \*IN; $OUT = \*OUT; my $sel = select($OUT); @@ -6739,20 +6739,20 @@ sub parse_options { # Options are always all word characters, followed by a non-word # separator. - s/^(\w+)(\W?)// or print( $OUT "Invalid option `$_'\n" ), last; + s/^(\w+)(\W?)// or print( $OUT "Invalid option '$_'\n" ), last; my ( $opt, $sep ) = ( $1, $2 ); # Make sure that such an option exists. my $matches = grep( /^\Q$opt/ && ( $option = $_ ), @options ) || grep( /^\Q$opt/i && ( $option = $_ ), @options ); - print( $OUT "Unknown option `$opt'\n" ), next unless $matches; - print( $OUT "Ambiguous option `$opt'\n" ), next if $matches > 1; + print( $OUT "Unknown option '$opt'\n" ), next unless $matches; + print( $OUT "Ambiguous option '$opt'\n" ), next if $matches > 1; my $val; # '?' as separator means query, but must have whitespace after it. if ( "?" eq $sep ) { - print( $OUT "Option query `$opt?' followed by non-space `$_'\n" ), + print( $OUT "Option query '$opt?' followed by non-space '$_'\n" ), last if /^\S/; @@ -6790,7 +6790,7 @@ sub parse_options { my ($end) = "\\" . substr( ")]>}$sep", index( "([<{", $sep ), 1 ); #} s/^(([^\\$end]|\\[\\$end])*)$end($|\s+)// - or print( $OUT "Unclosed option value `$opt$sep$_'\n" ), last; + or print( $OUT "Unclosed option value '$opt$sep$_'\n" ), last; ( $val = $1 ) =~ s/\\([\\$end])/$1/g; } ## end else [ if ("?" eq $sep) @@ -6798,7 +6798,7 @@ sub parse_options { if ( $opt_needs_val{$option} && $val_defaulted ) { my $cmd = ( $CommandSet eq '580' ) ? 'o' : 'O'; print $OUT -"Option `$opt' is non-boolean. Use `$cmd $option=VAL' to set, `$cmd $option?' to query\n"; +"Option '$opt' is non-boolean. Use '$cmd $option=VAL' to set, '$cmd $option?' to query\n"; next; } ## end if ($opt_needs_val{$option... @@ -6939,7 +6939,7 @@ sub reset_IN_OUT { # This term can't get a new tty now. Better luck later. elsif ($term) { - &warn("Too late to set IN/OUT filehandles, enabled on next `R'!\n"); + &warn("Too late to set IN/OUT filehandles, enabled on next 'R'!\n"); } # Set the filehndles up as they were. @@ -6994,8 +6994,8 @@ sub TTY { } # Open file onto the debugger's filehandles, if you can. - open IN, $in or die "cannot open `$in' for read: $!"; - open OUT, ">$out" or die "cannot open `$out' for write: $!"; + open IN, $in or die "cannot open '$in' for read: $!"; + open OUT, ">$out" or die "cannot open '$out' for write: $!"; # Swap to the new filehandles. reset_IN_OUT( \*IN, \*OUT ); @@ -7006,7 +7006,7 @@ sub TTY { # Terminal doesn't support new TTY, or doesn't support readline. # Can't do it now, try restarting. - &warn("Too late to set TTY, enabled on next `R'!\n") if $term and @_; + &warn("Too late to set TTY, enabled on next 'R'!\n") if $term and @_; # Useful if done through PERLDB_OPTS: $console = $tty = shift if @_; @@ -7025,7 +7025,7 @@ we save the value to use it if we're restarted. sub noTTY { if ($term) { - &warn("Too late to set noTTY, enabled on next `R'!\n") if @_; + &warn("Too late to set noTTY, enabled on next 'R'!\n") if @_; } $notty = shift if @_; $notty; @@ -7042,7 +7042,7 @@ the value in case a restart is done so we can change it then. sub ReadLine { if ($term) { - &warn("Too late to set ReadLine, enabled on next `R'!\n") if @_; + &warn("Too late to set ReadLine, enabled on next 'R'!\n") if @_; } $rl = shift if @_; $rl; @@ -7091,7 +7091,7 @@ debugger remembers the setting in case you restart, though. sub NonStop { if ($term) { - &warn("Too late to set up NonStop mode, enabled on next `R'!\n") + &warn("Too late to set up NonStop mode, enabled on next 'R'!\n") if @_; } $runnonstop = shift if @_; @@ -7215,7 +7215,7 @@ sub LineInfo { $slave_editor = ( $stream =~ /^\|/ ); # Open it up and unbuffer it. - open( LINEINFO, "$stream" ) || &warn("Cannot open `$stream' for write"); + open( LINEINFO, "$stream" ) || &warn("Cannot open '$stream' for write"); $LINEINFO = \*LINEINFO; my $save = select($LINEINFO); $| = 1; @@ -7444,7 +7444,7 @@ B [IB<=>I] [I=B<\">IB<\">] ... During startup options are initialized from \$ENV{PERLDB_OPTS}. You can put additional initialization options I, I, I, I, and I there (or use - `B' after you set them). + B after you set them). B or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction. B Summary of debugger commands. @@ -7454,7 +7454,7 @@ B<$doccmd> I Runs the external doc viewer B<$doccmd> command on the named Perl I, or on B<$doccmd> itself if omitted. Set B<\$DB::doccmd> to change viewer. -Type `|h h' for a paged display if this was too hard to read. +Type '|h h' for a paged display if this was too hard to read. "; # Fix balance of vi % matching: }}}} @@ -7527,7 +7527,7 @@ B [I] [I] B I [I] Set breakpoint at first line of subroutine. B I<\$var> Set breakpoint at first line of subroutine referenced by I<\$var>. -B B I Set breakpoint on `require'ing the given file. +B B I Set breakpoint on 'require'ing the given file. B B I [I] Set breakpoint at first line of subroutine after it is compiled. @@ -7620,7 +7620,7 @@ B [IB<=>I] [I=B<\">IB<\">] ... During startup options are initialized from \$ENV{PERLDB_OPTS}. You can put additional initialization options I, I, I, I, and I there (or use - `B' after you set them). + B after you set them). B or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction. B [I] Get help [on a specific debugger command], enter B<|h> to page. @@ -7629,7 +7629,7 @@ B<$doccmd> I Runs the external doc viewer B<$doccmd> command on the named Perl I, or on B<$doccmd> itself if omitted. Set B<\$DB::doccmd> to change viewer. -Type `|h' for a paged display if this was too hard to read. +Type '|h' for a paged display if this was too hard to read. "; # Fix balance of vi % matching: }}}} @@ -8889,7 +8889,7 @@ Say we're done. sub end_report { local $\ = ''; - print $OUT "Use `q' to quit or `R' to restart. `h q' for details.\n"; + print $OUT "Use 'q' to quit or 'R' to restart. 'h q' for details.\n"; } =head2 clean_ENV @@ -9599,7 +9599,7 @@ sub cmd_prepost { elsif ( $cmd =~ /^\{/o ) { if ( $cmd =~ /^\{.*\}$/o && unbalanced( substr( $cmd, 1 ) ) ) { print $OUT -"$cmd is now a debugger command\nuse `;$cmd' if you mean Perl code\n"; +"$cmd is now a debugger command\nuse ';$cmd' if you mean Perl code\n"; } # Properly balanced. Pre-prompt debugger actions. @@ -9676,7 +9676,7 @@ the C block documentation for more details. package DB::fake; sub at_exit { - "Debugged program terminated. Use `q' to quit or `R' to restart."; + "Debugged program terminated. Use 'q' to quit or 'R' to restart."; } package DB; # Do not trace this 1; below!