This Week's Trending Top

This Month's Trending Top

This Year's Trending Top

Last Three Year's Trending Top

wwaldner
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
zoedsoupe
I can “overwrite” native stdlib functions, just by not importing them from the kernel, right? Like: defmodule Filter do Import Kernel...
New
garrison
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
user20230119
Should module attributes reset after every function definition or does ExUnit reset @tag with macros? Would I need @doc false for second...
New
mudasobwa
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 Top

vrod
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
joey_the_snake
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
slouchpie
Greetings comrades, According to: https://elixir-lang.org/getting-started/module-attributes.html#as-constants Every time an attribute ...
New
fireproofsocks
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
Fl4m3Ph03n1x
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
halostatue
How do I make this work in a defenum macro? defenum EmailStatus, :email_status, @email_states Right now, I’m getting: warning: undef...
New
yolo007wizard
Given the following code: defmodule MathOps do @moduledoc """ This module provides math operations """ @doc """ This function...
New
venomnert
I am just doing some poking around with module attribute and I created the following code: defmodule ModuleAttribute do Module.registe...
New
dcdourado
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
sfrances
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
enobat
Can you use custom attributes similar to @impl or @behaviour, but rather than using a callback function, only the function name is used (...
New
elt547
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
Kurisu
@msg gettext( "Sorry, your account must first be validated by our admins before " <> "you can access the reques...
New
cevado
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
catra
Hi, The question is pretty simple: Autocomplete and suggestions are not available when I use module attributes (you know like @some_cons...
New
  • Follow
  • Join
  • Shape
the conversation

Latest on Elixir Forum

Elixir Forum

Similar Portals

    None added yet

We're in Beta

About us Mission Statement