summaryrefslogtreecommitdiff
path: root/t/pragma/warn/perly
diff options
context:
space:
mode:
Diffstat (limited to 't/pragma/warn/perly')
-rw-r--r--t/pragma/warn/perly25
1 files changed, 25 insertions, 0 deletions
diff --git a/t/pragma/warn/perly b/t/pragma/warn/perly
new file mode 100644
index 0000000000..fd420d3b22
--- /dev/null
+++ b/t/pragma/warn/perly
@@ -0,0 +1,25 @@
+ perly.y AOK
+
+ dep() => deprecate("\"do\" to call subroutines")
+ Use of "do" to call subroutines is deprecated
+
+ sub fred {} do fred()
+ sub fred {} do fred(1)
+ sub fred {} $a = "fred" ; do $a()
+ sub fred {} $a = "fred" ; do $a(1)
+
+
+__END__
+# perly.y
+use warning 'deprecated' ;
+sub fred {}
+do fred() ;
+do fred(1) ;
+$a = "fred" ;
+do $a() ;
+do $a(1) ;
+EXPECT
+Use of "do" to call subroutines is deprecated at - line 4.
+Use of "do" to call subroutines is deprecated at - line 5.
+Use of "do" to call subroutines is deprecated at - line 7.
+Use of "do" to call subroutines is deprecated at - line 8.