Just curiosity, does moose-outdated shows any outdated packages or there is
no output?


On Sat, Mar 30, 2013 at 6:50 PM, will trillich
<will.trill...@serensoft.com>wrote:

> Still digging deeper -- here's the "T"race for right before it tries to
> hit the anonymous closure sub inside make_accessor: Comparing this against
> "Spill" which seems to have no problems at all...
>
> package Class::Accessor::Fast;
> use base 'Class::Accessor';
> use strict;
> $Class::Accessor::Fast::VERSION = '0.34';
>
> sub make_accessor {
>     my($class, $field) = @_;
>
>     return sub {
>         return $_[0]->{$field} if scalar(@_) == 1; *# <== $_[0] is string
> "Waste::Web" so boom!*
>         return $_[0]->{$field}  = scalar(@_) == 2 ? $_[1] : [@_[1..$#_]];
>     };
> }
>
> $ = Catalyst::Plugin::Cache::_default_curried_cache('Waste::Web') called
> from file `/usr/share/perl5/Catalyst/Plugin/Cache.pm' line 159
> $ = Catalyst::Plugin::Cache::cache('Waste::Web') called from file
> `/usr/share/perl5/Catalyst/TraitFor/Model/DBIC/Schema/Caching.pm' line 88
> . =
> Class::MOP::Class:::before(ref(Moose::Meta::Class::__ANON__::SERIAL::28),
> 'Waste::Web') called from file
> `/usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm' line 49
> $ =
> Class::MOP::Method::Wrapped::__ANON__[/usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm:51](ref(Moose::Meta::Class::__ANON__::SERIAL::28),
> 'Waste::Web') called from file
> `/usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm' line 91
> $ =
> Moose::Meta::Class::__ANON__::SERIAL::28::ACCEPT_CONTEXT(ref(Moose::Meta::Class::__ANON__::SERIAL::28),
> 'Waste::Web') called from file `/usr/local/share/perl/5.10.1/Catalyst.pm'
> line 629
> $ = Catalyst::_filter_component('Waste::Web',
> ref(Moose::Meta::Class::__ANON__::SERIAL::28)) called from file
> `/usr/local/share/perl/5.10.1/Catalyst.pm' line 700
> $ = Catalyst::model('Waste::Web', 'Waste') called from file
> `/usr/share/perl5/Catalyst/Model/DBIC/Schema.pm' line 549
> $ =
> Catalyst::Model::DBIC::Schema::__ANON__[/usr/share/perl5/Catalyst/Model/DBIC/Schema.pm:550]('Waste::Web::Model::Waste::Session',
> 'Waste::Web', undef) called from file
> `/usr/local/share/perl/5.10.1/Catalyst.pm' line 629
> $ = Catalyst::_filter_component('Waste::Web',
> 'Waste::Web::Model::Waste::Session', undef) called from file
> `/usr/local/share/perl/5.10.1/Catalyst.pm' line 700
> $ = Catalyst::model('Waste::Web', 'Waste::Session', undef) called from
> file `/usr/share/perl5/Catalyst/Plugin/Session/Store/DBIC.pm' line 145
> $ =
> Catalyst::Plugin::Session::Store::DBIC::session_store_model('Waste::Web')
> called from file `/usr/share/perl5/Catalyst/Plugin/Session/Store/DBIC.pm'
> line 78
> . = Catalyst::Plugin::Session::Store::DBIC::setup_finished('Waste::Web',
> 1) called from file `/usr/local/share/perl/5.10.1/Catalyst.pm' line 1233
> . = Catalyst::setup_finalize('Waste::Web') called from file
> `/usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm' line 50
> . =
> Class::MOP::Method::Wrapped::__ANON__[/usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm:51]('Waste::Web')
> called from file `/usr/local/lib/perl/5.10.1/Class/MOP/Method/Wrapped.pm'
> line 91
> . = Waste::Web::setup_finalize('Waste::Web') called from file
> `/usr/local/share/perl/5.10.1/Catalyst.pm' line 1207
> . = Catalyst::setup('Waste::Web') called from file
> `/home/will/projects/perl-mvc/Waste/script/../lib/Waste/Web.pm' line 54
> $ = require 'Waste/Web.pm' called from file
> `/usr/local/share/perl/5.10.1/Module/Runtime.pm' line 317
> . = Module::Runtime::require_module('Waste::Web') called from file
> `/usr/local/share/perl/5.10.1/Class/Load.pm' line 177
> @ =
> Class::Load::__ANON__[/usr/local/share/perl/5.10.1/Class/Load.pm:180]()
> called from file `/usr/local/share/perl/5.10.1/Try/Tiny.pm' line 72
> $ = eval {...} called from file `/usr/local/share/perl/5.10.1/Try/Tiny.pm'
> line 67
> @ = Try::Tiny::try(ref(CODE), ref(Try::Tiny::Catch)) called from file
> `/usr/local/share/perl/5.10.1/Class/Load.pm' line 183
> @ = Class::Load::try_load_class('Waste::Web', undef) called from file
> `/usr/local/share/perl/5.10.1/Class/Load.pm' line 38
> . = Class::Load::load_class('Waste::Web') called from file
> `/usr/local/share/perl/5.10.1/Catalyst/ScriptRole.pm' line 90
> . = Catalyst::ScriptRole::_run_application(ref(Catalyst::Script::Server))
> called from file `/usr/local/share/perl/5.10.1/Catalyst/Script/Server.pm'
> line 240
> . = Catalyst::Script::Server::run(ref(Catalyst::Script::Server)) called
> from file `/usr/local/share/perl/5.10.1/Catalyst/ScriptRunner.pm' line 50
>
>
>
> On Sat, Mar 30, 2013 at 11:53 AM, will trillich <
> will.trill...@serensoft.com> wrote:
>
>> Looks like it bombs out at $c->session_store_model because "$c" is just
>> "Waste::Web" and strict refs is in use. But why wouldn't it bomb out for
>> Catalyst::Upgrade or Spill?
>>
>>
>>
>> Catalyst::Plugin::Session::Store::DBIC::setup_finished(/usr/share/perl5/Catalyst/Plugin/Session/Store/DBIC.pm:76):
>> DB<23> *v 70*
>> 69      sub setup_finished {
>> 70:         my $c = shift;
>> 71
>> 72:         return $c->next::method unless @_;
>> 73
>> 74          # Try to determine id_field if it isn't set
>> 75:         unless ($c->_session_plugin_config->{id_field}) {
>> 76==>           my $model = $c->session_store_model;
>>
>> DB<24> *p $c->session_store_model*
>> Can't use string ("Waste::Web") as a HASH ref while "strict refs" in use
>> at /usr/share/perl5/Class/Accessor/Fast.pm line 10.
>>
>>
>> On Sat, Mar 30, 2013 at 11:04 AM, will trillich <
>> will.trill...@serensoft.com> wrote:
>>
>>> We have a Catalyst app "Waste::Web" that has been running fine and we
>>> are trying to upgrade to a more modern set of libraries via "cpanm". (One
>>> library was upgraded that caused conflicts, now we're running a sweep to
>>> get everything updated...)
>>>
>>> We have an old app called "Spills" that still runs fine. The problem is
>>> with a different old app called "Waste::Web"... It won't start, throwing
>>> the "can't use string as HASH ref" error, neither as standalone server for
>>> testing nor via apache. Suggestions?
>>>
>>>
>>>
>>> At first we thought maybe the script formats had changed. So we ran a
>>> quick sample "catalyst.pl Catalyst::Upgrade" to come up with the latest
>>> structure for comparison. This I'll call "new script" below. Then we looked
>>> at the script/*pl files, the lib/* files. None of the structures seem to
>>> have changed from what we can tell.
>>>
>>> That is, the old script/*server.pl script has the same standard
>>> structure as the brand new script:
>>>
>>> #!/usr/bin/env perl
>>> BEGIN {
>>>     $ENV{CATALYST_SCRIPT_GEN} = 40;
>>> }
>>> use Catalyst::ScriptRunner;
>>> Catalyst::ScriptRunner->run('Waste::Web', 'Server');
>>> 1;
>>>
>>> Comparing lib/Waste/Web.pm (old script) to lib/Catalyst/Upgrade.pm (new
>>> script) also looks similar -- commented code redacted for space:
>>>
>>> package Waste::Web;
>>> use Moose;
>>> use namespace::autoclean;
>>>
>>> use Catalyst::Runtime 5.80;
>>>
>>> use Catalyst qw/
>>>     ConfigLoader
>>>     Static::Simple
>>>         Session
>>>         Session::Store::DBIC
>>>         Session::State::Cookie
>>>         Authentication
>>>         Authentication::Credential::Password
>>>         Authorization::Roles
>>>     Cache
>>> /;
>>> use Waste::Lib::CSV;
>>>
>>> extends 'Catalyst';
>>>
>>> our $VERSION = '1.10';
>>>
>>> __PACKAGE__->config(
>>>     name => 'Waste::Web',
>>>     # Disable deprecated behavior needed by old applications
>>>     disable_component_resolution_regex_fallback => 1,
>>> );
>>>
>>> # Start the application
>>> __PACKAGE__->setup();
>>>
>>> In the new script there *is* a new option to the __PACKAGE__->config
>>> call but it's just to instantiate the X-Catalyst http header. All serious
>>> structures look the same.
>>>
>>> But Catalyst::Upgrade runs just fine, and an old app Spill runs just
>>> fine, where Waste::Web throws the error:
>>>
>>> Waste$ *perl script/waste_web_server.pl *
>>> Can't use string ("Waste::Web") as a HASH ref while "strict refs" in use
>>> at /usr/share/perl5/Class/Accessor/Fast.pm line 10.
>>> Compilation failed in require at
>>> /usr/local/share/perl/5.10.1/Catalyst/ScriptRunner.pm line 50.
>>>
>>> Waste$ *cd ../Catalyst-Upgrade/*
>>> Catalyst-Upgrade$ perl script/catalyst_upgrade_server.pl
>>> HTTP::Server::PSGI: Accepting connections at http://0:3000/
>>>
>>> Any ideas why we'd be getting this error?
>>>
>>> Here's the single-step debug log:
>>>
>>>
>>> Catalyst::Script::Server::run(/usr/local/share/perl/5.10.1/Catalyst/Script/Server.pm:240):
>>> DB<1> *v*
>>> 237             $self->pidfile->write
>>> 238:                if $self->_has_pidfile;
>>> 239
>>> 240==>          $self->_run_application;
>>> 241         }
>>> 242
>>> 243
>>> 244     }
>>> 245
>>> 246     sub _plack_loader_args {
>>>
>>> DB<1> *s*
>>>
>>> Catalyst::ScriptRole::_run_application(/usr/local/share/perl/5.10.1/Catalyst/ScriptRole.pm:88):
>>> 88:         my $self = shift;
>>>
>>> DB<1> *n*
>>>
>>> Catalyst::ScriptRole::_run_application(/usr/local/share/perl/5.10.1/Catalyst/ScriptRole.pm:89):
>>> 89:         my $app = $self->application_name;
>>>
>>> DB<1> *n*
>>>
>>> Catalyst::ScriptRole::_run_application(/usr/local/share/perl/5.10.1/Catalyst/ScriptRole.pm:90):
>>> 90:         Class::MOP::load_class($app);
>>>
>>> DB<1> *p $app*
>>> Waste::Web
>>>
>>> DB<2> *n*
>>> Can't use string ("Waste::Web") as a HASH ref while "strict refs" in use
>>> at /usr/share/perl5/Class/Accessor/Fast.pm line 10.
>>> Compilation failed in require at
>>> /usr/local/share/perl/5.10.1/Catalyst/ScriptRunner.pm line 50.
>>>  at /usr/local/share/perl/5.10.1/Catalyst/ScriptRole.pm line 90.
>>>
>>> Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=HASH(0xa5e1660)')
>>> called at /usr/local/share/perl/5.10.1/Catalyst/Script/Server.pm line 240
>>>
>>> Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0xa5e1660)')
>>> called at /usr/local/share/perl/5.10.1/Catalyst/ScriptRunner.pm line 50
>>>         Catalyst::ScriptRunner::run('Catalyst::ScriptRunner',
>>> 'Waste::Web', 'Server') called at script/waste_web_server.pl line 8
>>> Debugged program terminated.  Use q to quit or R to restart,
>>>   use o inhibit_exit to avoid stopping after program termination,
>>>   h q, h R or h o to get additional info.
>>>
>>>
>>>
>>
>>
>> --
>>  Will Trillich :: 812.454.6431
>>
>> “Grading takes away all the fun from failing. And a huge part of
>> education is about failure.”  -- Shimon Schocken
>>
>
>
>
> --
>  Will Trillich :: 812.454.6431
>
> “Grading takes away all the fun from failing. And a huge part of education
> is about failure.”  -- Shimon Schocken
>
> _______________________________________________
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to