Can someone help me "translate" this java fragment into perl / Moose? ". Trying to understand java object syntax / logic, and I only know perl.
EDIT based on comments: the fragment comes from the xwiki package - http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents ... Is it too big to parse, so what about the remaining code? Possibly (just to explain, ignore @lines? What is the general meaning of "@something"?
@Component("hello")
public class HelloWorldScriptService implements ScriptService
{
@Requirement
private HelloWorld helloWorld;
public String greet()
{
return this.helloWorld.sayHello();
}
}
Looking for something like the following perl snippet, but have no idea about "@Component, @Requirement - etc .: (
package HelloWorldScriptService;
use Moose;
sub greet {
return $self->
}
There are several documents where java is explained by perl-ish conditions? (at least some basics)