Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re^2: RFC: Business::CreditCard::Obscure

by kwaping (Priest)
on Aug 21, 2006 at 18:16 UTC ( #568632=note: print w/replies, xml ) Need Help??

in reply to Re: RFC: Business::CreditCard::Obscure
in thread RFC: Business::CreditCard::Obscure

I understand what you're saying and appreciate the comment. There is something you may be overlooking, though. I would like the user to have the choice of either calling new then obscure, or just going straight to Business::CreditCard::Obscure->obscure(). That's why I have the extra goodies inside that method. The constructor stuff in the new method was mostly just for user convenience to suit their preferred coding style. I'm aiming for maximum effective flexibility.

It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^3: RFC: Business::CreditCard::Obscure
by izut (Chaplain) on Aug 21, 2006 at 18:22 UTC

    I could use the module like this:

    my $obscure = Business::CreditCard::Obscure->new(cardnum => '123456789 +012')->obscure();

    Since it is very specific, why don't you write your module to export a function, like this:

    use Business::CreditCard::Obscure qw(obscure); my $obscure = obscure(cardnum = '123456789012');

    Igor 'izut' Sutton
    your code, your rules.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://568632]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2021-05-11 16:25 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (119 votes). Check out past polls.