Hello What am I doing wrong here? $test = defined(User[''foo'']) _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
Kosmin, Adam a écrit :> > Hello > > What am I doing wrong here? > > $test = defined(User[''foo'']) >i think defined work only for class, not for defined objects. By the way it would be great to have a ''exist()'' for the objects too no :) ? -- Cordialement, Ghislain ADNET. AQUEOS. Attention ! Toute demande de support ou commande de domaine par email sera refusée, pour cela utilisez https://support.aqueos.net. Pour tout contact nos coordonnées : http://www.aqueos.com/aqueos-services-informatiques-societe.php Fax: 01.72.70.32.66 _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Mar 28, 2007, at 2:02 AM, ADNET Ghislain wrote:> Kosmin, Adam a écrit : >> >> Hello >> >> What am I doing wrong here? >> >> $test = defined(User[''foo'']) >> > i think defined work only for class, not for defined objects.Correct; it''s a syntactical problem. I''ve updated the docs and left the bug open; hopefully I''ll get a chance to fix it soon.> By the way it would be great to have a ''exist()'' for the objects > too no :) ?What do you mean? A similar function but that works with objects? -- To get back my youth I would do anything in the world, except take exercise, get up early, or be respectable. -- Oscar Wilde --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
> What do you mean? A similar function but that works with objects? > > -- > >yes indeed :) _______________________________________________ Puppet-users mailing list Puppet-users@madstop.com https://mail.madstop.com/mailman/listinfo/puppet-users
On Mar 28, 2007, at 2:39 AM, ADNET Ghislain wrote:> >> What do you mean? A similar function but that works with objects? >> >> -- >> >> > yes indeed :)That is the plan for the defined() function; the grammar just doesn''t currently allow resource references as argument to rvalue functions, and I need to be a bit careful in allowing it because some things that would become syntactically correct need to be error-checked because they''re invalid, like ''template(File[yay])''. -- You''ve achieved success in your field when you don''t know whether what you''re doing is work or play. -- Warren Beatty --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com