Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6357163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T23:06:45+00:00 2026-05-24T23:06:45+00:00

My first Role is the following one: package AccBack::RTransaction; use strict; use warnings; use

  • 0

My first Role is the following one:

package AccBack::RTransaction;

use strict;
use warnings;

use Moose::Role;
use MooseX::Method::Signatures;

requires "_log";
requires "_config";

My second Role, which implement the first Role, is the following one:

package AccBack::RAccounting;

use AccBack::RTransaction;

requires "_log";

has "_config"            => (
    isa         => "Accounting::Config",
    is          => "ro",
    lazy        => 1,
    default     => sub { return Accounting::Config->new(); }
);

has "fibu"              => (
    isa         => "Maybe[Accounting::Fibu]",
    is          => "rw",
    writer      => "setFibu",
    reader      => "getFibu",
    default     => undef,
);

with "AccBack::RTransaction";

My base class is the following one:

package AccBack::Membership;

use AccBack::RAccounting;

has "_log"              => (
    isa         => "Log::Log4perl::Logger",
    is          => "ro",
    default     => sub { 
        return Log::Log4perl->get_logger("AccBack::Membership");
    }
);

has "mailMergeOption"  => (
    isa         => "Maybe[HashRef]",
    is          => "rw",
    writer      => "setMailMergeOption",
    reader      => "getMailMergeOption",
    default     => undef,
);

# Roles
with "AccBack::RAccounting";

If I wan’t to start my program, I get this error:

‘AccBack::RAccounting’ requires the method ‘_config’ to be implemented
by ‘AccBack::Membership’ at
C:/strawberry/perl/site/lib/Moose/Meta/Role/Application/ToCla

I don’t understand where the problem is. It is the same things as http://search.cpan.org/~doy/Moose-2.0203/lib/Moose/Cookbook/Roles/Recipe1.pod.

Does anybody have an idea about what I’ve misunderstand?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T23:06:45+00:00Added an answer on May 24, 2026 at 11:06 pm

    This is a known problem that will hopefully be fixed in the future. In the meantime, you should be able to satisfy the requirement in the second role by adding a stub method like this:

    sub _config;
    has "_config"            => (
        isa         => "Accounting::Config",
        is          => "ro",
        lazy        => 1,
        default     => sub { return Accounting::Config->new(); }
    );
    

    The stub sub will fulfill the requirement, but will not get in the way of role application.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my first ever interview for a Java developer role, specifically RMI, Serverlets
This is my first entry into backend development, taking mostly a design role in
I have one MySQL table, users , with the following columns: user_id (PK) email
I have the following code, and I am not sure why when I role
I am using Entity Framework 4.0 with Database First and come across the following
Given the following situation, Entity Framework Code-first missnames/renames the connecting or Join table. public
I have a table with one field of enum type. I execute the following
I am following a tutorial to learn how to use form based security in
I'm doing my first Rails deployment and using capistrano, following my host's directions: I
I got the following issue. I am trying to use the With or WithMany

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.