[Catalyst] Error loading simple app

Matt Ittigson mattittigson at gmail.com
Tue Apr 4 06:07:24 CEST 2006


17 apologies for answering my own post so many times.  I found a fix, though
I'm neither sure why it works, nor what the implications are.

If I comment out the following lines in Catalyst::Component:

sub COMPONENT {
    my ( $self, $c ) = @_;

    # Temporary fix, some components does not pass context to constructor
    my $arguments = ( ref( $_[-1] ) eq 'HASH' ) ? $_[-1] : {};

#     if ( my $new = $self->NEXT::COMPONENT( $c, $arguments ) ) {
#         return $new;
#     }
#     else {
        if ( my $new = $self->new( $c, $arguments ) ) {
            return $new;
        }
        else {
            my $class = ref $self || $self;
            my $new = { %{ $self->config }, %{$arguments} };
            return bless $new, $class;
        }
#     }
}

the server boots no problem.  I checked the inheritance hierarchy for
Mattistics::View::Seamstress and I can't find any redispatch COMPONENT
method ... but, for whatever reason, the above comments fix the issue.

If anyone on list would like me to continue debugging the issue, please send
along further instructions.  Thanks for your help.

-matt

On 4/3/06, Matt Ittigson <mattittigson at gmail.com> wrote:
>
> Sorry to reply to myself, but I did some further digging in the hopes of
> isolating the problem.  I tried running the script/catalystadvent_server.pl
> from the catalystadvent example and got the same error:
>
> Couldn't instantiate component "CatalystAdvent::View::Seamstress",
> "COMPONENT() didn't return a object" at
> /Library/Perl/5.8.6/Module/Pluggable/Fast.pm line 86
> Compilation failed in require at script/catalystadvent_server.pl line 49.
>
> I also tried running the server on a different port, and didn't get any
> different error messages.
>
> As a further FYI, this is on OS X.  Also, here are the version numbers for
> the various pieces of software that I believe are relevant:
>
> CPAN Terminal> l Module::Pluggable::Fast
>
> Details for 'Module::Pluggable::Fast'
> Author                         Sebastian Riedel (sri at oook.de)
> Description                    None given
> Development Stage              Unknown
> Interface Style                Unknown
> Language Used                  Unknown
> Package                        Module-Pluggable-Fast-0.18.tar.gz
> Public License                 Unknown
> Support Level                  Unknown
> Version Installed              0.18
> Version on CPAN                0.18
> Contains:                      Module::Pluggable::Fast
>
>
> CPAN Terminal> l Catalyst::View::Seamstress
>
> Details for 'Catalyst::View::Seamstress'
> Author                         Terrence Brannon (metaperl at gmail.com)
> Description                    None given
> Development Stage              Unknown
> Interface Style                Unknown
> Language Used                  Unknown
> Package                        Catalyst-View-Seamstress-1.15.tar.gz
> Public License                 Unknown
> Support Level                  Unknown
> Version Installed              1.15
> Version on CPAN                1.15
> Contains:                      Catalyst::Helper::View::Seamstress
>                                Catalyst::View::Seamstress
>
>
> CPAN Terminal> l HTML::Seamstress
>
> Details for 'HTML::Seamstress'
> Author                         Terrence Brannon ( metaperl at gmail.com)
> Description                    None given
> Development Stage              Unknown
> Interface Style                Unknown
> Language Used                  Unknown
> Package                        HTML-Seamstress-4.25.tar.gz
> Public License                 Unknown
> Support Level                  Unknown
> Version Installed              4.25
> Version on CPAN                4.25
> Contains:                      HTML::Seamstress
>                                HTML::Seamstress::Base
>                                Simple::Class
>                                XML::Seamstress
>                                html::Greeting
>                                html::GreetingAbs
>                                html::abstract::common
>                                html::abstract::homepage
>                                html::abstract::productpage
>                                html::hello_world
>                                html::homepage
>                                html::productpage
>                                x::hello_world
>
>
> CPAN Terminal> l Catalyst
>
> Details for 'Catalyst'
> Author                         Marcus Ramberg (mramberg at cpan.org)
> Description                    None given
> Development Stage              Unknown
> Interface Style                Unknown
> Language Used                  Unknown
> Package                        Catalyst-5.66.tar.gz
> Public License                 Unknown
> Support Level                  Unknown
> Version Installed              5.66
> Version on CPAN                5.66
> Contains:                      Catalyst
>                                Catalyst::Action
>                                Catalyst::ActionContainer
>                                Catalyst::AttrContainer
>                                Catalyst::Base
>                                Catalyst::Build
>                                Catalyst::Component
>                                Catalyst::Controller
>                                Catalyst::DispatchType
>                                Catalyst::DispatchType::Default
>                                Catalyst::DispatchType::Index
>                                Catalyst::DispatchType::Path
>                                Catalyst::DispatchType::Regex
>                                Catalyst::Dispatcher
>                                Catalyst::Engine
>                                Catalyst::Engine::CGI
>                                Catalyst::Engine::FastCGI
>                                Catalyst::Engine::HTTP
>                                Catalyst::Engine::HTTP::Restarter
>                                Catalyst::Engine::HTTP::Restarter::Watcher
>                                Catalyst::Exception
>                                Catalyst::Helper
>                                Catalyst::Log
>                                Catalyst::Model
>                                Catalyst::Request
>                                Catalyst::Request::Upload
>                                Catalyst::Response
>                                Catalyst::Test
>                                Catalyst::Utils
>                                Catalyst::View
>
>
> I'd love to dig further into the issue, but I'm at a bit of a loss as to
> what the next steps should be.  Unfortunately, there isn't an error message
> that gives me a hint in any direction.  Does anyone have Seamstress working
> on OS X?
>
> Thanks so much for putting up with the multiple messages and any help that
> the list can provide.
>
> -matt
>
>
> On 4/3/06, Matt Ittigson < mattittigson at gmail.com> wrote:
> >
> > Is there any reason why a simple app using Catalyst::View::Seamstress
> > would fail to start?  Are there incompatibilities?  Do I need to be running
> > development instead of released versions?  Is there a more basic setup I can
> > use to isolate the problem?
> >
> > Thanks in advance.
> >
> > -matt
> >
> >
> > On 4/2/06, Yuval Kogman <nothingmuch at woobling.org> wrote:
> > >
> > > On Sun, Apr 02, 2006 at 15:14:04 -0400, Matt Ittigson wrote:
> > >
> > > > and half from the SmokeServer sample application in the Catalyst
> > > > SVN repository.
> > >
> > > Just FYI (i have no time to really respond - my laptop is 90% dead
> > > since this afternoon) - the SmokeServer is not finished - i'm
> > > switching things around and there are a few ugly hacks that will
> > > have to be resolved in DBIC before it's considered a "good" example.
> > >
> > >
> > > > _______________________________________________
> > > > Catalyst mailing list
> > > > Catalyst at lists.rawmode.org
> > > > http://lists.rawmode.org/mailman/listinfo/catalyst
> > >
> > >
> > > --
> > >   Yuval Kogman < nothingmuch at woobling.org>
> > > http://nothingmuch.woobling.org  0xEBD27418
> > >
> > >
> > >
> > > _______________________________________________
> > > Catalyst mailing list
> > > Catalyst at lists.rawmode.org
> > > http://lists.rawmode.org/mailman/listinfo/catalyst
> > >
> > >
> > >
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060404/90225422/attachment-0001.htm 


More information about the Catalyst mailing list