thanks but no - pppd with the 'demand' option sets up a virtual interface that is 'up'
But you can easily see that, because the configured IP adress is a private or invalid (depends on pppd and the configuration, on my gateway it'a a 192.168.) one, while it surely isn't once a connection is established. So checking the ifconfig output, conviniently done using Net::Ifconfig::Wrapper, check the ip-adress for validity/privateness and your done.
If you have a difficult task, give it to a lazy person --
they will find an easier way to do it.