Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Alzabo::MethodMaker 0.92

    Download button

    No screenshots available
    Downloads: 361  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Good (3.1/5)
    8 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Dave Rolsky | More programs
    Perl Artistic License / FREE
    March 5th, 2008, 12:18 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Alzabo::MethodMaker description

    Alzabo::MethodMaker is a Perl module used to auto-generate useful methods based on an existing schema.

    Alzabo::MethodMaker is a Perl module used to auto-generate useful methods based on an existing schema.

    SYNOPSIS

    use Alzabo::MethodMaker ( schema => 'schema_name', all => 1 );

    This module can take an existing schema and generate a number of useful methods for this schema and its tables and rows. The method making is controlled by the parameters given along with the use statement, as seen in the SYNOPSIS section.

    PARAMETERS

    These parameters are all passed to the module when it is imported via use.
    schema => $schema_name

    This parameter is required.

    class_root => $class_name

    If given, this will be used as the root of the class names generated by this module. This root should not end in '::'. If none is given, then the calling module's name is used as the root. See New Class Names for more information.

    all => $bool

    This tells this module to make all of the methods it possibly can. See METHOD CREATION OPTIONS for more details.

    If individual method creation options are set as false, then that setting will be respected, so you could use

    use Alzabo::MethodMaker( schema => 'foo', all => 1, tables => 0 );

    to turn on all of the regular options except for "tables".

    name_maker => &naming_sub

    If provided, then this callback will be called any time a method name needs to be generated. This allows you to have full control over the resulting names. Otherwise names are generated as described in the documentation.
    The callback is expected to return a name for the method to be used. This name should not be fully qualified or contain any class designation as this will be handled by MethodMaker.

    It is important that none of the names returned conflict with existing methods for the object the method is being added to.

    For example, when adding methods that return column objects to a table, if you have a column called 'name' and try to use that as the method name, it won't work. Alzabo::Table objects already have such a method, which returns the name of the table. See the relevant documentation of the schema, table, and row objects for a list of methods they contain.
    The NAMING SUB PARAMETERS section contains the details of what parameters are passed to this callback.

    Please note that if you have a large complex schema you will almost certainly need to provide a custom naming subroutine to avoid name conflicts.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    method maker | Alzabo methods | Perl module | Alzabo | method | maker

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM