The example in URI.pm is broken on rakudo #6

Closed
crab2313 opened this Issue Aug 19, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@crab2313

the latest rakudo. 2012.07-359-g763b85a built on parrot 4.6.0
REPL:

use URI;
Nil
URI.new('http://foo.bar.com')
CHECK FAILED:
Undefined routine '&URI' called (line 1)

I changed the first line of URI.pm to

class URI is export;

also removed URI.pir

then
REPL:

use URI;
Nil
my $u = URI.new('http://foo.com/bar');
URI.new(grammar => IETF::RFC_Grammar.new(rfc => "rfc3896", grammar => IETF::RFC_Grammar::URI, parse_result => Match.new(orig => "http://foo.com/bar", from => 0, to => 18, ast => Any, list => ().list, hash => EnumMap.new("URI_reference", Match.new(orig => "http://foo.com/bar", from => 0, to => 18, ast => Any, list => ().list, hash => EnumMap.new("URI", Match.new(orig => "http://foo.com/bar", from => 0, to => 18, ast => Any, list => ().list, hash => EnumMap.new("query", (), "fragment", (), "scheme", Match.new(orig => "http://foo.com/bar", from => 0, to => 4, ast => Any, list => ().list, hash => EnumMap.new()), "hier_part", Match.new(orig => "http://foo.com/bar", from => 5, to => 18, ast => Any, list => ().list, hash => EnumMap.new("authority", Match.new(orig => "http://foo.com/bar", from => 7, to => 14, ast => Any, list => ().list, hash => EnumMap.new("userinfo", (), "port", (), "host", Match.new(orig => "http://foo.com/bar", from => 7, to => 14, ast => Any, list => ().list, hash => EnumMap.new("reg_name", Match.new(orig => "http://foo.com/bar", from => 7, to => 14, ast => Any, list => ().list, hash => EnumMap.new()), )), )), "path_abempty", Match.new(orig => "http://foo.com/bar", from => 14, to => 18, ast => Any, list => ().list, hash => EnumMap.new("segment", (Match.new(orig => "http://foo.com/bar", from => 15, to => 18, ast => Any, list => ().list, hash => EnumMap.new()),), )), )), )), )), ))), is_validating => Any, segments => Array.new(Match.new(orig => "http://foo.com/bar", from => 15, to => 18, ast => Any, list => ().list, hash => EnumMap.new())))
$u.scheme
http
$u.host
foo.com

@ronaldxs

This comment has been minimized.

Show comment
Hide comment
@ronaldxs

ronaldxs Aug 19, 2012

Collaborator

If I create a file named C.pm with one line 'class C {}' and then create a file test.pl with two lines:

use C;
C.new;

then running "perl6 test.pl" will give no errors and "perl6 < test.pl" will give essentially the same error as demonstrated in your example. AFAICT this is an issue with the perl6 command line interface and not the URI module. If you do not report the problem to RT in a few days I will double check RT for duplicate issues and then file this myself.

Filing good bug reports is not easy and may take some thought but bug reporting quality impacts the software development process. Thank you for using URI and good luck with perl6 development.

Collaborator

ronaldxs commented Aug 19, 2012

If I create a file named C.pm with one line 'class C {}' and then create a file test.pl with two lines:

use C;
C.new;

then running "perl6 test.pl" will give no errors and "perl6 < test.pl" will give essentially the same error as demonstrated in your example. AFAICT this is an issue with the perl6 command line interface and not the URI module. If you do not report the problem to RT in a few days I will double check RT for duplicate issues and then file this myself.

Filing good bug reports is not easy and may take some thought but bug reporting quality impacts the software development process. Thank you for using URI and good luck with perl6 development.

@ronaldxs ronaldxs closed this Aug 19, 2012

@masak

This comment has been minimized.

Show comment
Hide comment
@masak

masak Aug 19, 2012

Collaborator

It's been submitted to RT already: https://rt.perl.org/rt3/Ticket/Display.html?id=114308

Collaborator

masak commented Aug 19, 2012

It's been submitted to RT already: https://rt.perl.org/rt3/Ticket/Display.html?id=114308

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment