in reply to What About Providing Constructors in Roles?

Hi Karl, the standard practice I believe is to use a Role for something a thing *does*, not what it *is*, which is why Roles don't have constructors normally. FWIW (approx $0.02).


The way forward always starts with a minimal test.
  • Comment on Re: What About Providing Constructors in Roles?

Replies are listed 'Best First'.
Re^2: What About Providing Constructors in Roles?
by karlgoethebier (Abbot) on Dec 21, 2017 at 14:49 UTC
    "...Roles don't have constructors normally..."

    Hi Nick, i was sure that someone would post something like this ;-)

    But you are right: They don't. But in this case they provide them. Having a constructor or providing one is a different thing IMHO. Perhaps my English is still too bad to explain the difference exactly.

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

      Your English is fine! The code, too. Your intention is what's unclear ;-)


      The way forward always starts with a minimal test.