From b41bf23f2b8c6b924aea825b7135a4e70a5ebd29 Mon Sep 17 00:00:00 2001 From: Father Chrysostomos Date: Mon, 21 May 2012 13:52:29 -0700 Subject: perldiag: Rewrap symref error for better splain output Before: (F) You've told Perl to dereference a string, something which use strict blocks to prevent it happening accidentally. See "Symbolic references" in perlref. This can be triggered by an @ or $ in a double-quoted string immediately before interpolating a variable, for example in "user @$twitter_id", which says to treat the contents of $twitter_id as an array reference; use a \ to have a literal @ symbol followed by the contents of $twitter_id: "user \@$twitter_id". After: (F) You've told Perl to dereference a string, something which use strict blocks to prevent it happening accidentally. See "Symbolic references" in perlref. This can be triggered by an @ or $ in a double-quoted string immediately before interpolating a variable, for example in "user @$twitter_id", which says to treat the contents of $twitter_id as an array reference; use a \ to have a literal @ symbol followed by the contents of $twitter_id: "user \@$twitter_id". --- pod/perldiag.pod | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'pod') diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 3cf0188b52..08d52c7ac6 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1268,13 +1268,13 @@ test the type of the reference, if need be. =item Can't use string ("%s") as %s ref while "strict refs" in use -(F) You've told Perl to dereference a string, something which C -blocks to prevent it happening accidentally. See -L. This can be triggered by an C<@> or C<$> in a -double-quoted string immediately before interpolating a variable, for example -in C<"user @$twitter_id">, which says to treat the contents of C<$twitter_id> -as an array reference; use a C<\> to have a literal C<@> symbol followed by the -contents of C<$twitter_id>: C<"user \@$twitter_id">. +(F) You've told Perl to dereference a string, something which +C blocks to prevent it happening accidentally. See +L. This can be triggered by an C<@> or C<$> +in a double-quoted string immediately before interpolating a variable, +for example in C<"user @$twitter_id">, which says to treat the contents +of C<$twitter_id> as an array reference; use a C<\> to have a literal C<@> +symbol followed by the contents of C<$twitter_id>: C<"user \@$twitter_id">. =item Can't use subscript on %s -- cgit v1.2.1