[Bps-public-commit] dbix-searchbuilder branch, functions-in-searches, updated. 1.63-21-gc377cfa

Alex Vandiver alexmv at bestpractical.com
Fri Mar 29 20:17:56 EDT 2013


The branch, functions-in-searches has been updated
       via  c377cfadcb01cb9622c5925f0bbfd64ccfae9836 (commit)
      from  c7178fa1e26861d119792623c508c5abc10feefa (commit)

Summary of changes:
 lib/DBIx/SearchBuilder.pm | 56 ++++++++++++++++++++++++++++-------------------
 1 file changed, 34 insertions(+), 22 deletions(-)

- Log -----------------------------------------------------------------
commit c377cfadcb01cb9622c5925f0bbfd64ccfae9836
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Fri Mar 29 20:07:55 2013 -0400

    Update POD formatting slightly

diff --git a/lib/DBIx/SearchBuilder.pm b/lib/DBIx/SearchBuilder.pm
index dd7922d..eeb94e4 100755
--- a/lib/DBIx/SearchBuilder.pm
+++ b/lib/DBIx/SearchBuilder.pm
@@ -1575,44 +1575,56 @@ rules.
 
 =over 4
 
-=item * FUNCTION or undef returned when FIELD is not provided
+=item *
 
-=item * 'main' ALIAS is used if not provided
+FUNCTION or undef returned when FIELD is not provided
 
-=item * ALIAS.FIELD returned when FUNCTION is not provided
+=item *
 
-=item * NULL returned if FUNCTION is 'NULL'
+'main' ALIAS is used if not provided
 
-=item * If FUNCTION contains '?' (question marks) then they are
-replaced with ALIAS.FIELD and result returned.
+=item *
 
-=item * If FUNCTION has no '(' (opening parenthesis) then
-ALIAS.FIELD is appended in parentheses and returned.
+ALIAS.FIELD returned when FUNCTION is not provided
+
+=item *
+
+NULL returned if FUNCTION is 'NULL'
+
+=item *
+
+If FUNCTION contains '?' (question marks) then they are replaced with
+ALIAS.FIELD and result returned.
+
+=item *
+
+If FUNCTION has no '(' (opening parenthesis) then ALIAS.FIELD is
+appended in parentheses and returned.
 
 =back
 
 Examples:
 
-    ()
-    undef
+    $obj->CombineFunctionWithField()
+     => undef
 
-    (FUNCTION => 'FOO')
-    'FOO'
+    $obj->CombineFunctionWithField(FUNCTION => 'FOO')
+     => 'FOO'
 
-    (FIELD => 'foo')
-    'main.foo'
+    $obj->CombineFunctionWithField(FIELD => 'foo')
+     => 'main.foo'
 
-    (ALIAS => 'bar', FIELD => 'foo')
-    'bar.foo'
+    $obj->CombineFunctionWithField(ALIAS => 'bar', FIELD => 'foo')
+     => 'bar.foo'
 
-    (FUNCTION => 'FOO(?, ?)', FIELD => 'bar')
-    'FOO(main.bar, main.bar)'
+    $obj->CombineFunctionWithField(FUNCTION => 'FOO(?, ?)', FIELD => 'bar')
+     => 'FOO(main.bar, main.bar)'
 
-    (FUNCTION => 'FOO', FIELD => 'bar')
-    'FOO(main.bar)'
+    $obj->CombineFunctionWithField(FUNCTION => 'FOO', ALIAS => 'bar', FIELD => 'baz')
+     => 'FOO(bar.baz)'
 
-    (FUNCTION => 'NULL', FIELD => 'bar')
-    'NULL'
+    $obj->CombineFunctionWithField(FUNCTION => 'NULL', FIELD => 'bar')
+     => 'NULL'
 
 =cut
 

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list