# from Boyd Duffee on Thursday 11 October 2012:
>When I run
> perl Build.PL
>I get
> Can't use string as a HASH ref while "strict refs" in use
>when I call the create_build_script() method. I've attached the
>Build.PL file. What am I doing wrong?
Hi Boyd,
I get `Can't use string ("Module::Build::Custom") as a HASH ref...`
(perl 5.10 shiny feature: tells you the string.) Note that the cookbook
example says `$class->new(...)->create_build_script` and your code
essentially says `$class->new(...); $class->create_build_script`, which
loses the newly constructed object and tries to call an object method on
a class.
("Can't string as hash" is not the best error message for "Cannot call
object method with class." -- but newer Perl versions might have more
helpful error messages.)
--Eric
--
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------