Issue #5259 has been updated by eric sorenson.

Feel free to reject this if it's unrelated, but this came up on the mailing 
list today - it would be great if, whatever the nomenclature ends up being (I 
like "title"), the value is accessible as a local variable inside a resource.  
I.e. this doesn't work, and it really ought to:

<div style="font-family:monospace; white-space:pre">
[e...@recury ~/sandbox/dotmac/puppet]% cat packages.pp 
  $installserver = "localhost"

  package { [ 'glib2-2.24.1p2', 'gtar-1.23p1' ]:
      provider => 'pkgdmg',
      ensure => 'installed',
      source => 
"http://${installserver}/openbsd/${operatingsystemrelease}/packages/${hardwaremodel}/<em>${title}</em>.dmg",
    }

debug: Puppet::Type::Package::ProviderPkgdmg: Executing '/usr/bin/curl -o 
/tmp/gtar-1.23p1 -C - -k -s --url 
http://localhost/openbsd/10.5.0/packages/i386/<em>.dmg</em>'
</div>


----------------------------------------
Bug #5259: Synonyms (title, namevar, name) make it confusing.
https://projects.puppetlabs.com/issues/5259

Author: Jordan Sissel
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 
Affected Puppet version: 
Keywords: consistency usability
Branch: 


* If you're querying a resource, it's Someresource <| title == ... |>
* If you're writing a provider, it's called a 'namevar'
* If you're implementing a custom define, it's called $name.

This is confusing and could benefit from unification, even if it's a small step 
such as unifying $name and title.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to