Skip to content

Fix params hash handling#1

Open
1-1sam wants to merge 1 commit intoraku-community-modules:mainfrom
1-1sam:params-fix
Open

Fix params hash handling#1
1-1sam wants to merge 1 commit intoraku-community-modules:mainfrom
1-1sam:params-fix

Conversation

@1-1sam
Copy link
Copy Markdown

@1-1sam 1-1sam commented Jan 28, 2025

When calling the zci method, I get the following error:

Cannot look up attributes in a Hash type object. Did you forget a '.new'?
  in method zeroclickinfo_request_base at /home/sam/.raku/sources/E28B4258B5E0B34BAE9DEBE9C034E872E2F62ADD (WWW::DuckDuckGo) line 32
  in method zeroclickinfo_request at /home/sam/.raku/sources/E28B4258B5E0B34BAE9DEBE9C034E872E2F62ADD (WWW::DuckDuckGo) line 53
  in method zeroclickinfo at /home/sam/.raku/sources/E28B4258B5E0B34BAE9DEBE9C034E872E2F62ADD (WWW::DuckDuckGo) line 67
  in method zci at /home/sam/.raku/sources/E28B4258B5E0B34BAE9DEBE9C034E872E2F62ADD (WWW::DuckDuckGo) line 21
  in block <unit> at <unknown file> line 1
  in any <main> at /usr/share/perl6/runtime/perl6.moarvm line 1
  in any <entry> at /usr/share/perl6/runtime/perl6.moarvm line 1

The issue appears to be that WWW::DuckDuckGo tries to copy the params attribute into a seperate variable. There doesn't seem to be any reason to do this over just reading the from params attribute directly, so this PR corrects that.

WWW::DuckDuckGo currently tries to copy the params attribute into a
seperate associative variable, which causes errors. This commit fixes
that by just reading from the params attribute directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant