diff options
author | Paul "LeoNerd" Evans <leonerd@leonerd.org.uk> | 2022-04-06 11:48:03 +0100 |
---|---|---|
committer | Paul Evans <leonerd@leonerd.org.uk> | 2022-04-23 20:09:59 +0100 |
commit | 6e39d0368df84d2d809296d413005fa64d5f4b46 (patch) | |
tree | e48377b60cf352ba6000ccef9888cfc24668877c | |
parent | c5596632fbda9ccbe228d708345972a934f9ab90 (diff) | |
download | perl-6e39d0368df84d2d809296d413005fa64d5f4b46.tar.gz |
Point out that 'indirect' is only availble before 'use v5.36'
-rw-r--r-- | pod/perlobj.pod | 10 | ||||
-rw-r--r-- | pod/perlref.pod | 5 |
2 files changed, 15 insertions, 0 deletions
diff --git a/pod/perlobj.pod b/pod/perlobj.pod index b7dbf49cdd..dddf78abaf 100644 --- a/pod/perlobj.pod +++ b/pod/perlobj.pod @@ -751,6 +751,16 @@ appending "::" to it, like we saw earlier: my $file = new File:: $path, $data; +Indirect object syntax is only available when the +L<C<"indirect">|feature/The 'indirect' feature> named feature is enabled. +This is enabled by default, but can be disabled if requested. This +feature is present in older feature version bundles, but was removed +from the C<:5.36> bundle; so a L<C<use VERSION>|perlfunc/use VERSION> +declaration of C<v5.36> or above will also disable the feature. + + use v5.36; + # indirect object syntax is no longer available + =head2 C<bless>, C<blessed>, and C<ref> As we saw earlier, an object is simply a data structure that has been diff --git a/pod/perlref.pod b/pod/perlref.pod index f14d85bb3f..2fd321b0b4 100644 --- a/pod/perlref.pod +++ b/pod/perlref.pod @@ -232,6 +232,11 @@ better to use the direct method invocation approach: $menubar = $main->Frame(-relief => "raised", -borderwidth => 2) +This indirect object syntax is only available when +L<C<use feature "indirect">|feature/The 'indirect' feature> is in effect, +and that is not the case when L<C<use v5.36>|perlfunc/use VERSION> (or +higher) is requested, it is best to avoid indirect object syntax entirely. + =head3 Autovivification X<autovivification> |