#!/usr/bin/perl -w package Tie::Hash::Test; use Tie::Hash; use Attribute::Handlers autotie => { __CALLER__::Test => __PACKAGE__ }; use vars qw(@ISA); @ISA = 'Tie::StdHash'; sub TIEHASH { my $class = shift; my %self; @self{@_} = (undef) x @_; bless \%self, $class; } package main; my %hash : Test('one', 'two', 'three'); print join(':', keys %hash), "\n";