Bug#435806: manpage example does not work

Jeremiah Foster jeremiah at jeremiahfoster.com
Fri Aug 3 14:21:51 UTC 2007


I actually got the code to work from the CPAN synopsis file (not sure  
where the man page for libole-storage-lite-perl lives).

Here is my working code:

#!/usr/bin/perl

# testing ole::storage_lite

use strict;
use OLE::Storage_Lite;

my $oOl = OLE::Storage_Lite->new("/usr/share/example-content/oo- 
trig.xls");
my $oPps = $oOl->getPpsTree(1);
$oPps->save('./frog.xls');

	Jeremiah

On Aug 3, 2007, at 3:58 PM, gregor herrmann wrote:

> On Fri, 03 Aug 2007 12:22:26 +0200, martin f krafft wrote:
>
>> use OLE::Storage_Lite;
>> use strict;
>> my $oOl = OLE::Storage_Lite->new('test.msg');
>> my $oPps = $oOl->getPpsTree(1);
>> $oPps->save('-');
>>
>> However, if I run it, I get
>>
>> Can't call method "save" on an undefined value at ole.pl line 5.
>>
>> I am not at all a perl coder, but I can't see the reason for the
>> error.
>
> My guess is that OLE::Storage_Lite doesn't like your test.msg.
>
> Looking at /usr/share/doc/libole-storage-lite-perl/examples/smplls.pl
> you could
> * either add a line like
>   die( "test.msg is not a OLE file" ) unless($oPps);
>   before the ->save
> * or run
>   perl /usr/share/doc/libole-storage-lite-perl/examples/smplls.pl  
> test.msg
> to check.
>
> HTH,
> gregor
> -- 
>  .''`.   http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
>  : :' :  debian: the universal operating system - http:// 
> www.debian.org/
>  `. `'   member of https://www.vibe.at/ | how to reply: http:// 
> got.to/quote/
>    `-    NP: Status Quo: A Mess Of The Blues
> _______________________________________________
> pkg-perl-maintainers mailing list
> pkg-perl-maintainers at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/pkg-perl-maintainers





More information about the pkg-perl-maintainers mailing list