Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'require Module::Name <&subroutine>' doesn't always work #4758

Closed
p6rt opened this issue Nov 16, 2015 · 5 comments
Closed

'require Module::Name <&subroutine>' doesn't always work #4758

p6rt opened this issue Nov 16, 2015 · 5 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Nov 16, 2015

Migrated from rt.perl.org#126658 (status was 'resolved')

Searchable as RT126658$

@p6rt
Copy link
Author

p6rt commented Nov 16, 2015

From siavash.askari.nasr@gmail.com

Running 'require Module​::Name <&subroutine>;' gives this error​:
Trying to import symbols &subroutine from 'Module​::Name', but it does
not export anything

The specific module I used was DateTime​::Format
(https://github.com/supernovus/perl6-datetime-format):
require DateTime​::Format <&strftime>;
Which resulted to this error​:
Trying to import symbols &strftime from 'DateTime​::Format', but it does
not export anything
It works fine with 'use DateTime​::Format'.

I tested a very simple module and it worked, so does JSON​::Tiny (see
below)

Related links and discussions​:
http://irclog.perlgeek.de/perl6/2015-11-16#i_11545596

I changed `unit module DateTime​::Format;` to `unit module Format;`
in module's source code and then this worked​: require
Format​:file('[Path to /DateTime/Format.pm6]') <&strftime>;
http://irclog.perlgeek.de/perl6/2015-11-16#i_11545652
test case​: require JSON​::Tiny; require DateTime​::Format; say
OUR​::("JSON​::Tiny"); say OUR​::("DateTime​::Format")
DateTime​::Format doesn't get added to OUR​::, for whatever reason...
https://gist.github.com/cygx/cfef662ea505cd68b2e8

@p6rt
Copy link
Author

p6rt commented Nov 18, 2015

From @LLFourn

duplicate of​:

https://rt.perl.org/Public/Bug/Display.html?id=125951

On Wed, Nov 18, 2015 at 12​:44 AM Siavash <perl6-bugs-followup@​perl.org>
wrote​:

# New Ticket Created by Siavash
# Please include the string​: [perl #​126658]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=126658 >

Running 'require Module​::Name <&subroutine>;' gives this error​:
Trying to import symbols &subroutine from 'Module​::Name', but it does
not export anything

The specific module I used was DateTime​::Format
(https://github.com/supernovus/perl6-datetime-format):
require DateTime​::Format <&strftime>;
Which resulted to this error​:
Trying to import symbols &strftime from 'DateTime​::Format', but it does
not export anything
It works fine with 'use DateTime​::Format'.

I tested a very simple module and it worked, so does JSON​::Tiny (see
below)

Related links and discussions​:
http://irclog.perlgeek.de/perl6/2015-11-16#i_11545596

I changed `unit module DateTime​::Format;` to `unit module Format;`
in module's source code and then this worked​: require
Format​:file('[Path to /DateTime/Format.pm6]') <&strftime>;
http://irclog.perlgeek.de/perl6/2015-11-16#i_11545652
test case​: require JSON​::Tiny; require DateTime​::Format; say
OUR​::("JSON​::Tiny"); say OUR​::("DateTime​::Format")
DateTime​::Format doesn't get added to OUR​::, for whatever reason...
https://gist.github.com/cygx/cfef662ea505cd68b2e8

@p6rt
Copy link
Author

p6rt commented Nov 18, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented Mar 6, 2017

From @niner

Can no longer reproduce after commits 63cf5cac00, 3e86d0fa9a, 5b98caa35a and 6771deefa4 were merged.

@p6rt
Copy link
Author

p6rt commented Mar 6, 2017

@niner - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Mar 6, 2017
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant