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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:20:07+00:00 2026-05-31T16:20:07+00:00

The My_Module -module (used in this package) use s Signals::XSIG and sets $XSIG{‘WINCH’}[1] =

  • 0

The My_Module-module (used in this package) uses Signals::XSIG and sets $XSIG{'WINCH'}[1] = sub { ... };

use warnings;
use 5.014;
package Auto_sid;
use Exporter 'import';
our @EXPORT = qw(something);

use My_Module;

no warnings qw(redefine);

sub My_Module::list_to_big {
    my ( @arguments ) = @_;
    require Signals::XSIG;
    Signals::XSIG->import(%Signals::XSIG::XSIG);
    @{$Signals::XSIG::XSIG{'WINCH'}} = ();
    no Signals::XSIG;
    # ...
    # do something that My_Module normaly doesn't do and
    # which doesn't work when modified $SIG{'WINCH'}
    # ...
}

When I use this I get a lot of error-messages like:

"NUM63" is not exported by the Signals::XSIG module
"ARRAY(0xc23180)" is not exported by the Signals::XSIG module
"TRAP" is not exported by the Signals::XSIG module
"ARRAY(0xc119c8)" is not exported by the Signals::XSIG module
...

When I use use instead of require it works fine.
Why does this not work with require?

  • 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-31T16:20:09+00:00Added an answer on May 31, 2026 at 4:20 pm

    Because when you do this:

    Signals::XSIG->import(%Signals::XSIG::XSIG);
    

    you’re passing the contents of that hash to the import routine. As NUM63 and TRAP are signal names, and they are not valid exports for Signals::XSIG, you’re getting those errors.

    You need to do this:

    Signals::XSIG->import('%XSIG');
    

    Because it recognizes Exporter recognizes the string '%XSIG' as one of the things it does export.

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

Sidebar

Related Questions

I have seen code like this package xyz; # putting the module inside its
I have a module misc with variable $verbose : use strict; use diagnostics; package
I have used the module Mail::Webmail::Gmail to read the new messages in my Gmail
Consider this scenario: I have a project with two modules and one common module
I know this type of thing I want to do used to work in
This code used to work on Vista (and Windows XP) but after an upgrade
Anyone happen to use this combination in their web application? I'm having a bit
I've seen a couple of package on hackage which contain module names with .Internal
This is my first attempt to inline Java code in Perl. We cannot use
I know this is a dumb question but i'm stumped. My directory structure used

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.