package YourApp::Schema::Result::Product; # .. # DBIC code # .. sub view { my $self = shift; # I wonder how often each product is viewed? }