[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] BBEdit 5.1/MacPerl and STDOUT



I ran across something with BBEdit 5.1/MacPerl the other day.  I sent an 
email to Bare Bones and today got a response.  My apologies if this has 
already been posted, but if not, it might save others some time trying to 
figure out what's going on.

Regards,
Will

Here's my email and Bare Bone's response embedded within:

> When you run a MacPerl script directly from BBEdit 5.1 using the new
> PERL Palette Run option, if the script happens to print to STDOUT, the
> output will go to another BBEdit Window called "MacPerl Output".  I
> never saved this output in the past, but this time accidently saved it
> just after closing the window without realizing it.  (it asks you if you
> want to save the changes to MacPerl Output - I've always done a shortcut
> for Don't Save: cmd-D).  If you do happen to save the output, it places
> it in the BBEdit Application Folder (BBEdit 5.0:MacPerl Support:MacPerl
> Output).  If you run the same script again, it appends to the same file
> you just saved - your output will thus contain the old output plus your
> new output.
> 
> I had no idea what was happening... my output kept showing the output I
> had saved (without knowing it), plus my new output!  I stared at my code
> for quite a while that evening.
> 
> The MacPerl application does not prompt you if you close the STDOUT
> window, however, if you choose to save it, it will ask you where to put
> the file. BBEdit 5.1 does not prompt you where to put the file.  Is
> there a BBEdit 5.1 preference I'm missing here, or is this something
> that just works this way? 

It just works that way.

> I would like to notify the MacPerl list to save others from spending the
> time to figure this one out.  (Also, the MacPerl application does not
> appear to append output if you saved your output as BBEdit 5.1 does).

Yes, this is purely a behaviour of BBEdit's particular Perl integration.
If you run a perl script without first clearling STDOUT, the output of the
script will be appended to the content of STDOUT. If you happen to save
the STDOUT file then new STDOUT windows will open with the saved content
plus any new output.

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org