Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
Ohhh.. believe me, I've been without a hat since I broke the fancy thing. The table name and the only file it points to (zips.pm) match. So I'm really at a lost. Here is the controller if you're interested.
package WeilMclain::Controller::ContractorLocator; use strict; use warnings; use base 'Catalyst::Controller'; =head1 NAME WeilMclain::Controller::ContractorLocator - Catalyst Controller =head1 DESCRIPTION Catalyst Controller. =head1 METHODS =cut =head2 index =cut sub index : Private { my ( $self, $c ) = @_; $c->stash->{template} = 'contractorlocator/index'; } sub search : Local { my ( $self, $c ) = @_; # Figure out hte zip code we are dealing with in case user gives c +ity,state my $zip_code = 0; if ($c->request->param('city') && $c->request->param('state')) { $zip_code = $c->model('WeilMclainDB::Zips')->get_zip($c->reque +st->param('city'),$c->request->param('state')); } elsif (!$c->request->param('zip')) { $c->response->redirect('/cont +ractorlocator'); } else { $zip_code = $c->request->param('zip'); } my $zips = [$c->model('WeilMclainDB::Zips')->get_closest($zip_code +,$c->request->param('miles'))]; # Get contractors in $zips if (scalar @{$zips} > 0) { $c->stash->{contractors} = [$c->model(' +WeilMclainDB::Contractor')->locate_by_zip($zips)]; } $c->stash->{template} = 'contractorlocator/search'; } =head1 AUTHOR Copyright 2006 Denny D. Daugherty <ddaugherty@kujoe.com> =head1 LICENSE =cut 1;

In reply to Re^2: MVC Catalyst Architecture - City, State Zip locator by ChristinaH
in thread MVC Catalyst Architecture - City, State Zip locator by ChristinaH

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.