Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
# Split a string variable into an array using the specified split # character. # # Usage: # # $string = 'value1,value2' # $array_var = split($string, ',') # # $array_var holds the result ['value1', 'value2'] # module Puppet::Parser::Functions newfunction(:split, :type => :rvalue) do |args| return args[0].split(args[1]) end end
This paste will be private.
From the Design Piracy series on my blog: