This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
$name =~ /Phill?ipp?e?/ && $name eq "Philippe" # FAIL
[perl5.git] / handy.h
diff --git a/handy.h b/handy.h
index 63f7fd8..911deca 100644 (file)
--- a/handy.h
+++ b/handy.h
@@ -656,6 +656,18 @@ US-ASCII (Basic Latin) range are viewed as not having any case.
 typedef U32 line_t;
 #define NOLINE ((line_t) 4294967295UL)
 
+/* Helpful alias for version prescan */
+#define is_LAX_VERSION(a,b) \
+       (a != Perl_prescan_version(aTHX_ a, FALSE, b, NULL, NULL, NULL, NULL))
+
+#define is_STRICT_VERSION(a,b) \
+       (a != Perl_prescan_version(aTHX_ a, TRUE, b, NULL, NULL, NULL, NULL))
+
+#define BADVERSION(a,b,c) \
+       if (b) { \
+           *b = c; \
+       } \
+       return a;
 
 /*
 =head1 Memory Management
@@ -777,9 +789,9 @@ PoisonWith(0xEF) for catching access to freed memory.
  * implementation unless -DPERL_MEM_LOG_NOIMPL is also defined.
  *
  * Known problems:
- * - all memory allocs do not get logged, only those
+ * - not all memory allocs get logged, only those
  *   that go through Newx() and derivatives (while all
- *  Safefrees do get logged)
+ *   Safefrees do get logged)
  * - __FILE__ and __LINE__ do not work everywhere
  * - __func__ or __FUNCTION__ even less so
  * - I think more goes on after the perlio frees but