PerlDancer / Dancer2

Perl Dancer Next Generation (rewrite of Perl Dancer)
http://perldancer.org/
Other
543 stars 273 forks source link

Feature/engine namespaces 1323 #1577

Open veryrusty opened 3 years ago

veryrusty commented 3 years ago

Draft implementation to allow fully qualified namespaces for all engines, as discussed some time ago in #1323.

Draft PR before I go write more tests / documentation to ensure this is where we want to go:

  set engines => {
    serialier => {
      'My::Awesome::Serializer => { ... },
    },
    template => {
      'My::Template::DWIM => { ... }.
    },
  };
  set serializer => `+My::Awesome::Serializer`;
  set template => `+My::Template::DWIM`;
veryrusty commented 3 years ago

@SysPete @racke @cromedome thoughts ?

racke commented 3 years ago

Sounds good to me. :+1:

racke commented 3 years ago

Just make sure that you don't repeat the serialier typo in the documentation.


 set engines => {
    serialier => {
      'My::Awesome::Serializer => { ... },
    },
    template => {
      'My::Template::DWIM => { ... }.
    },
  };
SysPete commented 3 years ago

@veryrusty :+1: for using + as a FQ namespace indicator as it follows a pattern used elsewhere. Very happy to see this, thank you!

cromedome commented 3 years ago

Yes! 👍 I like what you've done here! Please keep running with it.