f



Using Tcl::Tk Module with Tcl/Tk 8.5

Not sure if this is the right place for this question, as it is with
relation to the Tcl::Tk module, rather than Perl/Tk specifically.

I'd like to use Tcl::Tk with Tcl/Tk 8.5 rather than 8.4. To that end,
on a clean Debian Testing system I have installed only Tcl/Tk 8.5 and
also finally managed to install the Tcl::Tk module.

I was having problems installing the Tcl-0.95 module, which Tcl::Tk
depends on, but fixed it with a specific include path call:

>sudo perl Makefile.PL --tclsh /usr/bin/tclsh8.5 --tclconfig /usr/lib/tcl8.5/tclConfig.sh --include /usr/include/tcl8.5

Following on from this Tcl::Tk also then installed without error.

However, now my Perl script fails to execute. The error I receive is:

String found where operator expected at
/usr/local/share/perl/5.10.0/Tcl/Tk.pm line 575, near
"Carp::croak 'Usage: $interp = new Tcl::Tk($display)'"
(Do you need to predeclare Carp::croak?)
syntax error at /usr/local/share/perl/5.10.0/Tcl/Tk.pm
line 575, near "Carp::croak 'Usage: $interp = new
Tcl::Tk($display)'"
BEGIN not safe after errors--compilation aborted at
/usr/local/share/perl/5.10.0/Tcl/Tk.pm line 700.
Compilation failed in require at vidcap.pl line 3.
BEGIN failed--compilation aborted at vidcap.pl line 3.

Not sure what to do here. I've had a look at line 575 in Tk.pm for
obvious errors. There actually was not a semicolon at the end of that
line. I added one, but the error just changed to:

String found where operator expected at /usr/local/share/perl/5.10.0/
Tcl/Tk.pm line 576, near "Carp::croak 'Usage: $interp = new
Tcl::Tk([$display])'"
	(Do you need to predeclare Carp::croak?)
syntax error at /usr/local/share/perl/5.10.0/Tcl/Tk.pm line 576, near
"Carp::croak 'Usage: $interp = new Tcl::Tk([$display])'"
BEGIN not safe after errors--compilation aborted at /usr/local/share/
perl/5.10.0/Tcl/Tk.pm line 701.
Compilation failed in require at vidcap.pl line 3.
BEGIN failed--compilation aborted at vidcap.pl line 3.

Any ideas would be most appreciated, because frankly I have none.

0
PhillC
5/20/2008 9:51:20 PM
comp.lang.perl.tk 4721 articles. 0 followers. pharrendorf (19) is leader. Post Follow

5 Replies
1092 Views

Similar Articles

[PageSpeed] 44

PhillC wrote:
> Not sure if this is the right place for this question, as it is with
> relation to the Tcl::Tk module, rather than Perl/Tk specifically.
> 
> I'd like to use Tcl::Tk with Tcl/Tk 8.5 rather than 8.4. To that end,
> on a clean Debian Testing system I have installed only Tcl/Tk 8.5 and
> also finally managed to install the Tcl::Tk module.
> 
> I was having problems installing the Tcl-0.95 module, which Tcl::Tk
> depends on, but fixed it with a specific include path call:
> 
> 
>>sudo perl Makefile.PL --tclsh /usr/bin/tclsh8.5 --tclconfig /usr/lib/tcl8.5/tclConfig.sh --include /usr/include/tcl8.5
> 
> 
> Following on from this Tcl::Tk also then installed without error.
> 
> However, now my Perl script fails to execute. The error I receive is:
> 
> String found where operator expected at
> /usr/local/share/perl/5.10.0/Tcl/Tk.pm line 575, near
> "Carp::croak 'Usage: $interp = new Tcl::Tk($display)'"
> (Do you need to predeclare Carp::croak?)
> syntax error at /usr/local/share/perl/5.10.0/Tcl/Tk.pm
> line 575, near "Carp::croak 'Usage: $interp = new
> Tcl::Tk($display)'"
> BEGIN not safe after errors--compilation aborted at
> /usr/local/share/perl/5.10.0/Tcl/Tk.pm line 700.
> Compilation failed in require at vidcap.pl line 3.
> BEGIN failed--compilation aborted at vidcap.pl line 3.
> 
> Not sure what to do here. I've had a look at line 575 in Tk.pm for
> obvious errors. There actually was not a semicolon at the end of that
> line. I added one, but the error just changed to:
> 
> String found where operator expected at /usr/local/share/perl/5.10.0/
> Tcl/Tk.pm line 576, near "Carp::croak 'Usage: $interp = new
> Tcl::Tk([$display])'"
> 	(Do you need to predeclare Carp::croak?)
> syntax error at /usr/local/share/perl/5.10.0/Tcl/Tk.pm line 576, near
> "Carp::croak 'Usage: $interp = new Tcl::Tk([$display])'"
> BEGIN not safe after errors--compilation aborted at /usr/local/share/
> perl/5.10.0/Tcl/Tk.pm line 701.
> Compilation failed in require at vidcap.pl line 3.
> BEGIN failed--compilation aborted at vidcap.pl line 3.
> 
> Any ideas would be most appreciated, because frankly I have none.
> 


Sounds like Tk.pm is missing a "use Carp;" statement.
** Posted from http://www.teranews.com **
0
smallpond
5/21/2008 2:39:11 PM
On 21 May, 15:39, smallpond <smallp...@juno.com> wrote:
> Sounds like Tk.pm is missing a "use Carp;" statement.
>

Adding use Carp; to Tk.pm results in the following:

Can't locate Carp/croak.pm in @INC (@INC contains: /etc/perl /usr/
local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/
share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/
site_perl .) at vidcap.pl line 5.
BEGIN failed--compilation aborted at vidcap.pl line 5.

Perhaps there's something wrong with my Perl installation. However,
removing and then re-installing effects too many dependencies. Any
further ideas?



0
PhillC
5/22/2008 7:00:01 PM
PhillC wrote:
> On 21 May, 15:39, smallpond <smallp...@juno.com> wrote:
> 
>>Sounds like Tk.pm is missing a "use Carp;" statement.
>>
> 
> 
> Adding use Carp; to Tk.pm results in the following:
> 
> Can't locate Carp/croak.pm in @INC (@INC contains: /etc/perl /usr/
> local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/
> share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/
> site_perl .) at vidcap.pl line 5.
> BEGIN failed--compilation aborted at vidcap.pl line 5.
> 
> Perhaps there's something wrong with my Perl installation. However,
> removing and then re-installing effects too many dependencies. Any
> further ideas?
> 
> 
> 

I'm guessing from the error messages that Carp.pm is an empty file or
not readable.  What type of system are you on and how did you install perl?
--S
** Posted from http://www.teranews.com **
0
smallpond
5/22/2008 8:48:15 PM
On 22 May, 21:48, smallpond <smallp...@juno.com> wrote:
> PhillC wrote:
> > On 21 May, 15:39, smallpond <smallp...@juno.com> wrote:
>
> >>Sounds like Tk.pm is missing a "use Carp;" statement.
>
> > Adding use Carp; to Tk.pm results in the following:
>
> > Can't locate Carp/croak.pm in @INC (@INC contains: /etc/perl /usr/
> > local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr/
> > share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/
> > site_perl .) at vidcap.pl line 5.
> > BEGIN failed--compilation aborted at vidcap.pl line 5.
>
> > Perhaps there's something wrong with my Perl installation. However,
> > removing and then re-installing effects too many dependencies. Any
> > further ideas?
>
> I'm guessing from the error messages that Carp.pm is an empty file or
> not readable.  What type of system are you on and how did you install perl?
> --S

I'm on Debian Lenny and Perl was installed during the distribution
install. I haven't installed Perl manually.


0
PhillC
5/28/2008 8:44:11 PM
On 28 May, 21:44, PhillC <phillcla...@gmail.com> wrote:
> On 22 May, 21:48, smallpond <smallp...@juno.com> wrote:
>
>
>
> > PhillC wrote:
> > > On 21 May, 15:39, smallpond <smallp...@juno.com> wrote:
>
> > >>Sounds like Tk.pm is missing a "use Carp;" statement.
>
> > > Adding use Carp; to Tk.pm results in the following:
>
> > > Can't locate Carp/croak.pm in @INC (@INC contains: /etc/perl /usr/
> > > local/lib/perl/5.10.0 /usr/local/share/perl/5.10.0 /usr/lib/perl5 /usr=
/
> > > share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/
> > > site_perl .) at vidcap.pl line 5.
> > > BEGIN failed--compilation aborted at vidcap.pl line 5.
>
> > > Perhaps there's something wrong with my Perl installation. However,
> > > removing and then re-installing effects too many dependencies. Any
> > > further ideas?
>
> > I'm guessing from the error messages that Carp.pm is an empty file or
> > not readable. =A0What type of system are you on and how did you install =
perl?
> > --S
>
> I'm on Debian Lenny and Perl was installed during the distribution
> install. I haven't installed Perl manually.


            I have found the solution to this after much Googling. It
doesn't make sense, but everything now works.

            Answer is on this page:

            http://search.cpan.org/src/TLINDEN/Config-General-2.31/General.p=
m

            Specific text is:

            # on debian with perl > 5.8.4 croak() doesn't work anymore
without this.
            # There is some require statement which dies 'cause it
can't find Carp::Heavy,
            # I really don't understand, what the hell they made, but
the debian perl
            # installation is definetly bullshit, damn!
            use Carp::Heavy;

            Not sure why this works, but my application now launches.
seems like the necessary modules were installed but something else is
not right.
0
PhillC
6/3/2008 4:08:28 PM
Reply:

Similar Artilces:

Perl/Tk and Tk 8.5
Is there any word on when the enhancements in Tk 8.5 (Tiles, themes, better-looking widgets) will be made available in the Perl/Tk port? I know that ActiveState has made some of this available for awhile in the "Tkx" module, but I'm interested in cross-platform support and am wondering when 8.5 will be incorporated in the base "Tk" port module. [Cross-posted to comp.lang.perl.tk with follow-ups set to go there.] Steve wrote: > Is there any word on when the enhancements in Tk 8.5 (Tiles, themes, > better-looking widgets) will be made available in the P...

[TCL/TK interface] Passing variable to TCL/TK
Hi, I am trying to sent to a variable to tcl/tk and unify there it with a string. I wrote the prolog code: :- use_module(library(tcltk)). :- use_package(classic). go(A):- tk_new([name('Simple')], Tcl), tcl_eval(Tcl, 'source simple2.tcl', _), tcl_eval(Tcl, ['ask', br(write(A))], _), tk_main_loop(Tcl), tcl_delete(Tcl). and the tcl file simple2.tcl proc ask {var} { unify_term $var my_value } unfortunatelly when I query for go(S). the interpeter goes into a loop (!?). Where I am wrong. Are there any example code somewhere i...

perl tk equivilent to Tcl/Tk fitToContents
Is there a perlTk equivilent to the TclTk fitToContents command you can run on a window. By default it seems that it automatically dits to contents for me, until a user does a manual resize, then it stops... Randell Pelak wrote: > Is there a perlTk equivilent to the TclTk fitToContents command you > can run on a window. By default it seems that it automatically dits > to contents for me, until a user does a manual resize, then it stops... So once the user sets the window the way they want, you're going to change it? Not very user friendly. You could just make the ...

Tcl/Tk to Perl/TK Translation Problem
Hello, I am having problems translating the following tcl/tk code to perl/tk: ============ tcl code ============ label .controls.sizel -text "Size:" grid .controls.quall .controls.quallo .controls.qual .controls.qualhi -sticky ew grid .controls.sizel .controls.sizesm .controls.size .controls.sizelg -sticky ew grid .controls.colorl .controls.color -sticky ew grid configure .controls.color -columnspan 3 grid configure .controls.quall .controls.sizel .controls.colorl -sticky e grid configure .controls.quallo .controls.sizesm -sticky e grid configure .controls.qualh...

Using the XCode tools on Mac OSX to compile tcl/tk 8.5.5 C application ...
I've compiled and linked 8.5.5 on Mac OS X 10.4.11 using the Xcode tools as provided by the OS, and that all went just fine and dandy. I can bring up the tclsh8.5, and puts $tcl_patchLevel tells me that I've arrived, likewise with wish8.5 reporting a tcl_patchLevel of 8.5.5 as well, and it works OK. My problem is linking a trivial C application which creates a single ttk::button which links and runs just fine on FreeBSD (various), and Linux (32 bit and 64 bit), as well as Windows. I cannot for the life of me find either the libtk8.5.dylib or libtk8.5.a file on that platform, and so...

Re: Tcl/Tk to Perl/TK Translation Problem
Philippe de Rochambeau <philippe@wwphi.net> wrote: > Hello, > > I am having problems translating the following tcl/tk code to perl/tk: > > ============ tcl code ============ > label .controls.sizel -text "Size:" > > grid .controls.quall .controls.quallo .controls.qual .controls.qualhi > -sticky ew > grid .controls.sizel .controls.sizesm .controls.size .controls.sizelg > -sticky ew > grid .controls.colorl .controls.color -sticky ew > grid configure .controls.color -columnspan 3 > grid configure .controls.quall .control...

Perl::Tk vs Tcl::Tk vs Tkx vs ...?
Hi all, thanks to Jeff's response i got insight into other possibilities than Perl::Tk. differences between Perl::Tk and both other modules are obvious. i've read some materials about Tcl::Tk and Tkx and for me it seems they are very similar. could you please point some differences? benefits? etc.? for me it seems both are trying to use Tcl as a middle tier to avoid producing tones of code - simpler maintainance, thin layer, more up to date. unfortunately as i understood it is impossible to reuse Tk::* modules written especially for Perl::Tk but on the other hand it is possibl...

Tcl/Tk 8.5.8 RELEASED
Tcl/Tk 8.5.8 Release Announcement November 16, 2009 The Tcl Core Team is pleased to announce the 8.5.8 releases of the Tcl dynamic language and the Tk toolkit. This is the eighth patch release of Tcl/Tk 8.5. More details can be found below. We would like to express our gratitude to all those who submit bug reports and patches. This information is invaluable in enabling us to identify and eliminate problems in the core. Where to get the new releases: ------------------------------ Tcl/Tk 8.5.8 sources are freely available as open source from the Tcl Developer Xchange web site at: ...

Tcl/Tk 8.5.5 RELEASED
Tcl/Tk 8.5.5 Release Announcement October 15, 2008 The Tcl Core Team is pleased to announce the 8.5.5 releases of the Tcl dynamic language and the Tk toolkit. This is the fifth patch release of Tcl/Tk 8.5. More details can be found below. We would like to express our gratitude to all those who submit bug reports and patches. This information is invaluable in enabling us to identify and eliminate problems in the core. Where to get the new releases: ------------------------------ Tcl/Tk 8.5.5 sources are freely available as open source from the Tcl Developer Xchange web site at: ...

iso: tcl/tk 8.5.4 or so developers using iwidgets
A developer contacted me this week with this peculiar siutation. The environment is software running on sparc solaris 10 systems and the gnome environment, displaying back to windows xp (running hummingbird x server) and the VirtuaWin desktop. About 3 weeks ago, he began seeing this: --- All of a sudden, widgets began to not build correctly in multi-widget GUIs. Certain pop-up toplevels with megawidgets =96 particularly entryfields and scrolledlistboxes - would have to be dismissed and re- created several times to appear correctly. The most common error was failure to widen ent...

Tcl/Tk 8.5.8 Release Candidates
Release Candidate downloads of the 8.5.8 releases of Tcl and Tk may now be found at ftp://ftp.tcl.tk/pub/tcl/tcl8_5/ The actual releases of these files should come on Monday, Nov. 16. Until then, enjoy this advance preview, and if you find anything catastrophically wrong with them, please inform me so we can fix the problem before the true release. Thanks! DGP Donald G Porter wrote: > > Release Candidate downloads of the 8.5.8 releases of Tcl and Tk may > now be found at > > ftp://ftp.tcl.tk/pub/tcl/tcl8_5/ You may also want to take a look at the draft release ...

tcl/tk 8.5 side 8.4
Hello i run windows vista familiy. I code with Tcl/Tk 8.4 with no problem. I would like to know if i can install Tcl/Tk 8.5 to test certain new possibilities without un-installing Tcl/Tk 8.4 ? thank you for help jerome groupeCompteRendu@gmail.com wrote: > Hello > i run windows vista familiy. I code with Tcl/Tk 8.4 with no problem. > I would like to > know if i can install Tcl/Tk 8.5 to test certain new possibilities > without un-installing > Tcl/Tk 8.4 ? > thank you for help > jerome Yes -- +------------------------------------------------------------------------+...

Proposed Modules: Tk::MDTextBook (renamed: Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTk)
A set of modules that allow easy mixing of code types to be interpretted as a Tk application... The input is in MIME-multipart/mixed format, and easy entity can be markdown (displayed formatted in a Text with options to add Tk windows and behaviours), perl (eval()ed), yaml (structure made available to app) or menu in yaml (posted on main mindow). The purpose of this is to contribute to a compiled program (for Windows/Mac/Linux) that can run appended scripts in this format. The reason for having this format is that resources can be included in the one file. The Markdown stuff...

Tcl/Tk 8.5 again
In another thread, http://groups.google.co.uk/group/comp.lang.tcl/browse_thread/thread/1d8aa360e29cd75c/ George Peter Staplin wrote: > Kevin Penrose wrote: >> >> I'm sure this is an old, old, old question, (and I've searched the group >> but I get too many matches with too many discussions of alpha versions), >> but can someone tell me what the status is of 8.5? Are we in beta, >> release candidate or alpha mode still? > > Last I heard; still alpha. I asked last week. > >> Have we a date for final release? > > Not AFAIK. >...

Web resources about - Using Tcl::Tk Module with Tcl/Tk 8.5 - comp.lang.perl.tk

Resources last updated: 2/2/2016 12:58:56 PM