Closed wbazant closed 4 years ago
Thanks for the detailed report!
This is most definitely a bug, and I think I'm going to take your solution and go a bit further: We don't need the Statocles::Site to be a singleton, we really could make it a Statocles object, put a Mojo::Log object on that, and then make a Statocles->log
method that does two things:
$self->log
.$level
and $message
), writes to the log.So every place that now has site->log->debug(...)
will be changed to Statocles->log( debug => ... )
. This removes the site
pseudo-package that is probably super-dangerous to have, and makes for an easy, identifiable, OO-pure(-er) way to get at the log singleton for the entire process.
Any chance this will get addressed? It's been more than a year, and currently it means new users using the default options cannot create a site.
If this is blocked on some other major re-factor, maybe we could just temporarily comment-out the logging line so the create
command is not broken.
Doug is making a v2, see the other branch.
The current code in master is definitely broken. Since I'm working on the v2 branch, I just realized that I can release bugfixes from the old code before I started refactoring (I've pushed it as the 'v0' branch). I'll release a new version right now.
This was an obstacle when I wanted to try out the project, this is a report and a patch I did to push the project on.
I'm creating a site. Stuff breaks with this error:
This was the stack trace when I ran it under debugger:
I see lib/Statocles/Site.pm does this in BUILD:
I also see that Statocless::Command wire up an object
site
of that class, but as far as I can tell this doesn't happen for me. I don't know if it's a bug or if I haven't installed it right. I ran this with Perl 5.18, and I see the Travis build is failing for it currently (I had the same failing test, and installed with -f), so maybe it's connected somehow.I've patched it for myself in Statocles.pm as follows: