This would be a nice elegant solution, however we have not turned the future
parser on quite yet. I will certainly keep this function in mind though in the
future.
On Jun 3, 2015, at 5:56 AM, Henrik Lindberg henrik.lindb...@cloudsmith.com
wrote:
On 2015-03-06 6:26, Jacob McCoy Wade wrote
from stdlib) which return true or false but
dont fail.
if ( is_string($myvar) or is_hash($myvar) ) {
...
} else {
fail('not a string or a hash')
}
Regards
Craig
On Wed, Jun 3, 2015 at 6:26 AM, Jacob McCoy Wade djsto...@gmail.com wrote:
I am trying to find out how I can validate
I am trying to find out how I can validate more than one type of data
structure for a given value in a manifest? In particular I would like to
be able to have either a string or a hash be a valid data structure.
Something like:
if ($myvar != false) {
validate_string($myvar) ||
On Friday, August 2, 2013 6:43:01 AM UTC-7, jcbollinger wrote:
On Thursday, August 1, 2013 2:37:03 PM UTC-5, Jacob McCoy Wade wrote:
The closest I've come is to use:
$random_1 = generate('/bin/sh', '-c', '\/bin/cat /dev/urandom | /usr
/bin/tr -dc \'a-z0-9\' | /usr/bin/fold -w 8 | /usr
I'm looking for some help in getting the proper escape sequence within the
generate function.
Ultimately what I'm trying to do is generate some random strings, store
them as variables, and use those variables to populate configuration files
stored as templates.
I can get this to work when