水曜日, 1月 31, 2007
火曜日, 1月 30, 2007
ISA Perl
--HogeA.pm
package HogeA;
use strict;
sub new {
my $class = shift;
my $self = bless {}, $class;
return $self;
}
sub hoge {
my $self = shift;
print "Hoge::hoge\n";
}
1;
--HogeB1.pm
package HogeB1;
use strict;
use HogeA;
our @ISA = qw ( HogeA );
# use base qw(HogeA);
sub new {
my $class = shift;
my $self = HogeA->new();
return bless $self, $class;
}
sub hogehoge{
print "hogehoge\n";
}
1;
--sample.pl
use strict;
use HogeB1;
my $b = HogeB1->new();
$b->hoge;
--result
Hoge::hoge
月曜日, 1月 29, 2007
Perl, add session info to a tag like PHP
I's easy to add indo to a tag byHTML::StickyQuery
---------------------------
#!/usr/bin/perl
use strict;
use CGI;
use HTML::StickyQuery;
my $session = 12345678;
my $output;
$output =<< "HTML";
<html> <head> <title>Session Test</title> </head> <body> <a href="sample1.pl">link1</a><br> <hr> <a href="sample2.pl">link2</a><br> <hr> </body> </html>
HTML
# create html
my $cgi=CGI->new;
print $cgi->header(-charset=>'UTF-8');
my $stq = HTML::StickyQuery->new;
print $stq->sticky(
scalarref => \$output,
param => { SESSID => $session }
);
--result html--
<a href="sample2.pl?SESSID=12345678">
土曜日, 1月 27, 2007
Windows Live Messanger and Yahoo Messenger
Windows Live Messanger
Add a contact
enter yahoo address on General tab,
type a personal invitation
save
Yahoo Messanger
Add a contact.
enter msn address and newwork is MSN.click next and finish.
Windows Live Messanger
show contact lists. you can see the address, click the address and open the conversation window.
click "Add contact to Allow List".