This Week's Trending
This Month's Trending
This Year's Trending
Last Three Year's Trending
Has anyone come up with a good way to create some form of module registry that can be used to lookup a module by name. My use case is to ...
New
I can “overwrite” native stdlib functions, just by not importing them from the kernel, right?
Like:
defmodule Filter do
Import Kernel...
New
A library I’m working on has a lot of functionality related to string prefixes (technically binaries, but they’re mostly strings). I have...
New
Should module attributes reset after every function definition or does ExUnit reset @tag with macros?
Would I need @doc false for second...
New
Prior to v1.18.0 I used the following vode to reach the struct definition in a module from __before_compile__/2 callback.
defp field...
New
Trending Over Three Years
I have put some module attributes in my tests for easier reference, like this
@example Application.fetch_env!(:my_app, :thing)
but I no...
New
I have 2 modules, one of them has a function that returns a list and the other one is using that function to create a module attribute.
...
New
Greetings comrades,
According to: https://elixir-lang.org/getting-started/module-attributes.html#as-constants
Every time an attribute ...
New
While looking over the source code for a library I’m using, I noticed that there were several times that the same module attribute (@para...
New
Background
I have to read a CSV and currently this is happening at compile time as the function runs in a module attribute:
# Imagine th...
New
How do I make this work in a defenum macro?
defenum EmailStatus, :email_status, @email_states
Right now, I’m getting:
warning: undef...
New
Given the following code:
defmodule MathOps do
@moduledoc """
This module provides math operations
"""
@doc """
This function...
New
I am just doing some poking around with module attribute and I created the following code:
defmodule ModuleAttribute do
Module.registe...
New
When a module attribute is based on the return of a function defined on another module, can we say we’ve a module dependency? Module A de...
New
Hi
I’m trying to use module attributes in my typespec, but I get errors when I do this:
defmodule KitchenCalculator do
@ml :millilite...
New
Can you use custom attributes similar to @impl or @behaviour, but rather than using a callback function, only the function name is used (...
New
I was just watching a conference video on pubsub and there was a module attribute defined with interpolation and passed as the topic id. ...
New
@msg gettext(
"Sorry, your account must first be validated by our admins before " <>
"you can access the reques...
New
so I was using MyModule.__info__(:attributes)[:behaviour] to make sure a module implements a behaviour but when the module has 2 or more ...
New
Hi,
The question is pretty simple: Autocomplete and suggestions are not available when I use module attributes (you know like @some_cons...
New
Latest on Elixir Forum
Get money off!
The Pragmatic Bookshelf
35% off any eBook
Manning Publications
45% off any item
ElixirCasts
10% off for life
The Pragmatic Studio
20% off any course
AppSignal
10% off for 12 months
Honeybadger
10% off for 12 months
Simply use coupon code "devtalk.com" or "elixirforum" at checkout!
Filter by Type:
Sub Categories:
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








