Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

class::virtually::abstract(3pm) [debian man page]

Class::Virtually::Abstract(3pm) 			User Contributed Perl Documentation			   Class::Virtually::Abstract(3pm)

NAME
Class::Virtually::Abstract - Compile-time enforcement of Class::Virtual SYNOPSIS
package My::Virtual::Idaho; use base qw(Class::Virtually::Abstract); __PACKAGE__->virtual_methods(qw(new foo bar this that)); package My::Private::Idaho; use base qw(My::Virtual::Idaho); sub new { ... } sub foo { ... } sub bar { ... } sub this { ... } # oops, forgot to implement that()!! Whatever will happen?! # Meanwhile, in another piece of code! # KA-BLAM! My::Private::Idaho fails to compile because it didn't # fully implement My::Virtual::Idaho. use My::Private::Idaho; DESCRIPTION
This subclass of Class::Virtual provides compile-time enforcement. That means subclasses of your virtual class are required to implement all virtual methods or else it will not compile. BUGS and CAVEATS Because this relies on import() it is important that your classes are used instead of required. This is a problem, and I'm trying to figure a way around it. Also, if a subclass defines its own import() routine (I've done it) Class::Virtually::Abstract's compile-time checking is defeated. Got to think of a better way to do this besides import(). AUTHOR
Original idea and code from Ben Tilly's AbstractClass http://www.perlmonks.org/index.pl?node_id=44300&lastnode_id=45341 Embraced and Extended by Michael G Schwern <schwern@pobox.com> SEE ALSO
Class::Virtual perl v5.10.1 2007-10-23 Class::Virtually::Abstract(3pm)

Check Out this Related Man Page

DBIx::Class::SQLMaker(3pm)				User Contributed Perl Documentation				DBIx::Class::SQLMaker(3pm)

NAME
DBIx::Class::SQLMaker - An SQL::Abstract-based SQL maker class DESCRIPTION
This module is a subclass of SQL::Abstract and includes a number of DBIC-specific workarounds, not yet suitable for inclusion into the SQL::Abstract core. It also provides all (and more than) the functionality of SQL::Abstract::Limit, see DBIx::Class::SQLMaker::LimitDialects for more info. Currently the enhancements to SQL::Abstract are: o Support for "JOIN" statements (via extended "table/from" support) o Support of functions in "SELECT" lists o "GROUP BY"/"HAVING" support (via extensions to the order_by parameter) o Support of "...FOR UPDATE" type of select statement modifiers o The "-ident" operator o The "-value" operator OPERATORS
-ident Used to explicitly specify an SQL identifier. Takes a plain string as value which is then invariably treated as a column name (and is being properly quoted if quoting has been requested). Most useful for comparison of two columns: my %where = ( priority => { '<', 2 }, requestor => { -ident => 'submitter' } ); which results in: $stmt = 'WHERE "priority" < ? AND "requestor" = "submitter"'; @bind = ('2'); -value The -value operator signals that the argument to the right is a raw bind value. It will be passed straight to DBI, without invoking any of the SQL::Abstract condition-parsing logic. This allows you to, for example, pass an array as a column value for databases that support array datatypes, e.g.: my %where = ( array => { -value => [1, 2, 3] } ); which results in: $stmt = 'WHERE array = ?'; @bind = ([1, 2, 3]); AUTHORS
See "CONTRIBUTORS" in DBIx::Class. LICENSE
You may distribute this code under the same terms as Perl itself. perl v5.14.2 2011-11-29 DBIx::Class::SQLMaker(3pm)
Man Page