summaryrefslogtreecommitdiff
path: root/lib/auto/POSIX/assert.al
diff options
context:
space:
mode:
authorLarry Wall <lwall@netlabs.com>1994-05-04 23:00:00 +0000
committerLarry Wall <lwall@netlabs.com>1994-05-04 23:00:00 +0000
commit85e6fe838fb25b257a1b363debf8691c0992ef71 (patch)
treefd5340cd6c3bbabfc21d3b0cac48e7ab3a481ebf /lib/auto/POSIX/assert.al
parent2304df62caa7d9be70e8b8bcdb454e139c9c103d (diff)
downloadperl-85e6fe838fb25b257a1b363debf8691c0992ef71.tar.gz
perl 5.0 alpha 9perl-5a9
[editor's note: the sparc executables have not been included, and emacs backup files have been removed]
Diffstat (limited to 'lib/auto/POSIX/assert.al')
-rw-r--r--lib/auto/POSIX/assert.al12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/auto/POSIX/assert.al b/lib/auto/POSIX/assert.al
new file mode 100644
index 0000000000..f32a8537ed
--- /dev/null
+++ b/lib/auto/POSIX/assert.al
@@ -0,0 +1,12 @@
+# NOTE: Derived from POSIX.pm. Changes made here will be lost.
+package POSIX;
+
+sub assert {
+ usage "assert(expr)", caller if @_ != 1;
+ if (!$_[0]) {
+ local ($pack,$file,$line) = caller;
+ die "Assertion failed at $file line $line\n";
+ }
+}
+
+1;