summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-11-25 14:58:42 +0000
committerNicholas Clark <nick@ccl4.org>2010-11-25 14:58:42 +0000
commitb19934fbc3c981a7e4bb888f0d6a20f926a0bc17 (patch)
treee15476f7230d021c936b5765e76a19a2f90800f1 /pod
parenta3179684398978e8bf4afba360eb728e4215d751 (diff)
downloadperl-b19934fbc3c981a7e4bb888f0d6a20f926a0bc17.tar.gz
Extend -d:foo=bar to make -d:-foo expand to C<no foo>, consistent with -M-foo
Diffstat (limited to 'pod')
-rw-r--r--pod/perldelta.pod24
-rw-r--r--pod/perlrun.pod1
2 files changed, 25 insertions, 0 deletions
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index f612dcde85..f269ac3399 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -28,6 +28,30 @@ here, but most should go in the L</Performance Enhancements> section.
[ List each enhancement as a =head2 entry ]
+=head2 C<-d:-foo> calls C<Devel::foo::unimport>
+
+The syntax C<-dI<B<:>foo>> was extended in 5.6.1 to make C<-dI<:fooB<=bar>>>
+equivalent to C<-Mfoo=bar>, which expands internally to C<use foo 'bar';>.
+F<perl> now allows prefixing the module name with C<->, with the same
+semantics as C<-M>, I<i.e.>
+
+=over 4
+
+=item C<-d:-foo>
+
+Equivalent to C<-M-foo>, expands to C<no foo;>, calls C<< foo->unimport() >>
+if the method exists.
+
+=item C<-d:-foo=bar>
+
+Equivalent to C<-M-foo=bar>, expands to C<no foo 'bar';>, calls
+C<< foo->unimport('bar') >> if the method exists.
+
+=back
+
+This is particularly useful to suppresses the default actions of a
+C<Devel::*> module's C<import> method whilst still loading it for debugging.
+
=head1 Security
XXX Any security-related notices go here. In particular, any security
diff --git a/pod/perlrun.pod b/pod/perlrun.pod
index 62c1ebbbfd..473205a789 100644
--- a/pod/perlrun.pod
+++ b/pod/perlrun.pod
@@ -361,6 +361,7 @@ tracing module installed as Devel::foo. E.g., B<-d:DProf> executes
the program using the Devel::DProf profiler. As with the B<-M>
flag, options may be passed to the Devel::foo package where they
will be received and interpreted by the Devel::foo::import routine.
+Again, like B<-M>, use -d:-foo to call Devel::foo::unimport instead of import.
The comma-separated list of options must follow a C<=> character.
If B<t> is specified, it indicates to the debugger that threads
will be used in the code being debugged.