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

Re: Error.pm deprecated






On Sat, May 17, 2014 at 8:59 AM, <..hidden..> wrote:
In that file I see stuff like:
$payment->error("Invalid Payment Amount Option");

So i am guessing $payment has an error object? Anywhere pm $payment is
used will depend on Error.pm

Not really.  This calls essentially a version of the old SL::Form->error() function.  In 1.4 these should just be replaced with a simple die or croak. 

What is the plan for good old Form.pm? I never had a problem with
$form->error or whatever.

yeah.  $payment just inherits this from Form.  However in 1.4, we catch dies and redirect them there, so it makes code more modular to just use die.

Best Wishes,
Chris Travers 

Cheers
turtle

> grepping code with 'use.*Error'
> i only see it in
>
> ./LedgerSMB/Scripts/payment.pm:use Error;
>
> 2014-05-17 5:49 GMT+02:00  <..hidden..>:
>>> Hi All,
>>>    I've added some debug generation to the error handling, but it's
>>> conflicting with Error.pm on occasion which is annoying. Looking at
>>> Error.pm, it has been deprecated because if various odd issues with it:
>>>
>>>
>>>   WARNING ^
>>>   <http://search.cpan.org/%7Eshlomif/Error-0.17022/lib/Error.pm#___top>
>>>
>>> Using the "Error" module is *no longer recommended* due to the
>>> black-magical nature of its syntactic sugar, which often tends to
>>> break.
>>> Its maintainers have stopped actively writing code that uses it, and
>>> discourage people from doing so. See the "SEE ALSO" section below for
>>> better recommendations.
>>>
>>>
>>> I've noticed that a lot of CPAN modules use Try::Tiny these days
>>> instead.
>>>
>>>
>>> Lyle
>>>
>>> ------------------------------------------------------------------------------
>>> Start Your Social Network Today - Download eXo Platform
>>> Build your Enterprise Intranet with eXo Platform Software
>>> Java Based Open Source Intranet - Social, Extensible, Cloud Ready
>>> Get Started Now And Turn Your Intranet Into A Collaboration Platform
>>> http://p.sf.net/sfu/ExoPlatform_______________________________________________
>>> Ledger-smb-devel mailing list
>>> ..hidden..
>>> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>>>
>> Interesting
>> I see 1.4 uses it in Makefile.PL
>> Can you point me to where it actually calls Error.pm ?
>> cheers
>> --turtle
>>
>>
>> ------------------------------------------------------------------------------
>> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
>> Instantly run your Selenium tests across 300+ browser/OS combos.
>> Get unparalleled scalability from the best Selenium testing platform
>> available
>> Simple to use. Nothing to install. Get started now for free."
>> http://p.sf.net/sfu/SauceLabs
>> _______________________________________________
>> Ledger-smb-devel mailing list
>> ..hidden..
>> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>
> ------------------------------------------------------------------------------
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform
> available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> _______________________________________________
> Ledger-smb-devel mailing list
> ..hidden..
> https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
>



------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel



--
Best Wishes,
Chris Travers

Efficito:  Hosted Accounting and ERP.  Robust and Flexible.  No vendor lock-in.
http://www.efficito.com/learn_more
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Ledger-smb-devel mailing list
..hidden..
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel