FAQ

Toby Corkindale wrote:
Seems to be an error in the Manual::Cookbook.
Under "Stringification" it says:
Employ the standard stringification technique by using the "overload"
module. Replace "foo" with the column/method of your choice.

use overload ?""? => ?foo?, fallback => 1;

However, this results in an error of:
Can't resolve method "???" overloading """" in package "overload"

Changing the overload line to this (thanks Castaway!) works:
use overload '""' => sub { return $_[0]->foo; }, fallback => 1;


This is on Perl 5.8.8 (overload.pm $VERSION=1.04).

-Toby
Seconded, I get the same behaviour with those versions.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 3 | next ›
Discussion Overview
groupdbix-class @
categoriesperl, catalyst
postedOct 13, '06 at 11:29a
activeNov 16, '06 at 10:20a
posts3
users3
websitedbix-class.org
irc#dbix-class

People

Translate

site design / logo © 2021 Grokbase