-
Notifications
You must be signed in to change notification settings - Fork 10
Description
I am reading more about Beam::Wire in order to understand Statocles config files. I have a few questions about $class in B::W::Help::Config and would appreciate clarification in the documentation.
The "prefixed metadata" section gives an example of "mak[ing] a 'default class' in your config file" using $class: Person. That example calls Beam::Wire::get('person'). However, from the get() docs and this example, it's not clear to me how it works. Would you be willing to expand the example somewhat? For example, the get() docs don't say when get() would return a non-blessed instance. I also do not understand how $class (call the constructor with a hashref of arguments) relates to the "default class" referenced in the docs.
In the Event Handlers (on) section, $class is described as creating an "anonymous object". Does that mean that using $class will always create a hashref? If so, what is the argument of the $class config key used for?
Finally, "Specifying Constructor Args" says that you can pass a hashref of arguments to the constructor by giving class => Foo, args => [{x=>1, y=>2}]. Is $class just shorthand for that? It seems to me it may not be, but I am not sure.
Thanks in advance for any clarification you may be able to provide!