A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://raw.github.com/cfengine/core/master/examples/namespace_bodies.cf below:

bundle agent __main__ { methods: "example_space:main"; } body file control { namespace => "example_space"; } bundle agent main { reports: # Use the 'first_line' printfile body from the current namespace "Specifying a body without explict namespace assumes the same namespace.$(const.n)Show me the first 1 line of this file" printfile => first_line( $(this.promise_filename) ); # Use the 'first_two_lines' printfile body from the 'default' namespace "Forgetting to prefix bodies with 'default:' is a common mistake when using the standard library.$(const.n)Show me the first 2 line of this file" printfile => default:first_two_lines( $(this.promise_filename) ); } body printfile first_line(file) # @brief Report the first 1 lines of a file # @param file The full path of the file to report { file_to_print => "$(file)"; number_of_lines => "1"; } body file control { namespace => "default"; } body printfile first_two_lines(file) # @brief Report the first 2 lines of a file # @param file The full path of the file to report { file_to_print => "$(file)"; number_of_lines => "2"; } ############################################################################### #+begin_src example_output #@ ``` #@ R: Specifying a body without explict namespace assumes the same namespace. #@ Show me the first 1 line of this file #@ R: bundle agent __main__ #@ R: Forgetting to prefix bodies with 'default:' is a common mistake when using the standard library. #@ Show me the first 2 line of this file #@ R: bundle agent __main__ #@ R: { #@ ``` #+end_src

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4