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 8444739
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:28:24+00:00 2026-06-10T09:28:24+00:00

I have these three files Constants/Requests.pm #!/usr/bin/perl use strict; use base ‘Exporter’; use constant

  • 0

I have these three files

Constants/Requests.pm

#!/usr/bin/perl

use strict;

use base 'Exporter';

use constant MR_NOACTION     =>   0;
use constant MR_START        =>   1;
use constant MR_STOP         =>   2;

our @EXPORT = (
    'MR_NOACTION',
    'MR_START',
    'MR_STOP'
);
1;

JobManDB.pm

#!/usr/bin/perl

package JobManDB;

use strict;
use warnings;

use constant WEB_DB_FILE    => "db/web.db";
use constant MASTER_DB_FILE => "db/master.db";

use Constants::Requests;

sub new
{
    print "Ahoj: " . MR_NOACTION . "\n";
    ...

Master.pm

#!/usr/bin/perl

package Master;

use strict;
use warnings;

use Time::HiRes qw( usleep );
use Data::Dumper;

use JobManDB;                   # use #1

use Constants::Requests;  # use #2

...

Program as posted is working, if but if I swith use #1 with use #2 the compilation fails with error:

Bareword "MR_NOACTION" not allowed while "strict subs" in use at lib/JobManDB.pm line 26.

(line 26 is the line in ‘new’ subroutine). I would like to know why. Thank you.

EDIT:
Another issue is, that if I add line package Requests; at the beginning of Requests.pm, the compilation fails with the same error but independently on order of ‘uses’.

  • 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-06-10T09:28:26+00:00Added an answer on June 10, 2026 at 9:28 am

    The Requests.pm file is missing its package declaration, package Constants::Requests;.

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

Sidebar

Related Questions

Suppose that I have those three files: a.h //a.h header #include <stdio.h> int int_variable;
I have a system where employees can upload files. There are three ways Upload
I have a directory full of XML files. For each of these files I
Have there been incompatibilities between Java releases where Java source code/Java class files targeting
Hi there I have 3 files in rails as follows: 1)Located at app/controller/listings_controller.rb class
Say I have two files where there is one number per line File 1
I have a simple file browser and there I display files and folders, obtained
I have developed an application that read how many files are there in a
Does File.list() have a longer run time if there are more files in its
(1) I have a site that serves up MP3 files: http://domain/files/1234567890.mp3 (2) I have

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.