[PATCH/puppet] Use notice() in the versioncmp() docs

223 views
Skip to first unread message

Todd Zullinger

unread,
Oct 25, 2009, 12:23:27 PM10/25/09
to puppe...@googlegroups.com
Use of notify() is an error, so replace it with notice, which is a
function. Alternately, notify { msg => '2.6-1 is > than 2.4.5' } could
be used.

Signed-off-by: Todd Zullinger <t...@pobox.com>
---

This hardly seems worthy of a ticket, but it could save someone some
frustration when reading the versioncmp() documentation at:

http://reductivelabs.com/trac/puppet/wiki/FunctionReference

The versioncmp() example produces an error when run:

Unknown function notify at /tmp/test.pp:2 on node localhost

Using notice() fixes this.

Anyway, the trivial fix is on the versioncmp-docs-typo branch at
git://jet.mox.net/~tmz/puppet.git.

lib/puppet/parser/functions/versioncmp.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/puppet/parser/functions/versioncmp.rb b/lib/puppet/parser/functions/versioncmp.rb
index bdf5391..9435655 100644
--- a/lib/puppet/parser/functions/versioncmp.rb
+++ b/lib/puppet/parser/functions/versioncmp.rb
@@ -18,7 +18,7 @@ This functions returns a number::
Example::

if versioncmp('2.6-1', '2.4.5') > 0 {
- notify('2.6-1 is > than 2.4.5')
+ notice('2.6-1 is > than 2.4.5')
}

") do |args|
--
1.6.5.1

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When life gives you lemons, make lemonade, pee in it, and serve it to
the people that piss you off.
-- Jack Handy, Deep Thoughts

Luke Kanies

unread,
Oct 26, 2009, 12:33:09 AM10/26/09
to puppe...@googlegroups.com
+1, good catch.
--
There is only one success - to be able to spend your life in your own
way. -- Christopher Morley
---------------------------------------------------------------------
Luke Kanies | http://reductivelabs.com | http://madstop.com

James Turnbull

unread,
Oct 26, 2009, 5:57:01 AM10/26/09
to puppe...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 26/10/09 Todd Zullinger wrote:
> versioncmp-docs-typo

Pushed in commit d383ab897937a7e7e5fcf2929a63241e894f7616 in branch
0.25.x.

Regards

James Turnbull

- --
Author of:
* Pro Linux Systems Administration (http://tinyurl.com/linuxadmin)
* Pulling Strings with Puppet (http://tinyurl.com/pupbook)
* Pro Nagios 2.0 (http://tinyurl.com/pronagios)
* Hardening Linux (http://tinyurl.com/hardeninglinux)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEVAwUBSuVybSFa/lDkFHAyAQJS5wf+JReEtWLufXM1TI/rrpBEdxrf0FHSIcCf
nLjw1+0+W8qDmdNd4whZ71ym33eFyzQZwXqiFLwE2+KhVZpNXTwFw3XkicfFp8BF
dsWphCbPUAQG7DVdVFSZHyhG0lm7r4iSGWWthPFLbMxO5CM5eDArrRCIQVeF6Ha/
jlWF9eVWWsSdTJsjvtW0A1SE88fRUVUMkd/o8+Mo7nbbDeYVTigB0WVQDxCE9fk3
p9nVM7t8PBtojOL2PTDCTOhuO7BkAnioTeXMg1eTnFhZj6Ox5pWZm/mKbblnvRp8
/lr0fmD/9bwHrogEfQsIOO0ofOc4sbX39pnyWPZSwKjqbdBXEAUjIg==
=bidx
-----END PGP SIGNATURE-----

Reply all
Reply to author
Forward
0 new messages