Subject: | A size method not found bug |
Date: | Sun, 8 Jun 2014 21:50:12 +0800 |
To: | "bug-Text-Flowchart"<bug-Text-Flowchart [...] rt.cpan.org> |
From: | "zhkzyth"<zhkzyth [...] gmail.com> |
hi, guys
I am new to perl.I try to play the Text::flowchart to draw some asci flow charts.But i met some problems when i run some demo code as flow.
```
# use 5.010;
# say "hello world!";
use Text::Flowchart
# $object = Text::Flowchart->new(
# "width" => 120,
# "debug" => 1
# );
$flowchart = Text::Flowchart::new->(); #boring flowchart, no options
$flowchart = Text::Flowchart::new->( #flowchart specifying new width, a % as the padding character, and using the debugging option
"width" => 100,
"pad" => "%",
"debug" => 1
);
$flowchart = Text::Flowchart::new( #using periods as the padding character
"pad" => "."
);
$example_box = $flowchart->box( #creates a box at (0,0)
"string" => "Do you need to make a flowchart?",
"x_coord" => 0,
"y_coord" => 2,
);
$example_box2 = $flowchart->box( #creates a box at (15,0)
"string" => "Yes I do.",
"x_coord" => 19,
"y_coord" => 0,
"width" => 13
);
$example_box3 = $flowchart->box( #creates a box at (15,0)
"string" => "No I don't.",
"x_coord" => 19,
"y_coord" => 7
);
$flowchart->relate(
[$example_box, "right"] => [$example_box2, "left"]
);
$flowchart->relate(
[$example_box, "right", -1] => [$example_box3, "left"]
);
$flowchart->draw();
```
And then i met the log as follow:
```
Can't locate object method "size" via package "main" at /Users/admin/perl5/lib/perl5/Text/Flowchart.pm line 38.
```
Some info may help:
- i use flowchart 1.0,which i downloaded by the cpanm.
- my perl version:
```
➜ ~ perl -v
This is perl 5, version 12, subversion 4 (v5.12.4) built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)
Copyright 1987-2010, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
```
3. my sys info.
```
➜ ~ uname -a
Darwin admintekiMacBook-Pro.local 12.5.0 Darwin Kernel Version 12.5.0: Sun Sep 29 13:33:47 PDT 2013; root:xnu-2050.48.12~1/RELEASE_X86_64 x86_64
```
Hope to hear from you.Thanks.
------------------
zhkzyth@gmail.com