mop

Dealing with multiple-inherited constructors in Moose

Greetings, I'm learning Moose and I'm trying to write a CGI::Application subclass with Moose, which is made difficult by the fact that CGI-App is not based on Moose. In my other CGI-App subclasses, I like to have a parent class with a setup method that looks at the child class's symbol table and automatically sets up the runmodes. I f...

Turning off inline constructors with MooseX::Declare

Greetings, As a followup to my previous question about Moose, I've now run into a new problem. I've got a Moose class which uses Recipe 12 in order to extend a non-Moose parent class. Here it is: package MyApp::CGI; ### TODO: make this work with MooseX::Declare? use Moose; extends 'CGI::Application'; sub new { my $class = shif...

Real-World Scheme OOP Programs?

I am working on a sort of "bug finder" for Scheme (R5RS) and I want to try if and how well it would work for object-oriented programming. Therefore I was looking at some of the numerous object systems for Scheme (for example, Tiny-CLOS, Prometheus, and YASOS). Of course, in order to find bugs, I have to have code in which I can search t...

Problem with mixins in a MooseX::NonMoose class

Consider the following: package MyApp::CGI; use Moose; use MooseX::NonMoose; use Data::Dumper; extends 'CGI::Application'; BEGIN { print "begin isa = " . Dumper \@MyApp::CGI::ISA; }; print "runtime isa = " . Dumper \@MyApp::CGI::ISA; ... The output when this compiles is: begin isa = $VAR1 = [ 'Moose::Object' ...

How can I extend Moose's automatic pragma exports?

You know how Moose automatically turns on strict and warnings during import? I want to extend that behavior by turning on autodie and use feature ':5.10' in my Moose classes. I've tracked down where Moose does this, in Moose::Exporter, which assembles a custom import sub for Moose that calls strict->import and warnings->import for the c...

Test if a class is a subclass of another class in common lisp

How do I see if one CLOS class is a subclass of another CLOS class? ...

Groovy methodMissing

Hi I have a closure within an object Foo and inside the closure i define a method called 'myStaticMethod' that I want to resolve once the closure is called outside the object Foo. I also happen to have 'on purpose' a static method within my object Foo with the same name. When I call the closure i set the 'resolve strategy' to DELEGATE...

Does Ruby have a Metaobject protocol and if not, is it possible to implement one?

Pardon my ignorance, but What is a Metaobject protocol, and does Ruby have one? If not, is it possible to implement one for Ruby? What features might a Metaobject protocol possess if Ruby was to have one? ...