The @ / "at" Symbol in Elixir

I've been working through Programming Elixir and I came to some code examples that included @user_agent [{"User-agent", "Elixir [email protected]"}].

I'm sure Dave introduced the concept in the book but I couldn't find where and my searching online and through the docs left me empty handed as well.

Turns out it's called a module attribute. In this case it's being used as a constant. Which means that at compile time wherever @user_agent is referenced, [{"User-agent", "Elixir [email protected]"}], get's shoved in in it's place.

So module attribute constants are like variables in SCSS.

Protip I received from a more experienced friend: environment variables that are referenced via constants will be picked up on compilation but won't be picked up until you recompile. Hair has been pulled by people who forget this fact.