Method: Puppet::Util::PTomulik::Packagex::Portsx::Functions#split_pkgname
- Defined in:
- lib/puppet/util/ptomulik/packagex/portsx/functions.rb
#split_pkgname(pkgname) ⇒ Array
Split pkgname into portname and portversion.
112 113 114 115 116 117 118 |
# File 'lib/puppet/util/ptomulik/packagex/portsx/functions.rb', line 112 def split_pkgname(pkgname) if m = /^#{PKGNAME_RE}$/.match(pkgname) m.captures else [pkgname, nil] end end |