Loading ...
Sorry, an error occurred while loading the content.

Re: [PBML] Moose what am I doing wrong here?

Expand Messages
  • Wendell Hatcher
    hmm, not sure why it isnt printing out for me. I am using the code below and calling it from my windows laptop from the command line. #!/usr/bin/perl use
    Message 1 of 9 , Oct 14, 2010
    • 0 Attachment
      hmm, not sure why it isnt printing out for me. I am using the code below and calling it from my windows laptop from the command line.


      #!/usr/bin/perl
      use strict;
      use 5.12.1;
      use warnings;

      BEGIN {
      package Foo;
      use Moose;
      has name => (is => 'rw');
      }

      my $object = Foo->new(name => 'Dell');

      print $object->name, "\n";


      --- On Thu, 10/14/10, merlyn@... <merlyn@...> wrote:

      From: merlyn@... <merlyn@...>
      Subject: Re: [PBML] Moose what am I doing wrong here?
      To: "Wendell Hatcher" <wlh1074@...>
      Cc: perl-beginner@yahoogroups.com
      Date: Thursday, October 14, 2010, 12:25 PM







       









      >>>>> "Wendell" == Wendell Hatcher <wlh1074@...> writes:



      Wendell> yes, in-fact I took your code below and just added my name with no success.

      Wendell> #!/usr/bin/perl

      Wendell> use strict;

      Wendell> use warnings;



      Wendell> BEGIN {

      Wendell> package Foo;

      Wendell> use Moose;

      Wendell> has name => (is => 'rw');

      Wendell> }



      Wendell> my $object = Foo->new(name => 'Dell');



      Wendell> print $object->name, "\n";



      This runs just fine for me, prints "Dell" followed by newline. *Just*

      tested it.



      --

      Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095

      <merlyn@...> <URL:http://www.stonehenge.com/merlyn/>

      Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.

      See http://methodsandmessages.posterous.com/ for Smalltalk discussion























      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.