Commit | Line | Data |
767a6a26 |
1 | doio.c |
599cee73 |
2 | |
9a7dcd9c |
3 | Can't open bidirectional pipe [Perl_do_open9] |
599cee73 |
4 | open(F, "| true |"); |
5 | |
767a6a26 |
6 | Missing command in piped open [Perl_do_open9] |
06eaf0bc |
7 | open(F, "| "); |
8 | |
767a6a26 |
9 | Missing command in piped open [Perl_do_open9] |
06eaf0bc |
10 | open(F, " |"); |
11 | |
767a6a26 |
12 | warn(warn_nl, "open"); [Perl_do_open9] |
599cee73 |
13 | open(F, "true\ncd") |
14 | |
9ddeeac9 |
15 | close() on unopened filehandle %s [Perl_do_close] <<TODO |
767a6a26 |
16 | $a = "fred";close("$a") |
599cee73 |
17 | |
9ddeeac9 |
18 | tell() on unopened filehandle [Perl_do_tell] |
599cee73 |
19 | $a = "fred";$a = tell($a) |
20 | |
9ddeeac9 |
21 | seek() on unopened filehandle [Perl_do_seek] |
599cee73 |
22 | $a = "fred";$a = seek($a,1,1) |
23 | |
9ddeeac9 |
24 | sysseek() on unopened filehandle [Perl_do_sysseek] |
599cee73 |
25 | $a = "fred";$a = seek($a,1,1) |
26 | |
767a6a26 |
27 | warn(warn_uninit); [Perl_do_print] |
599cee73 |
28 | print $a ; |
29 | |
9ddeeac9 |
30 | -x on unopened filehandle %s [Perl_my_stat] |
599cee73 |
31 | close STDIN ; -x STDIN ; |
32 | |
767a6a26 |
33 | warn(warn_nl, "stat"); [Perl_my_stat] |
599cee73 |
34 | stat "ab\ncd" |
35 | |
767a6a26 |
36 | warn(warn_nl, "lstat"); [Perl_my_lstat] |
599cee73 |
37 | lstat "ab\ncd" |
38 | |
767a6a26 |
39 | Can't exec \"%s\": %s [Perl_do_aexec5] |
599cee73 |
40 | |
767a6a26 |
41 | Can't exec \"%s\": %s [Perl_do_exec3] |
599cee73 |
42 | |
767a6a26 |
43 | Filehandle %s opened only for output [Perl_do_eof] |
44 | my $a = eof STDOUT |
599cee73 |
45 | |
0453d815 |
46 | Mandatory Warnings ALL TODO |
47 | ------------------ |
767a6a26 |
48 | Can't do inplace edit: %s is not a regular file [Perl_nextargv] |
0453d815 |
49 | edit a directory |
50 | |
767a6a26 |
51 | Can't do inplace edit: %s would not be unique [Perl_nextargv] |
52 | Can't rename %s to %s: %s, skipping file [Perl_nextargv] |
53 | Can't rename %s to %s: %s, skipping file [Perl_nextargv] |
54 | Can't remove %s: %s, skipping file [Perl_nextargv] |
55 | Can't do inplace edit on %s: %s [Perl_nextargv] |
0453d815 |
56 | |
57 | |
599cee73 |
58 | __END__ |
767a6a26 |
59 | # doio.c [Perl_do_open9] |
4438c4b7 |
60 | use warnings 'io' ; |
3eeba6fb |
61 | open(F, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|"); |
62 | close(F); |
4438c4b7 |
63 | no warnings 'io' ; |
0453d815 |
64 | open(G, '|'.($^O eq 'VMS' ? 'mcr ':'')."$^X -e 1|"); |
65 | close(G); |
599cee73 |
66 | EXPECT |
9a7dcd9c |
67 | Can't open bidirectional pipe at - line 3. |
599cee73 |
68 | ######## |
767a6a26 |
69 | # doio.c [Perl_do_open9] |
4438c4b7 |
70 | use warnings 'io' ; |
0453d815 |
71 | open(F, "| "); |
4438c4b7 |
72 | no warnings 'io' ; |
0453d815 |
73 | open(G, "| "); |
06eaf0bc |
74 | EXPECT |
75 | Missing command in piped open at - line 3. |
76 | ######## |
767a6a26 |
77 | # doio.c [Perl_do_open9] |
4438c4b7 |
78 | use warnings 'io' ; |
0453d815 |
79 | open(F, " |"); |
4438c4b7 |
80 | no warnings 'io' ; |
0453d815 |
81 | open(G, " |"); |
06eaf0bc |
82 | EXPECT |
83 | Missing command in piped open at - line 3. |
84 | ######## |
767a6a26 |
85 | # doio.c [Perl_do_open9] |
4438c4b7 |
86 | use warnings 'io' ; |
0453d815 |
87 | open(F, "<true\ncd"); |
4438c4b7 |
88 | no warnings 'io' ; |
0453d815 |
89 | open(G, "<true\ncd"); |
599cee73 |
90 | EXPECT |
91 | Unsuccessful open on filename containing newline at - line 3. |
92 | ######## |
767a6a26 |
93 | # doio.c [Perl_do_close] <<TODO |
94 | use warnings 'unopened' ; |
95 | close "fred" ; |
96 | no warnings 'unopened' ; |
97 | close "joe" ; |
98 | EXPECT |
9ddeeac9 |
99 | close() on unopened filehandle fred at - line 3. |
767a6a26 |
100 | ######## |
101 | # doio.c [Perl_do_tell Perl_do_seek Perl_do_sysseek Perl_my_stat] |
4438c4b7 |
102 | use warnings 'io' ; |
599cee73 |
103 | close STDIN ; |
104 | tell(STDIN); |
105 | $a = seek(STDIN,1,1); |
106 | $a = sysseek(STDIN,1,1); |
107 | -x STDIN ; |
9ddeeac9 |
108 | stat(STDIN) ; |
4438c4b7 |
109 | no warnings 'io' ; |
0453d815 |
110 | close STDIN ; |
111 | tell(STDIN); |
112 | $a = seek(STDIN,1,1); |
113 | $a = sysseek(STDIN,1,1); |
114 | -x STDIN ; |
9ddeeac9 |
115 | stat(STDIN) ; |
599cee73 |
116 | EXPECT |
9ddeeac9 |
117 | tell() on unopened filehandle at - line 4. |
118 | seek() on unopened filehandle at - line 5. |
119 | sysseek() on unopened filehandle at - line 6. |
120 | -x on unopened filehandle STDIN at - line 7. |
121 | stat() on unopened filehandle STDIN at - line 8. |
599cee73 |
122 | ######## |
767a6a26 |
123 | # doio.c [Perl_do_print] |
4438c4b7 |
124 | use warnings 'uninitialized' ; |
599cee73 |
125 | print $a ; |
4438c4b7 |
126 | no warnings 'uninitialized' ; |
0453d815 |
127 | print $b ; |
599cee73 |
128 | EXPECT |
b89fed5f |
129 | Use of uninitialized value in print at - line 3. |
599cee73 |
130 | ######## |
767a6a26 |
131 | # doio.c [Perl_my_stat Perl_my_lstat] |
4438c4b7 |
132 | use warnings 'io' ; |
599cee73 |
133 | stat "ab\ncd"; |
134 | lstat "ab\ncd"; |
4438c4b7 |
135 | no warnings 'io' ; |
0453d815 |
136 | stat "ab\ncd"; |
137 | lstat "ab\ncd"; |
599cee73 |
138 | EXPECT |
139 | Unsuccessful stat on filename containing newline at - line 3. |
140 | Unsuccessful stat on filename containing newline at - line 4. |
141 | ######## |
767a6a26 |
142 | # doio.c [Perl_do_aexec5] |
4438c4b7 |
143 | use warnings 'io' ; |
dfe13c55 |
144 | exec "lskdjfalksdjfdjfkls","" ; |
4438c4b7 |
145 | no warnings 'io' ; |
0453d815 |
146 | exec "lskdjfalksdjfdjfkls","" ; |
599cee73 |
147 | EXPECT |
e5e1b98b |
148 | OPTION regex |
c4f6c246 |
149 | Can't exec "lskdjfalksdjfdjfkls": .+ |
599cee73 |
150 | ######## |
767a6a26 |
151 | # doio.c [Perl_do_exec3] |
4438c4b7 |
152 | use warnings 'io' ; |
599cee73 |
153 | exec "lskdjfalksdjfdjfkls", "abc" ; |
4438c4b7 |
154 | no warnings 'io' ; |
0453d815 |
155 | exec "lskdjfalksdjfdjfkls", "abc" ; |
599cee73 |
156 | EXPECT |
e5e1b98b |
157 | OPTION regex |
3eeba6fb |
158 | Can't exec "lskdjfalksdjfdjfkls(:? abc)?": .+ |
0453d815 |
159 | ######## |
767a6a26 |
160 | # doio.c [Perl_nextargv] |
0453d815 |
161 | $^W = 0 ; |
ccc2aad8 |
162 | my $filename = "./temp.dir" ; |
0453d815 |
163 | mkdir $filename, 0777 |
164 | or die "Cannot create directory $filename: $!\n" ; |
165 | { |
166 | local (@ARGV) = ($filename) ; |
167 | local ($^I) = "" ; |
168 | my $x = <> ; |
169 | } |
170 | { |
4438c4b7 |
171 | no warnings 'inplace' ; |
0453d815 |
172 | local (@ARGV) = ($filename) ; |
173 | local ($^I) = "" ; |
174 | my $x = <> ; |
175 | } |
176 | { |
4438c4b7 |
177 | use warnings 'inplace' ; |
0453d815 |
178 | local (@ARGV) = ($filename) ; |
179 | local ($^I) = "" ; |
180 | my $x = <> ; |
181 | } |
182 | rmdir $filename ; |
183 | EXPECT |
ccc2aad8 |
184 | Can't do inplace edit: ./temp.dir is not a regular file at - line 9. |
185 | Can't do inplace edit: ./temp.dir is not a regular file at - line 21. |
0453d815 |
186 | |
767a6a26 |
187 | ######## |
188 | # doio.c [Perl_do_eof] |
189 | use warnings 'io' ; |
190 | my $a = eof STDOUT ; |
191 | no warnings 'io' ; |
192 | $a = eof STDOUT ; |
193 | EXPECT |
43693395 |
194 | Filehandle STDOUT opened only for output at - line 3. |