What name(space) is suitable for My::Module?

2012-03-09 Thread Narazaka Nanigashi
Hello,

I'm going to release a Perl module for the first time but cannot determine the 
name of the module.
Please suggest some names or let me know a place suitable for asking this issue.

I'm mainly hesitating to decide the namespace of the module.

My module is for input and output of config / BBS log files whose records 
are separated by some delimiters.

I mean config / BBS log files as some tab/comma/etc separated (single 
delimiter) data or '12. [This is the subject] : 2012/02/07 : Article' (multi 
delimiters) data, that is text data consisted of many records of some data 
columns.

I wrote this module to unify methods to input and output these files 
(especially multi delimiters data).
This module will convert the data and raw array reference mutual.(maybe need 
more object-oriented.)

I think BBS:: seems to specialize directions too much and Config:: seems not 
for 2 demention data list.
And the name will be *::Column or *::Delimiters but I'm afraid that I may be 
confusing these words' meaning ...




or... some other module for my purpose already exists?


I hope you'll understand my poor English...

Thanks

-- 
Narazaka Nanigashi p...@narazaka.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: What name(space) is suitable for My::Module?

2012-03-09 Thread Shawn H Corey
On 12-03-09 09:53 AM, Narazaka Nanigashi wrote:
 or... some other module for my purpose already exists?

have you checked out Text::CSV ? I sounds similar to what you're proposing.

-- 
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

It's Mutual Aid, not fierce competition, that's the dominate
force of evolution.  Of course, anyone who has worked in
open source already knows this.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: What name(space) is suitable for My::Module?

2012-03-09 Thread Narazaka Nanigashi
Oh, I missed checking it.

My purpose is to process multiple delimiters, so Text::CSV is not enough... but 
Text::* can be one of the choice of namespace?


On Fri, 09 Mar 2012 10:18:29 -0500
Shawn H Corey shawnhco...@gmail.com wrote:

 On 12-03-09 09:53 AM, Narazaka Nanigashi wrote:
  or... some other module for my purpose already exists?
 
 have you checked out Text::CSV ? I sounds similar to what you're proposing.
 
 -- 
 Just my 0.0002 million dollars worth,
   Shawn
 
 Programming is as much about organization and communication
 as it is about coding.
 
 It's Mutual Aid, not fierce competition, that's the dominate
 force of evolution.  Of course, anyone who has worked in
 open source already knows this.
 
 -- 
 To unsubscribe, e-mail: beginners-unsubscr...@perl.org
 For additional commands, e-mail: beginners-h...@perl.org
 http://learn.perl.org/
 
 


-- 
Narazaka Nanigashi p...@narazaka.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: What name(space) is suitable for My::Module?

2012-03-09 Thread Shawn H Corey

On 12-03-09 10:56 AM, Narazaka Nanigashi wrote:

Oh, I missed checking it.

My purpose is to process multiple delimiters, so Text::CSV is not enough... but 
Text::* can be one of the choice of namespace?


If it involves only text. If it works on other things, like say packed 
strings, then something may be more appropriate.



--
Just my 0.0002 million dollars worth,
  Shawn

Programming is as much about organization and communication
as it is about coding.

It's Mutual Aid, not fierce competition, that's the dominate
force of evolution.  Of course, anyone who has worked in
open source already knows this.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




I'd like to explain to me how to do testing on lists and list slices

2012-03-09 Thread ml
hello the list
hello the perl guru
hello this

I want to know how to work on slices of lists. 
I has 3 slices of the form.
$t[0] = user;
$t[1] = ip; 
$t[2] = time();

the registration of the list are checked by me
I know what the file contains
and recording are separated by a space (/\s+/)
I would like to test on how many times a user or an ip c is connected
via the time value and authorize or not the execution of the following
function

I'd like to explain to me how to do testing on lists and list slices

sincerely
-- 
http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0xC2626742
 gpg --keyserver pgp.mit.edu --recv-key C2626742

 http://urlshort.eu fakessh @
 http://gplus.to/sshfake
 http://gplus.to/sshswilting
 http://gplus.to/john.swilting
 https://lists.fakessh.eu/mailman/
 This list is moderated by me, but all applications will be accepted
 provided they receive a note of presentation


signature.asc
Description: Ceci est une partie de message numériquement signée


Re: What name(space) is suitable for My::Module?

2012-03-09 Thread Narazaka Nanigashi
On Fri, 09 Mar 2012 11:14:25 -0500
Shawn H Corey shawnhco...@gmail.com wrote:

 On 12-03-09 10:56 AM, Narazaka Nanigashi wrote:
  Oh, I missed checking it.
 
  My purpose is to process multiple delimiters, so Text::CSV is not enough... 
  but Text::* can be one of the choice of namespace?
 
 If it involves only text. If it works on other things, like say packed 
 strings, then something may be more appropriate.
 

My current method of splitting columns by delimiters is simple regular 
expressions supposing only text data.
It looks interesting to involve packed strings or some but must need more tests.

And, in my thinking, multiple column is for convenience of human reading so 
such as '42 [SnVzdA==] 416e6f74686572 / ...' may not be wanted...

-- 
Narazaka Nanigashi p...@narazaka.net

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




insert a . every four characters

2012-03-09 Thread Noah

Hi there,

I am trying to insert a '.' every four characters.  Say I have a $it = 
'123456789012' and want the result to be '1234.5678.9012'


whats one of the smoothest ways to do that?


Cheers,
Noah

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: insert a . every four characters

2012-03-09 Thread Noah

On 3/9/12 8:37 PM, Noah wrote:

Hi there,

I am trying to insert a '.' every four characters. Say I have a $it =
'123456789012' and want the result to be '1234.5678.9012'

whats one of the smoothest ways to do that?



okay I answered my own question.  I am wondering if there is a different 
way?


I did:

$it =~ s/(\S{4})/$1\./g;



Cheers,
Noah





Cheers,
Noah




--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: What name(space) is suitable for My::Module?

2012-03-09 Thread David Christensen

On 03/09/2012 06:53 AM, Narazaka Nanigashi wrote:

I'm going to release a Perl module for the first time but cannot determine the 
name of the module.

...

My module is for input and output of config / BBS log files whose records 
are separated by some delimiters.


Please see:

http://www.cpan.org/misc/cpan-faq.html#How_contribute_modules

http://www.cpan.org/modules/04pause.html


I suggest that you pick a working name, package your distribution per 
CPAN conventions, make the code available on a public server (tarball, 
Git or Mercurial repository, etc.), and then post to modu...@perl.org 
with a request for advice and a link to your code.



 or... some other module for my purpose already exists?

Have you tried browsing or searching CPAN?

http://www.cpan.org/

http://search.cpan.org/


HTH,

David

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




[ask] oracle date

2012-03-09 Thread Eko Budiharto

dear list,
I have a date data extracted from oracle, stored as this 1993-11-30 
00:00:00. The datatype in the oracle is date. I would like to save into 
mysql (the datatype is also date), I got an error. When I do a small 
debug, I print the date directly, it comes out into 30-NOV-93. I am 
trying to use date::manip, time::format, date::format, it still got an 
error and cannot be saved into mysql.


Please help to tell me how to convert the date format and can be stored 
into mysql. Thanks.



Eko

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Of Date-Manip and Perl versions

2012-03-09 Thread David Christensen

On 03/08/2012 11:53 AM, Bruce Ferrell wrote:

Just thought I'd share with the group and experience I just had.  In perhaps 
the hope of sparing others of the PITA I just went through.

...
 use Common;  # contains timestamp()
 use Date::Manip;
...
 Shouldn't this have thrown SOME kind of error/warning what was going on?

You might want to make that suggestion to the module maintainer:

https://rt.cpan.org/Public/Dist/Display.html?Name=Date-Manip


Ultimately, the only way to protect yourself against changes in modules 
and/or Perl itself is to write (and run) regression tests.



 In circuit the code runs as a daemon and errors aren't easy to get at.

Log::Log4perl is very useful in general, and has special features for 
debugging running services:


http://search.cpan.org/~mschilli/Log-Log4perl-1.36/lib/Log/Log4perl.pm


HTH,

David

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: Of Date-Manip and Perl versions

2012-03-09 Thread Bruce Ferrell
On 03/09/2012 09:45 PM, David Christensen wrote:
 On 03/08/2012 11:53 AM, Bruce Ferrell wrote:
 Just thought I'd share with the group and experience I just had.  In perhaps 
 the hope of sparing others of the PITA I just went through.
 ...
  use Common;  # contains timestamp()
  use Date::Manip;
 ...
  Shouldn't this have thrown SOME kind of error/warning what was going on?

 You might want to make that suggestion to the module maintainer:

 https://rt.cpan.org/Public/Dist/Display.html?Name=Date-Manip


 Ultimately, the only way to protect yourself against changes in modules 
 and/or Perl itself is to write (and run) regression tests.


  In circuit the code runs as a daemon and errors aren't easy to get at.

 Log::Log4perl is very useful in general, and has special features for 
 debugging running services:

 http://search.cpan.org/~mschilli/Log-Log4perl-1.36/lib/Log/Log4perl.pm


 HTH,

 David

Thanks David. 
Very helpful suggestions.  Ultimately it turned out there were multiple errors 
on my part that were significant contributors to the situation.  Too late at 
night coding is my only
excuse.


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: [ask] oracle date

2012-03-09 Thread Octavian Rasnita
From: Eko Budiharto eko.budiha...@gmail.com
Subject: [ask] oracle date


 dear list,
 I have a date data extracted from oracle, stored as this 1993-11-30 
 00:00:00. The datatype in the oracle is date. I would like to save into 
 mysql (the datatype is also date), I got an error. When I do a small 
 debug, I print the date directly, it comes out into 30-NOV-93. I am 
 trying to use date::manip, time::format, date::format, it still got an 
 error and cannot be saved into mysql.
 
 Please help to tell me how to convert the date format and can be stored 
 into mysql. Thanks.
 
 
 Eko



After you connect to Oracle, you need to send the following sql queries in 
order to changed the format in which it returns the date fields:

alter session set nls_date_format = '-MM-DD HH24:MI:SS';
alter session set nls_timestamp_format = '-MM-DD HH24:MI:SS.FF';
alter session set nls_timestamp_tz_format='-MM-DD HH24:MI:SS.FF TZHTZM';

After you do this, the dates will be returned in the same format as the one 
used by MySQL, so you don't need any Perl module to parse the date fields.

Octavian







--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: insert a . every four characters

2012-03-09 Thread Owen

 On 3/9/12 8:37 PM, Noah wrote:
 Hi there,

 I am trying to insert a '.' every four characters. Say I have a $it
 =
 '123456789012' and want the result to be '1234.5678.9012'

 whats one of the smoothest ways to do that?


 okay I answered my own question.  I am wondering if there is a
 different
 way?

 I did:

 $it =~ s/(\S{4})/$1\./g;



What is there is only, say 11 characters? Or doesn't that situation arise



 --
Owen


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/




Re: insert a . every four characters

2012-03-09 Thread Jim Gibson

At 8:37 PM -0800 3/9/12, Noah wrote:

Hi there,

I am trying to insert a '.' every four characters.  Say I have a $it 
= '123456789012' and want the result to be '1234.5678.9012'


whats one of the smoothest ways to do that?


You could adapt the method suggested by 'perldoc -q commas' How can 
I output my numbers with commas added?



--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/