Re: New User-Defined Function Syntax in SQL::Statement

From: Michael A Chase tech (mchase_at_ix.netcom.com)
Date: 02/21/05


Date: Mon, 21 Feb 2005 14:52:03 -0500
To:  dbi-users@perl.org

On 02/21/2005 02:23 PM, Jeff Zucker said:

> $dbh->do("CREATE FUNCTION foo");
> # pre-declares function foo, a perl subroutine in current package
>
> $dbh->do("CREATE FUNCTION foo AS Bar::baz");
> # pre-declares function foo, using baz, a subroutine in package Bar

Since AS usually introduces an alias, this might make more sense as:

    $dbh -> do( "CREATE FUNCTION Bar::baz AS foo" );
       # predeclares function foo, using baz, a subroutine in package Bar

-- 
Mac :})
** I usually forward private questions to the appropriate mail list. **
Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.