Introspection: Difference between revisions
Content deleted Content added
Thundergnat (talk | contribs) m →{{header|Ring}}: Remove vanity tags |
SqrtNegInf (talk | contribs) m →{{header|Perl}}: 'rm -rf /' in 'eval' is not funny, and off-topic anyhow, removed |
||
Line 1,432:
<lang perl>eval('abs(0)'); # eval("") instead of eval{}; the latter is not for run-time check
print "abs() doesn't seem to be available\n" if $@;</lang>
To check if a package or object provides certain method name, use 'can':
Line 1,503 ⟶ 1,499:
4 integers, sum = 74717
</pre>
=={{header|Perl 6}}==
<lang perl6>use v6; # require Perl 6
|