{"id":29832346,"url":"https://github.com/hauntedhost/using","last_synced_at":"2025-09-09T08:39:26.822Z","repository":{"id":165387159,"uuid":"94848748","full_name":"hauntedhost/using","owner":"hauntedhost","description":"attempt to import helper functions into another module namespace","archived":false,"fork":false,"pushed_at":"2017-06-20T04:14:20.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-10T08:53:15.513Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hauntedhost.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-06-20T04:10:44.000Z","updated_at":"2017-06-20T04:10:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d24190d-4aa8-45c2-a871-e86e213d1dfd","html_url":"https://github.com/hauntedhost/using","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hauntedhost/using","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauntedhost%2Fusing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauntedhost%2Fusing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauntedhost%2Fusing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauntedhost%2Fusing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hauntedhost","download_url":"https://codeload.github.com/hauntedhost/using/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauntedhost%2Fusing/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274268374,"owners_count":25253389,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-29T11:35:58.892Z","updated_at":"2025-09-09T08:39:26.813Z","avatar_url":"https://github.com/hauntedhost.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Using\n\nI would like to import functions from one module into another module.\n\nGiven this code:\n\n```elixir\ndefmodule Using do\n  use Using.Importer\nend\n\ndefmodule Using.Importer do\n  defmacro __using__(_) do\n    quote do\n      import Using.Helpers\n    end\n  end\nend\n\ndefmodule Using.Helpers do\n  def hello, do: \"world\"\n  def greeting(name), do: \"hello #{name}\"\nend\n```\n\nI would expect to be able to call `Using.hello/0` and `Using.greeting/1` directly. But they are not in scope.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauntedhost%2Fusing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhauntedhost%2Fusing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauntedhost%2Fusing/lists"}