use v5.14; use attributes(); use Data::Dumper; my $Hi; sub Hi:lvalue { $Hi; } my $Hello; sub Hello { $Hello; } BEGIN { attributes::->import(__PACKAGE__, \&Hello, 'lvalue'); } Hi = 'monks'; # It kind of looks like a sigil-less variable actually :) Hello = 'world'; # There would be a warning here without the BEGIN block say "Hi: ", Hi; say "Hello: ", Hello; __END__ Hi: monks Hello: