Vadim Konovalov wrote:
On Sunday 08 June 2008 01:24:17 Brian Bevins wrote:
I don't think there was a problem with snit. The thing that forced us to
use an older version of Tcl::Tk was that our perl is so old (5.8.2) that
the Exporter lacks the import method, which was added with perl 5.8.3.
To be more sure, I need more details on failure (obviously:) but it is
unobvious for me how Exporter could be a show-stopper for Tcl::Tk.
For example I never use "exporter"-ed functions from Tcl::Tk, because I always
write e.g.
$int->MainLoop; # no exported function, it is found by OO semantic
instead of just
MainLoop; # if I ever use this approach, I write Tcl::Tk::MainLoop
All in all, Tcl::Tk is pure-perl and all is relatively obvious within it.
"snit" however could be tough place, as it is needed for Scrolled widgets, (it
was not required for some old versions of Tcl::Tk).
Do you have snit within your Tcl/Tk installation?
We have snit 1.2 (which came as part of tcllib 1.9) installed and apparently
working correctly.
The reason I believe the problem is with the Exporter is as follows. I can build Tcl::Tk
0.97 with no problems. But when I do "make test" I get the following errors:
make test
PERL_DL_NONLAZY=1 /a/pubtools/rhel-4-0-ia32/perl/5.8.2/bin/perl "-MExtUtils::Command::MM"
"-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/after........."import" is not exported by the Exporter module
Can't continue after import errors at
/a/pubtools/build/perl-modules/Tcl-Tk-0.97/blib/lib/Tcl/Tk.pm line 5
BEGIN failed--compilation aborted at
/a/pubtools/build/perl-modules/Tcl-Tk-0.97/blib/lib/Tcl/Tk.pm line 5.
Compilation failed in require at t/after.t line 4.
BEGIN failed--compilation aborted at t/after.t line 4.
t/after.........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-6
Failed 6/6 tests, 0.00% okay
And so on. All the tests fail complaining that '"import" is not exported by the
Exporter module". This is because Tk.pm inlcudes the following line:
use Exporter ('import');
But the Exporter did not have an import method until perl 5.8.3. This is not a
bug with Tcl::Tk. It's just that our perl is too old. I had to go back to
Tcl::Tk 0.91 to find one that didn't have that line, but instead had just:
use Exporter;
So that works even with our perl 5.8.2. I honestly don't think there is
anything that you need to do here. We just need to move to a newer version of
perl. Maybe Tcl::Tk doesn't really need Exporter::import, so that dependency
could be removed, but I would guess that it was added for a reason.
Thanks,
--Brian
--
Brian S. Bevins, PE
Computer Scientist / Mechanical Engineer
Thomas Jefferson National Accelerator Facility
"Nothing in all the world is more dangerous than
sincere ignorance and conscientious stupidity."
--Martin Luther King Jr.