Bigtop

 view release on metacpan or  search on metacpan

docs/keyword_cookbook/controller/namespace_base/example.bigtop  view on Meta::CPAN

    Init Std {  }
    SQL SQLite {  }
    CGI Gantry { with_server 1; flex_db 1; gantry_conf 1; }
    HttpdConf Gantry { gantry_conf 1; }
    Control Gantry { dbix 1; }
    Model GantryDBIxClass {  }
    SiteLook GantryDefault {  }
    Conf Gantry { gen_root 1; instance kids; }
}
app Kids {
    config {
        dbconn `dbi:SQLite:dbname=app.db` => no_accessor;
        template_wrapper `genwrapper.tt` => no_accessor;
    }
    controller is base_controller {
        method do_main is base_links {
        }
        method site_links is links {
        }
    }
    table child {
        field id {
            is int4, primary_key, auto;
        }
        field name {
            is varchar;
            label Name;
            html_form_type text;
        }
        field birth_day {
            is date;
            label `Birth Day`;
            html_form_type text;
            date_select_text `Select Date`;
        }
        field created {
            is datetime;
        }
        field modified {
            is datetime;
        }
        foreign_display `%name`;
    }
    controller Child is AutoCRUD {
        controls_table child;
        rel_location `little/rascals`;
        text_description child;
        page_link_label Child;
# we will manually test this controller, we promise:
        skip_test 1;
        method do_main is main_listing {
            cols name, birth_day;
            header_options Add;
            row_options Edit, Delete;
            title Child;
            limit_by family;
        }
        method form is AutoCRUD_form {
            all_fields_but id, created, modified;
            extra_keys
                legend => `$self->path_info =~ /edit/i ? 'Edit' : 'Add'`;
            form_name child;
        }
    }
    controller Soap is SOAP {
        soap_name KidsSOAPName;
# here we name the namespace base:
        namespace_base `kidssoap.example.com/soapstuff`;
        gen_uses Gantry::Plugins::SOAP::RPC;
        rel_location soap;
        skip_test 1;
        method do_getBirthDay is SOAP {
            expects childName => `soapenc:string`;
            returns childNameReturn => `soapenc:string`;
        }
    }
}



( run in 1.336 second using v1.01-cache-2.11-cpan-56fb94df46f )